Jeff,
I think your looking for the command
mesh.getExteriorFaces()
You can combine this with spatial constraints to define specific regions on
the outside of your mesh. For example:
headBndry=(FixedValue(mesh.getExteriorFaces()&(X==0.),110.),
FixedValue(mesh.getExteriorFaces()&(X==max(X)),100.),
FixedValue(mesh.getExteriorFaces()&
(Y>0.1)&(Y<50.)&(X>200.)&(X<300.),105.))
Hope that helps,
Andy
On Tue, Sep 22, 2009 at 3:15 PM, Sowards, Jeffrey
<[email protected]>wrote:
> Hello List,
>
> 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.
>
> y
> |
> |___ x
>
> _______
> flux{ | | } flux
> flux{ | | } flux
> flux{ | / } flux
> flux{ | / } flux
> flux{ | | } flux
> flux{ | | } flux
> flux{ | | } flux
> flux{ | \ } flux
> flux{ | \ } flux
> flux{ | | }flux
> flux{ |______ | }flux
>
> | | |
> xo x1 x2
>
>
> 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:
>
> _______
> 0 { | | } 1
> 0 { | | } 1
> 0 { | /
> 0 { | /
> 0 { | |
> 0 { | |
> 0 { | |
> 0 { | \
> 0 { | \
> 0 { | | } 1
> 0 { |______ | } 1
>
> xo x1 x2
>
>
> I want to apply the flux so that it covers all x >= x1 on the right face.
> I get the error "Face list has interior faces" with the following:
>
> >>> x, y = mesh.getFaceCenters()
> >>> facesRight = (mesh.getFaces() & (x == x1) | (x > x1))
> >>> BCs = (FixedValue(faces=facesRight(), value=1.),
> FixedValue(faces=mesh.getFacesLeft(), value=0))
>
> Should I break the right face into 4 sections, then apply the flux to each
> section face. 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.
>
> For example:
>
> Include Line(3) and Line(7)
> >>> faceRight1 = mesh.getFacesRight()
> Circle(4)
> >>> faceRight2 = (mesh.getFaces() & (x == Circle(4)) | (y == Circle(4)))
> Line(5)
> >>> faceRight3 = (mesh.getFaces() & (x == Line(5)) | (y == Line(5)))
> Line(6)
> >>> faceRight4 = (mesh.getFaces() & (x == Circle(6)) | (y == Circle(6)))
>
> Line(2)
> _ _______
> y5 | |
> _ | | Line(3)
> y4 | /
> _ | / Circle(4)
> y3 | |
> Line(1) | | Line(5)
> _ | |
> y2 | \
> _ | \ Circle(6)
> y1 | |
> _ |______ | Line(7)
> yo
> Line(8)
>
>
>
>
> 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?
>
> Thanks for any suggestions!
>
> Jeff
>
--
---
Andrew Reeve
Dept. of Earth Sciences
University of Maine
Orono, ME 04444