CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Netgen] mesh grading with netgen

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By philippose

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2010, 04:40
Default mesh grading with netgen
  #1
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 15
RugbyGandalf is on a distinguished road
hello,

i have imported a *.stp geometry in netgen. From this i would like to build a volume mesh. This works already, but i have another problem:

the geometry ist a cylinder with another curved body inside. The aim is to simulate airflow around the body inside the cylinder.
That is why i need to have a very fine mesh directly on the body's surface, but a less fine mesh in the rest of the cylinder...

Could someone tell me how to configure netgen to do so?

Thank you very much in forecast

Greetings
RugbyGandalf
RugbyGandalf is offline   Reply With Quote

Old   November 8, 2010, 06:46
Default
  #2
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
Hello there,

A Good Day to you :-)!

Nice to see that you are interested in checking out the various grading options present in Netgen...

Its particularly easier given the fact that you are using the STEP geometry format, becuase Netgen has some extra tricks for OCC geometry.

There are essentially two ways you can achieve the local mesh grading you need:

1. Limit the maximum mesh size on the surfaces around which you want a fine mesh.

2. Use a "Mesh Size File" (MSZ) to specify a set of points and the corresponding maximum mesh size at and around these points. Using this method, you can create something like a cloud point in the form of a box around the region where you want a finer mesh, and limit the mesh size at these points.

I think in your particular situation, the easier method would be to use Method:1.... where you directly click the individual surfaces directly within the Netgen interface and limit the max mesh size at these surfaces.

In order to use the functionality, do the following:

1. Specify a global max and min allowable mesh size and a grading factor (0...1) in the menu "Mesh -> Meshing Options -> Mesh Size".

2. Create a clipping plane so that you can gain access to the inside of the geometry using "View -> Clipping Plane".

3 Now, use the menu: "Geometry -> Edit Face Mesh Size", and double click one by one on each of the surfaces you want to make finer, and each time, specify the maximum mesh size allowed on that face.

I made a quick example.... check the screen-shots... The mesh has been coloured using the element mesh sizes (View -> Viewing Options -> Mesh)

Hope this helps.

Have a nice day!

Philippose
Attached Images
File Type: jpg NG_STEP_Grading_001.jpg (60.3 KB, 273 views)
File Type: jpg NG_STEP_Grading_002.jpg (81.7 KB, 235 views)
File Type: jpg NG_STEP_Grading_003.jpg (32.9 KB, 220 views)
vbnhfylbh likes this.
philippose is offline   Reply With Quote

Old   November 8, 2010, 17:17
Default
  #3
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 15
RugbyGandalf is on a distinguished road
Dear Philippose,

thank you very much for your fast answer!
I tried a little with cubes, how different configurations worked out for the mesh.
After this i was meshing my case i described before.

The mesh grading worked so far, as you can see on those screenshots below.
The curved body in the middle of the cylindric geometry has the finest net - as it should be. meshing also the volume, worked after using Geometry -> IGES/STEP topology doctor -> analyse -> heal
Are there any options i can / have to select before healing?

I also have some additional questions:
- what does Mesh -> meshing options -> Mesh -> second order elements mean?
- and what about Mesh -> meshing options -> Mesh -> second order elements -> quad dominated?
- How are dimensions handled? If i export a file out of Pro/E with meter as dimension, what does the max mesh size in netgen mean? also meter?
- what is happening when i select optimize mesh (and maybe three optimation steps?

Thank you very very much for your help!!!
Your first answer was great for me

If you know where to get a good manual for netgen i would be glad if you could give me a link...

Greetings

RugbyGandalf
Attached Images
File Type: jpg netgen1.jpg (58.6 KB, 144 views)
File Type: jpg netgen2.jpg (53.5 KB, 122 views)
RugbyGandalf is offline   Reply With Quote

Old   November 9, 2010, 01:15
Default
  #4
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
Hi again,

A Good Morning to you :-)!

Nice that you were able to get the mesh grading part of it working!

So, to answer your questions:

1. Geometry Healing.... There are no specific options you can / need to set other than the different types of healing Netgen performs, and also the threshold that is used... but you need to play around with them to get it right for your geometry. However..... I would personally suggest, that you ensure that you do as much of the geometry part within the CAD software itself, and make sure that the STEP that you export is "good", rather than relying on the healing feature.

2. Second Order.... This option creates second order surface and volume elements.... which implies... 6 instead of 3 points for triangles, and 10 instead of 4 points for tetrahedra. However, this is intended for use in FEM, and you cannot use second order elements with OpenFOAM.

3. Quad Dominated.... This option only works for surface meshes, and as the name suggests, it causes Netgen to create a surface mesh which is essentially made up of Quadrilateral elements, with triangles only used in small local areas where pure Quads do not give a valid mesh.

4. Dimensions.... Netgen only imports the raw data from a STEP / IGES file. Usually, when exporting geometry from Pro/E, Pro/E converts the mesh from whatever units were used to create the geometry, into "mm", and then puts in a "Units" specification in the STEP File. However, Netgen does not do any reconversion.... only the raw point and topology data are read in. This means, that if you create your geometry in "m", and export it, the values you see in netgen will have co-ordinates amplified by a factor of 1000.

5. Mesh Optimisation.... This step is used to improve the quality of the surface and volume meshes by running through multiple routines of edge-swapping, smoothing, point movement, etc...etc.... Usually, if you select more optimisation steps, you get a better mesh.... but as can be expected, there is a limit after which your mesh cannot be improved anymore, and choosing more steps only takes up more time. The exact limit depends purely on the complexity of the geometry. I usually use between 8 to 10 optimisation steps for both the surface and the volume mesh elements.

(You can see the mesh quality in the form of a graph under the "Viewing Options" menu.... and this is updated in real-time at the end of each optimisation step.... so if you ask it to do too many steps, you will see that the quality plot does not change any more).

6. Manual for Netgen.... :-) :-)! Oops.... welll.... there is a very preliminary PDF file which is present in the installation... but this is old. Have a look around on the Netgen Sourceforge Wiki.... I had put in a couple of screen-casts, and there should also be another PDF. However, on the whole..... I agree.... there is no comprehensive documentation for Netgen. This is purely because of a lack of resources and time... As always, any form of contributions are always welcome :-) ;-)!

Have a great day ahead!

Philippose
philippose is offline   Reply With Quote

Old   November 9, 2010, 10:26
Default
  #5
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 15
RugbyGandalf is on a distinguished road
Hello Philippose,

thanks a lot again.
I was also looking for the wiki (but only two screencasts will work) :-(

now i have a strange problem: when the mesh on the streamlined body has to small element sizes, the meshing won't work and Netgen gives out the following error message:



Face 1 / 6 (parameter space projection)
Face 2 / 6 (parameter space projection) Face 3 / 6 (parameter space projection)
Face 4 / 6 (parameter space projection)
Face 5 / 6 (parameter space projection)
Singular Matrix
retry Surface 5
Face 5 / 6 (plane space projection)
ERROR: Problem in Surface mesh generation
Face 6 / 6 (parameter space projection)
Surface meshing error occured before (in 1 faces)
Singular Matrix
retry Surface 6
Face 6 / 6 (plane space projection)
Surface meshing error occured before (in 1 faces)
WARNING! NOT ALL FACES HAVE BEEN MESHED
SURFACE MESHING ERROR OCCURED IN 1 FACES:
Face 5

for more information open IGES/STEP Topology Explorer


Problem in Surface mesh generation

Face 5 and 6 are the two sides of of the streamlined body, which i gave a maximum mesh size of 2, mesh grading is set to 0.1 and the max element sizes of the other faces are set to 50.
Heal the geometry seems not to work, because this destroys my streamlined body
Do you have any idea, how i could handle this?
I will try to make an attachment with the *.stp file... This is a *.txt file, so if it is possible to download this, one need to rename the ending to *.stp.
Maybe the problem gets clearer than...!?

Thank you very much again!

Best Greetings,

RugbyGandalf
Attached Files
File Type: txt tropfenimzylinderinmeter.txt (27.6 KB, 27 views)
RugbyGandalf is offline   Reply With Quote

Old   November 9, 2010, 13:12
Default
  #6
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25
philippose will become famous soon enough
Hi again,

Good Evening to you !!

Yes... you are right, there is an issue with the combination of the way the geoemtry on the droplet is defined, and small mesh sizes.... but as always, there is an easy solution :-)!

What you need to do, is to make use of the "Uniform Refine" feature in Netgen.... What Uniform refine does, is as the name suggests, uniformly refine the mesh... which means, every Tetrahedra is split into 8 tetrahedra...

Try the following:

Max global mesh size = 50
Min global mesh size = 0.5
Grading = 0.4

And then for the faces of the droplet.... use a Max mesh size of 5.0

Now let Netgen mesh the geometry... and once thats done (you get around 45000 volume elements), go to the "Refinement -> Refine Uniform" option.... this will uniformly refine the mesh giving you are really nice looking distribution....

Always..... after performing a Uniform refine.... also run "Mesh -> Optimize Volume"... this will improve the uniformly refined mesh even more.

Have a great evening ahead!

Philippose

(P.S.... the Geometry you sent me was an IGS and not a STP file :-)!)
philippose is offline   Reply With Quote

Old   November 15, 2010, 05:18
Default
  #7
Member
 
Martin
Join Date: Aug 2010
Location: Germany
Posts: 55
Rep Power: 15
RugbyGandalf is on a distinguished road
Dear Philippose,

thank you very much for your very helpful answers.
With your help it worked to improve the mesh and start a calculation with OpenFOAM.

I would be very happy, if i could ask more questions about Netgen when some occur..

Regards,

RugbyGandalf
RugbyGandalf is offline   Reply With Quote

Old   July 7, 2011, 06:04
Default Netgen Batch Mode (Mesh Grading)
  #8
New Member
 
ShivaPrasad
Join Date: Jul 2011
Location: India
Posts: 2
Rep Power: 0
shivaprasad123 is on a distinguished road
Dear Philippose,

Iam Trying to Use NETGEN in the batch mode. It Works well for importing a STEP Geometry and then geneating volume mesh. I wanted to know how to control the mesh grading (Size ad Refinement) in the batch mode.
Can u please send me a sample Meshsize file and a RefinementInfo file.

Regarding the geometry healing... when i import a step file and perform healing and then export the geometry to a Step file...the changes (Healing Changes ...i.e, shortest edge length) are not saved.


Thanks in advance

Regards
M.ShivaPrasad Reddy
shivaprasad123 is offline   Reply With Quote

Old   October 5, 2014, 06:36
Default
  #9
New Member
 
Nikolay Nosorev
Join Date: Oct 2014
Location: Russia
Posts: 2
Rep Power: 0
Logrus is on a distinguished road
How to make mesh for OpenFOAm usage? When i trying to use included geometry files, it make syrface mesh, then mesh inside the body.But OpenFoam need mesh around body.How to make this?Sorry, but i am completely newby and cannot solve this problem.
P.S. I am using windows version of netgen.
Logrus is offline   Reply With Quote

Old   September 2, 2015, 07:43
Default Netgen tutor online
  #10
New Member
 
JohnM
Join Date: Jan 2015
Posts: 8
Rep Power: 11
JohnMontreal is on a distinguished road
Hi All ;
For CFD Academy online , we are looking for a netgen tutor
the academy is http://cadcae.net
thanks in advance for help
for more information please write us to info@cadcae.net
best regards.
Maria Zuzuvecha - CEO academy
JohnMontreal is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
[Netgen] Problems creating OpenFOAM mesh with Netgen sur4j OpenFOAM Meshing & Mesh Conversion 1 March 22, 2014 17:03
Mesh motion with Translation & Rotation Doginal CFX 2 January 12, 2014 06:21
Salome mesh with NETGEN 1D-2D-3D for OF kriz OpenFOAM 4 June 14, 2010 06:17
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 19:43


All times are GMT -4. The time now is 18:07.