[Gmsh] Problem with importing a mesh in Abaqus

Omid Mahabadi omid.mahabadi at geomechanica.com
Mon May 6 16:47:20 CEST 2013


Hi Martin,
Yes, you would need to get one of the later versions of Gmsh from their 
svn repository. I'm not aware if their new binaries include the new 
feature. However, building Gmsh is fairly straightforward and is well 
explained in the README.txt file that comes with the source code.

The attached geometry file should work fine with the Abaqus export. 
Notice "Mesh.SaveGroupsOfNodes = 1;" at the end of the file, which will 
export the abaqus Node Sets (NSETs).

Cheers,
Omid


On 06/05/13 12:38 AM, Martin Genet wrote:
> Dear M. Mahabadi,
>
> Do you have a small working example of an Abaqus export from GMSH 
> including node sets? I can't find anything like that in the 
> documentation or wiki. Would be very useful.
>
> Also, this functionality is available only with the svn version, 
> right? It's not gonna work with 2.7.0, right?
>
> Thanks a lot for your help.
>
> Kind regards,
> Martin
>
>> Dear Christophe,
>> I have been using the updated Gmsh with the Abaqus NSET export and it
>> has been working very well so far. I've only come across a tiny issue,
>> that is, the names of Physical Entities are not used from the geometry
>> file. Instead, they are numbered automatically in the exported inp file
>> (e.g., PhysicalLine2,..., PhysicalSurface1,...). Is there a way to
>> preserve the names specified in the geo file?
>>
>> Thank you,
>> Omid
>>
>>
>> On 05/04/13 12:02 PM, Christophe Geuzaine wrote:
>> >/  On 05 Apr 2013, at 17:49, Omid Mahabadi <omid.mahabadi at geomechanica.com  <http://www.geuz.org/mailman/listinfo/gmsh>> wrote:
>> />/
>> />>/  On 05/04/13 10:25 AM, Christophe Geuzaine wrote:
>> />>>/  On 05 Apr 2013, at 16:13, Omid Mahabadi <omid.mahabadi at geomechanica.com  <http://www.geuz.org/mailman/listinfo/gmsh>> wrote:
>> />>>/
>> />>>>/  Hi,
>> />>>>/  I thought quite a bit about element types in Abaqus. The reality is that there are so many different element types in Abaqus that makes defining a "generic" type rather impossible. I would suggest to keep the default Abaqus export as currently is, but give the user the option to define custom types in the gmsh geometry file. For instance, in the case of a 2D mesh, the user may define a maximum of two strings for the 1D and 2D element types, which can look like:
>> />>>>/  Mesh.Abaqus.ElementType.1D = "C1D2"
>> />>>>/  Mesh.Abaqus.ElementType.2D = "C2D3"
>> />>>>/  (I'm just mimicking gmsh's syntax here)
>> />>>>/
>> />>>>/  I discussed the above suggestion with another colleague of mine who has used Abaqus in the past and it made sense to them. What are your thoughts?
>> />>>>/
>> />>>/  With SVN r15202 I at least changed the default tags to tags that should be understood by Abaqus/Standard (had to change lines, triangles and quads). We might want more flexibility in the future, but it might also be overkill (we need types for 1st order and 2nd order elements, etc.).
>> />>/  I totally agree as user-defined types can get complicated.
>> />>/  On a side note, for your information I've realized that now Element numbers don't start from 1 anymore.
>> />/  Indeed: that's a side-effect of the new scheme. Since we must remember the numbers in the ELSETS, we cannot just renumber on-the-fly as before.
>> />/
>> />>>/
>> />>>>/  Thank you,
>> />>>>/  Omid
>> />>>>/
>> />>>>/
>> />>>>/  On 05/04/13 06:35 AM, Christophe Geuzaine wrote:
>> />>>>>/  On 05 Apr 2013, at 12:07, Christophe Geuzaine <cgeuzaine at ulg.ac.be  <http://www.geuz.org/mailman/listinfo/gmsh>> wrote:
>> />>>>>/
>> />>>>>>/  On 18 Mar 2013, at 18:03, Pierre-Frederic Villard <pierre-frederic.villard at univ-lorraine.fr  <http://www.geuz.org/mailman/listinfo/gmsh>> wrote:
>> />>>>>>/
>> />>>>>>>/  Hi,
>> />>>>>>>/
>> />>>>>>>/  I have issues with importing gmsh-created meshes in Abaqus 6.12. I tried two methods, which equally failed:
>> />>>>>>>/  1 - I tried to save the mesh as OpenCASCADE step format but I have an error:   "Error   : No OpenCASCADE model found"
>> />>>>>>/  Hi Pierre-Frederic - This would actually not export the mesh, but the CAD model - so it's not what you want.
>> />>>>>>/
>> />>>>>>>/  2 - I tried to save the model as an Abaqus INP file but I have a problem importing it in Abaqus : "Element type "C2D3" is not supported." with triangles and "Element type "C1D2" is not supported" with segments.
>> />>>>>>>/
>> />>>>>>/  Indeed. I just had a look at the Abaqus documentation, and C2D3 and C1D2 do not seem to be in the general "Element Indexes" available in Abaqus/Standard.
>> />>>>>>/
>> />>>>>>/  What should we use when we export "generic" elements (i.e., not linked to any physics)?
>> />>>>>>/
>> />>>>>>/  @Omid - any ideas?
>> />>>>>/  I've committed r15202 with the ideas from
>> />>>>>/
>> />>>>>/  https://geuz.org/trac/gmsh/ticket/129
>> />>>>>/
>> />>>>>/  @Abaqus users: let me know if this is better...
>> />>>>>/
>> />>>>>/
>> />>>>>/
>> />>>>>>>/  Does anyone have any idea how to solve this problem?
>> />>>>>>>/
>> />>>>>>>/  Cheers,
>> />>>>>>>/
>> />>>>>>>/  Pierre
>> />>>>>>>/
>> />>>>>>>/
>> />>>>>>>/  _______________________________________________
>> />>>>>>>/  gmsh mailing list
>> />>>>>>>/  gmsh at geuz.org  <http://www.geuz.org/mailman/listinfo/gmsh>
>> />>>>>>>/  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  <http://www.montefiore.ulg.ac.be/%7Egeuzaine>
>> />>>>>>/
>> />>>>>>/
>> />>>>>>/
>> />>>>/  --
>> />>>>/  Omid Mahabadi
>> />>>>/  Geomechanica, Inc.
>> />>>>/  Tel: (647) 478-9767 x824
>> />>>>/
>> />>/  --
>> />>/  Omid Mahabadi
>> />>/  Geomechanica, Inc.
>> />>/  Tel: (647) 478-9767 x824
>> />>/
>> /
>> -- 
>> Omid Mahabadi
>> Geomechanica, Inc.
>> Tel: (647) 478-9767 x824

-- 
Omid Mahabadi
Geomechanica, Inc.
Tel: (647) 478-9767 x824

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20130506/ef97b634/attachment.html>
-------------- next part --------------
/*********************************************************************
 *
 *  Gmsh tutorial 1
 *
 *  Variables, elementary entities (points, lines, surfaces), physical
 *  entities (points, lines, surfaces)
 *
 *********************************************************************/

// The simplest construction in Gmsh's scripting language is the
// `affectation'. The following command defines a new variable `lc':

lc = 4;
lcfine = 2;

// This variable can then be used in the definition of Gmsh's simplest
// `elementary entity', a `Point'. A Point is defined by a list of
// four numbers: three coordinates (X, Y and Z), and a characteristic
// length (lc) that sets the target element size at the point:

Point(1) = {0, 0, 0, lc};

// The distribution of the mesh element sizes is then obtained by
// interpolation of these characteristic lengths throughout the
// geometry. Another method to specify characteristic lengths is to
// use a background mesh (see `t7.geo' and `bgmesh.pos').

// We can then define some additional points as well as our first
// curve.  Curves are Gmsh's second type of elementery entities, and,
// amongst curves, straight lines are the simplest. A straight line is
// defined by a list of point numbers. In the commands below, for
// example, the line 1 starts at point 1 and ends at point 2:

Point(2) = {10, 0,  0, lc} ;
Point(3) = {10, 10, 0, 0.05} ;
Point(4) = {0,  10, 0, lc} ;

Point(5) = {10, 7,  0, lcfine} ;
Point(6) = {7, 7, 0, lcfine} ;
Point(7) = {7,  10, 0, lcfine} ;

Line(1) = {1,2} ;
Line(2) = {2,5} ;
Line(3) = {5,6} ;
Line(4) = {6,7} ;
Line(5) = {7,4} ;
Line(6) = {4,1} ;

Line(7) = {5,3} ;
Line(8) = {3,7} ;
Line(9) = {7,6} ;
Line(10) = {6,5} ;

// The third elementary entity is the surface. In order to define a
// simple rectangular surface from the four lines defined above, a
// line loop has first to be defined. A line loop is a list of
// connected lines, a sign being associated with each line (depending
// on the orientation of the line):

Line Loop(11) = {1,2,3,4,5,6} ;
Line Loop(12) = {7,8,9,10} ;

// We can then define the surface as a list of line loops (only one
// here, since there are no holes--see `t4.geo'):

Plane Surface(13) = {11} ;
Plane Surface(14) = {12} ;

// At this level, Gmsh knows everything to display the rectangular
// surface 6 and to mesh it. An optional step is needed if we want to
// associate specific region numbers to the various elements in the
// mesh (e.g. to the line segments discretizing lines 1 to 4 or to the
// triangles discretizing surface 6). This is achieved by the
// definition of `physical entities'. Physical entities will group
// elements belonging to several elementary entities by giving them a
// common number (a region number).

// We can for example group the points 1 and 2 into the physical
// entity 1:

//Physical Point(1) = {1,2} ;

// Consequently, two punctual elements will be saved in the output
// mesh file, both with the region number 1. The mechanism is
// identical for line or surface elements:

MyLine = 99;
Physical Line("line 1") = {10} ;

Physical Surface("surface 1") = {13} ;
Physical Surface("surface 2") = {14} ;

// All the line elements created during the meshing of lines 1, 2 and
// 4 will be saved in the output mesh file with the region number 99;
// and all the triangular elements resulting from the discretization
// of surface 6 will be given an automatic region number (100,
// associated with the label "My fancy surface label").

// Note that if no physical entities are defined, then all the
// elements in the mesh will be saved "as is", with their default
// orientation.

// Define internal mesh boundaries along lines
Point(15) = {1, 3,  0, lcfine} ;
Point(16) = {9, 3, 0, lcfine} ;
Line(17) = {15, 16} ;

Point(18) = {1, 5,  0, lc} ;
Point(19) = {9, 5, 0, lc} ;
Line(20) = {18, 19} ;
Line{17} In Surface{13} ;

MyLine = 99;
Physical Line(MyLine) = {17} ;

// Physical Line(MyLine) = {20} ;

Mesh.SaveGroupsOfNodes = 1;


More information about the gmsh mailing list