On Mon, Jul 2, 2018 at 3:16 PM, Zhekai Deng
<zhekaideng2...@u.northwestern.edu> wrote:
> Hi Daniel,
>
> Thanks for the pointed sources. I think I still need some help on how to
> setup my boundary at irregular triangular gmsh. Even though the locations of
> my boundary conditions are simple (two straight lines inclined with fixed
> degree), my mesh generated from gmsh is triangular and irregular. Thus, my
> boundary location lines are not fully aligned with the face edges in the
> mesh. I wonder how to setup the "where" option in case like this?

It depends if the boundary condition is defined with a sharp or
diffuse formulation. If you're using a sharp boundary formulation then
the mesh faces need to be aligned along the boundary. In that case I
don't know any other way. Gmsh will certainly let you do that.

> Right now, I am thinking that I need to mark my boundary by myself. I have
> been trying a lot of statements like following but it seems doesn't work
> out:
> phi.faceGrad.constrain([a*local_shear_rate*(1-phi.faceValue)*phi.faceValue],
> where = np.abs(yFace -(leftheight - (L +
> xFace)*np.tan(25.0/180.0*np.pi)))<eps)

That probably won't work. If the boundary conditions are internal to
the domain then they need to be defined as part of the equations, not
using constraints.

> I am not sure whether It is better to formulate my boundary condition as a
> source term instead of using faceGrad.constrain...

Exactly, formulate the boundary condition as a source and variable
diffusion coefficient.

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

Reply via email to