On Sep 22, 2009, at 3:15 PM, Sowards, Jeffrey wrote:
I would like to apply a constant flux boundary condition to the
entire right vertical face of an irregular geometry that was
constructed with Gmsh. Suppose the geometry looks something like
the sketch below.
:
:
When I use the following in my BCs to get the mesh faces:
>>> BCs = (FixedValue(faces=mesh.getFacesRight(), value=1.),
FixedValue(faces=mesh.getFacesLeft(), value=0))
the flux is only applied alont the right face where x = x2 as shown
here:
Possible terminology problem: FixedValue represents a Dirichlet
condition. Constant flux is a Neumann condition, and is technically
represented with our FixedFlux boundary condition, although there are
some issues with that. See FAQ 5.5: "How do I represent boundary
conditions?" for a discussion on reliably representing flux boundary
conditions in FiPy.
Beyond that, Andy Reeve is absolutely correct about using
mesh.getExteriorFaces().
Is there a way to apply boundary conditions to specific lines
extracted from my irregular geometry constructed with Gmsh? For
instance apply flux to the Line(3), Circle(4), Line(5), etc. as
constructed in the msh file.
Not presently.
Also, If the geometry consists of "fillets" in the locations above,
which are indicated as Circle(4) and Circle(5), is the flux always
going to be orthogonal to all cell faces along the two arcs where my
mesh has discretized the fillet into several straight lines?
For a FixedFlux term, the coefficient is a scalar representing the
flux normal to the discrete line segments. If that's not what you want
(e.g., for a uniform horizontal flux from left to right), you're
better off constructing a Source from the divergence of the flux
vectors you actually want, as described in the FAQ.