[I sent this reply to Julien, but neglected to send it to list. The new list 
server defaults to reply-to-poster, which I prefer, but it's easy to forget 
after so long]


On Oct 19, 2011, at 12:46 PM, Julien Derr wrote:

> the boundary conditions are defined by a source term (value c20 )in a 
> circular region : 
> and a null value on the outside, 
> 
> 
> X, Y = mesh.getFaceCenters()
> XX = FaceVariable(mesh=mesh, value=X)
> YY = FaceVariable(mesh=mesh, value=Y)
> sourcec2 =  ((XX-CX)**2+(YY-CY)**2 <= Rstart**2 )

Are these faces interior to the mesh? .constrain() is not supported for 
internal boundary conditions.

> c2.constrain(c20, where=sourcec2)
> BCsforc2 = FixedValue(faces=mesh.getExteriorFaces(), value=0)

I don't recommend combining .constrain() and old-style `FixedValue` boundary 
conditions. Choose one or the other.

-----------------------------------


On Oct 19, 2011, at 1:39 PM, Julien Derr replied:

> Thanks Jonathan, 
> I put all the conditions via constrain, but the result is the same.

OK, not surprising. As I said, I don't recommend mixing .constrain() and 
FixedValue(), but I don't know for a fact that they don't work together.

> what do you mean by faces interior to the mesh? I have a 2D mesh, and I 
> wanted to constrain a full circle in the middle of the mesh, so yes in a way 
> it is not the outside boundary of the mesh...

Yes, exactly.

> what is the alternative ? I guess using an implicit plus an explicit source 
> directly in the equation?

Yes, that's the recommended procedure.

> I am still confused with the syntax fipy is using, where can I find 
> documentation about the syntax ? 

Syntax with respect to what?


_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy]

Reply via email to