Re: [Gmsh] Question on creating meshes with layered elements

2020-11-10 Thread Marco Antolovic
 Just a quick update, I have noticed that in some cases translated and bottom 
curves require a boolean union operation.
I have updated the script and the txt file accordingly (see attachment).
Marco

Il lunedì 9 novembre 2020, 09:31:58 CET, Marco Antolovic 
 ha scritto:  
 
  Hello Christophe,
there appear to be problems with my email formatting.
To avoid that I re-send the previous message as a file (hopefully this should 
work)

Regards,
Marco

Il mercoledì 4 novembre 2020, 09:14:51 CET, Christophe Geuzaine 
 ha scritto:  
 
 

> On 22 Oct 2020, at 12:56, Marco Antolovic  wrote:
> 
> Hi all,
> 
> I'm trying to find the best way to approach the following problem:
> 
> I have a parallelepiped with the edge alone z much smaller than that along x 
> and y (this is typical, for example, 
> for PCB traces) and I would like to guarantee, in the volume, a predefined 
> number of layers (np_layers) along z
> edge.
> 
> If I build the structure in gmsh this is quite simple to obtain by saying:
> 
> SetFactory("OpenCASCADE");
> thickness = 140e-6;
> nr_layers = 4;
> surf=newreg;
> Rectangle(surf)={.001,0,0,.001,.001,0};
> Extruded_surf() = Extrude { 0,0, thickness } { Surface{surf}; 
> Layers{nr_layers}; Recombine;};
> 
> But how can I apply this in case the parallelepiped is coming from a step 
> file? The command above
> (Extrude{...}{... Layers{}}) can't be used.

Indeed, we would need to "reverse engineer" the fact that the volume has indeed 
been created by extrusion. See

https://gitlab.onelab.info/gmsh/gmsh/-/issues/929

for the issue tracking this feature request.

Christophe


> 
> I was thinking about slicing the Volume with some planes (see example below)
> 
> SetFactory("OpenCASCADE");
> thickness = 140e-6;
> nr_layers = 4;
> surf=newreg;
> Rectangle(surf)={.001,0,0,.001,.001,0};
> Extruded_surf() = Extrude { 0,0, thickness } { Surface{surf};};
> vol() = Extruded_surf(1);
> For i In {1:nr_layers-1}
> surf1(i-1)=newreg;
> Rectangle(surf1(i-1)) = {.001, 0, thickness/nr_layers*i, .001, .001};
> EndFor
> results() = BooleanFragments{Volume{vol()};Delete;}{Surface{surf1()}; 
> Delete;};
> 
> but when trying to recombine the triangles in the layers I get the following 
> error:
> 
> Error  : Pyramid top vertex already classified on volume 2 (!= 3) - 
> non-manifold quad boundaries not supported
> yet
> 
> Any suggestion on how to address the issue is much appreciated.
> 
> Regards,
> 
> Marco
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://people.montefiore.ulg.ac.be/geuzaine





structured_grids_with_step_files_test_V06.geo
Description: Binary data
From my side I have spent some time thinking on how to solve, if possible, this 
problem 
with scripting tools only and I came out with the following idea

Assumptions:
1. The ID of the volume to be meshed with layered extrusion is known
2. The volume is extruded from a surface that belongs to a plane
3. Embedded curves are present only on top and bottom surfaces of the volume
4. The embedded curves on top does not match with embedded curves on bottom

I assume that if another entity is touching the volume (defined in points 1,2) 
on its top and bottom surfaces, due to conformal meshing requirements, this 
will 
create embedded curves on them hence assumption 3 and 4.

The procedure is as follows:

- Select the volume that requires layered extrusion
- Duplicate its bottom surface (including embedded curves) and top embedded 
curves
- Delete (recursive) the volume 
- Duplicate, translate and embed the top curves on the bottom surface. If 
translated
  curves intersects with original bottom curves use BooleanUnion
- Extrude the bottom mesh with Extrude{}{ Layers{...}}
- Embed the top curve on top surface generated by Extrude
- Run Coherence/BooleanFragmens

The attached script is a simplified version of the above procedure (the volume 
requiring
extrusion is already deleted, top embedded curves, bottom surface and embedded 
curves
already available).
I wanted to prepare a simple script and hopefully get a feedback before I embark
on further hours of scripting because there might be subtleties that only Gmsh 
developers
are aware of which, if overlooked, could lead to a unicorn chase from my side 
:-)

The script builds a cylinder inside a parallelepiped.

The cylinder is the volume meshed with a layered extrusion (along z) and it 
features
two embedded curves, one on top and one on bottom that are different in shape 
and location
on XY plane. 

The mesh type in the parallelepiped is arbitrary, it only needs to guarantee 
that
the total mesh (cube + cylinder) is conformal.

The results seem to give a conformal mesh and solve the extrusion problem.

Any feedback is much appreciated,

Many thanks,

Marco___
gmsh mailing list

Re: [Gmsh] Question on creating meshes with layered elements

2020-11-09 Thread Marco Antolovic
 Hello Christophe,
there appear to be problems with my email formatting.
To avoid that I re-send the previous message as a file (hopefully this should 
work)

Regards,
Marco

Il mercoledì 4 novembre 2020, 09:14:51 CET, Christophe Geuzaine 
 ha scritto:  
 
 

> On 22 Oct 2020, at 12:56, Marco Antolovic  wrote:
> 
> Hi all,
> 
> I'm trying to find the best way to approach the following problem:
> 
> I have a parallelepiped with the edge alone z much smaller than that along x 
> and y (this is typical, for example, 
> for PCB traces) and I would like to guarantee, in the volume, a predefined 
> number of layers (np_layers) along z
> edge.
> 
> If I build the structure in gmsh this is quite simple to obtain by saying:
> 
> SetFactory("OpenCASCADE");
> thickness = 140e-6;
> nr_layers = 4;
> surf=newreg;
> Rectangle(surf)={.001,0,0,.001,.001,0};
> Extruded_surf() = Extrude { 0,0, thickness } { Surface{surf}; 
> Layers{nr_layers}; Recombine;};
> 
> But how can I apply this in case the parallelepiped is coming from a step 
> file? The command above
> (Extrude{...}{... Layers{}}) can't be used.

Indeed, we would need to "reverse engineer" the fact that the volume has indeed 
been created by extrusion. See

https://gitlab.onelab.info/gmsh/gmsh/-/issues/929

for the issue tracking this feature request.

Christophe


> 
> I was thinking about slicing the Volume with some planes (see example below)
> 
> SetFactory("OpenCASCADE");
> thickness = 140e-6;
> nr_layers = 4;
> surf=newreg;
> Rectangle(surf)={.001,0,0,.001,.001,0};
> Extruded_surf() = Extrude { 0,0, thickness } { Surface{surf};};
> vol() = Extruded_surf(1);
> For i In {1:nr_layers-1}
> surf1(i-1)=newreg;
> Rectangle(surf1(i-1)) = {.001, 0, thickness/nr_layers*i, .001, .001};
> EndFor
> results() = BooleanFragments{Volume{vol()};Delete;}{Surface{surf1()}; 
> Delete;};
> 
> but when trying to recombine the triangles in the layers I get the following 
> error:
> 
> Error  : Pyramid top vertex already classified on volume 2 (!= 3) - 
> non-manifold quad boundaries not supported
> yet
> 
> Any suggestion on how to address the issue is much appreciated.
> 
> Regards,
> 
> Marco
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://people.montefiore.ulg.ac.be/geuzaine



  From my side I have spent some time thinking on how to solve, if possible, this 
problem 
with scripting tools only and I came out with the following idea

Assumptions:
1. The ID of the volume to be meshed with layered extrusion is known
2. The volume is extruded from a surface that belongs to a plane
3. Embedded curves are present only on top and bottom surfaces of the volume
4. The embedded curves on top does not match with embedded curves on bottom

I assume that if another entity is touching the volume (defined in points 1,2) 
on its top and bottom surfaces, due to conformal meshing requirements, this 
will 
create embedded curves on them hence assumption 3 and 4.

The procedure is as follows:

- Select the volume that requires layered extrusion
- Duplicate its bottom surface (including embedded curves) and top embedded 
curves
- Delete (recursive) the volume 
- Duplicate, translate and embed the top embedded curves on the bottom surface
- Extrude the bottom mesh with Extrude{}{ Layers{...}}
- Embed the top curve on top surface generated by Extrude
- Run Coherence/BooleanFragmens

The attached script is a simplified version of the above procedure (the volume 
requiring
extrusion is already deleted, top embedded curves, bottom surface and embedded 
curves
already available).
I wanted to prepare a simple script and hopefully get a feedback before I embark
on further hours of scripting because there might be subtleties that only Gmsh 
developers
are aware of which, if overlooked, could lead to a unicorn chase from my side 
:-)

The script builds a cylinder inside a parallelepiped.

The cylinder is the volume meshed with a layered extrusion (along z) and it 
features
two embedded curves, one on top and one on bottom that are different in shape 
and location
on XY plane. 

The mesh type in the parallelepiped is arbitrary, it only needs to guarantee 
that
the total mesh (cube + cylinder) is conformal.

The results seem to give a conformal mesh and solve the extrusion problem.

Any feedback is much appreciated,

Many thanks,

Marco

structured_grids_with_step_files_test_V05.geo
Description: Binary data
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question on creating meshes with layered elements

2020-11-08 Thread Marco Antolovic
 Hi Christiophe,
glad to see that this feature has been already formally requested.
>From my side I have spent some time thinking on how to solve, if possible, 
>this problem with scripting tools only and I came out with the following idea
Assumptions:1. The ID of the volume to be meshed with layered extrusion is 
known2. The volume is extruded from a surface that belongs to a plane3. 
Embedded curves are present only on top and bottom surfaces of the volume4. The 
embedded curves on top does not match with embedded curves on bottom
I assume that if another entity is touching the volume (defined in points 1,2) 
on its top and bottom surfaces, due to conformal meshing requirements, this 
will create embedded curves on them hence assumption 3 and 4.
The procedure is as follows:
- Select the volume that requires layered extrusion- Duplicate its bottom 
surface (including embedded curves) and top embedded curves- Delete (recursive) 
the volume - Duplicate, translate and embed the top embedded curves on the 
bottom surface- Extrude the bottom mesh with Extrude{}{ Layers{...}}- Embed the 
top curve on top surface generated by Extrude- Run Coherence/BooleanFragmens
The attached script is a simplified version of the above procedure (the volume 
requiring extrusion is already deleted, top embedded curves, bottom surface and 
embedded curves already available).I wanted to prepare a simple script and 
hopefully get a feedback before I embark on further hours of scripting because 
there might be subtleties that only Gmsh developers are aware of which, if 
overlooked, could lead to a unicorn chase from my side :-)

The script builds a cylinder inside a parallelepiped.
The cylinder is the volume meshed with a layered extrusion (along z) and it 
features two embedded curves, one on top and one on bottom that are different 
in shape and location on XY plane. 
The mesh type in the parallelepiped is arbitrary, it only needs to guarantee 
that the total mesh (cube + cylinder) is conformal.
The results seem to give a conformal mesh and solve the extrusion problem.
Any feedback is much appreciated,
Many thanks,
Marco




Il mercoledì 4 novembre 2020, 09:14:51 CET, Christophe Geuzaine 
 ha scritto:  
 
 

> On 22 Oct 2020, at 12:56, Marco Antolovic  wrote:
> 
> Hi all,
> 
> I'm trying to find the best way to approach the following problem:
> 
> I have a parallelepiped with the edge alone z much smaller than that along x 
> and y (this is typical, for example, 
> for PCB traces) and I would like to guarantee, in the volume, a predefined 
> number of layers (np_layers) along z
> edge.
> 
> If I build the structure in gmsh this is quite simple to obtain by saying:
> 
> SetFactory("OpenCASCADE");
> thickness = 140e-6;
> nr_layers = 4;
> surf=newreg;
> Rectangle(surf)={.001,0,0,.001,.001,0};
> Extruded_surf() = Extrude { 0,0, thickness } { Surface{surf}; 
> Layers{nr_layers}; Recombine;};
> 
> But how can I apply this in case the parallelepiped is coming from a step 
> file? The command above
> (Extrude{...}{... Layers{}}) can't be used.

Indeed, we would need to "reverse engineer" the fact that the volume has indeed 
been created by extrusion. See

https://gitlab.onelab.info/gmsh/gmsh/-/issues/929

for the issue tracking this feature request.

Christophe


> 
> I was thinking about slicing the Volume with some planes (see example below)
> 
> SetFactory("OpenCASCADE");
> thickness = 140e-6;
> nr_layers = 4;
> surf=newreg;
> Rectangle(surf)={.001,0,0,.001,.001,0};
> Extruded_surf() = Extrude { 0,0, thickness } { Surface{surf};};
> vol() = Extruded_surf(1);
> For i In {1:nr_layers-1}
> surf1(i-1)=newreg;
> Rectangle(surf1(i-1)) = {.001, 0, thickness/nr_layers*i, .001, .001};
> EndFor
> results() = BooleanFragments{Volume{vol()};Delete;}{Surface{surf1()}; 
> Delete;};
> 
> but when trying to recombine the triangles in the layers I get the following 
> error:
> 
> Error  : Pyramid top vertex already classified on volume 2 (!= 3) - 
> non-manifold quad boundaries not supported
> yet
> 
> Any suggestion on how to address the issue is much appreciated.
> 
> Regards,
> 
> Marco
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://people.montefiore.ulg.ac.be/geuzaine



  

structured_grids_with_step_files_test_V05.geo
Description: Binary data
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question on creating meshes with layered elements

2020-11-04 Thread Christophe Geuzaine


> On 22 Oct 2020, at 12:56, Marco Antolovic  wrote:
> 
> Hi all,
> 
> I'm trying to find the best way to approach the following problem:
> 
> I have a parallelepiped with the edge alone z much smaller than that along x 
> and y (this is typical, for example, 
> for PCB traces) and I would like to guarantee, in the volume, a predefined 
> number of layers (np_layers) along z
> edge.
> 
> If I build the structure in gmsh this is quite simple to obtain by saying:
> 
> SetFactory("OpenCASCADE");
> thickness = 140e-6;
> nr_layers = 4;
> surf=newreg;
> Rectangle(surf)={.001,0,0,.001,.001,0};
> Extruded_surf() = Extrude { 0,0, thickness } { Surface{surf}; 
> Layers{nr_layers}; Recombine;};
> 
> But how can I apply this in case the parallelepiped is coming from a step 
> file? The command above
> (Extrude{...}{... Layers{}}) can't be used.

Indeed, we would need to "reverse engineer" the fact that the volume has indeed 
been created by extrusion. See

https://gitlab.onelab.info/gmsh/gmsh/-/issues/929

for the issue tracking this feature request.

Christophe


> 
> I was thinking about slicing the Volume with some planes (see example below)
> 
> SetFactory("OpenCASCADE");
> thickness = 140e-6;
> nr_layers = 4;
> surf=newreg;
> Rectangle(surf)={.001,0,0,.001,.001,0};
> Extruded_surf() = Extrude { 0,0, thickness } { Surface{surf};};
> vol() = Extruded_surf(1);
> For i In {1:nr_layers-1}
> surf1(i-1)=newreg;
> Rectangle(surf1(i-1)) = {.001, 0, thickness/nr_layers*i, .001, .001};
> EndFor
> results() = BooleanFragments{Volume{vol()};Delete;}{Surface{surf1()}; 
> Delete;};
> 
> but when trying to recombine the triangles in the layers I get the following 
> error:
> 
> Error   : Pyramid top vertex already classified on volume 2 (!= 3) - 
> non-manifold quad boundaries not supported
> yet
> 
> Any suggestion on how to address the issue is much appreciated.
> 
> Regards,
> 
> Marco
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://people.montefiore.ulg.ac.be/geuzaine





___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question on creating meshes with layered elements

2020-10-22 Thread Marco Antolovic
Hi all,
I'm trying to find the best way to approach the following problem:
I have a parallelepiped with the edge alone z much smaller than that along x 
and y (this is typical, for example, for PCB traces) and I would like to 
guarantee, in the volume, a predefined number of layers (np_layers) along zedge.
If I build the structure in gmsh this is quite simple to obtain by saying:
SetFactory("OpenCASCADE");thickness = 140e-6;nr_layers = 
4;surf=newreg;Rectangle(surf)={.001,0,0,.001,.001,0};Extruded_surf() = Extrude 
{ 0,0, thickness } { Surface{surf}; Layers{nr_layers}; Recombine;};
But how can I apply this in case the parallelepiped is coming from a step file? 
The command above(Extrude{...}{... Layers{}}) can't be used.
I was thinking about slicing the Volume with some planes (see example below)
SetFactory("OpenCASCADE");thickness = 140e-6;nr_layers = 
4;surf=newreg;Rectangle(surf)={.001,0,0,.001,.001,0};Extruded_surf() = Extrude 
{ 0,0, thickness } { Surface{surf};};vol() = Extruded_surf(1);For i In 
{1:nr_layers-1}surf1(i-1)=newreg;Rectangle(surf1(i-1)) = {.001, 0, 
thickness/nr_layers*i, .001, .001};EndForresults() = 
BooleanFragments{Volume{vol()};Delete;}{Surface{surf1()}; Delete;};
but when trying to recombine the triangles in the layers I get the following 
error:
Error   : Pyramid top vertex already classified on volume 2 (!= 3) - 
non-manifold quad boundaries not supportedyet
Any suggestion on how to address the issue is much appreciated.
Regards,
Marco
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question about storing two vectors in one line of a msh file

2020-09-07 Thread cean wang
Hi,

In the $NodeData section of a msh file, like below, 1-component defines a
(scalar) field, and 3-component will define a vector field.

Could I use a 6-component value to define two vector fields? I have 3
transition and 3 rotation values for one grid point to store. Or I have to
make two $NodeData sections each have a 3-component value?

Regards,

Cean

$NodeData
1*1 string tag:*
"A scalar view"  *  the name of the view ("A scalar view")*
1*1 real tag:*
0.0  *  the time value (0.0)*
3*3 integer tags:*
0*  the time step (0; time steps always start at 0)*
1*  1-component (scalar) field*
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about adding new solver in onelab

2020-09-02 Thread Christophe Geuzaine


> On 27 Aug 2020, at 03:15, cean wang  wrote:
> 
> Sorry last post seems not working. It says An HTML attachment was 
> scrubbed..., So I try to post with another email program. Here it is.
> 
> 
> 
> 
> 
> I opened myinput.dat with gmsh and clicked on my solver to solver it, got a 
> message saying:
> 
>  
> Calling ‘“d:\mysolver.exe” -onelab “mysolver” 127.0.0.1:53927’
> 
> Abnormal server termination(Socket listening timeout on socket 127.0.0.1:0)
> 
>  
> I was expecting something like Calling ‘“d:\mysolver.exe myinput.dat”. Like 
> run in an terminal.
> 
>  
> Just wondering does a normal solver exe could be called directly? Or have to 
> be modified like the Double pendulum in C++ demo solver? But my solver is an 
> Fortran program.
> 

The goal of the ONELAB interface is to provide a simple communication layer 
between the solver(s) and Gmsh. You could e.g. take the simple Python solver 
example, and call your Fortran code from there with a simple system call. Since 
the Python code will have access to the ONELAB parameters, you could use it to 
generate the input file for your Fortran solver.

Christophe


>  
>  
> From: Max Orok
> Sent: Tuesday, August 25, 2020 8:18 PM
> To: cean wang
> Cc: Gmsh
> Subject: Re: [Gmsh] Question about adding new solver in onelab
> 
>  
> It's in the options list, to get to the list:
> 
> Open Gmsh -> Help -> Current Options and Workspace
> 
> Edit the value 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about adding new solver in onelab

2020-08-26 Thread cean wang
Sorry last post seems not working. It says An HTML attachment was
scrubbed..., So I try to post with another email program. Here it is.



I opened myinput.dat with gmsh and clicked on my solver to solver it, got a
message saying:



Calling ‘“d:\mysolver.exe” -onelab “mysolver” 127.0.0.1:53927’

Abnormal server termination(Socket listening timeout on socket 127.0.0.1:0)



I was expecting something like Calling ‘“d:\mysolver.exe myinput.dat”. Like
run in an terminal.



Just wondering does a normal solver exe could be called directly? Or have
to be modified like the Double pendulum in C++ demo solver? But my solver
is an Fortran program.





*From: *Max Orok 
*Sent: *Tuesday, August 25, 2020 8:18 PM
*To: *cean wang 
*Cc: *Gmsh 
*Subject: *Re: [Gmsh] Question about adding new solver in onelab



It's in the options list, to get to the list:

Open Gmsh -> Help -> Current Options and Workspace

Edit the value
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about adding new solver in onelab

2020-08-25 Thread Cean Wang
I opened myinput.dat with gmsh and clicked on my solver to solver it, got a message saying: Calling ‘“d:\mysolver.exe” -onelab “mysolver” 127.0.0.1:53927’Abnormal server termination(Socket listening timeout on socket 127.0.0.1:0) I was expecting something like Calling ‘“d:\mysolver.exe myinput.dat”. Like run in an terminal. Just wondering does a normal solver exe could be called directly? Or have to be modified like the Double pendulum in C++ demo solver? But my solver is an Fortran program.  From: Max OrokSent: Tuesday, August 25, 2020 8:18 PMTo: cean wangCc: GmshSubject: Re: [Gmsh] Question about adding new solver in onelab It's in the options list, to get to the list: Open Gmsh -> Help -> Current Options and WorkspaceEdit the value  

___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about adding new solver in onelab

2020-08-25 Thread Max Orok
It's in the options list, to get to the list:
Open Gmsh -> Help -> Current Options and Workspace
Edit the value

[image: image.png]

To save for next time:
Tools->Options->Save options on exit

[image: image.png]

Sincerely,
Max


On Tue, Aug 25, 2020 at 12:35 AM cean wang  wrote:

> Where is the "Solver.AutoMesh = 0" option?
>
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about adding new solver in onelab

2020-08-24 Thread cean wang
Where is the "Solver.AutoMesh = 0" option?
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] question

2020-08-24 Thread Christophe Geuzaine


> On 20 Jul 2020, at 10:28, Jean-François Remacle 
>  wrote:
> 
> hello
> 
> gmsh has not (yet) that capability
> 

Note that for geometries created with the built-in geometry kernel, you can 
extrude the geometry along the surface mesh normals. This can provide an 
alternative for simple geometries: see e.g. 
https://gitlab.onelab.info/gmsh/gmsh/-/blob/master/benchmarks/extrude/sphere_boundary_layer.geo

Christophe

> JF
> 
>> Le 18 juil. 2020 à 19:05, George Bourantas  a 
>> écrit :
>> 
>> Hi All,
>> 
>> How to generate a tetrahedral mesh with boundary layers?
>> 
>> Thank you in advance.
>> 
>> G.
>> ___
>> gmsh mailing list
>> gmsh@onelab.info
>> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fonelab.info%2Fmailman%2Flistinfo%2Fgmsh&data=02%7C01%7Cjean-francois.remacle%40uclouvain.be%7C293104fe733efcd008d82b3fb908%7C7ab090d4fa2e4ecfbc7c4127b4d582ec%7C0%7C0%7C637306900442035546&sdata=YfhIzsSyiaf7BQx3Her0gU0IauD7BuCD8Q4NVfTb9NI%3D&reserved=0
> 
> --
> Prof. Jean-Francois Remacle
> Universite catholique de Louvain (UCL)
> Ecole Polytechnique de Louvain (EPL) - Louvain School of Engineering
> Institute of Mechanics, Materials and Civil Engineering (iMMC)
> Center for Systems Engineering and Applied Mechanics (CESAME)
> Tel : +32-10-472352 -- Mobile : +32-473-909930 
> 
> 
> 
> 
> 
> 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about adding new solver in onelab

2020-08-24 Thread Christophe Geuzaine


> On 21 Aug 2020, at 02:44, cean wang  wrote:
> 
> Hi, 
> 
> I am using gmsh 4.5.6 win version.
> 
> I have a fea program (myfea.exe), it runs in a DOS Terminal with the 
> following command:
> 
> c:/myfea myinput.dat
> 
> myinput.dat includes mesh and boundary conditions. It could be opened by gmsh 
> and show the mesh correctly. myfea.exe will save the result in an msh file. I 
> added a new solver in gmsh and specified where myfea.exe is. When I run the 
> solver, gmsh seems to try to mesh the domain and overwrite myinput.dat file. 
> The result is myfea.exe can't myinput.dat anymore .
> 
> Wondering how do I disable the meshing, just do the solve?
> 

Set the "Solver.AutoMesh = 0" option.

Christophe


> Regards,
> 
> Cean 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question about adding new solver in onelab

2020-08-20 Thread cean wang
Hi,

I am using gmsh 4.5.6 win version.

I have a fea program (myfea.exe), it runs in a DOS Terminal with the
following command:

c:/myfea myinput.dat

myinput.dat includes mesh and boundary conditions. It could be opened by
gmsh and show the mesh correctly. myfea.exe will save the result in an msh
file. I added a new solver in gmsh and specified where myfea.exe is. When I
run the solver, gmsh seems to try to mesh the domain and overwrite
myinput.dat file. The result is myfea.exe can't myinput.dat anymore .

Wondering how do I disable the meshing, just do the solve?

Regards,

Cean
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] question

2020-07-20 Thread Jean-François Remacle
hello

gmsh has not (yet) that capability

JF

> Le 18 juil. 2020 à 19:05, George Bourantas  a 
> écrit :
> 
> Hi All,
> 
> How to generate a tetrahedral mesh with boundary layers?
> 
> Thank you in advance.
> 
> G.
> ___
> gmsh mailing list
> gmsh@onelab.info
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fonelab.info%2Fmailman%2Flistinfo%2Fgmsh&data=02%7C01%7Cjean-francois.remacle%40uclouvain.be%7C293104fe733efcd008d82b3fb908%7C7ab090d4fa2e4ecfbc7c4127b4d582ec%7C0%7C0%7C637306900442035546&sdata=YfhIzsSyiaf7BQx3Her0gU0IauD7BuCD8Q4NVfTb9NI%3D&reserved=0

--
Prof. Jean-Francois Remacle
Universite catholique de Louvain (UCL)
Ecole Polytechnique de Louvain (EPL) - Louvain School of Engineering
Institute of Mechanics, Materials and Civil Engineering (iMMC)
Center for Systems Engineering and Applied Mechanics (CESAME)
Tel : +32-10-472352 -- Mobile : +32-473-909930 

 





___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] question

2020-07-18 Thread George Bourantas
Hi All,

How to generate a tetrahedral mesh with boundary layers?

Thank you in advance.

G.
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question regarding values of boundingBox and General.MaxX/Y/Z and Geometry.Tolerance

2020-03-29 Thread Christophe Geuzaine


> On 27 Mar 2020, at 11:21, Tobias Lichti Fraunhofer ITWM 
>  wrote:
> 
> Hello all,
> 
> I have a question regarding the values of above variables/function output.
> 
> If my model is a cube of e.g. [Xmin , Ymin , Zmin , Xmax , Ymax , Zmax] = 
> [0,0,0,5,5,5] and I calculate the boundingBox of the model I will obtain 
> [0-1e-7 , 0-1e-7 , 0-1e-7 , 5+1e-7 , 5+1e-7 , 5+1e-7].
> The variables General.MinX/Y/Z and General.MaxX/Y/Z as well have an offset of 
> 1e-7.
> 
> This offset seems to be independent from Geometry.Tolerance.

Indeed, this is the internal tolerance of OpenCASCADE. To be on the safe side, 
OCC always adds this tolerance to its bounding boxes. Moreover, OCC bounding 
boxes are not guaranteed to be tight - they are sometimes actually completely 
unusable because they are much larger than the actual geometry.

To mitigate this issue, the latest development snapshot introduces a new 
option: "Geometry.OCCBoundsUseStl". If you set it to 1, the bounding boxes of 
OCC shapes are computed using to the STL mesh. They might be too small compared 
to the true shape (for curved surfaces), but this way you can at least choose 
your poison ;-)

See e.g. https://gitlab.onelab.info/gmsh/gmsh/-/blob/master/tutorial/t18.geo 
for an example.

Christophe

> 
> Can anyone tell me how the offset can be controlled or how it is defined?
> I am also grateful for every hint about how is the best way to get the exact 
> bounding box of the model.
> 
> Best regards and thanks in advance!
> Tobias
> 
> 
> 
> -- 
> Tobias Lichti
> Fraunhofer-Platz 1, 67663 Kaiserslautern, Germany
> Telefon: +49 631 31600-4974, Fax: +49 631 31600-5974
> mailto: tobias.lic...@itwm.fraunhofer.de
> www.itwm.fraunhofer.de
> 
> 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question regarding values of boundingBox and General.MaxX/Y/Z and Geometry.Tolerance

2020-03-27 Thread Tobias Lichti Fraunhofer ITWM

Hello all,

I have a question regarding the values of above variables/function output.

If my model is a cube of e.g. [Xmin , Ymin , Zmin , Xmax , Ymax ,  
Zmax] = [0,0,0,5,5,5] and I calculate the boundingBox of the model I  
will obtain [0-1e-7 , 0-1e-7 , 0-1e-7 , 5+1e-7 , 5+1e-7 , 5+1e-7].
The variables General.MinX/Y/Z and General.MaxX/Y/Z as well have an  
offset of 1e-7.


This offset seems to be independent from Geometry.Tolerance.

Can anyone tell me how the offset can be controlled or how it is defined?
I am also grateful for every hint about how is the best way to get the  
exact bounding box of the model.


Best regards and thanks in advance!
Tobias



--
Tobias Lichti
Fraunhofer-Platz 1, 67663 Kaiserslautern, Germany
Telefon: +49 631 31600-4974, Fax: +49 631 31600-5974
mailto: tobias.lic...@itwm.fraunhofer.de
www.itwm.fraunhofer.de



___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] question about python api

2019-12-02 Thread Frederic Dubois
Cool ! Thanks

- Mail original -
> De: "Christophe Geuzaine" 
> À: "Frederic Dubois" 
> Cc: "gmsh" 
> Envoyé: Lundi 2 Décembre 2019 16:00:25
> Objet: Re: [Gmsh] question about python api

>> On 29 Nov 2019, at 11:58, Frederic Dubois 
>> wrote:
>> 
>> Hi,
>> 
>> You are right gmsh.fltk.run()is my problem ; I thought that once you close 
>> the
>> graphical interface it finishes the script ...
> 
> This is now fixed in the latest snapshot: you can run, quit, relaunch the GUI,
> etc. from the same script.
> 
> Much nicer... and intuitive indeed :-)
> 
> Christophe
> 
> 
> 
>> 
>> Regards
>> 
>> - Mail original -
>>> De: "Christophe Geuzaine" 
>>> À: "Frederic Dubois" 
>>> Cc: "gmsh" 
>>> Envoyé: Vendredi 29 Novembre 2019 09:39:38
>>> Objet: Re: [Gmsh] question about python api
>> 
>>>> On 29 Nov 2019, at 09:06, Frederic Dubois 
>>>> wrote:
>>>> 
>>>> Hi Christophe,
>>>> 
>>>> In fact I did things in the "complicated" way to be able to recover the 2D
>>>> elements on the skin of the grains.
>>>> 
>>>> Using fragments, these elements are not created or saved even if I create 
>>>> a 2D
>>>> physical group (here "itz".
>>>> 
>>> 
>>> Works fine here. (Maybe you left gmsh.fltk.run() in the script? Saving the 
>>> mesh
>>> happens afterwards...)
>>> 
>>> Christophe
>>> 
>>>> Using the "complicated" way, how can I remove the duplicated nodes (like 
>>>> using
>>>> coherence in .geo file) ?
>>>> I tried to do this by fusing the two meshes but I am not confident in the
>>>> result.
>>>> 
>>>> Regards
>>>> 
>>>> - Mail original -
>>>>> De: "Christophe Geuzaine" 
>>>>> À: "Frederic Dubois" 
>>>>> Cc: "gmsh" 
>>>>> Envoyé: Jeudi 28 Novembre 2019 23:12:28
>>>>> Objet: Re: [Gmsh] question about python api
>>>> 
>>>>>> On 28 Nov 2019, at 22:42, Frederic Dubois 
>>>>>> 
>>>>>> wrote:
>>>>>> 
>>>>>> Hi Christophe,
>>>>>> 
>>>>>> You are right, this is the best way.
>>>>>> 
>>>>>> Can you comment this ?
>>>>>> f.remove(sphere1)
>>>>>> f.remove(sphere2)
>>>>> 
>>>>> Fragment tries hard to keep intact the tags of those entities that have 
>>>>> not been
>>>>> modified, here the two spheres. So I remove these two from the list of 
>>>>> returned
>>>>> entities, which gives me the remaining (new) volume - the paste.
>>>>> 
>>>>> Christophe
>>>>> 
>>>>> 
>>>>>> 
>>>>>> Regards
>>>>>> 
>>>>>> - Mail original -
>>>>>>> De: "Christophe Geuzaine" 
>>>>>>> À: "Frederic Dubois" 
>>>>>>> Cc: "gmsh" 
>>>>>>> Envoyé: Jeudi 28 Novembre 2019 21:31:12
>>>>>>> Objet: Re: [Gmsh] question about python api
>>>>>> 
>>>>>>>> On 28 Nov 2019, at 20:06, Frederic Dubois 
>>>>>>>> 
>>>>>>>> wrote:
>>>>>>>> 
>>>>>>>> Dear all,
>>>>>>>> 
>>>>>>>> I am trying to mesh a composite material made of paste and grains.
>>>>>>>> Since I have to do some Boolean operation on a 3D volume of composite 
>>>>>>>> I tried to
>>>>>>>> use the occ factory.
>>>>>>>> At the end of the day I need a continuous mesh where paste elements of 
>>>>>>>> the mesh
>>>>>>>> belong to a paste physical group and grains elements belong to an other
>>>>>>>> physical group.
>>>>>>>> 
>>>>>>>> In the attached script I first create a cylinder and two grains.
>>>>>>>> Using a cut I was able to obtain a mesh with all the elements 
>>>>>>>> belonging to the
>>>>>>>> past

Re: [Gmsh] question about python api

2019-12-02 Thread Christophe Geuzaine


> On 29 Nov 2019, at 11:58, Frederic Dubois  
> wrote:
> 
> Hi,
> 
> You are right gmsh.fltk.run()is my problem ; I thought that once you close 
> the graphical interface it finishes the script ...

This is now fixed in the latest snapshot: you can run, quit, relaunch the GUI, 
etc. from the same script.

Much nicer... and intuitive indeed :-)

Christophe



> 
> Regards
> 
> - Mail original -
>> De: "Christophe Geuzaine" 
>> À: "Frederic Dubois" 
>> Cc: "gmsh" 
>> Envoyé: Vendredi 29 Novembre 2019 09:39:38
>> Objet: Re: [Gmsh] question about python api
> 
>>> On 29 Nov 2019, at 09:06, Frederic Dubois 
>>> wrote:
>>> 
>>> Hi Christophe,
>>> 
>>> In fact I did things in the "complicated" way to be able to recover the 2D
>>> elements on the skin of the grains.
>>> 
>>> Using fragments, these elements are not created or saved even if I create a 
>>> 2D
>>> physical group (here "itz".
>>> 
>> 
>> Works fine here. (Maybe you left gmsh.fltk.run() in the script? Saving the 
>> mesh
>> happens afterwards...)
>> 
>> Christophe
>> 
>>> Using the "complicated" way, how can I remove the duplicated nodes (like 
>>> using
>>> coherence in .geo file) ?
>>> I tried to do this by fusing the two meshes but I am not confident in the
>>> result.
>>> 
>>> Regards
>>> 
>>> - Mail original -
>>>> De: "Christophe Geuzaine" 
>>>> À: "Frederic Dubois" 
>>>> Cc: "gmsh" 
>>>> Envoyé: Jeudi 28 Novembre 2019 23:12:28
>>>> Objet: Re: [Gmsh] question about python api
>>> 
>>>>> On 28 Nov 2019, at 22:42, Frederic Dubois 
>>>>> 
>>>>> wrote:
>>>>> 
>>>>> Hi Christophe,
>>>>> 
>>>>> You are right, this is the best way.
>>>>> 
>>>>> Can you comment this ?
>>>>> f.remove(sphere1)
>>>>> f.remove(sphere2)
>>>> 
>>>> Fragment tries hard to keep intact the tags of those entities that have 
>>>> not been
>>>> modified, here the two spheres. So I remove these two from the list of 
>>>> returned
>>>> entities, which gives me the remaining (new) volume - the paste.
>>>> 
>>>> Christophe
>>>> 
>>>> 
>>>>> 
>>>>> Regards
>>>>> 
>>>>> - Mail original -
>>>>>> De: "Christophe Geuzaine" 
>>>>>> À: "Frederic Dubois" 
>>>>>> Cc: "gmsh" 
>>>>>> Envoyé: Jeudi 28 Novembre 2019 21:31:12
>>>>>> Objet: Re: [Gmsh] question about python api
>>>>> 
>>>>>>> On 28 Nov 2019, at 20:06, Frederic Dubois 
>>>>>>> 
>>>>>>> wrote:
>>>>>>> 
>>>>>>> Dear all,
>>>>>>> 
>>>>>>> I am trying to mesh a composite material made of paste and grains.
>>>>>>> Since I have to do some Boolean operation on a 3D volume of composite I 
>>>>>>> tried to
>>>>>>> use the occ factory.
>>>>>>> At the end of the day I need a continuous mesh where paste elements of 
>>>>>>> the mesh
>>>>>>> belong to a paste physical group and grains elements belong to an other
>>>>>>> physical group.
>>>>>>> 
>>>>>>> In the attached script I first create a cylinder and two grains.
>>>>>>> Using a cut I was able to obtain a mesh with all the elements belonging 
>>>>>>> to the
>>>>>>> paste.
>>>>>>> Using a fuse I was able to obtain a mesh with all the elements 
>>>>>>> belonging to the
>>>>>>> grains.
>>>>>>> Unfortunately, it seems that the two meshes are separated.
>>>>>>> 
>>>>>>> I tried to fuse them to obtain a continuous mesh but I am not sure it 
>>>>>>> works fine
>>>>>>> and that it is the proper method.
>>>>>>> 
>>>>>>> Any advice ?
>>>>>> 
>>>>>> Simpler to use fragments:
>>>>>> 
>>>>&

Re: [Gmsh] question about python api

2019-11-29 Thread Frederic Dubois
Hi,

You are right gmsh.fltk.run()is my problem ; I thought that once you close the 
graphical interface it finishes the script ...

Regards

- Mail original -
> De: "Christophe Geuzaine" 
> À: "Frederic Dubois" 
> Cc: "gmsh" 
> Envoyé: Vendredi 29 Novembre 2019 09:39:38
> Objet: Re: [Gmsh] question about python api

>> On 29 Nov 2019, at 09:06, Frederic Dubois 
>> wrote:
>> 
>> Hi Christophe,
>> 
>> In fact I did things in the "complicated" way to be able to recover the 2D
>> elements on the skin of the grains.
>> 
>> Using fragments, these elements are not created or saved even if I create a 
>> 2D
>> physical group (here "itz".
>> 
> 
> Works fine here. (Maybe you left gmsh.fltk.run() in the script? Saving the 
> mesh
> happens afterwards...)
> 
> Christophe
> 
>> Using the "complicated" way, how can I remove the duplicated nodes (like 
>> using
>> coherence in .geo file) ?
>> I tried to do this by fusing the two meshes but I am not confident in the
>> result.
>> 
>> Regards
>> 
>> - Mail original -
>>> De: "Christophe Geuzaine" 
>>> À: "Frederic Dubois" 
>>> Cc: "gmsh" 
>>> Envoyé: Jeudi 28 Novembre 2019 23:12:28
>>> Objet: Re: [Gmsh] question about python api
>> 
>>>> On 28 Nov 2019, at 22:42, Frederic Dubois 
>>>> wrote:
>>>> 
>>>> Hi Christophe,
>>>> 
>>>> You are right, this is the best way.
>>>> 
>>>> Can you comment this ?
>>>> f.remove(sphere1)
>>>> f.remove(sphere2)
>>> 
>>> Fragment tries hard to keep intact the tags of those entities that have not 
>>> been
>>> modified, here the two spheres. So I remove these two from the list of 
>>> returned
>>> entities, which gives me the remaining (new) volume - the paste.
>>> 
>>> Christophe
>>> 
>>> 
>>>> 
>>>> Regards
>>>> 
>>>> - Mail original -
>>>>> De: "Christophe Geuzaine" 
>>>>> À: "Frederic Dubois" 
>>>>> Cc: "gmsh" 
>>>>> Envoyé: Jeudi 28 Novembre 2019 21:31:12
>>>>> Objet: Re: [Gmsh] question about python api
>>>> 
>>>>>> On 28 Nov 2019, at 20:06, Frederic Dubois 
>>>>>> 
>>>>>> wrote:
>>>>>> 
>>>>>> Dear all,
>>>>>> 
>>>>>> I am trying to mesh a composite material made of paste and grains.
>>>>>> Since I have to do some Boolean operation on a 3D volume of composite I 
>>>>>> tried to
>>>>>> use the occ factory.
>>>>>> At the end of the day I need a continuous mesh where paste elements of 
>>>>>> the mesh
>>>>>> belong to a paste physical group and grains elements belong to an other
>>>>>> physical group.
>>>>>> 
>>>>>> In the attached script I first create a cylinder and two grains.
>>>>>> Using a cut I was able to obtain a mesh with all the elements belonging 
>>>>>> to the
>>>>>> paste.
>>>>>> Using a fuse I was able to obtain a mesh with all the elements belonging 
>>>>>> to the
>>>>>> grains.
>>>>>> Unfortunately, it seems that the two meshes are separated.
>>>>>> 
>>>>>> I tried to fuse them to obtain a continuous mesh but I am not sure it 
>>>>>> works fine
>>>>>> and that it is the proper method.
>>>>>> 
>>>>>> Any advice ?
>>>>> 
>>>>> Simpler to use fragments:
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> Christophe
>>>>> 
>>>>> 
>>>>>> 
>>>>>> Regards
>>>>>> 
>>>>>> --
>>>>>> Frédéric Dubois, PhD, Eng.
>>>>>> ---
>>>>>> Directeur adjoint du LMGC.
>>>>>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>>>>>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>>>>>> http://www.lmgc.univ-montp2.fr/~dubois
>>>>>> Tel: 33/0 467144984
>>>>>> Mobile: 33/0 635490843
>>>>>> ___
>>>>>> gmsh mailing list
>>>>>> gmsh@onelab.info
>>>>>> http://onelab.info/mailman/listinfo/gmsh
>>>>> 
>>>>> —
>>>>> Prof. Christophe Geuzaine
>>>>> University of Liege, Electrical Engineering and Computer Science
>>>>> http://www.montefiore.ulg.ac.be/~geuzaine
>>>> 
>>>> --
>>>> Frédéric Dubois, PhD, Eng.
>>>> ---
>>>> Directeur adjoint du LMGC.
>>>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>>>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>>>> http://www.lmgc.univ-montp2.fr/~dubois
>>>> Tel: 33/0 467144984
>>>> Mobile: 33/0 635490843
>>> 
>>> —
>>> Prof. Christophe Geuzaine
>>> University of Liege, Electrical Engineering and Computer Science
>>> http://www.montefiore.ulg.ac.be/~geuzaine
>> 
>> --
>> Frédéric Dubois, PhD, Eng.
>> ---
>> Directeur adjoint du LMGC.
>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>> http://www.lmgc.univ-montp2.fr/~dubois
>> Tel: 33/0 467144984
>> Mobile: 33/0 635490843
>> 
> 
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine

-- 
Frédéric Dubois, PhD, Eng.
---
Directeur adjoint du LMGC.
Laboratoire de Mécanique et Génie Civil - CNRS/UM
cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
http://www.lmgc.univ-montp2.fr/~dubois
Tel: 33/0 467144984
Mobile: 33/0 635490843

___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] question about python api

2019-11-29 Thread cgeuzaine


> Le 29 nov. 2019 à 11:58, Frederic Dubois  a 
> écrit :
> 
> Hi,
> 
> You are right gmsh.fltk.run()is my problem ; I thought that once you close 
> the graphical interface it finishes the script ...
> 

Indeed we should fix that!

Christophe 



> Regards
> 
> - Mail original -
>> De: "Christophe Geuzaine" 
>> À: "Frederic Dubois" 
>> Cc: "gmsh" 
>> Envoyé: Vendredi 29 Novembre 2019 09:39:38
>> Objet: Re: [Gmsh] question about python api
> 
>>> On 29 Nov 2019, at 09:06, Frederic Dubois 
>>> wrote:
>>> 
>>> Hi Christophe,
>>> 
>>> In fact I did things in the "complicated" way to be able to recover the 2D
>>> elements on the skin of the grains.
>>> 
>>> Using fragments, these elements are not created or saved even if I create a 
>>> 2D
>>> physical group (here "itz".
>>> 
>> 
>> Works fine here. (Maybe you left gmsh.fltk.run() in the script? Saving the 
>> mesh
>> happens afterwards...)
>> 
>> Christophe
>> 
>>> Using the "complicated" way, how can I remove the duplicated nodes (like 
>>> using
>>> coherence in .geo file) ?
>>> I tried to do this by fusing the two meshes but I am not confident in the
>>> result.
>>> 
>>> Regards
>>> 
>>> - Mail original -
>>>> De: "Christophe Geuzaine" 
>>>> À: "Frederic Dubois" 
>>>> Cc: "gmsh" 
>>>> Envoyé: Jeudi 28 Novembre 2019 23:12:28
>>>> Objet: Re: [Gmsh] question about python api
>>> 
>>>>> On 28 Nov 2019, at 22:42, Frederic Dubois 
>>>>> 
>>>>> wrote:
>>>>> 
>>>>> Hi Christophe,
>>>>> 
>>>>> You are right, this is the best way.
>>>>> 
>>>>> Can you comment this ?
>>>>> f.remove(sphere1)
>>>>> f.remove(sphere2)
>>>> 
>>>> Fragment tries hard to keep intact the tags of those entities that have 
>>>> not been
>>>> modified, here the two spheres. So I remove these two from the list of 
>>>> returned
>>>> entities, which gives me the remaining (new) volume - the paste.
>>>> 
>>>> Christophe
>>>> 
>>>> 
>>>>> 
>>>>> Regards
>>>>> 
>>>>> - Mail original -
>>>>>> De: "Christophe Geuzaine" 
>>>>>> À: "Frederic Dubois" 
>>>>>> Cc: "gmsh" 
>>>>>> Envoyé: Jeudi 28 Novembre 2019 21:31:12
>>>>>> Objet: Re: [Gmsh] question about python api
>>>>> 
>>>>>>> On 28 Nov 2019, at 20:06, Frederic Dubois 
>>>>>>> 
>>>>>>> wrote:
>>>>>>> 
>>>>>>> Dear all,
>>>>>>> 
>>>>>>> I am trying to mesh a composite material made of paste and grains.
>>>>>>> Since I have to do some Boolean operation on a 3D volume of composite I 
>>>>>>> tried to
>>>>>>> use the occ factory.
>>>>>>> At the end of the day I need a continuous mesh where paste elements of 
>>>>>>> the mesh
>>>>>>> belong to a paste physical group and grains elements belong to an other
>>>>>>> physical group.
>>>>>>> 
>>>>>>> In the attached script I first create a cylinder and two grains.
>>>>>>> Using a cut I was able to obtain a mesh with all the elements belonging 
>>>>>>> to the
>>>>>>> paste.
>>>>>>> Using a fuse I was able to obtain a mesh with all the elements 
>>>>>>> belonging to the
>>>>>>> grains.
>>>>>>> Unfortunately, it seems that the two meshes are separated.
>>>>>>> 
>>>>>>> I tried to fuse them to obtain a continuous mesh but I am not sure it 
>>>>>>> works fine
>>>>>>> and that it is the proper method.
>>>>>>> 
>>>>>>> Any advice ?
>>>>>> 
>>>>>> Simpler to use fragments:
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Christophe
>>>>>> 
>

Re: [Gmsh] question about python api

2019-11-29 Thread Frederic Dubois
Hi Christophe,

In fact I did things in the "complicated" way to be able to recover the 2D 
elements on the skin of the grains.

Using fragments, these elements are not created or saved even if I create a 2D 
physical group (here "itz".

Using the "complicated" way, how can I remove the duplicated nodes (like using 
coherence in .geo file) ?
I tried to do this by fusing the two meshes but I am not confident in the 
result.

Regards

- Mail original -
> De: "Christophe Geuzaine" 
> À: "Frederic Dubois" 
> Cc: "gmsh" 
> Envoyé: Jeudi 28 Novembre 2019 23:12:28
> Objet: Re: [Gmsh] question about python api

>> On 28 Nov 2019, at 22:42, Frederic Dubois 
>> wrote:
>> 
>> Hi Christophe,
>> 
>> You are right, this is the best way.
>> 
>> Can you comment this ?
>> f.remove(sphere1)
>> f.remove(sphere2)
> 
> Fragment tries hard to keep intact the tags of those entities that have not 
> been
> modified, here the two spheres. So I remove these two from the list of 
> returned
> entities, which gives me the remaining (new) volume - the paste.
> 
> Christophe
> 
> 
>> 
>> Regards
>> 
>> - Mail original -
>>> De: "Christophe Geuzaine" 
>>> À: "Frederic Dubois" 
>>> Cc: "gmsh" 
>>> Envoyé: Jeudi 28 Novembre 2019 21:31:12
>>> Objet: Re: [Gmsh] question about python api
>> 
>>>> On 28 Nov 2019, at 20:06, Frederic Dubois 
>>>> wrote:
>>>> 
>>>> Dear all,
>>>> 
>>>> I am trying to mesh a composite material made of paste and grains.
>>>> Since I have to do some Boolean operation on a 3D volume of composite I 
>>>> tried to
>>>> use the occ factory.
>>>> At the end of the day I need a continuous mesh where paste elements of the 
>>>> mesh
>>>> belong to a paste physical group and grains elements belong to an other
>>>> physical group.
>>>> 
>>>> In the attached script I first create a cylinder and two grains.
>>>> Using a cut I was able to obtain a mesh with all the elements belonging to 
>>>> the
>>>> paste.
>>>> Using a fuse I was able to obtain a mesh with all the elements belonging 
>>>> to the
>>>> grains.
>>>> Unfortunately, it seems that the two meshes are separated.
>>>> 
>>>> I tried to fuse them to obtain a continuous mesh but I am not sure it 
>>>> works fine
>>>> and that it is the proper method.
>>>> 
>>>> Any advice ?
>>> 
>>> Simpler to use fragments:
>>> 
>>> 
>>> 
>>> 
>>> Christophe
>>> 
>>> 
>>>> 
>>>> Regards
>>>> 
>>>> --
>>>> Frédéric Dubois, PhD, Eng.
>>>> ---
>>>> Directeur adjoint du LMGC.
>>>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>>>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>>>> http://www.lmgc.univ-montp2.fr/~dubois
>>>> Tel: 33/0 467144984
>>>> Mobile: 33/0 635490843
>>>> ___
>>>> gmsh mailing list
>>>> gmsh@onelab.info
>>>> http://onelab.info/mailman/listinfo/gmsh
>>> 
>>> —
>>> Prof. Christophe Geuzaine
>>> University of Liege, Electrical Engineering and Computer Science
>>> http://www.montefiore.ulg.ac.be/~geuzaine
>> 
>> --
>> Frédéric Dubois, PhD, Eng.
>> ---
>> Directeur adjoint du LMGC.
>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>> http://www.lmgc.univ-montp2.fr/~dubois
>> Tel: 33/0 467144984
>> Mobile: 33/0 635490843
> 
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine

-- 
Frédéric Dubois, PhD, Eng.
---
Directeur adjoint du LMGC.
Laboratoire de Mécanique et Génie Civil - CNRS/UM
cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
http://www.lmgc.univ-montp2.fr/~dubois
Tel: 33/0 467144984
Mobile: 33/0 635490843

import math
import sys

import gmsh
gmsh.initialize(sys.argv)

# 1: MeshAdapt, 2: Automatic, 5: Delaunay, 6: Frontal-Delaunay, 7: BAMG,
# 8: Frontal-Delaunay for Quads, 9: Packing of Parallelograms
gmsh.option.setNumber("Mesh.Algorithm", 5)
# 1: Delaunay, 4: Frontal, 7: MMG3D, 9: R-tree, 10: HXT 
gmsh.option.setNumber("Mesh.Algorithm3

Re: [Gmsh] question about python api

2019-11-29 Thread Christophe Geuzaine


> On 29 Nov 2019, at 09:06, Frederic Dubois  
> wrote:
> 
> Hi Christophe,
> 
> In fact I did things in the "complicated" way to be able to recover the 2D 
> elements on the skin of the grains.
> 
> Using fragments, these elements are not created or saved even if I create a 
> 2D physical group (here "itz".
> 

Works fine here. (Maybe you left gmsh.fltk.run() in the script? Saving the mesh 
happens afterwards...)

Christophe

> Using the "complicated" way, how can I remove the duplicated nodes (like 
> using coherence in .geo file) ?
> I tried to do this by fusing the two meshes but I am not confident in the 
> result.
> 
> Regards
> 
> - Mail original -
>> De: "Christophe Geuzaine" 
>> À: "Frederic Dubois" 
>> Cc: "gmsh" 
>> Envoyé: Jeudi 28 Novembre 2019 23:12:28
>> Objet: Re: [Gmsh] question about python api
> 
>>> On 28 Nov 2019, at 22:42, Frederic Dubois 
>>> wrote:
>>> 
>>> Hi Christophe,
>>> 
>>> You are right, this is the best way.
>>> 
>>> Can you comment this ?
>>> f.remove(sphere1)
>>> f.remove(sphere2)
>> 
>> Fragment tries hard to keep intact the tags of those entities that have not 
>> been
>> modified, here the two spheres. So I remove these two from the list of 
>> returned
>> entities, which gives me the remaining (new) volume - the paste.
>> 
>> Christophe
>> 
>> 
>>> 
>>> Regards
>>> 
>>> - Mail original -
>>>> De: "Christophe Geuzaine" 
>>>> À: "Frederic Dubois" 
>>>> Cc: "gmsh" 
>>>> Envoyé: Jeudi 28 Novembre 2019 21:31:12
>>>> Objet: Re: [Gmsh] question about python api
>>> 
>>>>> On 28 Nov 2019, at 20:06, Frederic Dubois 
>>>>> 
>>>>> wrote:
>>>>> 
>>>>> Dear all,
>>>>> 
>>>>> I am trying to mesh a composite material made of paste and grains.
>>>>> Since I have to do some Boolean operation on a 3D volume of composite I 
>>>>> tried to
>>>>> use the occ factory.
>>>>> At the end of the day I need a continuous mesh where paste elements of 
>>>>> the mesh
>>>>> belong to a paste physical group and grains elements belong to an other
>>>>> physical group.
>>>>> 
>>>>> In the attached script I first create a cylinder and two grains.
>>>>> Using a cut I was able to obtain a mesh with all the elements belonging 
>>>>> to the
>>>>> paste.
>>>>> Using a fuse I was able to obtain a mesh with all the elements belonging 
>>>>> to the
>>>>> grains.
>>>>> Unfortunately, it seems that the two meshes are separated.
>>>>> 
>>>>> I tried to fuse them to obtain a continuous mesh but I am not sure it 
>>>>> works fine
>>>>> and that it is the proper method.
>>>>> 
>>>>> Any advice ?
>>>> 
>>>> Simpler to use fragments:
>>>> 
>>>> 
>>>> 
>>>> 
>>>> Christophe
>>>> 
>>>> 
>>>>> 
>>>>> Regards
>>>>> 
>>>>> --
>>>>> Frédéric Dubois, PhD, Eng.
>>>>> ---
>>>>> Directeur adjoint du LMGC.
>>>>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>>>>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>>>>> http://www.lmgc.univ-montp2.fr/~dubois
>>>>> Tel: 33/0 467144984
>>>>> Mobile: 33/0 635490843
>>>>> ___
>>>>> gmsh mailing list
>>>>> gmsh@onelab.info
>>>>> http://onelab.info/mailman/listinfo/gmsh
>>>> 
>>>> —
>>>> Prof. Christophe Geuzaine
>>>> University of Liege, Electrical Engineering and Computer Science
>>>> http://www.montefiore.ulg.ac.be/~geuzaine
>>> 
>>> --
>>> Frédéric Dubois, PhD, Eng.
>>> ---
>>> Directeur adjoint du LMGC.
>>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>>> http://www.lmgc.univ-montp2.fr/~dubois
>>> Tel: 33/0 467144984
>>> Mobile: 33/0 635490843
>> 
>> —
>> Prof. Christophe Geuzaine
>> University of Liege, Electrical Engineering and Computer Science
>> http://www.montefiore.ulg.ac.be/~geuzaine
> 
> -- 
> Frédéric Dubois, PhD, Eng.
> ---
> Directeur adjoint du LMGC.
> Laboratoire de Mécanique et Génie Civil - CNRS/UM
> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
> http://www.lmgc.univ-montp2.fr/~dubois
> Tel: 33/0 467144984
> Mobile: 33/0 635490843
> 

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] question about python api

2019-11-28 Thread Frederic Dubois
Hi Christophe,

You are right, this is the best way.

Can you comment this ?
f.remove(sphere1)
f.remove(sphere2)

Regards

- Mail original -
> De: "Christophe Geuzaine" 
> À: "Frederic Dubois" 
> Cc: "gmsh" 
> Envoyé: Jeudi 28 Novembre 2019 21:31:12
> Objet: Re: [Gmsh] question about python api

>> On 28 Nov 2019, at 20:06, Frederic Dubois 
>> wrote:
>> 
>> Dear all,
>> 
>> I am trying to mesh a composite material made of paste and grains.
>> Since I have to do some Boolean operation on a 3D volume of composite I 
>> tried to
>> use the occ factory.
>> At the end of the day I need a continuous mesh where paste elements of the 
>> mesh
>> belong to a paste physical group and grains elements belong to an other
>> physical group.
>> 
>> In the attached script I first create a cylinder and two grains.
>> Using a cut I was able to obtain a mesh with all the elements belonging to 
>> the
>> paste.
>> Using a fuse I was able to obtain a mesh with all the elements belonging to 
>> the
>> grains.
>> Unfortunately, it seems that the two meshes are separated.
>> 
>> I tried to fuse them to obtain a continuous mesh but I am not sure it works 
>> fine
>> and that it is the proper method.
>> 
>> Any advice ?
> 
> Simpler to use fragments:
> 
> 
> 
> 
> Christophe
> 
> 
>> 
>> Regards
>> 
>> --
>> Frédéric Dubois, PhD, Eng.
>> ---
>> Directeur adjoint du LMGC.
>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>> http://www.lmgc.univ-montp2.fr/~dubois
>> Tel: 33/0 467144984
>> Mobile: 33/0 635490843
>> ___
>> gmsh mailing list
>> gmsh@onelab.info
>> http://onelab.info/mailman/listinfo/gmsh
> 
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine

-- 
Frédéric Dubois, PhD, Eng.
---
Directeur adjoint du LMGC.
Laboratoire de Mécanique et Génie Civil - CNRS/UM
cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
http://www.lmgc.univ-montp2.fr/~dubois
Tel: 33/0 467144984
Mobile: 33/0 635490843

___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] question about python api

2019-11-28 Thread Christophe Geuzaine


> On 28 Nov 2019, at 22:42, Frederic Dubois  
> wrote:
> 
> Hi Christophe,
> 
> You are right, this is the best way.
> 
> Can you comment this ?
> f.remove(sphere1)
> f.remove(sphere2)

Fragment tries hard to keep intact the tags of those entities that have not 
been modified, here the two spheres. So I remove these two from the list of 
returned entities, which gives me the remaining (new) volume - the paste.

Christophe


> 
> Regards
> 
> - Mail original -
>> De: "Christophe Geuzaine" 
>> À: "Frederic Dubois" 
>> Cc: "gmsh" 
>> Envoyé: Jeudi 28 Novembre 2019 21:31:12
>> Objet: Re: [Gmsh] question about python api
> 
>>> On 28 Nov 2019, at 20:06, Frederic Dubois 
>>> wrote:
>>> 
>>> Dear all,
>>> 
>>> I am trying to mesh a composite material made of paste and grains.
>>> Since I have to do some Boolean operation on a 3D volume of composite I 
>>> tried to
>>> use the occ factory.
>>> At the end of the day I need a continuous mesh where paste elements of the 
>>> mesh
>>> belong to a paste physical group and grains elements belong to an other
>>> physical group.
>>> 
>>> In the attached script I first create a cylinder and two grains.
>>> Using a cut I was able to obtain a mesh with all the elements belonging to 
>>> the
>>> paste.
>>> Using a fuse I was able to obtain a mesh with all the elements belonging to 
>>> the
>>> grains.
>>> Unfortunately, it seems that the two meshes are separated.
>>> 
>>> I tried to fuse them to obtain a continuous mesh but I am not sure it works 
>>> fine
>>> and that it is the proper method.
>>> 
>>> Any advice ?
>> 
>> Simpler to use fragments:
>> 
>> 
>> 
>> 
>> Christophe
>> 
>> 
>>> 
>>> Regards
>>> 
>>> --
>>> Frédéric Dubois, PhD, Eng.
>>> ---
>>> Directeur adjoint du LMGC.
>>> Laboratoire de Mécanique et Génie Civil - CNRS/UM
>>> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
>>> http://www.lmgc.univ-montp2.fr/~dubois
>>> Tel: 33/0 467144984
>>> Mobile: 33/0 635490843
>>> ___
>>> gmsh mailing list
>>> gmsh@onelab.info
>>> http://onelab.info/mailman/listinfo/gmsh
>> 
>> —
>> Prof. Christophe Geuzaine
>> University of Liege, Electrical Engineering and Computer Science
>> http://www.montefiore.ulg.ac.be/~geuzaine
> 
> -- 
> Frédéric Dubois, PhD, Eng.
> ---
> Directeur adjoint du LMGC.
> Laboratoire de Mécanique et Génie Civil - CNRS/UM
> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
> http://www.lmgc.univ-montp2.fr/~dubois
> Tel: 33/0 467144984
> Mobile: 33/0 635490843

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] question about python api

2019-11-28 Thread Christophe Geuzaine


> On 28 Nov 2019, at 20:06, Frederic Dubois  
> wrote:
> 
> Dear all,
> 
> I am trying to mesh a composite material made of paste and grains.
> Since I have to do some Boolean operation on a 3D volume of composite I tried 
> to use the occ factory.
> At the end of the day I need a continuous mesh where paste elements of the 
> mesh belong to a paste physical group and grains elements belong to an other 
> physical group.
> 
> In the attached script I first create a cylinder and two grains.
> Using a cut I was able to obtain a mesh with all the elements belonging to 
> the  paste.
> Using a fuse I was able to obtain a mesh with all the elements belonging to 
> the grains.
> Unfortunately, it seems that the two meshes are separated.
> 
> I tried to fuse them to obtain a continuous mesh but I am not sure it works 
> fine and that it is the proper method.
> 
> Any advice ?

Simpler to use fragments:


import math
import sys

import gmsh
gmsh.initialize(sys.argv)

# 1: MeshAdapt, 2: Automatic, 5: Delaunay, 6: Frontal-Delaunay, 7: BAMG,
# 8: Frontal-Delaunay for Quads, 9: Packing of Parallelograms
gmsh.option.setNumber("Mesh.Algorithm", 5)
# 1: Delaunay, 4: Frontal, 7: MMG3D, 9: R-tree, 10: HXT
gmsh.option.setNumber("Mesh.Algorithm3D", 1)

# dreaming of an homogeneous mesh size
lc_=0.5
gmsh.option.setNumber("Mesh.CharacteristicLengthMin", lc_);
gmsh.option.setNumber("Mesh.CharacteristicLengthMax", lc_);
#
gmsh.option.setNumber("Mesh.MshFileVersion",2.2)

gmsh.model.add("cheese");

# cylinder
cyl = (3, gmsh.model.occ.addCylinder(0,0,0,0,0,5,2));

# grains
sphere1 = (3, gmsh.model.occ.addSphere(-1,0.,1,0.5))
sphere2 = (3, gmsh.model.occ.addSphere(1.,0.,4,0.5))

f, _ = gmsh.model.occ.fragment([cyl, sphere1, sphere2], [])
f.remove(sphere1)
f.remove(sphere2)

gmsh.model.occ.synchronize()

group1 = gmsh.model.addPhysicalGroup(3, [sphere1[1], sphere2[1]])
gmsh.model.setPhysicalName(3, group1, 'grains')

group2 = gmsh.model.addPhysicalGroup(3, [f[0][1]])
gmsh.model.setPhysicalName(3, group2, 'paste')

gmsh.fltk.run()

gmsh.model.mesh.generate(3)

gmsh.write("composite.msh")
gmsh.write("composite.vtk")

gmsh.finalize()


Christophe


> 
> Regards
> 
> -- 
> Frédéric Dubois, PhD, Eng.
> ---
> Directeur adjoint du LMGC.
> Laboratoire de Mécanique et Génie Civil - CNRS/UM
> cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier
> http://www.lmgc.univ-montp2.fr/~dubois
> Tel: 33/0 467144984
> Mobile: 33/0 635490843
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine



___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] question about python api

2019-11-28 Thread Frederic Dubois
Dear all, 

I am trying to mesh a composite material made of paste and grains. 
Since I have to do some Boolean operation on a 3D volume of composite I tried 
to use the occ factory. 
At the end of the day I need a continuous mesh where paste elements of the mesh 
belong to a paste physical group and grains elements belong to an other 
physical group. 

In the attached script I first create a cylinder and two grains. 
Using a cut I was able to obtain a mesh with all the elements belonging to the 
paste. 
Using a fuse I was able to obtain a mesh with all the elements belonging to the 
grains. 
Unfortunately, it seems that the two meshes are separated. 

I tried to fuse them to obtain a continuous mesh but I am not sure it works 
fine and that it is the proper method. 

Any advice ? 

Regards 

-- 
Frédéric Dubois, PhD, Eng. 
--- 
Directeur adjoint du LMGC. 
Laboratoire de Mécanique et Génie Civil - CNRS/UM 
cc 048, 163 rue Auguste Broussonnet, 34090 Montpellier 
http://www.lmgc.univ-montp2.fr/~dubois 
Tel: 33/0 467144984 
Mobile: 33/0 635490843 

import math
import sys

import gmsh
gmsh.initialize(sys.argv)

# 1: MeshAdapt, 2: Automatic, 5: Delaunay, 6: Frontal-Delaunay, 7: BAMG,
# 8: Frontal-Delaunay for Quads, 9: Packing of Parallelograms
gmsh.option.setNumber("Mesh.Algorithm", 5)
# 1: Delaunay, 4: Frontal, 7: MMG3D, 9: R-tree, 10: HXT 
gmsh.option.setNumber("Mesh.Algorithm3D", 1)

# dreaming of an homogeneous mesh size
lc_=0.5
gmsh.option.setNumber("Mesh.CharacteristicLengthMin", lc_);
gmsh.option.setNumber("Mesh.CharacteristicLengthMax", lc_);
#
gmsh.option.setNumber("Mesh.MshFileVersion",2.2)

gmsh.model.add("cheese");

# cylinder
cyl=gmsh.model.occ.addCylinder(0,0,0,0,0,5,2);


# grains
sphere1=gmsh.model.occ.addSphere(-1,0.,1,0.5)
sphere2=gmsh.model.occ.addSphere(1.,0.,4,0.5)

grains = gmsh.model.occ.fuse([(3,sphere1)],[(3,sphere2)])[0]
gmsh.model.occ.synchronize()

print(grains)
lg=[]
for g in grains:
  lg.append(g[1])
ggrains = gmsh.model.addPhysicalGroup(3,lg)
gmsh.model.setPhysicalName(3, ggrains, 'grains')

# paste = cyl - grains
paste= gmsh.model.occ.cut([(3,cyl)],grains,removeObject=True,removeTool=False)[0][0]
gmsh.model.occ.synchronize()

print(paste)
gpaste = gmsh.model.addPhysicalGroup(3,[paste[1]])
gmsh.model.setPhysicalName(3, gpaste, 'paste')

# # merging grains and paste 
all = gmsh.model.occ.fuse(grains,[paste],removeObject=False,removeTool=False)[0][0]
gmsh.model.occ.synchronize()

print(all)
gall = gmsh.model.addPhysicalGroup(3,[all[1]])
gmsh.model.setPhysicalName(3, gall, 'all')

gmsh.model.mesh.generate(3)

gmsh.write("composite.msh")
gmsh.write("composite.vtk")

gmsh.finalize()





___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] question about CharacteristicLengthMax

2019-10-18 Thread Christophe Geuzaine


> On 4 Oct 2019, at 05:54, Peter Johnston  wrote:
> 
> Hello,
> 
> I was under the impression that CharacteristicLengthMax was used to control 
> the mesh size in gmsh. However, I seem to he having some issues.
> 
> In the attached python script, I read in some STL files that define surface. 
> I then define some volumes and then mesh them. If I do not set 
> CharacteristicLengthMax I get a volume mesh as shown in no-max.jpg. This is 
> OK, but I would like some more nodes within and around my heart. If I set 
> CharacteristicLengthMax=0.5, then I get a similar mesh around the heart, but 
> it is finer away from the heart (max-0-5.jpg). However, if I set 
> CharacteristicLengthMax=0.05, then I appear to get rubbish, especially around 
> the heart (max-0-05.jpg).
> 
> Clearly, I have missed something.

The STL mesh you merge will not be remeshed, so it constraints the volume mesh 
size. If you want to remesh the STL, see e.g. tutorial/t13.geo.

Christophe

> 
> I also tried to use a ball around the heart region, but that didn’t achieve 
> anything. Given the above comments, I was unsure what to put in for VIN and 
> VOUT.
> 
> Any thoughts would be much appreciated.
> 
> Thank you,
> 
> Peter.
> 
> -
> 
> Associate Professor Peter Johnston (FAustMS, FIMA)
> School of Environment and Science
> Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
> T +61 7 373 57748| F +61 7 373 57656 Email p.johns...@griffith.edu.au
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] question on addEllipseArc in Occ in python api

2019-09-16 Thread Peter Johnston
Hello,

I am having problems trying to create an elliptical arc in gmsh using the 
python API. I keep getting the following run-time error:


[peter:gmsh] % python3 trial-ell.py

Traceback (most recent call last):

  File "trial-ell.py", line 80, in 

region()

  File "trial-ell.py", line 71, in region

inn_surf = gmsh.model.occ.addEllipseArc(pil,origin,major_in,piu,-1)

  File "/Users/peter/fromnet/gmsh-4.4.1-MacOSX-sdk/lib/gmsh.py", line 3503, in 
addEllipseArc

ierr.value)

ValueError: ('gmshModelOccAddEllipseArc returned non-zero error code: ', 1)

Unfortunately, I don’t know what this error means, despite having looked 
through the python source code. I have attached the offending code. I am using 
the gmsh 4.4.1 SDK.

If someone could help me, I would be most appreciative.

Thanks very much,

Peter.

-

Associate Professor Peter Johnston (FAustMS, FIMA)
School of Environment and Science
Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
T +61 7 373 57748| F +61 7 373 57656 Email p.johns...@griffith.edu.au


trial-ell.py
Description: trial-ell.py
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about gmesh number of nodes

2019-06-19 Thread Christophe Geuzaine


> On 15 Jun 2019, at 07:25, Mohamad Jalalimanesh  
> wrote:
> 
> Hello,
> I have the same question as this link :
> http://onelab.info/pipermail/gmsh/2012/007316.html 
> Specifically, I'm trying to do this in Command-line options with mesh1 output 
> type. How can I do that?

All Gmsh options can be set from the command line (using e.g. '-setnumber 
OptionName value' for numeric options); some popular options also have 
shortcuts. See the reference manual for the extensive list.

So if you want to scale the mesh size from the command line you could e.g. do

gmsh file.geo -3 -clscale 1
gmsh file.geo -3 -clscale 0.5
gmsh file.geo -3 -clscale 0.25

Christophe

> 
> Regards
> Mohamad
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question about gmesh number of nodes

2019-06-14 Thread Mohamad Jalalimanesh
Hello,
I have the same question as this link :
http://onelab.info/pipermail/gmsh/2012/007316.html
Specifically, I'm trying to do this in Command-line options with mesh1
output type. How can I do that?

Regards
Mohamad
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question on mesh visibility

2019-03-18 Thread Christophe Geuzaine


> On 18 Mar 2019, at 08:24, Peter Johnston  wrote:
> 
> Hello,
> 
> I created this simple .geo file:
> 
> Merge "bs610.stl";
> Mesh.Smoothing=100;
> //+
> Surface Loop(1) = {1};
> //+
> Volume(1) = {1};
> //+
> out[] = Translate{-100,0,0} {Duplicata{Volume {1};}};
> 
>  to read an STL file and duplicate and translate the surface.
> 
> However, I cannot see the new surface. I can see the two volume labels, but 
> only the original surface.
> 
> Have I done something wrong? Is there a switch that I need to set?
> 

Geometrical operations are currently only supported on CAD entities (not 
meshes).

Christophe


> Thanks,
> 
> Peter.
> 
> -
> 
> Associate Professor Peter Johnston (FAustMS, FIMA)
> School of Environment and Science
> Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
> T +61 7 373 57748| F +61 7 373 57656 Email p.johns...@griffith.edu.au
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question on mesh visibility

2019-03-18 Thread Peter Johnston
Hello,

I created this simple .geo file:


Merge "bs610.stl";

Mesh.Smoothing=100;

//+

Surface Loop(1) = {1};

//+

Volume(1) = {1};

//+

out[] = Translate{-100,0,0} {Duplicata{Volume {1};}};

 to read an STL file and duplicate and translate the surface.

However, I cannot see the new surface. I can see the two volume labels, but 
only the original surface.

Have I done something wrong? Is there a switch that I need to set?

Thanks,

Peter.

-

Associate Professor Peter Johnston (FAustMS, FIMA)
School of Environment and Science
Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
T +61 7 373 57748| F +61 7 373 57656 Email p.johns...@griffith.edu.au
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about Progression and Bump

2018-10-25 Thread Nathan J. Neeteson
Hi Alessandro,

If I am understanding you correctly, you can already accomplish this yourself 
as a user by calculating the number of nodes you need to specify for a given 
progression to get a desired first element size.

From a CFD perspective, what would make the most sense intuitively would be to 
be able to specify the length of the first element and the growth rate / 
progression and let gmsh calculate the total number of nodes. Of course in an 
ideal world if you could choose from any of the options for a given geometry 
would be best, but development time is limited, and these are all 
algorithmically equivalent to each other and can currently be accomplished with 
only a few extra lines of code in the .geo file.

In terms of actually adding functionality what would be the most useful would 
be the ability to specify the first element length at both ends of a line 
segment and the growth rate from each end and have gmsh distribute points along 
the line segment smoothly to obey these progressions. Currently there is a bit 
of added work for a user to have to construct 2 line segments to accomplish 
this and then also have to do some additional algebra to ensure that the grid 
spacing is relatively smooth where the unconstrained ends of the line segments 
meet.

Thanks,

Nathan J. Neeteson, M.Sc.
Flow Control Research Engineer
RGL Reservoir Management Inc.
Engineering & Design Group
P. 403.930.0371 (ext. 8371) | C. 613.929.6283
nneete...@rglinc.com<mailto:nneete...@rglinc.com> | rglinc.com
API Q1™ and ISO 9001:2015 certified facilities.
NOTE: Email and URL addresses have recently changed

From: Alessandro Vicini [mailto:alessandro.vic...@sitael.com]
Sent: October 25, 2018 3:14 AM
To: Ruth Vazquez Sabariego ; Nathan J. Neeteson 

Cc: gmsh@onelab.info
Subject: R: [Gmsh] Question about Progression and Bump


It might be useful having the possibility to specify the number of intervals 
and the length of the first element, rather than the progression…

A.


Da: gmsh [mailto:gmsh-boun...@ace20.montefiore.ulg.ac.be] Per conto di Ruth 
Vazquez Sabariego
Inviato: mercoledì 24 ottobre 2018 16:28
A: Nathan J. Neeteson
Cc: gmsh@onelab.info<mailto:gmsh@onelab.info>
Oggetto: Re: [Gmsh] Question about Progression and Bump

Dear Nathan,

As you have noticed, the Bump does not do a double geometrical progression.
The formula used is a bit more complicated, you can see what it actually does 
in the code (meshGEdge.cpp).

A double progression is not (yet?) available.
Work around by dividing your second region in two?

Regards,
Ruth


—
Prof. Ruth V. Sabariego
KU Leuven
Dept. Electrical Engineering ESAT/Electa, EnergyVille
http://www.esat.kuleuven.be/electa<https://urlsand.esvalabs.com/?u=http%3A%2F%2Fwww.esat.kuleuven.be%2Felecta&e=69b77ccd&h=6f8d0521&f=y&p=y>
http://www.energyville.be<https://urlsand.esvalabs.com/?u=http%3A%2F%2Fwww.energyville.be&e=69b77ccd&h=5cdb1935&f=y&p=y>

Free software: 
http://gmsh.info<https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgmsh.info&e=69b77ccd&h=ec49fb48&f=y&p=y>
 | 
http://getdp.info<https://urlsand.esvalabs.com/?u=http%3A%2F%2Fgetdp.info&e=69b77ccd&h=0e857c64&f=y&p=y>
 | 
http://onelab.info<https://urlsand.esvalabs.com/?u=http%3A%2F%2Fonelab.info&e=69b77ccd&h=e3a8f919&f=y&p=y>





On 23 Oct 2018, at 22:07, Nathan J. Neeteson 
mailto:nneete...@rglinc.com>> wrote:

Hello,

I have a question about using Progression and Bump in neighboring blocks in a 
block-structured mesh. What I want is for the two blocks to have cells of the 
same height where they meet. I know the thickness of the first cell from the 
wall (dx0), the length of each line (L), and the progression I want (r), so 
when I’m using Progression I can calculate the number of nodes to use as N = 
log(1+(L*(r-1))/(dx0)) / log(r) – 1. Then I can set the appropriate lines to 
Transfinite and assign them N Using Progression r and it works as expected.

However, in one of my blocks I want to refine towards both the top and bottom, 
so I need to use the Bump option. The problem is that I have no idea what “r” 
value to use after Bump (using the same r value as is used for Progression does 
not give me the results I want) and I also have no idea how to calculate the 
number of points to use along this line. MY first instinct was to calculate the 
number of points needed as double the number of points for a single progression 
with half of the length (two progressions end to end). I think this is right, 
but when I use r after Bump I get no refinement. What value am I supposed to 
use for number of points and the rate of growth when using the Bump function so 
that I get the equivalent of the product of two Progressions end to end?

Here is a zoomed in look at where I want the first cells to match heights:

The bott

Re: [Gmsh] Question about Progression and Bump

2018-10-24 Thread Nathan J. Neeteson
Hi Ruth,

Thanks for your response. I have indeed worked around the problem by dividing 
the domain into 2 planes and doing two separate single progressions. I was 
still curious what the response would be because I would like understand how 
Bump works even if I can't use it for this purpose.

I will look at the file you recommended I look at.

Thanks,
Nathan

Get Outlook for Android<https://aka.ms/ghei36>


From: Ruth Vazquez Sabariego 
Sent: Wednesday, October 24, 2018 8:27:41 AM
To: Nathan J. Neeteson
Cc: gmsh@onelab.info
Subject: Re: [Gmsh] Question about Progression and Bump

Dear Nathan,

As you have noticed, the Bump does not do a double geometrical progression.
The formula used is a bit more complicated, you can see what it actually does 
in the code (meshGEdge.cpp).

A double progression is not (yet?) available.
Work around by dividing your second region in two?

Regards,
Ruth


—
Prof. Ruth V. Sabariego
KU Leuven
Dept. Electrical Engineering ESAT/Electa, EnergyVille
http://www.esat.kuleuven.be/electa
http://www.energyville.be

Free software: http://gmsh.info | http://getdp.info | http://onelab.info







On 23 Oct 2018, at 22:07, Nathan J. Neeteson 
mailto:nneete...@rglinc.com>> wrote:

Hello,

I have a question about using Progression and Bump in neighboring blocks in a 
block-structured mesh. What I want is for the two blocks to have cells of the 
same height where they meet. I know the thickness of the first cell from the 
wall (dx0), the length of each line (L), and the progression I want (r), so 
when I’m using Progression I can calculate the number of nodes to use as N = 
log(1+(L*(r-1))/(dx0)) / log(r) – 1. Then I can set the appropriate lines to 
Transfinite and assign them N Using Progression r and it works as expected.

However, in one of my blocks I want to refine towards both the top and bottom, 
so I need to use the Bump option. The problem is that I have no idea what “r” 
value to use after Bump (using the same r value as is used for Progression does 
not give me the results I want) and I also have no idea how to calculate the 
number of points to use along this line. MY first instinct was to calculate the 
number of points needed as double the number of points for a single progression 
with half of the length (two progressions end to end). I think this is right, 
but when I use r after Bump I get no refinement. What value am I supposed to 
use for number of points and the rate of growth when using the Bump function so 
that I get the equivalent of the product of two Progressions end to end?

Here is a zoomed in look at where I want the first cells to match heights:

The bottom block uses single progression and the upper block you are seeing the 
lower end of the double progression.


Here is my .geo file:
---
// orifice properties
orificeLength = 0.03;
orificeRadius = 0.002;

// pipe properties
pipeRadius = 0.05;

// distance from orifice to inlet
inletDist = 5*pipeRadius;

// distance from orifice to outlet
outletDist = 5*pipeRadius;

// grid size parameters
r = 1.1; // growth parameter
dx0 = 1*10^(-4); // first wall dist for y+=1

upstreamNx = (Log(1 + ((inletDist*(r-1))/(dx0))) / Log(r)) - 1; // number of 
elements in x direction upstream
downstreamNx = (Log(1 + ((outletDist*(r-1))/(dx0))) / Log(r)) - 1; // number of 
elements in x direction upstream
orificeNx = orificeLength/dx0; // number of elements in x direction inside 
orifice

upstreamOrificeNy = orificeRadius/dx0;
upstreamPipeNy = 2*((Log(1 + pipeRadius-orificeRadius)/2)*(r-1))/(dx0))) / 
Log(r)) - 1);


// element index
i = 1;

// ~~-~~ POINTS ~~-~~
// order of point definition doesn't matter, just give descriptive names

inletCenterPoint = i;
Point(i) = {-orificeLength-inletDist,0,0,1};
i=i+1;

inletPipeWallPoint = i;
Point(i) = {-orificeLength-inletDist,pipeRadius,0,1};
i=i+1;

inletOrificeWallPoint = i;
Point(i) = {-orificeLength-inletDist,orificeRadius,0,1};
i=i+1;

upOrificeCenterPoint = i;
Point(i) = {-orificeLength,0,0,1};
i=i+1;

upOrificePipeWallPoint = i;
Point(i) = {-orificeLength,pipeRadius,0,1};
i=i+1;

upOrificeOrificeWallPoint = i;
Point(i) = {-orificeLength,orificeRadius,0,1};
i=i+1;


// ~~-~~ LINES ~~-~~
// all lines should be defined going up and/or to the right for consistency

inletOrificeLine = i;
Line(i) = {inletCenterPoint,inletOrificeWallPoint};
i=i+1;

inletPipeLine = i;
Line(i) = {inletOrificeWallPoint,inletPipeWallPoint};
i=i+1;

upstreamPipeWallLine = i;
Line(i) = {inletPipeWallPoint,upOrificePipeWallPoint};
i=i+1;

upstreamCenterLine = i;
Line(i) = {inletCenterPoint,upOrificeCenterPoint};
i=i+1;

upstreamOrificeLine = i;
Line(i) = {inletOrificeWallPoint,upOrificeOrificeWallPoint};
i=i+1;

upstreamOrificePlateLine = i;
Line(i) = {upO

Re: [Gmsh] Question about Progression and Bump

2018-10-24 Thread Ruth Vazquez Sabariego
Dear Nathan,

As you have noticed, the Bump does not do a double geometrical progression.
The formula used is a bit more complicated, you can see what it actually does 
in the code (meshGEdge.cpp).

A double progression is not (yet?) available.
Work around by dividing your second region in two?

Regards,
Ruth


—
Prof. Ruth V. Sabariego
KU Leuven
Dept. Electrical Engineering ESAT/Electa, EnergyVille
http://www.esat.kuleuven.be/electa
http://www.energyville.be

Free software: http://gmsh.info | http://getdp.info | http://onelab.info







On 23 Oct 2018, at 22:07, Nathan J. Neeteson 
mailto:nneete...@rglinc.com>> wrote:

Hello,

I have a question about using Progression and Bump in neighboring blocks in a 
block-structured mesh. What I want is for the two blocks to have cells of the 
same height where they meet. I know the thickness of the first cell from the 
wall (dx0), the length of each line (L), and the progression I want (r), so 
when I’m using Progression I can calculate the number of nodes to use as N = 
log(1+(L*(r-1))/(dx0)) / log(r) – 1. Then I can set the appropriate lines to 
Transfinite and assign them N Using Progression r and it works as expected.

However, in one of my blocks I want to refine towards both the top and bottom, 
so I need to use the Bump option. The problem is that I have no idea what “r” 
value to use after Bump (using the same r value as is used for Progression does 
not give me the results I want) and I also have no idea how to calculate the 
number of points to use along this line. MY first instinct was to calculate the 
number of points needed as double the number of points for a single progression 
with half of the length (two progressions end to end). I think this is right, 
but when I use r after Bump I get no refinement. What value am I supposed to 
use for number of points and the rate of growth when using the Bump function so 
that I get the equivalent of the product of two Progressions end to end?

Here is a zoomed in look at where I want the first cells to match heights:

The bottom block uses single progression and the upper block you are seeing the 
lower end of the double progression.


Here is my .geo file:
---
// orifice properties
orificeLength = 0.03;
orificeRadius = 0.002;

// pipe properties
pipeRadius = 0.05;

// distance from orifice to inlet
inletDist = 5*pipeRadius;

// distance from orifice to outlet
outletDist = 5*pipeRadius;

// grid size parameters
r = 1.1; // growth parameter
dx0 = 1*10^(-4); // first wall dist for y+=1

upstreamNx = (Log(1 + ((inletDist*(r-1))/(dx0))) / Log(r)) - 1; // number of 
elements in x direction upstream
downstreamNx = (Log(1 + ((outletDist*(r-1))/(dx0))) / Log(r)) - 1; // number of 
elements in x direction upstream
orificeNx = orificeLength/dx0; // number of elements in x direction inside 
orifice

upstreamOrificeNy = orificeRadius/dx0;
upstreamPipeNy = 2*((Log(1 + pipeRadius-orificeRadius)/2)*(r-1))/(dx0))) / 
Log(r)) - 1);


// element index
i = 1;

// ~~-~~ POINTS ~~-~~
// order of point definition doesn't matter, just give descriptive names

inletCenterPoint = i;
Point(i) = {-orificeLength-inletDist,0,0,1};
i=i+1;

inletPipeWallPoint = i;
Point(i) = {-orificeLength-inletDist,pipeRadius,0,1};
i=i+1;

inletOrificeWallPoint = i;
Point(i) = {-orificeLength-inletDist,orificeRadius,0,1};
i=i+1;

upOrificeCenterPoint = i;
Point(i) = {-orificeLength,0,0,1};
i=i+1;

upOrificePipeWallPoint = i;
Point(i) = {-orificeLength,pipeRadius,0,1};
i=i+1;

upOrificeOrificeWallPoint = i;
Point(i) = {-orificeLength,orificeRadius,0,1};
i=i+1;


// ~~-~~ LINES ~~-~~
// all lines should be defined going up and/or to the right for consistency

inletOrificeLine = i;
Line(i) = {inletCenterPoint,inletOrificeWallPoint};
i=i+1;

inletPipeLine = i;
Line(i) = {inletOrificeWallPoint,inletPipeWallPoint};
i=i+1;

upstreamPipeWallLine = i;
Line(i) = {inletPipeWallPoint,upOrificePipeWallPoint};
i=i+1;

upstreamCenterLine = i;
Line(i) = {inletCenterPoint,upOrificeCenterPoint};
i=i+1;

upstreamOrificeLine = i;
Line(i) = {inletOrificeWallPoint,upOrificeOrificeWallPoint};
i=i+1;

upstreamOrificePlateLine = i;
Line(i) = {upOrificeOrificeWallPoint,upOrificePipeWallPoint};
i=i+1;

upstreamOrificeEntryLine = i;
Line(i) = {upOrificeCenterPoint,upOrificeOrificeWallPoint};
i=i+1;

// ~~-~~ LINE LOOPS ~~-~~
// all line loops should be oriented clockwise

upstreamPipeLoop = i;
Line Loop(i) = 
{inletPipeLine,upstreamPipeWallLine,-upstreamOrificePlateLine,-upstreamOrificeLine};
i=i+1;

upstreamOrificeLoop = i;
Line Loop(i) = 
{inletOrificeLine,upstreamOrificeLine,-upstreamOrificeEntryLine,-upstreamCenterLine};
i=i+1;



// ~~-~~ PLANE SURFACES ~~-~~

upstreamPipePlane = i;
Plane Surface(i)

[Gmsh] Question about Progression and Bump

2018-10-23 Thread Nathan J. Neeteson
Hello,

I have a question about using Progression and Bump in neighboring blocks in a 
block-structured mesh. What I want is for the two blocks to have cells of the 
same height where they meet. I know the thickness of the first cell from the 
wall (dx0), the length of each line (L), and the progression I want (r), so 
when I'm using Progression I can calculate the number of nodes to use as N = 
log(1+(L*(r-1))/(dx0)) / log(r) - 1. Then I can set the appropriate lines to 
Transfinite and assign them N Using Progression r and it works as expected.

However, in one of my blocks I want to refine towards both the top and bottom, 
so I need to use the Bump option. The problem is that I have no idea what "r" 
value to use after Bump (using the same r value as is used for Progression does 
not give me the results I want) and I also have no idea how to calculate the 
number of points to use along this line. MY first instinct was to calculate the 
number of points needed as double the number of points for a single progression 
with half of the length (two progressions end to end). I think this is right, 
but when I use r after Bump I get no refinement. What value am I supposed to 
use for number of points and the rate of growth when using the Bump function so 
that I get the equivalent of the product of two Progressions end to end?

Here is a zoomed in look at where I want the first cells to match heights:

The bottom block uses single progression and the upper block you are seeing the 
lower end of the double progression.
[cid:image001.png@01D46AD9.B5964A40]

Here is my .geo file:
---
// orifice properties
orificeLength = 0.03;
orificeRadius = 0.002;

// pipe properties
pipeRadius = 0.05;

// distance from orifice to inlet
inletDist = 5*pipeRadius;

// distance from orifice to outlet
outletDist = 5*pipeRadius;

// grid size parameters
r = 1.1; // growth parameter
dx0 = 1*10^(-4); // first wall dist for y+=1

upstreamNx = (Log(1 + ((inletDist*(r-1))/(dx0))) / Log(r)) - 1; // number of 
elements in x direction upstream
downstreamNx = (Log(1 + ((outletDist*(r-1))/(dx0))) / Log(r)) - 1; // number of 
elements in x direction upstream
orificeNx = orificeLength/dx0; // number of elements in x direction inside 
orifice

upstreamOrificeNy = orificeRadius/dx0;
upstreamPipeNy = 2*((Log(1 + pipeRadius-orificeRadius)/2)*(r-1))/(dx0))) / 
Log(r)) - 1);


// element index
i = 1;

// ~~-~~ POINTS ~~-~~
// order of point definition doesn't matter, just give descriptive names

inletCenterPoint = i;
Point(i) = {-orificeLength-inletDist,0,0,1};
i=i+1;

inletPipeWallPoint = i;
Point(i) = {-orificeLength-inletDist,pipeRadius,0,1};
i=i+1;

inletOrificeWallPoint = i;
Point(i) = {-orificeLength-inletDist,orificeRadius,0,1};
i=i+1;

upOrificeCenterPoint = i;
Point(i) = {-orificeLength,0,0,1};
i=i+1;

upOrificePipeWallPoint = i;
Point(i) = {-orificeLength,pipeRadius,0,1};
i=i+1;

upOrificeOrificeWallPoint = i;
Point(i) = {-orificeLength,orificeRadius,0,1};
i=i+1;


// ~~-~~ LINES ~~-~~
// all lines should be defined going up and/or to the right for consistency

inletOrificeLine = i;
Line(i) = {inletCenterPoint,inletOrificeWallPoint};
i=i+1;

inletPipeLine = i;
Line(i) = {inletOrificeWallPoint,inletPipeWallPoint};
i=i+1;

upstreamPipeWallLine = i;
Line(i) = {inletPipeWallPoint,upOrificePipeWallPoint};
i=i+1;

upstreamCenterLine = i;
Line(i) = {inletCenterPoint,upOrificeCenterPoint};
i=i+1;

upstreamOrificeLine = i;
Line(i) = {inletOrificeWallPoint,upOrificeOrificeWallPoint};
i=i+1;

upstreamOrificePlateLine = i;
Line(i) = {upOrificeOrificeWallPoint,upOrificePipeWallPoint};
i=i+1;

upstreamOrificeEntryLine = i;
Line(i) = {upOrificeCenterPoint,upOrificeOrificeWallPoint};
i=i+1;

// ~~-~~ LINE LOOPS ~~-~~
// all line loops should be oriented clockwise

upstreamPipeLoop = i;
Line Loop(i) = 
{inletPipeLine,upstreamPipeWallLine,-upstreamOrificePlateLine,-upstreamOrificeLine};
i=i+1;

upstreamOrificeLoop = i;
Line Loop(i) = 
{inletOrificeLine,upstreamOrificeLine,-upstreamOrificeEntryLine,-upstreamCenterLine};
i=i+1;



// ~~-~~ PLANE SURFACES ~~-~~

upstreamPipePlane = i;
Plane Surface(i) = upstreamPipeLoop;
i=i+1;

upstreamOrificePlane = i;
Plane Surface(i) = upstreamOrificeLoop;
i=i+1;



// ~~-~~ MAKE STRUCTURED ~~-~~

// the x-oriented lines upstream of the orifice
Transfinite 
Line{-upstreamCenterLine,-upstreamOrificeLine,-upstreamPipeWallLine} = 
upstreamNx Using Progression r;

// the x-oriented lines in the orifice


// the x-oriented lines downstream of the orifice


// the y-oriented lines from the centerline to the orifice radius
Transfinite Line{inletOrificeLine,upstreamOrificeEntryLine} = upstreamOrificeNy;

/

Re: [Gmsh] Question Gmsh in FreeCAD

2018-10-06 Thread Christophe Geuzaine


> On 4 Oct 2018, at 09:49, Takdanai Tapsuwan 
>  wrote:
> 
> Dear Sirs,
> 
> I am doing right now my bachelor-thesis in topic FE-Simulation for a cast 
> componet. Now, I did my componet meshing in FreeCAD and I would like to ask 
> you some questions:
> 
> 1. What did the Gmsh in FreeCAD do? Is it Tria3 (linear) or Tria6 (quad) 
> selected?
> 2. What's the different between meshing by shape and meshing by 3D?
> 

No idea... You should ask the FreeCAD guys.

> Many thanks in advance
> 
> Best regards
> 
> Takdanai Tapsuwan
> 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question Gmsh in FreeCAD

2018-10-04 Thread Takdanai Tapsuwan
Dear Sirs,

I am doing right now my bachelor-thesis in topic FE-Simulation for a cast 
componet. Now, I did my componet meshing in FreeCAD and I would like to ask you 
some questions:

1. What did the Gmsh in FreeCAD do? Is it Tria3 (linear) or Tria6 (quad) 
selected?
2. What's the different between meshing by shape and meshing by 3D?

Many thanks in advance

Best regards

Takdanai Tapsuwan


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question on gmsh meshing with size determined by executable

2018-09-19 Thread Max Orok
Hi Moritz,

You can either add this line to your geo file: Mesh.MshFileVersion=2.2
Or, use the command line option -format msh2

Sincerely,
Max Orok

On Wed, Sep 19, 2018 at 6:18 AM moritz braun  wrote:

> Dear Christophe
> Dear Colleagues
>
> Is there maybe a way  to use the old version of the output format for
> compatibility  i.e
> an option on the command line?
> Otherwise I will be kind of stuck.
>
>
> Regards
>
> Moritz
>
> On Wed, Sep 19, 2018 at 11:54 AM, Christophe Geuzaine  > wrote:
>
>>
>>
>> > On 19 Sep 2018, at 10:34, moritz braun  wrote:
>> >
>> > Dear Christophe
>> > Dear Fellow gmsh users!
>> >
>> > Currently my geo file ends with
>> > Volume (186)={theloops[]};
>> > Physical Volume(999)= 186;
>> > I assume for every point  would need to add
>> > Point {x_i,y_i,z_i} in Volume{186};
>> > Is that the right syntax?
>>
>> exact : see e.g.
>> https://gitlab.onelab.info/gmsh/gmsh/blob/master/tutorial/t15.geo
>>
>> >
>> > Regards
>> >
>> > Moritz
>> >
>> >
>> > On Tue, Sep 18, 2018 at 9:13 PM, Christophe Geuzaine <
>> cgeuza...@uliege.be> wrote:
>> >
>> >
>> > > On 18 Sep 2018, at 12:16, moritz braun 
>> wrote:
>> > >
>> > > Dear Christophe
>> > >
>> > > I am currently using gmsh  with a size function
>> > > that becomes very small, but not zero
>> > > close to the positions of nuclei in a molecule
>> > > and is scaling close to linear for distances > 0.1 abohr.
>> > > More specifically
>> > > i have chosen the size function as
>> > > S*sqrt(0.02**2+d**2), with S as a parameter between 0.1 and 0.5
>> > > It would possbily make my calculation more exact
>> > > if I could force gmsh to use the nuclear positions
>> > > as grid points.
>> > > Is there a way to  get gmsh to do that?
>> > >
>> >
>> > Yes : in .geo files, use "Point { ... } In Surface { ... };" or "Point
>> { ... } In Volume { ... };".
>> >
>> > In the API (Python, Julia, C++ or C), use the "embed" function.
>> >
>> > Cheers,
>> >
>> > Christophe
>> >
>> > > Regards
>> > >
>> > > Moritz
>> > >
>> > > --
>> > > Prof M Braun Tel.:27-12-4298006/8027
>> > > Physics Department  Fax.: 27-12-4293643
>> > > University of South Africa (UNISA)
>> > > moritz.br...@gmail.com
>> > > P.O. Box 392
>> > > 0003
>> > > UNISA
>> > >  South Africa
>> > > http://moritz-braun.blogspot.com
>> >
>> > —
>> > Prof. Christophe Geuzaine
>> > University of Liege, Electrical Engineering and Computer Science
>> > http://www.montefiore.ulg.ac.be/~geuzaine
>> >
>> > Free software: http://gmsh.info | http://getdp.info |
>> http://onelab.info
>> >
>> >
>> >
>> >
>> > --
>> > Prof M Braun Tel.:27-12-4298006/8027
>> > Physics Department  Fax.: 27-12-4293643
>> > University of South Africa (UNISA)
>> > moritz.br...@gmail.com
>> > P.O. Box 392
>> > 0003
>> > UNISA
>> >  South Africa
>> > http://moritz-braun.blogspot.com
>>
>> —
>> Prof. Christophe Geuzaine
>> University of Liege, Electrical Engineering and Computer Science
>> http://www.montefiore.ulg.ac.be/~geuzaine
>>
>> Free software: http://gmsh.info | http://getdp.info | http://onelab.info
>>
>>
>
>
> --
> Prof M Braun Tel.:27-12-4298006/8027
> Physics Department  Fax.: 27-12-4293643
> University of South Africa (UNISA)
> moritz.br...@gmail.com
> P.O. Box 392
> 0003
> UNISA
>  South Africa
> http://moritz-braun.blogspot.com
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question on gmsh meshing with size determined by executable

2018-09-19 Thread moritz braun
Dear Christophe
Dear Colleagues

Is there maybe a way  to use the old version of the output format for
compatibility  i.e
an option on the command line?
Otherwise I will be kind of stuck.


Regards

Moritz

On Wed, Sep 19, 2018 at 11:54 AM, Christophe Geuzaine 
wrote:

>
>
> > On 19 Sep 2018, at 10:34, moritz braun  wrote:
> >
> > Dear Christophe
> > Dear Fellow gmsh users!
> >
> > Currently my geo file ends with
> > Volume (186)={theloops[]};
> > Physical Volume(999)= 186;
> > I assume for every point  would need to add
> > Point {x_i,y_i,z_i} in Volume{186};
> > Is that the right syntax?
>
> exact : see e.g. https://gitlab.onelab.info/gmsh/gmsh/blob/master/
> tutorial/t15.geo
>
> >
> > Regards
> >
> > Moritz
> >
> >
> > On Tue, Sep 18, 2018 at 9:13 PM, Christophe Geuzaine <
> cgeuza...@uliege.be> wrote:
> >
> >
> > > On 18 Sep 2018, at 12:16, moritz braun  wrote:
> > >
> > > Dear Christophe
> > >
> > > I am currently using gmsh  with a size function
> > > that becomes very small, but not zero
> > > close to the positions of nuclei in a molecule
> > > and is scaling close to linear for distances > 0.1 abohr.
> > > More specifically
> > > i have chosen the size function as
> > > S*sqrt(0.02**2+d**2), with S as a parameter between 0.1 and 0.5
> > > It would possbily make my calculation more exact
> > > if I could force gmsh to use the nuclear positions
> > > as grid points.
> > > Is there a way to  get gmsh to do that?
> > >
> >
> > Yes : in .geo files, use "Point { ... } In Surface { ... };" or "Point {
> ... } In Volume { ... };".
> >
> > In the API (Python, Julia, C++ or C), use the "embed" function.
> >
> > Cheers,
> >
> > Christophe
> >
> > > Regards
> > >
> > > Moritz
> > >
> > > --
> > > Prof M Braun Tel.:27-12-4298006/8027
> > > Physics Department  Fax.: 27-12-4293643
> > > University of South Africa (UNISA)
> > > moritz.br...@gmail.com
> > > P.O. Box 392
> > > 0003
> > > UNISA
> > >  South Africa
> > > http://moritz-braun.blogspot.com
> >
> > —
> > Prof. Christophe Geuzaine
> > University of Liege, Electrical Engineering and Computer Science
> > http://www.montefiore.ulg.ac.be/~geuzaine
> >
> > Free software: http://gmsh.info | http://getdp.info | http://onelab.info
> >
> >
> >
> >
> > --
> > Prof M Braun Tel.:27-12-4298006/8027
> > Physics Department  Fax.: 27-12-4293643
> > University of South Africa (UNISA)
> > moritz.br...@gmail.com
> > P.O. Box 392
> > 0003
> > UNISA
> >  South Africa
> > http://moritz-braun.blogspot.com
>
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
> Free software: http://gmsh.info | http://getdp.info | http://onelab.info
>
>


-- 
Prof M Braun Tel.:27-12-4298006/8027
Physics Department  Fax.: 27-12-4293643
University of South Africa (UNISA)
moritz.br...@gmail.com
P.O. Box 392
0003
UNISA
 South Africa
http://moritz-braun.blogspot.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question on gmsh meshing with size determined by executable

2018-09-18 Thread moritz braun
Awesome, thanks!

On Tue, Sep 18, 2018, 9:13 PM Christophe Geuzaine 
wrote:

>
>
> > On 18 Sep 2018, at 12:16, moritz braun  wrote:
> >
> > Dear Christophe
> >
> > I am currently using gmsh  with a size function
> > that becomes very small, but not zero
> > close to the positions of nuclei in a molecule
> > and is scaling close to linear for distances > 0.1 abohr.
> > More specifically
> > i have chosen the size function as
> > S*sqrt(0.02**2+d**2), with S as a parameter between 0.1 and 0.5
> > It would possbily make my calculation more exact
> > if I could force gmsh to use the nuclear positions
> > as grid points.
> > Is there a way to  get gmsh to do that?
> >
>
> Yes : in .geo files, use "Point { ... } In Surface { ... };" or "Point {
> ... } In Volume { ... };".
>
> In the API (Python, Julia, C++ or C), use the "embed" function.
>
> Cheers,
>
> Christophe
>
> > Regards
> >
> > Moritz
> >
> > --
> > Prof M Braun Tel.:27-12-4298006/8027
> > Physics Department  Fax.: 27-12-4293643
> > University of South Africa (UNISA)
> > moritz.br...@gmail.com
> > P.O. Box 392
> > 0003
> > UNISA
> >  South Africa
> > http://moritz-braun.blogspot.com
>
> —
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
> Free software: http://gmsh.info | http://getdp.info | http://onelab.info
>
>
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question on gmsh meshing with size determined by executable

2018-09-18 Thread Christophe Geuzaine


> On 18 Sep 2018, at 12:16, moritz braun  wrote:
> 
> Dear Christophe
> 
> I am currently using gmsh  with a size function 
> that becomes very small, but not zero
> close to the positions of nuclei in a molecule
> and is scaling close to linear for distances > 0.1 abohr.
> More specifically
> i have chosen the size function as
> S*sqrt(0.02**2+d**2), with S as a parameter between 0.1 and 0.5
> It would possbily make my calculation more exact
> if I could force gmsh to use the nuclear positions
> as grid points.
> Is there a way to  get gmsh to do that?
> 

Yes : in .geo files, use "Point { ... } In Surface { ... };" or "Point { ... } 
In Volume { ... };".

In the API (Python, Julia, C++ or C), use the "embed" function.

Cheers,

Christophe

> Regards
> 
> Moritz 
> 
> -- 
> Prof M Braun Tel.:27-12-4298006/8027
> Physics Department  Fax.: 27-12-4293643
> University of South Africa (UNISA)  
> moritz.br...@gmail.com
> P.O. Box 392 
> 0003 
> UNISA
>  South Africa 
> http://moritz-braun.blogspot.com

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question on gmsh meshing with size determined by executable

2018-09-18 Thread moritz braun
Dear Christophe

I am currently using gmsh  with a size function
that becomes very small, but not zero
close to the positions of nuclei in a molecule
and is scaling close to linear for distances > 0.1 abohr.
More specifically
i have chosen the size function as
S*sqrt(0.02**2+d**2), with S as a parameter between 0.1 and 0.5
It would possbily make my calculation more exact
if I could force gmsh to use the nuclear positions
as grid points.
Is there a way to  get gmsh to do that?

Regards

Moritz

-- 
Prof M Braun Tel.:27-12-4298006/8027
Physics Department  Fax.: 27-12-4293643
University of South Africa (UNISA)
moritz.br...@gmail.com
P.O. Box 392
0003
UNISA
 South Africa
http://moritz-braun.blogspot.com
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question

2018-06-03 Thread tadej -ivan Zecevic
Hi,

I am trying to align surfaces so that they can create one connected big
mesh. I would like to connect end of the mesh on surface(1)  with beginning
of mesh on surface (2). Is that possible?

This is my .geo file:

p82=newp;
Point(p82 +1)={1200,0,0};
Point(p82 +2)={1200,1200,0};
Point(p82 +3)={1200,1200,1000};
Point(p82 +4)={1200,0,1000};
Point(p82+5)={0,1200,400};
Point(p82+6)={0,1200,0};
Point(p82+7)={1200,1200,400};


Line(2881)={p82+2,p82+3};
Line(2882)={p82+3,p82+4};
Line(2883)={p82+4,p82+1};
Line(2884)={p82+1,p82+2};

Line(2885)={p82+2,p82+7};
Line(2886)={p82+7,p82+5};
Line(2887)={p82+5,p82+6};
Line(2888)={p82+6,p82+2};

Line Loop(1)={2881,2882,2883,2884};
Plane Surface(1)={1};

Line Loop(2)={2885,2886,2887,2888};
Plane Surface(2)={2};
//+
Transfinite Surface {1};
//+
Transfinite Surface {2};
//+
Recombine Surface {1, 2};

Thank you very much,
Tadej
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question about ruled surface

2018-01-05 Thread tadej -ivan Zecevic
Dear gmsh authors and users,

I am using gmsh through python and pygmsh library and I have one problem.
In my geo files I have to remove(change or adapt) Ruled Surface because in
python's pygmsh library they don't have add_ruled_surface_to_geometry
function(they have:add_compound_surface,
add_physical_surface,add_plane_surface,add_surface. Do you know how to do
it? I am working at my master degree these and I am relatively new with all
this so any suggestions are more then welcome.

Thank you and happy new year,
Tadej-Ivan Zečević
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question about the random perturbation factor

2017-12-18 Thread Shunxiang Cao
To whom it may concern,

Hi. My name is Shunxiang Cao. I am currently a Ph.D. student at Virginia
Tech. Could you please answer one question for me?

My simulation involves crack propagation and want to perform a mesh
sensitivity analysis by setting a random perturbation factor to the mesh. I
want to do it more rigorously and want to know more about the algorithm of
this feature. But I cannot find the documentation of the algorithm of
"-rand float". Would you please send me some references or point me to
right direction? Thank you very much for your time.

Best regards,
Shunxiang Cao
Ph.D. Candidate
Virginia Tech
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question for gmsh

2017-11-23 Thread simone cartesio
sorry, excuse me for the disorder. I would kindly like to know how to plot
the data in gmsh that derive from a calculation made by me in matlab.
initially I create all the domain and mesh in gmsh, I bring the matlab data
to work out the problem and after I want to bring them back to gmsh for a
post print the mesh data initially created and then make dominance cuts to
verify the long tension state the cutting plans. thank you in advance
cordial greetings
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question about web to invoke gmsh.exe

2017-08-10 Thread 李正國
Dear Sir:

I use gmsh.exe to draw 2 png files.

Test 1 :
gmsh.bat => very simple, only 1 command line
gmsh.exe post1d.geo

It works.

Test 2 :
Purpose : Invoke gmsh.bat from WEB
Approach : index.php which execute the gmsh.bat.
The php code can be invoked by URL, no error message, but the generated png
files are black.

Any solution and suggestion?

Thanks.
-- 
--
Peter Lee
E-mail: jglee0...@gmail.com
Cell-phone : 0911374413
Skype : jgleeyalinwu
--
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about gmsh

2017-05-08 Thread Jeremy Theler
tools -> options -> geometry -> surface labels
-- 
Jeremy Theler
www.seamplex.com



On Sun, 2017-05-07 at 15:05 +0200, marcel_mueller...@web.de wrote:
> Hallo,
>  
> I'm a student of Engineering Sciences and a newbie in using gmsh but
> did some tutorials.
> 
> Just a short example:
> After building a cube (or any other form) in Creo 3.0 as .stp, I use
> in part.geo: Physical Surface ("wall") = {4}
> I import Model in Abaqus and when clicking Assembly -> Sets, I finally
> find my WALL-Surface.
>  
> Is there any way to determine a specific surface, before I generate
> part.inp??
> I mean, how can I assign e. g. the right cube surface to the name
> "WALL".
> At the moment all I can do is trying to figure out by generating .inp
> again and again and testing the surfaces.
>  
> I would be very happy if you could send a short answer.
> Best wishes,
>  
> Marcel
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question about gmsh

2017-05-07 Thread marcel_mueller . fh

Hallo,

 

I'm a student of Engineering Sciences and a newbie in using gmsh but did some tutorials.


Just a short example:
After building a cube (or any other form) in Creo 3.0 as .stp, I use in part.geo: Physical Surface ("wall") = {4}
I import Model in Abaqus and when clicking Assembly -> Sets, I finally find my WALL-Surface.

 

Is there any way to determine a specific surface, before I generate part.inp??
I mean, how can I assign e. g. the right cube surface to the name "WALL".
At the moment all I can do is trying to figure out by generating .inp again and again and testing the surfaces.

 

I would be very happy if you could send a short answer.

Best wishes,

 

Marcel


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question utilisateur

2017-02-09 Thread Eric TOURET
Bonjour,
J'utilise actuellement Gmsh comme viewer pour des résultats de calcul et ne 
parviens pas à masquer certaines parties de ma structure que je désirerais 
enlever.
Est-il possible d'agir à l'aide de la souris et du module visibility d'agir sur 
les éléments eux-mêmes et de les sélectionner afin de les masquer ou alors 
est-il seulement possible de masquer des « groupes » tels que surfaces, volumes 
à l'aide du tree/list browser ?
Je n'ai pas trouvé plus d'infos que ça sur internet.
Merci d'avance pour votre retour,

Cordialement,


Eric Touret
Ingénieur d'études

[Logo]

[Sans titre-1]
SITES - Entité Rhône-alpes
5, route du Pérollier
69570 Dardilly. France
Ligne directe : 04 78 33 80 00 / Fax : 04 78 33 44 18
www.sites.fr
[Sans titre-1]



___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about gmsh

2016-11-03 Thread Christophe Geuzaine

> On 3 Nov 2016, at 02:01, Mayank Jog  wrote:
> 
> Hello Jeremy and Christophe, 
> Thanks for the help! 
> 
> Jeremy: 
> The data is Current-density magnitude at nodes (attached Fig1.png). I need to 
> recast this onto a uniformly-spaced 3D cartesian grid (nodes are 
> non-uniformly spaced in 3D). 
> 
> One hack I tried (please correct me :) ), was to export the .msh file as 
> ascii, then interpolate the data at each element onto the regular cartesian 
> grid. The coordinates of each element I set as the centroid of the nodes 
> comprising the element. 
> I'm new to handling mesh datadoes that sound like a fair approximation? 
> 
> Christophe: 
> I tried what you suggested in the GUI. I didnt understand the first line 
> (Merge "tutorial/view3.pos";) , but I carried out all the rest steps. I got a 
> new "view", but it only had a couple of voxels. I'm enclosing Fig1.png which 
> shows the data, and Fig2.png which shows what I get when I carried out the 
> step. 
> 

You should change the points (X0, Y0, ...) to match your geometry... 
Interactively, use Tools->Plugins->CutBox.

> ,
> Mayank 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
> On Wed, Nov 2, 2016 at 5:24 AM, Christophe Geuzaine  
> wrote:
> 
> > On 22 Oct 2016, at 04:09, Mayank Jog  wrote:
> >
> > Hello,
> > I have been using "simnibs" software which uses gmsh to calculate electric 
> > fields over a 3D mesh/geometry (human head).
> > It outputs a final .msh file, that contains the electric field information, 
> > and can be viewed using gmsh.
> >
> > My issue is, I want to convert this file to a list where each line =
> > [coord location, electric field value ] How do I go about doing it?
> >
> > The ultimate goal is to regrid this data onto a regular cartesian grid to 
> > do some funky postprocessing (fourier transforms, followed by funky stuff).
> 
> Here's an example:
> 
> Merge "tutorial/view3.pos";
> Plugin(CutBox).X0=0;
> Plugin(CutBox).Y0=0;
> Plugin(CutBox).Z0=0;
> Plugin(CutBox).X1=1;
> Plugin(CutBox).Y1=0;
> Plugin(CutBox).Z1=0;
> Plugin(CutBox).X2=0;
> Plugin(CutBox).Y2=1;
> Plugin(CutBox).Z2=0;
> Plugin(CutBox).X3=0;
> Plugin(CutBox).Y3=0;
> Plugin(CutBox).Z3=1;
> Plugin(CutBox).NumPointsU=20;
> Plugin(CutBox).NumPointsV=20;
> Plugin(CutBox).NumPointsW=20;
> Plugin(CutBox).ConnectPoints=0;
> Plugin(CutBox).Boundary=0;
> Plugin(CutBox).View=0;
> Plugin(CutBox).Run;
> Save View[1] "points.txt";
> 
> 
> 
> 
> > I tried saving the .msh file as a .txt ** , and then reading it line by 
> > line.I was thinking of replacing each triangular element with its 
> > centroid. However, I don't know how to proceed with other 
> > elementsplease help me out
> >
> > Thank you!
> > Mayank
> >
> > ** "Post processing Generic txt" option in "save as" in gmsh
> > ___
> > gmsh mailing list
> > gmsh@onelab.info
> > http://onelab.info/mailman/listinfo/gmsh
> 
> --
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
> 
> Free software: http://gmsh.info | http://getdp.info | http://onelab.info
> 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about gmsh

2016-11-02 Thread Jeremy Theler
If the data is given node-based, this can be done more or less easily
with awk. If the data is cell-centered (as it seems to be the case from
your description) probably a more complex solution will be needed.

Can you give us an example .msh file you want to convert to plain ASCII
columns?

--
jeremy

On Fri, 2016-10-21 at 19:09 -0700, Mayank Jog wrote:
> Hello,
> 
> I have been using "simnibs" software which uses gmsh to calculate
> electric fields over a 3D mesh/geometry (human head). 
> 
> It outputs a final .msh file, that contains the electric field
> information, and can be viewed using gmsh. 
> 
> 
> My issue is, I want to convert this file to a list where each line = 
> [coord location, electric field value ] How do I go about doing it? 
> 
> 
> The ultimate goal is to regrid this data onto a regular cartesian grid
> to do some funky postprocessing (fourier transforms, followed by funky
> stuff). I tried saving the .msh file as a .txt ** , and then reading
> it line by line.I was thinking of replacing each triangular
> element with its centroid. However, I don't know how to proceed with
> other elementsplease help me out
> 
> 
> Thank you!
> 
> Mayank
> 
> ** "Post processing Generic txt" option in "save as" in gmsh
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh



___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about gmsh

2016-11-02 Thread Christophe Geuzaine

> On 22 Oct 2016, at 04:09, Mayank Jog  wrote:
> 
> Hello,
> I have been using "simnibs" software which uses gmsh to calculate electric 
> fields over a 3D mesh/geometry (human head). 
> It outputs a final .msh file, that contains the electric field information, 
> and can be viewed using gmsh. 
> 
> My issue is, I want to convert this file to a list where each line = 
> [coord location, electric field value ] How do I go about doing it? 
> 
> The ultimate goal is to regrid this data onto a regular cartesian grid to do 
> some funky postprocessing (fourier transforms, followed by funky stuff).

Here's an example:

Merge "tutorial/view3.pos";
Plugin(CutBox).X0=0;
Plugin(CutBox).Y0=0;
Plugin(CutBox).Z0=0;
Plugin(CutBox).X1=1;
Plugin(CutBox).Y1=0;
Plugin(CutBox).Z1=0;
Plugin(CutBox).X2=0;
Plugin(CutBox).Y2=1;
Plugin(CutBox).Z2=0;
Plugin(CutBox).X3=0;
Plugin(CutBox).Y3=0;
Plugin(CutBox).Z3=1;
Plugin(CutBox).NumPointsU=20;
Plugin(CutBox).NumPointsV=20;
Plugin(CutBox).NumPointsW=20;
Plugin(CutBox).ConnectPoints=0;
Plugin(CutBox).Boundary=0;
Plugin(CutBox).View=0;
Plugin(CutBox).Run;
Save View[1] "points.txt";




> I tried saving the .msh file as a .txt ** , and then reading it line by 
> line.I was thinking of replacing each triangular element with its 
> centroid. However, I don't know how to proceed with other elementsplease 
> help me out
> 
> Thank you!
> Mayank
> 
> ** "Post processing Generic txt" option in "save as" in gmsh
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question about gmsh

2016-10-30 Thread Mayank Jog
Hello,
I have been using "simnibs" software which uses gmsh to calculate electric
fields over a 3D mesh/geometry (human head).
It outputs a final .msh file, that contains the electric field information,
and can be viewed using gmsh.

My issue is, I want to convert this file to a list where each line =
[coord location, electric field value ] How do I go about doing it?

The ultimate goal is to regrid this data onto a regular cartesian grid to
do some funky postprocessing (fourier transforms, followed by funky stuff).
I tried saving the .msh file as a .txt ** , and then reading it line by
line.I was thinking of replacing each triangular element with its
centroid. However, I don't know how to proceed with other
elementsplease help me out

Thank you!
Mayank

** "Post processing Generic txt" option in "save as" in gmsh
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about early post increment

2016-09-10 Thread Christophe Geuzaine

Jim - Indeed, good catch: our post-increment var++ was actually behaving like 
++var. This is now fixed in SVN.


> On 10 Sep 2016, at 00:39, Jim Monte  wrote:
> 
> Hi All,
> 
> I was trying to build arrays of point IDs and related things and used the 
> post increment essentially as shown in the simple example below. In this 
> example, the array element pid[0] is unassigned while pid[1] has a value, 
> although I would have expected pid[0] to be the only assigned value. Am I 
> misunderstanding how the increment operator is supposed to work in Gmsh?
> 
> Jim Monte
> 
> /*** start of example */
> i = 0; /* index to current point ID */
> j = newp; /* get a new point ID */
> pid[i++] = j; /* save point ID */
> Point(j) = {1, 2, 3}; /* assign value to point */
> xyz[] = Point{pid[0]}; /* retrieve coordinates of point */
> Printf("x=%g; y=%g; z=%g", xyz[0], xyz[1], xyz[2]); /* output */
> xyz[] = Point{pid[1]}; /* retrieve coordinates */
> Printf("x=%g; y=%g; z=%g", xyz[0], xyz[1], xyz[2]); /* output */
> /*** end of example */
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question about early post increment

2016-09-09 Thread Jim Monte
Hi All,

I was trying to build arrays of point IDs and related things and used the
post increment essentially as shown in the simple example below. In this
example, the array element pid[0] is unassigned while pid[1] has a value,
although I would have expected pid[0] to be the only assigned value. Am I
misunderstanding how the increment operator is supposed to work in Gmsh?

Jim Monte

/*** start of example */
i = 0; /* index to current point ID */
j = newp; /* get a new point ID */
pid[i++] = j; /* save point ID */
Point(j) = {1, 2, 3}; /* assign value to point */
xyz[] = Point{pid[0]}; /* retrieve coordinates of point */
Printf("x=%g; y=%g; z=%g", xyz[0], xyz[1], xyz[2]); /* output */
xyz[] = Point{pid[1]}; /* retrieve coordinates */
Printf("x=%g; y=%g; z=%g", xyz[0], xyz[1], xyz[2]); /* output */
/*** end of example */
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question regarding the step of high-order node placing

2016-05-28 Thread Schmid V.S.
Dear Prof. Geuzaine,

I am interested in the way how high-order nodes are projected onto the real 
geometry in gmsh, before additional optimisation algorithms could be applied. 
In your paper The Generation of Valid Curvilinear Meshes from 2015 in IDIHOM: 
Industrialization of High-Order Methods-A Top-Down Approach I found the 
explanation that they are orthogonally projected from the straight sided edge 
to the real geometry. I was wondering if this projection is done orthogonal to 
the straight edge, or orthogonal to the real geometry.
Could you provide me a short answer to this question or a reference where this 
is step in  the algorithm is explained in more detail?

Thank you in advance.

Best regards,
Verena Schmid

___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question sur GMSH (PERRIN Pierre - CEREMA/DTerEst/Infra/DOA)

2016-03-23 Thread PERRIN Pierre - CEREMA/DTerEst/Infra/DOA

Bonjour,

Merci pour cette piste supplémentaire, qui me semble relativement 
régulière, tout en restant pratique (cela évite le découpage en 
plusieurs sous-face). J’obtiens ceci :



Avec la documentation de GMSH, il est vrai que malheureusement on a du 
mal à savoir ce qui se cache derrière les nombreuses commandes 
"Mesh.Option List" : des images seraient commodes, même si cela 
alourdirait la documentation...


Toujours sur ma problématique, je ne connait pas bien le fonctionnement 
des algorithmes de maillage de la littérature, mais je ne peux pas 
m'empêcher de penser que l'on pourrait automatiser la détermination d'un 
maillage uniquement composé de carrés de taille différentes.
Ne serait-ce pas intéressant de développer un tel algorithme pour 
mailler (uniquement) les surfaces 2D rectangulaires, comprenant 1 ou 
plusieurs impacts rectangulaires ?

Après je me doute que ce n'est pas nécessairement votre priorité.

Je profite de nos échanges pour vous féliciter et vous remercier au 
sujet de GMSH : cet outils libre est vraiment très performant !


Cordialement


*Pierre PERRIN *
*Ingénieur d'études Ouvrages d'Art
Département Conception et Exploitation des Infrastructures
Division Ouvrages d'Art *
*Tél.: : +33(0)3 87 20 46 39
* */Mobilisé pour sauver le site de Metz/*


Centre d’études et d’expertise sur les risques, l’environnement, la 
mobilité et l’aménagement www.cerema.fr <http://www.cerema.fr>

Direction territoriale Est
1, boulevard Solidarité BP 85230 57076 METZ CEDEX 3 - Tél : +33 (0)3 87 
20 43 00
Siège social : Cité des Mobilités - 25, avenue François Mitterrand - CS 
92 803 - F-69674 Bron Cedex - Tél : +33 (0)4 72 14 30 30


Le 22/03/2016 17:48, > Christophe Geuzaine (par Internet) a écrit :

On 22 Mar 2016, at 13:12, PERRIN Pierre - CEREMA/DTerEst/Infra/DOA 
 wrote:

Bonjour,

Je vous remercie pour cette information. Finalement il est obligatoire de 
découper en plusieurs sous-surfaces si on souhaite obtenir un maillage 
quadrangle régulier.


PS : pour un maillage non-structuré en quad "plus régulier", essayez également

Mesh.Algorithm = 8; // delquad



Sinon, en définissant les surfaces par soustraction, j'ai aussi trouvé la 
solution ci-jointe, mais qui n'est pas aussi régulière car transfinite surface 
ne s'applique pas si le nombre de coin d'une surface est supérieur à 4.
Il me reste à tester si ces différentes solutions sont toutes bien acceptées 
par Code Aster pour résolution du problème EF.


Merci de votre aide et de votre réactivité,

Cordialement



Pierre PERRIN
Ingénieur d'études Ouvrages d'Art
Département Conception et Exploitation des Infrastructures
Division Ouvrages d'Art
Tél.: : +33(0)3 87 20 46 39
Mobilisé pour sauver le site de Metz

Centre d’études et d’expertise sur les risques, l’environnement, la mobilité et 
l’aménagement   www.cerema.fr
Direction territoriale Est
1, boulevard Solidarité BP 85230 57076 METZ CEDEX 3 - Tél : +33 (0)3 87 20 43 00
Siège social : Cité des Mobilités - 25, avenue François Mitterrand - CS 92 803 
- F-69674 Bron Cedex - Tél : +33 (0)4 72 14 30 30
Le 19/03/2016 18:25, > ru...@artenum.com (par Internet) a écrit :

A solution could be the attached file.

Regards,

Benjamin

Le 19-03-2016 12:00, gmsh-requ...@ace20.montefiore.ulg.ac.be a écrit :

Send gmsh mailing list submissions to
 gmsh@onelab.info

To subscribe or unsubscribe via the World Wide Web, visit
 http://onelab.info/mailman/listinfo/gmsh
or, via email, send a message with subject or body 'help' to
 gmsh-requ...@onelab.info

You can reach the person managing the list at
 gmsh-ow...@onelab.info

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gmsh digest..."


Today's Topics:

1. Question sur GMSH (PERRIN Pierre - CEREMA/DTerEst/Infra/DOA)


--

Message: 1
Date: Fri, 18 Mar 2016 16:04:43 +0100
From: "PERRIN Pierre - CEREMA/DTerEst/Infra/DOA"
 
To: g...@geuz.org
Subject: [Gmsh] Question sur GMSH
Message-ID: <56ec190b.3050...@cerema.fr>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Bonjour,

Je me pose une question apparemment simple sur GMSH, mais dont je ne
parviens pas ? trouver la r?ponse...

Je souhaite mailler un grand rectangle, avec ? l'int?rieur un petit
rectangle.
Le petit rectangle ne repr?sente pas un trou, mais un impact de charge.
Je souhaite in fine avoir acc?s dans Code Aster ? un physical sur cet
impact pour pouvoir placer un chargement surfacique.



Je vous joint mon fichier .geo, un peu pollu? par mes essais... Je
parviens ? mailler apparemment correctement, mais en r?alit? les 2
maillages sont distincts, ce que Code Aster n'appr?cie pas et me signale.
Vous serait-il possible de m'indiquer une m?thode qui me permette
d'arriver ? mes

Re: [Gmsh] Question sur GMSH (PERRIN Pierre - CEREMA/DTerEst/Infra/DOA)

2016-03-22 Thread Christophe Geuzaine

> On 22 Mar 2016, at 13:12, PERRIN Pierre - CEREMA/DTerEst/Infra/DOA 
>  wrote:
> 
> Bonjour,
> 
> Je vous remercie pour cette information. Finalement il est obligatoire de 
> découper en plusieurs sous-surfaces si on souhaite obtenir un maillage 
> quadrangle régulier.
> 

PS : pour un maillage non-structuré en quad "plus régulier", essayez également 

Mesh.Algorithm = 8; // delquad


> Sinon, en définissant les surfaces par soustraction, j'ai aussi trouvé la 
> solution ci-jointe, mais qui n'est pas aussi régulière car transfinite 
> surface ne s'applique pas si le nombre de coin d'une surface est supérieur à 
> 4.
> Il me reste à tester si ces différentes solutions sont toutes bien acceptées 
> par Code Aster pour résolution du problème EF.
> 
> 
> Merci de votre aide et de votre réactivité,
> 
> Cordialement
> 
> 
> 
> Pierre PERRIN 
> Ingénieur d'études Ouvrages d'Art 
> Département Conception et Exploitation des Infrastructures 
> Division Ouvrages d'Art 
> Tél.: : +33(0)3 87 20 46 39 
> Mobilisé pour sauver le site de Metz
> 
> Centre d’études et d’expertise sur les risques, l’environnement, la mobilité 
> et l’aménagement   www.cerema.fr
> Direction territoriale Est 
> 1, boulevard Solidarité BP 85230 57076 METZ CEDEX 3 - Tél : +33 (0)3 87 20 43 
> 00
> Siège social : Cité des Mobilités - 25, avenue François Mitterrand - CS 92 
> 803 - F-69674 Bron Cedex - Tél : +33 (0)4 72 14 30 30 
> Le 19/03/2016 18:25, > ru...@artenum.com (par Internet) a écrit :
>> A solution could be the attached file. 
>> 
>> Regards, 
>> 
>> Benjamin 
>> 
>> Le 19-03-2016 12:00, gmsh-requ...@ace20.montefiore.ulg.ac.be a écrit : 
>>> Send gmsh mailing list submissions to 
>>> gmsh@onelab.info 
>>> 
>>> To subscribe or unsubscribe via the World Wide Web, visit 
>>> http://onelab.info/mailman/listinfo/gmsh 
>>> or, via email, send a message with subject or body 'help' to 
>>> gmsh-requ...@onelab.info 
>>> 
>>> You can reach the person managing the list at 
>>> gmsh-ow...@onelab.info 
>>> 
>>> When replying, please edit your Subject line so it is more specific 
>>> than "Re: Contents of gmsh digest..." 
>>> 
>>> 
>>> Today's Topics: 
>>> 
>>>1. Question sur GMSH (PERRIN Pierre - CEREMA/DTerEst/Infra/DOA) 
>>> 
>>> 
>>> -- 
>>> 
>>> Message: 1 
>>> Date: Fri, 18 Mar 2016 16:04:43 +0100 
>>> From: "PERRIN Pierre - CEREMA/DTerEst/Infra/DOA" 
>>>  
>>> To: g...@geuz.org 
>>> Subject: [Gmsh] Question sur GMSH 
>>> Message-ID: <56ec190b.3050...@cerema.fr> 
>>> Content-Type: text/plain; charset="utf-8"; Format="flowed" 
>>> 
>>> Bonjour, 
>>> 
>>> Je me pose une question apparemment simple sur GMSH, mais dont je ne 
>>> parviens pas ? trouver la r?ponse... 
>>> 
>>> Je souhaite mailler un grand rectangle, avec ? l'int?rieur un petit 
>>> rectangle. 
>>> Le petit rectangle ne repr?sente pas un trou, mais un impact de charge. 
>>> Je souhaite in fine avoir acc?s dans Code Aster ? un physical sur cet 
>>> impact pour pouvoir placer un chargement surfacique. 
>>> 
>>> 
>>> 
>>> Je vous joint mon fichier .geo, un peu pollu? par mes essais... Je 
>>> parviens ? mailler apparemment correctement, mais en r?alit? les 2 
>>> maillages sont distincts, ce que Code Aster n'appr?cie pas et me signale. 
>>> Vous serait-il possible de m'indiquer une m?thode qui me permette 
>>> d'arriver ? mes fins ? 
>>> 
>>> 
>>> En vous remerciant par avance, 
>>> 
>>> Cordialement 
>>> 
>>> Pierre PERRIN 
>>> 
>>> *Pour information * 
>>> Ce que je souhaite faire se fait tr?s facilement avec le module ?l?ments 
>>> finis de RDM6 (http://iut.univ-lemans.fr/ydlogi/rdm_version_6.html). 
>>> On d?fini 2 rectangles, puis un menu permet de passer les cot? de 
>>> l'impact en pointill?s, pour signifier simplement que l'on va adapter le 
>>> maillage ? ce contour, mais sans consid?rer de trou dans la plaque : 
>>> 
>>> puis lorsqu'on maille on obtient : 
>>> 
>>> Si on n'a pas d?fini les pointill?s, il y a par contre un trou : 
>>> 
>>> 
>>> -- 
>>> 

Re: [Gmsh] Question sur GMSH (PERRIN Pierre - CEREMA/DTerEst/Infra/DOA)

2016-03-22 Thread PERRIN Pierre - CEREMA/DTerEst/Infra/DOA

Bonjour,

Je vous remercie pour cette information. Finalement il est obligatoire 
de découper en plusieurs sous-surfaces si on souhaite obtenir un 
maillage quadrangle régulier.


Sinon, en définissant les surfaces par soustraction, j'ai aussi trouvé 
la solution ci-jointe, mais qui n'est pas aussi régulière car 
transfinite surface ne s'applique pas si le nombre de coin d'une surface 
est supérieur à 4.
Il me reste à tester si ces différentes solutions sont toutes bien 
acceptées par Code Aster pour résolution du problème EF.



Merci de votre aide et de votre réactivité,

Cordialement



*Pierre PERRIN *
*Ingénieur d'études Ouvrages d'Art
Département Conception et Exploitation des Infrastructures
Division Ouvrages d'Art *
*Tél.: : +33(0)3 87 20 46 39
* */Mobilisé pour sauver le site de Metz/*


Centre d’études et d’expertise sur les risques, l’environnement, la 
mobilité et l’aménagement www.cerema.fr <http://www.cerema.fr>

Direction territoriale Est
1, boulevard Solidarité BP 85230 57076 METZ CEDEX 3 - Tél : +33 (0)3 87 
20 43 00
Siège social : Cité des Mobilités - 25, avenue François Mitterrand - CS 
92 803 - F-69674 Bron Cedex - Tél : +33 (0)4 72 14 30 30


Le 19/03/2016 18:25, > ru...@artenum.com (par Internet) a écrit :

A solution could be the attached file.

Regards,

Benjamin

Le 19-03-2016 12:00, gmsh-requ...@ace20.montefiore.ulg.ac.be a écrit :

Send gmsh mailing list submissions to
gmsh@onelab.info

To subscribe or unsubscribe via the World Wide Web, visit
http://onelab.info/mailman/listinfo/gmsh
or, via email, send a message with subject or body 'help' to
gmsh-requ...@onelab.info

You can reach the person managing the list at
gmsh-ow...@onelab.info

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gmsh digest..."


Today's Topics:

   1. Question sur GMSH (PERRIN Pierre - CEREMA/DTerEst/Infra/DOA)


--

Message: 1
Date: Fri, 18 Mar 2016 16:04:43 +0100
From: "PERRIN Pierre - CEREMA/DTerEst/Infra/DOA"

To: g...@geuz.org
Subject: [Gmsh] Question sur GMSH
Message-ID: <56ec190b.3050...@cerema.fr>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Bonjour,

Je me pose une question apparemment simple sur GMSH, mais dont je ne
parviens pas ? trouver la r?ponse...

Je souhaite mailler un grand rectangle, avec ? l'int?rieur un petit
rectangle.
Le petit rectangle ne repr?sente pas un trou, mais un impact de charge.
Je souhaite in fine avoir acc?s dans Code Aster ? un physical sur cet
impact pour pouvoir placer un chargement surfacique.



Je vous joint mon fichier .geo, un peu pollu? par mes essais... Je
parviens ? mailler apparemment correctement, mais en r?alit? les 2
maillages sont distincts, ce que Code Aster n'appr?cie pas et me 
signale.

Vous serait-il possible de m'indiquer une m?thode qui me permette
d'arriver ? mes fins ?


En vous remerciant par avance,

Cordialement

Pierre PERRIN

*Pour information *
Ce que je souhaite faire se fait tr?s facilement avec le module ?l?ments
finis de RDM6 (http://iut.univ-lemans.fr/ydlogi/rdm_version_6.html).
On d?fini 2 rectangles, puis un menu permet de passer les cot? de
l'impact en pointill?s, pour signifier simplement que l'on va adapter le
maillage ? ce contour, mais sans consid?rer de trou dans la plaque :

puis lorsqu'on maille on obtient :

Si on n'a pas d?fini les pointill?s, il y a par contre un trou :


--

*Pierre PERRIN *
*Ing?nieur d'?tudes Ouvrages d'Art
D?partement Conception et Exploitation des Infrastructures
Division Ouvrages d'Art *
*T?l.: : +33(0)3 87 20 46 39
* */Mobilis? pour sauver le site de Metz/*


Centre d??tudes et d?expertise sur les risques, l?environnement, la
mobilit? et l?am?nagement www.cerema.fr <http://www.cerema.fr>
Direction territoriale Est
1, boulevard Solidarit? BP 85230 57076 METZ CEDEX 3 - T?l : +33 (0)3 87
20 43 00
Si?ge social : Cit? des Mobilit?s - 25, avenue Fran?ois Mitterrand - CS
92 803 - F-69674 Bron Cedex - T?l : +33 (0)4 72 14 30 30



-- next part --
An HTML attachment was scrubbed...
URL:
<http://onelab.info/pipermail/gmsh/attachments/20160318/1e8e28a6/attachment-0001.html> 


-- next part --
//PARAMETRES
h=0.1;
cote_x=20.0 ;
cote_y=10.0 ;
deb_impact_x=5.0;
deb_impact_y=5.0;
impact_x=0.6 ;
impact_y=0.4 ;


//POINTS
Point(1)={0,0,0,h};
Point(2)={cote_x,0,0,h};
Point(3)={cote_x,cote_y,0,h};
Point(4)={0,cote_y,0,h};
Point(5)={deb_impact_x,deb_impact_y,0,h};
Point(6)={deb_impact_x+impact_y,deb_impact_y,0,h};
Point(7)={deb_impact_x+impact_y,deb_impact_y+impact_y,0,h};
Point(8)={deb_impact_x,deb_impact_y+impact_y,0,h};

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

//SU

Re: [Gmsh] Question sur GMSH (PERRIN Pierre - CEREMA/DTerEst/Infra/DOA)

2016-03-19 Thread ruard

A solution could be the attached file.

Regards,

Benjamin

Le 19-03-2016 12:00, gmsh-requ...@ace20.montefiore.ulg.ac.be a écrit :

Send gmsh mailing list submissions to
gmsh@onelab.info

To subscribe or unsubscribe via the World Wide Web, visit
http://onelab.info/mailman/listinfo/gmsh
or, via email, send a message with subject or body 'help' to
gmsh-requ...@onelab.info

You can reach the person managing the list at
gmsh-ow...@onelab.info

When replying, please edit your Subject line so it is more specific
than "Re: Contents of gmsh digest..."


Today's Topics:

   1. Question sur GMSH (PERRIN Pierre - CEREMA/DTerEst/Infra/DOA)


--

Message: 1
Date: Fri, 18 Mar 2016 16:04:43 +0100
From: "PERRIN Pierre - CEREMA/DTerEst/Infra/DOA"
    
To: g...@geuz.org
Subject: [Gmsh] Question sur GMSH
Message-ID: <56ec190b.3050...@cerema.fr>
Content-Type: text/plain; charset="utf-8"; Format="flowed"

Bonjour,

Je me pose une question apparemment simple sur GMSH, mais dont je ne
parviens pas ? trouver la r?ponse...

Je souhaite mailler un grand rectangle, avec ? l'int?rieur un petit
rectangle.
Le petit rectangle ne repr?sente pas un trou, mais un impact de charge.
Je souhaite in fine avoir acc?s dans Code Aster ? un physical sur cet
impact pour pouvoir placer un chargement surfacique.



Je vous joint mon fichier .geo, un peu pollu? par mes essais... Je
parviens ? mailler apparemment correctement, mais en r?alit? les 2
maillages sont distincts, ce que Code Aster n'appr?cie pas et me 
signale.

Vous serait-il possible de m'indiquer une m?thode qui me permette
d'arriver ? mes fins ?


En vous remerciant par avance,

Cordialement

Pierre PERRIN

*Pour information *
Ce que je souhaite faire se fait tr?s facilement avec le module 
?l?ments

finis de RDM6 (http://iut.univ-lemans.fr/ydlogi/rdm_version_6.html).
On d?fini 2 rectangles, puis un menu permet de passer les cot? de
l'impact en pointill?s, pour signifier simplement que l'on va adapter 
le

maillage ? ce contour, mais sans consid?rer de trou dans la plaque :

puis lorsqu'on maille on obtient :

Si on n'a pas d?fini les pointill?s, il y a par contre un trou :


--

*Pierre PERRIN *
*Ing?nieur d'?tudes Ouvrages d'Art
D?partement Conception et Exploitation des Infrastructures
Division Ouvrages d'Art *
*T?l.: : +33(0)3 87 20 46 39
* */Mobilis? pour sauver le site de Metz/*


Centre d??tudes et d?expertise sur les risques, l?environnement, la
mobilit? et l?am?nagement www.cerema.fr <http://www.cerema.fr>
Direction territoriale Est
1, boulevard Solidarit? BP 85230 57076 METZ CEDEX 3 - T?l : +33 (0)3 87
20 43 00
Si?ge social : Cit? des Mobilit?s - 25, avenue Fran?ois Mitterrand - CS
92 803 - F-69674 Bron Cedex - T?l : +33 (0)4 72 14 30 30



-- next part --
An HTML attachment was scrubbed...
URL:
<http://onelab.info/pipermail/gmsh/attachments/20160318/1e8e28a6/attachment-0001.html>
-- next part --
//PARAMETRES
h=0.1;
cote_x=20.0 ;
cote_y=10.0 ;
deb_impact_x=5.0;
deb_impact_y=5.0;
impact_x=0.6 ;
impact_y=0.4 ;


//POINTS
Point(1)={0,0,0,h};
Point(2)={cote_x,0,0,h};
Point(3)={cote_x,cote_y,0,h};
Point(4)={0,cote_y,0,h};
Point(5)={deb_impact_x,deb_impact_y,0,h};
Point(6)={deb_impact_x+impact_y,deb_impact_y,0,h};
Point(7)={deb_impact_x+impact_y,deb_impact_y+impact_y,0,h};
Point(8)={deb_impact_x,deb_impact_y+impact_y,0,h};

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

//SURFACES
Line Loop(1)={1,2,3,4};
Plane Surface(1)={1};
Transfinite Surface{1};
Recombine Surface{1};

// incorporation des lignes dans les surfaces :
// En GMSH ancien (v1.60)
//??
// En GMSH moderne (v2.12)
//Line {5,6,7,8} In Surface {1};

Line {5} In Surface {1};
Line {6} In Surface {1};
Line {7} In Surface {1};
Line {8} In Surface {1};


Line Loop(2)={5,6,7,8};
Plane Surface(2)={2};
Transfinite Surface{2};
Recombine Surface{2};


// Essais inutile au final :
//Compound Surface(3)={1,2};
//Transfinite Surface{3};
//Mesh.RemeshAlgorithm=1;
Coherence;
Mesh.Format=1;

//PHYSICAL
Physical Line(1)={1, 3}; //section d'encastrement
Physical Line(2)={2, 4}; //section d'encastrement
Physical Surface(1)={1};
Physical Surface(2)={2};
Physical Surface(3)={1,2};

//Color Yellow { Surface {1} ; }
//Color Red { Line {2} ; }





--

Subject: Digest Footer

___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


--

End of gmsh Digest, Vol 158, Issue 15
*




--


Benjamin JEANTY-RUARD

  
  Artenum Toulouse - Science &

[Gmsh] Question sur GMSH

2016-03-19 Thread PERRIN Pierre - CEREMA/DTerEst/Infra/DOA

Bonjour,

Je me pose une question apparemment simple sur GMSH, mais dont je ne 
parviens pas à trouver la réponse...


Je souhaite mailler un grand rectangle, avec à l'intérieur un petit 
rectangle.

Le petit rectangle ne représente pas un trou, mais un impact de charge.
Je souhaite in fine avoir accès dans Code Aster à un physical sur cet 
impact pour pouvoir placer un chargement surfacique.




Je vous joint mon fichier .geo, un peu pollué par mes essais... Je 
parviens à mailler apparemment correctement, mais en réalité les 2 
maillages sont distincts, ce que Code Aster n'apprécie pas et me signale.
Vous serait-il possible de m'indiquer une méthode qui me permette 
d'arriver à mes fins ?



En vous remerciant par avance,

Cordialement

Pierre PERRIN

*Pour information *
Ce que je souhaite faire se fait très facilement avec le module éléments 
finis de RDM6 (http://iut.univ-lemans.fr/ydlogi/rdm_version_6.html).
On défini 2 rectangles, puis un menu permet de passer les coté de 
l'impact en pointillés, pour signifier simplement que l'on va adapter le 
maillage à ce contour, mais sans considérer de trou dans la plaque :


puis lorsqu'on maille on obtient :

Si on n'a pas défini les pointillés, il y a par contre un trou :


--

*Pierre PERRIN *
*Ingénieur d'études Ouvrages d'Art
Département Conception et Exploitation des Infrastructures
Division Ouvrages d'Art *
*Tél.: : +33(0)3 87 20 46 39
* */Mobilisé pour sauver le site de Metz/*


Centre d’études et d’expertise sur les risques, l’environnement, la 
mobilité et l’aménagement www.cerema.fr 

Direction territoriale Est
1, boulevard Solidarité BP 85230 57076 METZ CEDEX 3 - Tél : +33 (0)3 87 
20 43 00
Siège social : Cité des Mobilités - 25, avenue François Mitterrand - CS 
92 803 - F-69674 Bron Cedex - Tél : +33 (0)4 72 14 30 30




//PARAMETRES
h=0.1;
cote_x=20.0 ;
cote_y=10.0 ;
deb_impact_x=5.0;
deb_impact_y=5.0;
impact_x=0.6 ;
impact_y=0.4 ;


//POINTS
Point(1)={0,0,0,h};
Point(2)={cote_x,0,0,h};
Point(3)={cote_x,cote_y,0,h};
Point(4)={0,cote_y,0,h};
Point(5)={deb_impact_x,deb_impact_y,0,h};
Point(6)={deb_impact_x+impact_y,deb_impact_y,0,h};
Point(7)={deb_impact_x+impact_y,deb_impact_y+impact_y,0,h};
Point(8)={deb_impact_x,deb_impact_y+impact_y,0,h};

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

//SURFACES
Line Loop(1)={1,2,3,4};
Plane Surface(1)={1};
Transfinite Surface{1};
Recombine Surface{1};

// incorporation des lignes dans les surfaces :
// En GMSH ancien (v1.60)
//??
// En GMSH moderne (v2.12)
//Line {5,6,7,8} In Surface {1};

Line {5} In Surface {1};
Line {6} In Surface {1};
Line {7} In Surface {1};
Line {8} In Surface {1};

 
Line Loop(2)={5,6,7,8}; 
Plane Surface(2)={2};
Transfinite Surface{2};
Recombine Surface{2};

   
// Essais inutile au final :
//Compound Surface(3)={1,2};
//Transfinite Surface{3};
//Mesh.RemeshAlgorithm=1;
Coherence;
Mesh.Format=1;

//PHYSICAL
Physical Line(1)={1, 3}; //section d'encastrement 
Physical Line(2)={2, 4}; //section d'encastrement 
Physical Surface(1)={1};
Physical Surface(2)={2};
Physical Surface(3)={1,2};

//Color Yellow { Surface {1} ; }
//Color Red { Line {2} ; }




___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about GMSH physicals and partitioning

2016-03-08 Thread Nicolas Marsic

Hello Ben,

Maybe SetPartition is what you are looking for.

If I remember correctly, SetPartition(42){ Volume{ 1 }; } will set the 
partition ID 42 to the volume 1.
You can have a look at 
http://gmsh.info/doc/texinfo/gmsh.html#Miscellaneous-mesh-commands


Best,
Nicolas.

On 22/02/16 20:37, benjamin kary wrote:

Hello,

Is there any way to define physicals based on the partition IDs?  I
would like to assign partition IDs to line segments so that I can define
the interfaces between subdomains.  I currently get the interface line
segments for free with an (negative) elementary geometrical entity
number that was seemingly generated incrementally.  Can I tag this with
one of the partition IDs somehow?

Thanks,
Ben


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh



___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] question about gmsh

2016-03-07 Thread Theler German Guillermo
Can you post the .geo file?



On Fri, 2016-03-04 at 20:16 +0100, Emilio Martín wrote:
> I'm trying to learn how to use gmsh, but I have a problem. In the
> attached picture you can see two surfaces. The model tries to show an
> object that penetrates into another. How can match the meshing of both
> parties, so that they have common nodes in the connection lines?
> The idea is that the two bodies are bonded along the contact lines.
>
> Thank you very much in advance for your comments.
> E.Martin
>
>
>
>

 Imprima este mensaje sólo si es absolutamente necesario.
Para imprimir, en lo posible utilice el papel de ambos lados.
El Grupo Sancor Seguros se compromete con el cuidado del medioambiente.



AVISO DE CONFIDENCIALIDAD

El Grupo Sancor Seguros comunica que:

Este mensaje y todos los archivos adjuntos a el son para uso exclusivo del 
destinatario y pueden contener información confidencial o propietaria, cuya 
divulgación es sancionada por ley. Si usted recibió este mensaje erróneamente, 
por favor notifíquenos respondiendo al remitente, borre el mensaje original y 
destruya las copias (impresas o grabadas en cualquier medio magnético) que 
pueda haber realizado del mismo. Todas las opiniones contenidas en este mail 
son propias del autor del mensaje. La publicación, uso, copia o impresión total 
o parcial de este mensaje o documentos adjuntos queda prohibida.

Disposición DNDP 10-2008. El titular de los datos personales tiene la facultad 
de ejercer el derecho de acceso a los mismos en forma gratuita a intervalos no 
inferiores a seis meses, salvo que acredite un interés legítimo al efecto 
conforme lo establecido en el artículo 14, inciso 3 de la Ley 25.326. La 
DIRECCIÓN NACIONAL DE PROTECCIÓN DE DATOS PERSONALES, Organo de Control de la 
Ley 25.326, tiene la atribución de atender las denuncias y reclamos que se 
interpongan con relación al incumplimiento de las normas sobre la protección de 
datos personales.
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] question about gmsh

2016-03-04 Thread Emilio Martín
I'm trying to learn how to use gmsh, but I have a problem. In the attached
picture you can see two surfaces. The model tries to show an object
that penetrates
into another. How can match the meshing of both parties, so that they
have common
nodes in the connection lines?
The idea is that the two bodies are bonded along the contact lines.

Thank you very much in advance for your comments.
E.Martin
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question about GMSH physicals and partitioning

2016-02-22 Thread benjamin kary
Hello,

Is there any way to define physicals based on the partition IDs?  I would
like to assign partition IDs to line segments so that I can define the
interfaces between subdomains.  I currently get the interface line segments
for free with an (negative) elementary geometrical entity number that was
seemingly generated incrementally.  Can I tag this with one of the
partition IDs somehow?

Thanks,
Ben
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


Re: [Gmsh] Question about plugin crack

2016-02-11 Thread Christophe Geuzaine

> On 06 Feb 2016, at 00:18, Babak Hassas Irani  wrote:
> 
> Hi,
> 
> I want to insert edge cracks [notches] with *different lengths and angles* in 
> a 2D mesh. Is plugin crack capable to do it? 
> 
> I have read the documentation, but I'm not sure yet.
> 

A priori, yes. Give it a try...

> Best,
> Babak
> 
> 
> ___
> gmsh mailing list
> gmsh@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Tetrahedron V, July 4-5 2016: http://tetrahedron.montefiore.ulg.ac.be
Free software: http://gmsh.info | http://getdp.info | http://onelab.info


___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh


[Gmsh] Question about plugin crack

2016-02-05 Thread Babak Hassas Irani
Hi,

I want to insert edge cracks [notches] with *different lengths and angles*
in a 2D mesh. Is plugin crack capable to do it?

I have read the documentation, but I'm not sure yet.

Best,
Babak
___
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh