[Gmsh] Applying Loads and Constraints
Jose M. Sancho
jmsancho at ceu.es
Mon Oct 23 16:51:12 CEST 2006
Hi William,
We use Gmsh as a pre- and post-processor to our own fem code.
Applying boundary conditions is easy.
Assign physical properties to entities.
We include our own commands in the gmsh .geo file as comments to gmsh
script language. The solver parse these commands and associate with
the nodes and elements in the mesh file.
Please note the seven last lines in the following excerpt.
Gmsh comments are used to enter the material, element and boundary
properties.
// Structured mesh for localization test
// José M. Sancho
// August 2006
lc=4; // not used ?
Point(1) = { 0.0, 0.0, 0.0, lc};
Point(2) = {6.317, 0.0, 0.0, lc};
Point(3) = {6.413, 4.445, 0.0, lc};
Point(4) = { 0.0, 4.445, 0.0, lc};
Point(5) = {6.413, 22.222+4.445, 0.0, lc};
Point(6) = { 0.0, 22.222+4.445, 0.0, lc};
Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {3,4};
Line(4) = {4,1};
Line Loop(1)={1,2,3,4};
Plane Surface(1) = {1};
Recombine Surface {1};
np=11; //points per line
Transfinite Line{1,3} = np;
Transfinite Line{2,4} = np;
Transfinite Surface{1} = {1,2,3,4};
Recombine Surface {1};
Line(5) = {3,5};
Line(6) = {5,6};
Line(7) = {6,4};
Line Loop(2)={-3,5,6,7};
Plane Surface(2) = {2};
Recombine Surface {2};
Transfinite Line{6} = np;
Transfinite Line{5,7} = np;
Transfinite Surface{2} = {4,3,5,6};
Recombine Surface {2};
Physical Line(101) ={4,7};
Physical Line(102) ={1};
Physical Line(103) ={6};
Physical Surface(1) = 1;
Physical Surface(2) = 2;
//-------------------------- cofe data
-------------------------------------
//$ MateType 0 cofe::MatJ2<2> 0 206.9 0.29 0.0 0.45 -1000.0
//$ MateType 1 cofe::MatILE<2> 1 206.9 0.29 0.0
//$ ElemType 1 cofe::QuadEasElement 0
//$ ElemType 2 cofe::QuadEasElement 1
//$ BounType 101 1 0 0.0 0.0
//$ BounType 102 0 1 0.0 0.0
//$ BounType 103 0 1 0.0 0.1