[Gmsh] Something missing in msh file

Christophe Geuzaine cgeuzaine at ulg.ac.be
Wed Apr 1 20:25:55 CEST 2009


Henk Krus wrote:
> Hi all,
> 
> I'm trying to write a geometry and data out to a msh-file. First 
> step is to send results to gmsh; next step would be to write out 
> data (geometry) and boundary regions from gmsh towards dolfyn (how 
> to deal with surfaces is the next question; and is it possible to 
> import just nodes+cells in gmsh and assign boundary conditions).
> 
> As such the geometry looks ok (but hex and tet models) but I do not 
> see the boundary regions/walls/surfaces. Moreover the velocity 
> vectors nor the temperatures appear. I'm overlooking something but 
> what?
> 
> The structure of the msh file:
> 
> The hexahedra are fluid cells (id 1). Boundary regions are fluid+ 
> region number. Both are 'cells' (hex+quad); data corresponds as 
> well. What am I doing wrong?

Hi Henk - cf. below for 2 small changes:

> 
> Thanks in advance folks!
> Henk
> 
> The file:
> 
> $MeshFormat
> 2.0 0 8
> $EndMeshFormat
> $PhysicalNames
>            6
>    1 "Fluid001"
>    2 "DefaultWall"
>    3 "Region001"
>    4 "Region002"
>    5 "Region003"
>    6 "Region004"
> $EndPhysicalNames
> $Nodes
>     1922
>        1  0.00000E+00  0.00000E+00 -5.00000E-02
>        2  0.00000E+00  3.33333E-02 -5.00000E-02
> ...
>     1921  1.00000E+00  9.66667E-01  5.00000E-02
>     1922  1.00000E+00  1.00000E+00  5.00000E-02
> $EndNodes
> $Elements
>     2820
>        1 5 3   1 0 1    1   32   33    2   962   993  994  963
>        2 5 3   1 0 1    2   33   34    3   963   994  995  964
> ...
>      899 5 3   1 0 1  928  959  960  929  1889  1920 1921 1890
>      900 5 3   1 0 1  929  960  961  930  1890  1921 1922 1891
>      901 3 3   2 0 1       1       32       33        2
>      902 3 3   2 0 1     962      993      994      963
>      903 3 3   4 0 1       1       32      993      962
> ...
>     2819 3 3   6 0 1     930      961     1922     1891
>     2820 3 3   5 0 1     960     1921     1922      961
> $EndElements
> $ElementData
> 1
> "Velocity vector cell"
> 1
>  0.200E+00
> 1
>        200

the above two lines should read

3     (instead of 1; there are 3 integer tags that will follow)
0     (instead of 200; 0 is the index of the time step)

> 3
>       2820
>        1  8.66025E-01  5.00000E-01  0.00000E+00
>        2  8.66025E-01  5.00000E-01  0.00000E+00
> ...
>     2819  6.83013E-01  0.00000E+00  0.00000E+00
>     2820  6.83013E-01  0.00000E+00  0.00000E+00
> $EndElementData
> $ElementData
> 1
> "Temperature cell"
> 1
>  0.200E+00
> 1
>        200

same thing here:

1
200

should read


3
0


> 1
>       2820
>        1  2.000E+01
>        2  2.000E+01
>        3  2.000E+01
> ...
>     2819  2.000E+01
>     2820  2.000E+01
> $EndElementData
> 
> _______________________________________________
> 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