CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Open Source Meshers: Gmsh, Netgen, CGNS, ...

Netgen refinement regions

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 3, 2013, 05:49
Default Netgen refinement regions
  #1
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 8
danvica is on a distinguished road
Is there any equivalent way to refine a region within Netgen ?

Something as refinementRegions in snappyHexMesh.


Thanks.
__________________
Daniele Vicario

blueCFD2.1 - Windows 7
danvica is offline   Reply With Quote

Old   January 3, 2013, 09:29
Default
  #2
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 530
Rep Power: 16
philippose will become famous soon enough
Hello there,

A Good day to you!

Yes, there is a way of locally refining meshes in netgen.

If you look into the Meshing options, in the second tab, under the basic mesh size settings, you have a box where you can specify a "mesh size file". This file is a simple text-file with the extension ".msz", with the following format:

<num of points>
<x1> <y1> <z1> <maxH1>
<x2> <y2> <z2> <maxH2>
<x3> <y3> <z3> <maxH3>
...
...
...
...
<xN> <yN> <zN> <maxHN>
<num of lines>
<x11> <y11> <z11> <x12> <y12> <z12> <maxH1>
<x21> <y21> <z21> <x22> <y22> <z22> <maxH2>
<x31> <y31> <z31> <x32> <y32> <z32> <maxH3>
...
...
...
...
<xN1> <yN1> <zN1> <xN2> <yN2> <zN2> <maxHN>

The first set of points basically specifies the maximum mesh size at the given points, and the second set limits the maximum mesh size along the specified lines to the given values.

In case you do not want to limit mesh sizes along lines, specify a "0" for the "<num of lines>" followed by a new line.


Now.... the values specified in the mesh size file is taken into consideration after all the other mesh size definition functions, and hence, the mesh size file only needs to have those points where you really want the mesh to be locally refined.... all the other parts of the mesh will be meshed with the normal settings.

Be careful to specify the mesh sizes in the units in which the mesh geometry is defined :-)!


Hope this helps.... if you have any questions, feel free to put them up here, and I shall try to clarify them.

Have a nice day ahead!

Philippose
philippose is offline   Reply With Quote

Old   January 3, 2013, 10:44
Default
  #3
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 8
danvica is on a distinguished road
Thanks for the fast reply !

I already knew about points refinements but I missed the lines option.

Some questions:

- What does "locally" means ? How can you set the control distance of the points/lines ?

- Any plan to add a box option ? (Hey, you've got point and line: it seems natural to have all 3 dimensions... )

I could simulate a box option by N lines... but how to calculate N (see first question) ?

Thanks.
__________________
Daniele Vicario

blueCFD2.1 - Windows 7
danvica is offline   Reply With Quote

Old   January 3, 2013, 10:48
Default
  #4
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 8
danvica is on a distinguished road
BTW, I forgot to ask you why in Netgen 5.0 there's no more the "Edit Face mesh size" voice.

On the release notes there's an indication regarding an automatic refinement but I don't understand how to manual modify a surface mesh size.
__________________
Daniele Vicario

blueCFD2.1 - Windows 7
danvica is offline   Reply With Quote

Old   January 3, 2013, 11:26
Default
  #5
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 530
Rep Power: 16
philippose will become famous soon enough
Hello again,

In answer to your previous post....

When you specify a mesh size file, Netgen internally constrains the maximum element mesh size around the specified areas (in the case of a line, an internal resolution is used... cant remember the actual value now) for both... the surface mesh as well as the volume elements (tets).

The function was put in on a "need-to" basis, and I guess the requirement for a "box" type mesh restriction never came up (though, I know that there is an internal function which already does exactly this.... except, as of now... it is only used internally :-)!)

For example.... in my cases so far, I have almost always only required annular cylindrical areas in which the mesh should be refined, and for that, I wrote a small python script which writes a ".msz" file (essentially a point-cloud with mesh sizes)


As for your last post regarding the "Edit Face Mesh Size" option :-)! When I implemented this function a couple of years ago, it was purely for either "STEP" or "IGES" files.

Did you compile Netgen 5.0 from scratch yourself? And which platform are you using? It looks like in your case, the OpenCascade support for Netgen 5.0 has not been enabled / compiled.


Philippose
philippose is offline   Reply With Quote

Old   January 3, 2013, 12:14
Default
  #6
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 8
danvica is on a distinguished road
Thanks for the answers, I'll have to play a little with phyton...

Regarding Netgen 5.0, I just downloaded Netgen-5.0.0_x64.exe (http://sourceforge.net/projects/netg...4.exe/download)

There's a dev release but I haven't try it...
__________________
Daniele Vicario

blueCFD2.1 - Windows 7
danvica is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding layers goes wrong with SnappyHexMesh Elise OpenFOAM Native Meshers: snappyHexMesh and Others 1 April 22, 2013 02:32
snappyHexMesh refinement regions ignored guitarbren OpenFOAM Meshing & Mesh Conversion 2 April 9, 2013 03:59
Weird snapping outside a refinement region jasimpson89 OpenFOAM Meshing & Mesh Conversion 0 July 29, 2012 20:46
killed "snappyHexMesh" parkh32 OpenFOAM Pre-Processing 2 April 8, 2012 17:12
snappyHexMesh aborting Tobi OpenFOAM Native Meshers: snappyHexMesh and Others 0 November 10, 2010 04:23


All times are GMT -4. The time now is 11:00.