Thanks a lot Jonathan ...
On May 31, 2011, at 11:12 AM, Marc Saudreau wrote:
On May 31, 2011, at 10:08 AM, Marc Saudreau wrote:
1. In GMSH you can group some mesh elements and name them (usually
with a code number).
Is it possible to get this code number within FiPy to be able to work
on these elements specifically.
For instance, a method like mesh.getFaceColor() ?
FiPy does not presently read that information.
Is there a possibility to get it in a future version of FiPy ?
Or is there a way for me to get this information by modifying some
*.py files ... with your help ?
This does not seem to difficult to achieve (but may be I'm wrong) since
this information is in the gmsh file,and you read this file. The
next step should be to store this information and to get it via a
getFaceColor() method.
I don't think it would be too hard, but I'd need to look. The
current version of the code is found at
http://matforge.org/fipy/browser/branches/version-2_1/fipy/meshes/numMesh/gmshImport.py
although this code has been completely rewritten for the next
release. I think it would be easier to modify the new version,
although I see that it doesn't properly interpret the tags; it works
OK for reading partitions, which it was designed for, but I think it
needs more work to properly handle other tags.
I don't seem to be able to get Gmsh to actually output the physical
group in a useful way. Either it outputs the physical group for
*only* the labeled items or it outputs all items, but doesn't
include the group label. Do you know how to make this work?
I had a look at *.py files last week. It is really straightforward to get the
physical group from the GMSH mesh file for each cell elements and
face elements, and to define functions as getCellColor() and getFaceColor().
Now the problem is that face elements (for instance triangles in 3D) and cell
elements (for instance tetrahedals in 3D) are both defined with nodes
elements in the GMSH mesh file.
So I need to reconstruct the link between faces and adjacents cells i.e I need
a connectivity table. This could be done but to do it adequately, I need to
understand how in the current version of Fipy the relationship between faces
and cells is defined ... and to date i am a little bit confuse with that !
I had a look at the *.getExteriorFaces() and other functions but it takes
very long some times to do some reverse engineering so I was wondering is a
more technical document dedicated to developers (a developers' guide !)
is avalaible ?
This is not a good new since my geometry can not be obtain from
coordinates.
There's no mathematical description for the face centers?
Not really. In fact for my test cases, my geometries are simple
(cylinder, cube)
so I can fixed my BCs without any problem. But the next step will be to
use more complex geometries (scanned 3D objects for instance), so I really
need to identify my boundaries to fix heat fluxes properly.
I thought to use the mesh._getFaceNormals() method to get that but how
to use it. Is this the best way to proceed ??
outCoeffTop = (maskmyfaces* (h*mesh._getFaceNormals)).getDivergence()
Yes, I think so (fixing the typo)
outCoeffTop = (maskmyfaces* (h*mesh._getFaceNormals()).getDivergence()
Great I will test it as soon as possible !
Thanks again for your time and your help
Marc