On Mon, Jun 23, 2014 at 12:13 PM, Ronghai Wu <ronghai...@fau.de> wrote: > Hello, > > I would like to implement "partial derivative of u with respect to x + > partial derivative of v with respect to y = a constant" at boundaries. Is it > possible in Fipy? Thanks in advance. > > or maybe something similar as > mesh = Grid2D(dx=dx,dy=dy,nx=nx,ny=ny) > > u = CellVariable(mesh=mesh, hasOld=1, rank=0) > v = CellVariable(mesh=mesh, hasOld=1, rank=0) > (u.faceGrad[0] + v.faceGrad[1]).constrain(1., where=mesh.exteriorFaces)
The above syntax certainly won't work. The best way to do this would be with source terms that add directly to the equations. Constraints are not that sophisticated. How this is implemented depends on the equations you are solving and which equation the boundary condition is applied so you'll need to supply some more details. -- Daniel Wheeler _______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]