On Jan 28, 2021, at 2:45 PM, 'Fausto Arinos de A. Barbuto' via fipy <fi...@list.nist.gov> wrote:
Hi,
Is it OK to define the contour of an irregular shape based on its (X,Y)coordinates only, e.g.:
X, Y = mesh.faceCenters
L1 = (X == 0.000) & (Y <= 0.025)L2 = (X == 0.025) & (Y >= 0.025)T1 = (X <= 0.025) & (Y == 0.025)T2 = (X >= 0.025) & (Y == 0.200)B1 = (X <= 0.300) & (Y == 0.000)B2 = (X >= 0.300) & (Y == 0.050)R1 = (X == 0.300) & (Y <= 0.050)R2 = (X == 0.500) & (Y >= 0.050)
that is, without caring about mesh.facesLeft, mesh.facesBottom etc? Ifind it easier (albeit sillier, too) this way, sometimes.
A comment about FiPy's mesh generator function Gmsh2D. It allows one todefine line labels such as:
Physical Line("L1") = {8};Physical Line("B1") = {1};Physical Line("B2") = {3};...
Yet I wasn't able to use those line label definitions directly, like:
phi = CellVariable(name="phi(x,y)", mesh=mesh, value=0.0, hasOld=True)
phi.constrain(10.0, L1)phi.constrain(0.0, L2)phi.faceGrad.constrain(0.0, R1)
and so on and so forth? Do I still have to define the contour as shownat the beginning of this message? I get error messages saying that L1,L2, etc, weren't defined.
On Thursday, January 28, 2021, 07:46:53 p.m. GMT-3, 'Guyer, Jonathan E. Dr. (Fed)' via fipy <fi...@list.nist.gov> wrote:> You need to write: