[GiDlist] GiD --> ucd format?
Posted: Mon Jun 23, 2003 11:00 am
Hello GiD folk,
I am an applied mathematician working in crystal plasticity
and fatigue modelling. For my calculations I am using the
deal.II finite element library.
This library is poorly supplied with meshing tools, and for
complicated geometries it relies on importation of a mesh
in a particular format, for example "ucd" format.
It is best to explain this in terms of a very simple example:
Here (below) there is a single hex cell with 8 vertices (nodes).
After defining the vertices there are then 3 cell-type
connectivity statements. The first just describes the connectivity
of the hex element, but the 2 following lines each associate a tag
with a particular (quad) _face_ of the element. The face is
identified by its nodal connectivity. Thus we have tag 5 being
associated with the quad face with node numbers (0 1 2 3). Later
the tag will be associated with a boundary condition.
8 3 0 0 0
0 0.0 0.0 0.0
1 1.0 0.0 0.0
2 1.0 0.0 1.0
3 0.0 0.0 1.0
4 0.0 1.0 0.0
5 1.0 1.0 0.0
6 1.0 1.0 1.0
7 0.0 1.0 1.0
0 0 hex 0 1 2 3 4 5 6 7
1 5 quad 0 1 2 3
2 8 quad 0 1 5 4
The scheme is easily extended to a multi-element mesh: there is a
list of hex declarations, followed by as many quad lines as are required
to associate the tags with the relevant boundary (quad) faces.
My question is, can I use the .bas scripting language to create a
.dat file in this particular (ucd) format? The hard part
seems to be the last 2 lines. The GiD script language
seems very powerful, so I am confident that it can be done.
Can someone point me in the right direction?
Roger Young.
Applied Maths Group,
Industrial Research Ltd.,
Box 31-310 Lower Hutt,
New Zealand.
r.young at irl.cri.nz
I am an applied mathematician working in crystal plasticity
and fatigue modelling. For my calculations I am using the
deal.II finite element library.
This library is poorly supplied with meshing tools, and for
complicated geometries it relies on importation of a mesh
in a particular format, for example "ucd" format.
It is best to explain this in terms of a very simple example:
Here (below) there is a single hex cell with 8 vertices (nodes).
After defining the vertices there are then 3 cell-type
connectivity statements. The first just describes the connectivity
of the hex element, but the 2 following lines each associate a tag
with a particular (quad) _face_ of the element. The face is
identified by its nodal connectivity. Thus we have tag 5 being
associated with the quad face with node numbers (0 1 2 3). Later
the tag will be associated with a boundary condition.
8 3 0 0 0
0 0.0 0.0 0.0
1 1.0 0.0 0.0
2 1.0 0.0 1.0
3 0.0 0.0 1.0
4 0.0 1.0 0.0
5 1.0 1.0 0.0
6 1.0 1.0 1.0
7 0.0 1.0 1.0
0 0 hex 0 1 2 3 4 5 6 7
1 5 quad 0 1 2 3
2 8 quad 0 1 5 4
The scheme is easily extended to a multi-element mesh: there is a
list of hex declarations, followed by as many quad lines as are required
to associate the tags with the relevant boundary (quad) faces.
My question is, can I use the .bas scripting language to create a
.dat file in this particular (ucd) format? The hard part
seems to be the last 2 lines. The GiD script language
seems very powerful, so I am confident that it can be done.
Can someone point me in the right direction?
Roger Young.
Applied Maths Group,
Industrial Research Ltd.,
Box 31-310 Lower Hutt,
New Zealand.
r.young at irl.cri.nz