[Gmsh] calculating a boundary flux

Christophe Geuzaine cgeuzaine at ulg.ac.be
Mon Aug 17 14:25:12 CEST 2009


Geordie McBain wrote:
> Hello.  I'd like to calculate the integrated flux of a vector field
> through a patch on the boundary.  For example, after solving say a
> Laplace equation for temperature, I'd take the gradient of the
> temperature, and integrate the normal component of that over some part
> of the boundary (a Physical Surface in 3-D or Physical Line in 2-D)
> over which I'd specified the temperature with a Dirichlet condition in
> order to get the heat transfer rate.
> 
> I read that Plugin(Integrate) `integrates...the circulation/flux of
> vector fields over line/surface elements', so that looks ideal, but I
> guess I'm not calling it correctly.
> 
> For example (to avoid posting a lengthy data file) say I load the
> tutorial t7.geo, then use Plugin(Gradient) (on the `background mesh'
> view) to generate a vector field.  If I save the `background mesh
> Gradient' view as a Gmsh msh, it's only got the triangular domain
> elements, not the linear boundary elements.  If I save the mesh though
> (Ctrl-Shift S or File/Save Mesh) it does have the linear boundary
> elements.
> 
> Anyway, when I apply Plugin(Integrate) to the background mesh Gradient
> and then save that as a Gmsh msh, it contains a single point element
> at the centre of the domain and the scalar value 0.
> 
> 1. What does the scalar value 0 mean?

it's the value of the flux of the vector field through the surface (here 
the fector field has no z component, hence the flux is zero)

> 
> 2. How do I get the integrated flux of a vector field through each
> Physical Line/Surface boundary patch in two/three dimensions?

you need to generalize the plugin...


> 
> Thanks.
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
> 
> 


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine