Hi Jon,

Thanks for answering that. However, I am afraid I am not fully understand
how "physicalFaces" field for gmsh mesh could help me resolve this one.

The "physicalFaces" field, If I understand correctly, is giving me the
Physical Line (not Physical Surface) that I specified in gmsh. Thus, this
is giving me the faces index on that specific line I specified in gmsh.
What I want to achieve is that is there any function that takes sub-domain
name as input (in my case "Physical Surface("top")) give me all the faces
in this domain (not just faces on one line).

If I just use mesh.physicalFaces["Top"], it will just return error because
"Top" in my case is a "Physical Surface" not a "Physical Line".

Any help will be appreciated. Thanks.

Zhekai

On Fri, May 12, 2017 at 8:54 AM, Guyer, Jonathan E. Dr. (Fed) <
[email protected]> wrote:

> There is also a .physicalFaces field defined for a gmsh mesh.
>
> > On May 11, 2017, at 6:39 PM, Zhekai Deng <zhekaideng2014@u.
> northwestern.edu> wrote:
> >
> > Hi All,
> >
> > I wonder is there any way to specify the FaceVariable based on the
> naming from gmsh ?  For example, I name my sub domain in gmsh as "top" and
> "bottom". In Fipy, I would like to do something similar to following:
> >
> > velocityX_Top = (1-Epsilon*Epsilon)/(Epsilon*Epsilon)*(yFace +
> Epsilon*np.sqrt(1-xFace*xFace))
> > velocityY_Top = (1-Epsilon*Epsilon)/Epsilon*(
> xFace*yFace)/(np.sqrt(1-xFace*xFace))
> > velocityX_Bottom = yFace
> > velocityY_Bottom = -xFace
> >
> > velocityVector = FaceVariable(mesh=mesh.physicalCells["top"], rank=1)
> > velocityVector[0] = velocityX_Top
> > velocityVector[1] = velocityY_Top
> >
> > velocityVector = FaceVariable(mesh=mesh.physicalCells["bottom"], rank=1)
> > velocityVector[0] = velocityX_Bottom
> > velocityVector[1] = velocityY_Bottom
> >
> > I think it gives me error because the mesh.physicalCells is cell index,
> not face index. But is there any way I could do get all face index using
> sub domain ID?
> >
> > I have attached the complete and minimal code to demonstrate what I try
> to achieve.
> >
> > Thanks!
> >
> > Zhekai
> >
> > <example.py>_______________________________________________
> > fipy mailing list
> > [email protected]
> > http://www.ctcms.nist.gov/fipy
> >  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
>
>
> _______________________________________________
> fipy mailing list
> [email protected]
> http://www.ctcms.nist.gov/fipy
>   [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
>
_______________________________________________
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