CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Gmsh] Generating a parabolic profile in gmsh (https://www.cfd-online.com/Forums/openfoam-meshing/98459-generating-parabolic-profile-gmsh.html)

matt.mech.eng March 12, 2012 03:57

Generating a parabolic profile in gmsh
 
2 Attachment(s)
Hello,

I am trying to generate a parabolic profile (on the xy plane to be extruded along the z-direction) of a tank, to model the flow of fluid inside the tank with bubbleFoam. My issue is I have tried many ways to get such a geometry into openfoam.

My first try was to import an igs file with the geometry into gmsh, netgen or salome however none of these seemed to work..

I decided to generate the mesh from scratch, so I wrote a script to generate points along a parabola and join them all with straight lines (see attached image).
Then I try to generate a 2d surface mesh and I get the following error: "Error : Identical points in triangulation: increase element size or Mesh.RandomFactor"
and gmsh crashes.

How do I specify element size in gmsh? And what is Mesh.RandomFactor?

Cheers

GregorS March 12, 2012 07:59

From Gmsh documentation:
Mesh.RandomFactor
Random factor used in the 2D meshing algorithm (should be increased if RandomFactor * size(triangle)/size(model) approaches machine accuracy)
Default value: 1e-09

When generating mesh, position of every point is perturbated by small random value to avoid 3 aligned points. So for beginning you can set Mesh.RandomFactor=1e-7 (or something like that) in your .geo file and try again.

djamel February 21, 2016 12:38

angle of element in gmsh
 
I want to change the angle of triangle element


All times are GMT -4. The time now is 16:41.