[Gmsh] how fill a 2D-mesh with 3D-elements calling GMSH from the shell

benjamin JEANTY-RUARD ruard at artenum.com
Thu Feb 23 17:32:15 CET 2017


Dear Johannes,

Except if I misunderstand something, I think my previous answer is
suited to your problem.

For example, consider the attached files generated with the following
workflow:

test4.med mesh file-> test4.msh mesh file generated by Gmsh-> test4.geo
geometric file generated by "MeshToGeo" application-> manual
edition->test4Edited.geo geometric file-> volume mesh->test4Edited.med
volume mesh generated by Gmsh

As you can see, the boundary surface mesh of the final test4Edited.med
file is exactly identical in comparison with the initial test4.med
surface mesh file (same number and positions of nodes).

I hope this will help you,

Regards,

Benjamin

On Thu, 2017-02-23 at 12:00 +0100,
gmsh-request at ace20.montefiore.ulg.ac.be wrote:

> Message: 1
> Date: Wed, 22 Feb 2017 13:22:36 +0100
> From: Johannes_ACKVA <johannes.ackva at code-aster.de>
> To: DILASSER Guillaume <Guillaume.DILASSER at cea.fr>, "gmsh at geuz.org"
>         <gmsh at geuz.org>
> Subject: Re: [Gmsh] how fill a 2D-mesh with 3D-elements calling GMSH
>         from the shell
> Message-ID: <2d1a504a-3311-fdf2-c1c2-2a5a2ced627a at code-aster.de>
> Content-Type: text/plain; charset=windows-1252
> 
> hello,
> 
> many thanks,  Guillaume Dilasser und Benjamin Jeanty-Ruard, for your
> advices and time.
> 
> Unfortunally, I need that the surface mesh remains identic (same
> number
> and positions of nodes), so your proposals are not suited to my
> problem.
> 
> I thought that any mesher (also those in GMSH) should be able to
> create
> a 3D-mesh based on a closed hull of 2D-elements. Does anyone else know
> if and how this can be achieved with GMSH?  If not I will search for
> another tool,
> 
> thank you again and best regards
> 
> Johannes Ackva


Previous message:

Dear Johannes ACKVA,

> 
> If I well understand, your .med file is a mesh.
> 
> Besides, it seems Gmsh can not edit a mesh file or can not convert
> from a mesh file to a geometry .geo file.
> 
> A solution could be to convert your .med file to .msh file. Then, you
> can use the "Mesh To Geo" open source software to convert the from
> the .msh file to .geo file. You can download this application on the
> following web page (1) after a free registration on the following web
> page (2). This registration will give you a login and a password to
> download the "MeshToGeo" application
> 
> (2) registration web page:
> http://dev.artenum.com/projects/MeshToGeo/registration
> 
> (1) download web page:
> http://dev.artenum.com/projects/MeshToGeo/download
> 
> You will be able to edit the geo file and create a volume and finally
> generate a volume mesh. To finish, thanks to Gmsh, you can save the 3D
> mesh file in .med file.
> 
> So if I summarize:
> 
> .med mesh file-> .msh mesh file-> .geo geometric file-> manual
> edition->.geo geometric file-> volume mesh->.med volume mesh
> 
> You can find in attachement a sample of these operations with the
> following workflow:
> 
> test3.med mesh file-> testMesh.msh mesh file generated by Gmsh->
> test.geo geometric file generated by "MeshToGeo" application-> manual
> edition->testMeshModified.geo geometric file-> volume mesh->.med
> volume mesh generated by Gmsh
> 
> Regards,
> 
> Benjamin Jeanty-Ruard
> 
> On Mon, 2017-02-20 at 14:13 +0100,
> gmsh-request at ace20.montefiore.ulg.ac.be wrote:
> 
> > Message: 3
> > Date: Mon, 20 Feb 2017 12:36:56 +0100
> > From: Johannes_ACKVA <johannes.ackva at code-aster.de>
> > To: gmsh at geuz.org
> > Subject: [Gmsh] how fill a 2D-mesh with 3D-elements calling GMSH
> > from
> >         the shell
> > Message-ID: <816b4e5e-230f-3470-2c40-d6b8a2c22313 at code-aster.de>
> > Content-Type: text/plain; charset=utf-8
> > 
> > hello
> > 
> > how can I fill a closed hull of 2D-elements with 3D-elements, by
> > calling
> > GMSH from the shell?
> > 
> > I tried this:
> > 
> > 
> > >    gmsh MeshTria_2D.med  -3 -o quark.med
> > 
> > Info    : Running '/opt/gmsh-2.13.1-Linux/bin/gmsh MeshTria_2D.med
> > -3 -o
> > quark.med' [Gmsh 2.13.1, 1 node, max. 1 thread]
> > Info    : Started on Mon Feb 20 09:20:03 2017
> > Info    : Reading 'MeshTria_2D.med'...
> > Info    : Reading MED file V3.2.0 using MED library V3.2.0
> > Info    : Reading 3-D unstructured mesh <<MeshTria_2D>>
> > Info    : Done reading 'MeshTria_2D.med'
> > Info    : Finalized high order topology of periodic connections
> > Info    : Meshing 1D...
> > Info    : Done meshing 1D (8e-06 s)
> > Info    : Meshing 2D...
> > Info    : Done meshing 2D (6.91414e-06 s)
> > Info    : Meshing 3D...
> > Info    : Done meshing 3D (5e-06 s)
> > Info    : 8 vertices 24 elements
> > Info    : Writing 'quark.med'...
> > Info    : Done writing 'quark.med'
> > Info    : Stopped on Mon Feb 20 09:20:03 2017
> > 
> > but the resulting mesh does not contain any 3D-elements, it is
> > identic
> > to the input mesh.
> > 
> > Moreover, I discovered that after loading the 2D-mesh
> > (MeshTria_2D.med)
> > into the GUI, the button "3D" in "Mesh" does not create any
> > 3D-elements.
> > I fear that a geometry is needed. Or is there a manner to create a
> > volume mesh from a 2D-mesh?
> > 
> > Many thanks for your help,
> > 
> > Johannes_ACKVA 


-- 


Benjamin JEANTY-RUARD

  --------------------
      Artenum Toulouse - Science & Groupware
      http://www.artenum.com

          Bâtiment Calfocenter
          10, rue Marguerite Long
          31320 Castanet-Tolosan
          France
          Phone: +33 (0)5 82 95 51 97



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20170223/0ba5a00a/attachment-0001.html>
-------------- next part --------------
Point (1) = {-10.0, 10.0, 10.0, 100.0};
Point (2) = {10.0, 10.0, 10.0, 100.0};
Point (3) = {10.0, -10.0, 10.0, 100.0};
Point (4) = {10.0, -10.0, -10.0, 100.0};
Point (5) = {10.0, 10.0, -10.0, 100.0};
Point (6) = {-10.0, 10.0, -10.0, 100.0};
Point (7) = {-10.0, -10.0, -10.0, 100.0};
Point (8) = {-10.0, -10.0, 10.0, 100.0};
Point (9) = {10.0, 0.0, 0.0, 100.0};
Point (10) = {0.0, -10.0, 0.0, 100.0};
Point (11) = {0.0, 0.0, -10.0, 100.0};
Point (12) = {-10.0, 0.0, 0.0, 100.0};
Point (13) = {0.0, 0.0, 10.0, 100.0};
Point (14) = {0.0, 10.0, 0.0, 100.0};

Line (36) = {5, 14};
Line (35) = {14, 6};
Line (34) = {14, 1};
Line (33) = {2, 14};
Line (32) = {3, 13};
Line (31) = {13, 8};
Line (30) = {13, 1};
Line (29) = {2, 13};
Line (28) = {12, 7};
Line (27) = {8, 12};
Line (26) = {12, 6};
Line (25) = {1, 12};
Line (24) = {6, 11};
Line (23) = {11, 7};
Line (22) = {11, 4};
Line (21) = {5, 11};
Line (20) = {10, 7};
Line (19) = {8, 10};
Line (18) = {10, 4};
Line (17) = {3, 10};
Line (16) = {9, 4};
Line (15) = {5, 9};
Line (14) = {9, 3};
Line (13) = {2, 9};
Line (12) = {7, 6};
Line (11) = {4, 5};
Line (10) = {4, 3};
Line (9) = {7, 4};
Line (8) = {8, 7};
Line (7) = {3, 2};
Line (6) = {8, 3};
Line (5) = {1, 8};
Line (4) = {6, 1};
Line (3) = {5, 6};
Line (2) = {2, 5};
Line (1) = {1, 2};

Line Loop (1) = {13, 14, 7};
Line Loop (2) = {2, 15, -13};
Line Loop (3) = {-14, 16, 10};
Line Loop (4) = {-16, -15, -11};
Line Loop (5) = {17, 18, 10};
Line Loop (6) = {-6, 19, -17};
Line Loop (7) = {-18, 20, 9};
Line Loop (8) = {-20, -19, 8};
Line Loop (9) = {11, 21, 22};
Line Loop (10) = {-22, 23, 9};
Line Loop (11) = {3, 24, -21};
Line Loop (12) = {-12, -23, -24};
Line Loop (13) = {25, 26, 4};
Line Loop (14) = {5, 27, -25};
Line Loop (15) = {-26, 28, 12};
Line Loop (16) = {-28, -27, 8};
Line Loop (17) = {1, 29, 30};
Line Loop (18) = {-30, 31, -5};
Line Loop (19) = {-7, 32, -29};
Line Loop (20) = {-6, -31, -32};
Line Loop (21) = {1, 33, 34};
Line Loop (22) = {-34, 35, 4};
Line Loop (23) = {2, 36, -33};
Line Loop (24) = {3, -35, -36};

Plane Surface (1)  = {1};
Plane Surface (2)  = {2};
Plane Surface (3)  = {3};
Plane Surface (4)  = {4};
Plane Surface (5)  = {5};
Plane Surface (6)  = {6};
Plane Surface (7)  = {7};
Plane Surface (8)  = {8};
Plane Surface (9)  = {9};
Plane Surface (10)  = {10};
Plane Surface (11)  = {11};
Plane Surface (12)  = {12};
Plane Surface (13)  = {13};
Plane Surface (14)  = {14};
Plane Surface (15)  = {15};
Plane Surface (16)  = {16};
Plane Surface (17)  = {17};
Plane Surface (18)  = {18};
Plane Surface (19)  = {19};
Plane Surface (20)  = {20};
Plane Surface (21)  = {21};
Plane Surface (22)  = {22};
Plane Surface (23)  = {23};
Plane Surface (24)  = {24};




Physical Point(1) = {1, 2, 3, 4, 5, 6, 7, 8};
Physical Line(2) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
Physical Surface(3) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24};
Surface Loop(37) = {24, 11, 12, 15, 13, 14, 18, 17, 21, 23, 2, 4, 3, 1, 19, 20, 6, 8, 7, 5, 10, 9, 16, 22};
Volume(38) = {37};
Physical Volume(39) = {38};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test4.med
Type: audio/x-mod
Size: 27729 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20170223/0ba5a00a/attachment-0002.med>
-------------- next part --------------
$MeshFormat
2.2 0 8
$EndMeshFormat
$PhysicalNames
3
0 1 "G_0D_27                                                                         "
1 2 "G_1D_26                                                                         "
2 3 "G_2D_25                                                                         "
$EndPhysicalNames
$Nodes
14
1 -10 10 10
2 10 10 10
3 10 -10 10
4 10 -10 -10
5 10 10 -10
6 -10 10 -10
7 -10 -10 -10
8 -10 -10 10
9 10 0 0
10 0 -10 0
11 0 0 -10
12 -10 0 0
13 0 0 10
14 0 10 0
$EndNodes
$Elements
44
1 15 2 1 1 1
2 15 2 1 2 2
3 15 2 1 3 3
4 15 2 1 4 4
5 15 2 1 5 5
6 15 2 1 6 6
7 15 2 1 7 7
8 15 2 1 8 8
9 1 2 2 9 1 2
10 1 2 2 10 2 5
11 1 2 2 11 5 6
12 1 2 2 12 6 1
13 1 2 2 13 1 8
14 1 2 2 14 8 3
15 1 2 2 15 3 2
16 1 2 2 16 8 7
17 1 2 2 17 7 4
18 1 2 2 18 4 3
19 1 2 2 19 4 5
20 1 2 2 20 7 6
21 2 2 3 21 2 9 3
22 2 2 3 21 2 5 9
23 2 2 3 21 3 9 4
24 2 2 3 21 4 9 5
25 2 2 3 22 3 10 4
26 2 2 3 22 3 8 10
27 2 2 3 22 4 10 7
28 2 2 3 22 7 10 8
29 2 2 3 23 4 5 11
30 2 2 3 23 4 11 7
31 2 2 3 23 5 6 11
32 2 2 3 23 6 7 11
33 2 2 3 24 1 12 6
34 2 2 3 24 1 8 12
35 2 2 3 24 6 12 7
36 2 2 3 24 7 12 8
37 2 2 3 25 1 2 13
38 2 2 3 25 1 13 8
39 2 2 3 25 2 3 13
40 2 2 3 25 3 8 13
41 2 2 3 26 1 2 14
42 2 2 3 26 1 14 6
43 2 2 3 26 2 5 14
44 2 2 3 26 5 6 14
$EndElements
-------------- next part --------------
cl__1 = 100;
Point(1) = {-10, 10, 10, 100};
Point(2) = {10, 10, 10, 100};
Point(3) = {10, -10, 10, 100};
Point(4) = {10, -10, -10, 100};
Point(5) = {10, 10, -10, 100};
Point(6) = {-10, 10, -10, 100};
Point(7) = {-10, -10, -10, 100};
Point(8) = {-10, -10, 10, 100};
Point(9) = {10, 0, 0, 100};
Point(10) = {0, -10, 0, 100};
Point(11) = {0, 0, -10, 100};
Point(12) = {-10, 0, 0, 100};
Point(13) = {0, 0, 10, 100};
Point(14) = {0, 10, 0, 100};
Line(1) = {1, 2};
Line(2) = {2, 5};
Line(3) = {5, 6};
Line(4) = {6, 1};
Line(5) = {1, 8};
Line(6) = {8, 3};
Line(7) = {3, 2};
Line(8) = {8, 7};
Line(9) = {7, 4};
Line(10) = {4, 3};
Line(11) = {4, 5};
Line(12) = {7, 6};
Line(13) = {2, 9};
Line(14) = {9, 3};
Line(15) = {5, 9};
Line(16) = {9, 4};
Line(17) = {3, 10};
Line(18) = {10, 4};
Line(19) = {8, 10};
Line(20) = {10, 7};
Line(21) = {5, 11};
Line(22) = {11, 4};
Line(23) = {11, 7};
Line(24) = {6, 11};
Line(25) = {1, 12};
Line(26) = {12, 6};
Line(27) = {8, 12};
Line(28) = {12, 7};
Line(29) = {2, 13};
Line(30) = {13, 1};
Line(31) = {13, 8};
Line(32) = {3, 13};
Line(33) = {2, 14};
Line(34) = {14, 1};
Line(35) = {14, 6};
Line(36) = {5, 14};
Line Loop(1) = {13, 14, 7};
Plane Surface(1) = {1};
Line Loop(2) = {2, 15, -13};
Plane Surface(2) = {2};
Line Loop(3) = {-14, 16, 10};
Plane Surface(3) = {3};
Line Loop(4) = {-16, -15, -11};
Plane Surface(4) = {4};
Line Loop(5) = {17, 18, 10};
Plane Surface(5) = {5};
Line Loop(6) = {-6, 19, -17};
Plane Surface(6) = {6};
Line Loop(7) = {-18, 20, 9};
Plane Surface(7) = {7};
Line Loop(8) = {-20, -19, 8};
Plane Surface(8) = {8};
Line Loop(9) = {11, 21, 22};
Plane Surface(9) = {9};
Line Loop(10) = {-22, 23, 9};
Plane Surface(10) = {10};
Line Loop(11) = {3, 24, -21};
Plane Surface(11) = {11};
Line Loop(12) = {-12, -23, -24};
Plane Surface(12) = {12};
Line Loop(13) = {25, 26, 4};
Plane Surface(13) = {13};
Line Loop(14) = {5, 27, -25};
Plane Surface(14) = {14};
Line Loop(15) = {-26, 28, 12};
Plane Surface(15) = {15};
Line Loop(16) = {-28, -27, 8};
Plane Surface(16) = {16};
Line Loop(17) = {1, 29, 30};
Plane Surface(17) = {17};
Line Loop(18) = {-30, 31, -5};
Plane Surface(18) = {18};
Line Loop(19) = {-7, 32, -29};
Plane Surface(19) = {19};
Line Loop(20) = {-6, -31, -32};
Plane Surface(20) = {20};
Line Loop(21) = {1, 33, 34};
Plane Surface(21) = {21};
Line Loop(22) = {-34, 35, 4};
Plane Surface(22) = {22};
Line Loop(23) = {2, 36, -33};
Plane Surface(23) = {23};
Line Loop(24) = {3, -35, -36};
Plane Surface(24) = {24};
Physical Point(1) = {1, 2, 3, 4, 5, 6, 7, 8};
Physical Line(2) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
Physical Surface(3) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test4Edited.med
Type: audio/x-mod
Size: 41686 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20170223/0ba5a00a/attachment-0003.med>


More information about the gmsh mailing list