CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Mesh Utilities

Snappyhexmesh refinement parameters

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

Reply
 
LinkBack Thread Tools Display Modes
Old   December 15, 2008, 02:25
Default Hello all: I used snappyhe
  #1
New Member
 
liu yang
Join Date: Mar 2009
Posts: 7
Rep Power: 8
liuyang is on a distinguished road
Hello all:
I used snappyhexmesh for grid generating and it's quite efficient,but I still don't understand the parameters in subdictionary refinementRegions, the tuturial gives
refinementRegions
{
refinementBox
{
mode inside;
levels ((1E15 4));
}
}
and I used in a same way, only chages the mode to mode distance. It seems to work too.
My question is , what do the two parameters behind "levels" mean? and is the meanning the same for both inside mode and distance mode?
Thanks in advance.
liuyang is offline   Reply With Quote

Old   December 15, 2008, 04:24
Default Hi Liu, In my point of view (
  #2
Member
 
Velan
Join Date: Mar 2009
Location: India
Posts: 50
Rep Power: 8
velan is on a distinguished road
Hi Liu,
In my point of view (Please reply if it is wrong), mode inside or outside defined from "searchableBox"
So if your mode is inside, inside the searchable region, mesh will be refine and if your mode is outside, mesh will refine outside the searchable area. Here it doesnt matter about where the surface is. Mode distance refine from starting of the surface upto the distance mention.

And levels define how many times each cell has to refine.

Hope this clear your doubt
velan is offline   Reply With Quote

Old   December 15, 2008, 05:09
Default Hi Velan: Thank you very much
  #3
New Member
 
liu yang
Join Date: Mar 2009
Posts: 7
Rep Power: 8
liuyang is on a distinguished road
Hi Velan:
Thank you very much for your reply.
Maybe I didn't make my problem clear. I knew mode distance refine from starting of the surface, and in my case the refinementRegions is specified to the surface of the solid body.
My doubt is, what the two parameters (1E15 4) after "lelvels" means? Can they make my grid generation too slow? 1E15 is quite a large number. I changed it to 10, but the grid is not fine enough.
Thank you and everyone helped.
liuyang is offline   Reply With Quote

Old   December 15, 2008, 06:22
Default Hi Liu, mode distance ; le
  #4
Member
 
Velan
Join Date: Mar 2009
Location: India
Posts: 50
Rep Power: 8
velan is on a distinguished road
Hi Liu,

mode distance ;
levels (A B)

Here A is the distance from the solid surface. The grid will get refine upto the Distance A.
B is the number of refinement level per cell.

For you problem, keep your A constant and increase your B value. You will get more fine grid near the solid surface.

Hope your grid generation will be bit slow. Because it has to split the cells into B level times.

Some other people might explain you more clearly.
velan is offline   Reply With Quote

Old   December 15, 2008, 08:26
Default Hi Velan: Thank you very much
  #5
New Member
 
liu yang
Join Date: Mar 2009
Posts: 7
Rep Power: 8
liuyang is on a distinguished road
Hi Velan:
Thank you very much for your kind help and your patience. Now I'm quite clear.
Liuyang
liuyang is offline   Reply With Quote

Old   January 19, 2009, 08:44
Default Hello, Using snappyHexMesh
  #6
New Member
 
Bastien Holbek
Join Date: Mar 2009
Posts: 15
Rep Power: 8
bholbek is on a distinguished road
Hello,

Using snappyHexMesh mesh utility, i have successfully created a mesh and my simulation runs fine. I would like to modify it and play a little bit with the different parameters of snappyHexMeshDict file.
Modifying refinement parameters from some given regions or the global level (1E15 4) to (1E15 2) for example, i receive the following error when running my simulation:

Reading environmentalProperties
Reading thermophysical properties

Selecting thermodynamics package hThermo<puremixture<consttransport<speciethermo<hc onstthermo<perfectgas>>>>>
#0 Foam::error::printStack(Foam:stream&) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 __restore_rt at sigaction.c:0
#3 Foam::hThermo<foam::puremixture<foam::consttranspo rt<foam::speciethermo<foam::hc onstthermo<foam::perfectgas> > > > >::calculate() in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so"
#4 Foam::hThermo<foam::puremixture<foam::consttranspo rt<foam::speciethermo<foam::hc onstthermo<foam::perfectgas> > > > >::hThermo(Foam::fvMesh const&) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so"
#5 Foam::basicThermo::addfvMeshConstructorToTable<foa m::hthermo<foam::puremixture<f oam::consttransport<foam::speciethermo<foam::hcons tthermo<foam::perfectgas> > > > > >::New(Foam::fvMesh const&) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so"
#6 Foam::basicThermo::New(Foam::fvMesh const&) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so"
#7 main in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/buoyantFoa m"
#8 __libc_start_main in "/lib64/tls/libc.so.6"
#9 Foam::regIOobject::readIfModified() in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/buoyantFoa m"

checkMesh gives me: Mesh OK. I use the function mapFields to obtain my initial fields, interpolating the fields of an other simulation.
What kind of error is it? Could someone give me a tip?

Thanks

Bastien
bholbek is offline   Reply With Quote

Old   January 19, 2009, 08:46
Default Hello, Using snappyHexMesh
  #7
New Member
 
Bastien Holbek
Join Date: Mar 2009
Posts: 15
Rep Power: 8
bholbek is on a distinguished road
Hello,

Using snappyHexMesh mesh utility, i have successfully created a mesh and my simulation runs fine. I would like to modify it and play a little bit with the different parameters of snappyHexMeshDict file.
Modifying refinement parameters from some given regions or the global level (1E15 4) to (1E15 2) for example, i receive the following error when running my simulation:

Reading environmentalProperties
Reading thermophysical properties

Selecting thermodynamics package hThermo<puremixture<consttransport<speciethermo<hc onstthermo<perfectgas>>>>>
#0 Foam::error::printStack(Foam:stream&) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 __restore_rt at sigaction.c:0
#3 Foam::hThermo<foam::puremixture<foam::consttranspo rt<foam::speciethermo<foam::hc onstthermo<foam::perfectgas> > > > >::calculate() in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so"
#4 Foam::hThermo<foam::puremixture<foam::consttranspo rt<foam::speciethermo<foam::hc onstthermo<foam::perfectgas> > > > >::hThermo(Foam::fvMesh const&) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so"
#5 Foam::basicThermo::addfvMeshConstructorToTable<foa m::hthermo<foam::puremixture<f oam::consttransport<foam::speciethermo<foam::hcons tthermo<foam::perfectgas> > > > > >::New(Foam::fvMesh const&) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so"
#6 Foam::basicThermo::New(Foam::fvMesh const&) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so"
#7 main in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/buoyantFoa m"
#8 __libc_start_main in "/lib64/tls/libc.so.6"
#9 Foam::regIOobject::readIfModified() in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/buoyantFoa m"

checkMesh gives me: Mesh OK. I use the function mapFields to obtain my initial fields, interpolating the fields of an other simulation.
What kind of error is it? Could someone give me a tip?

Thanks

Bastien
bholbek is offline   Reply With Quote

Old   January 19, 2009, 10:54
Default Hi Bastien! That does not l
  #8
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Bastien!

That does not look like a problem of snappy to me. The problem happens during the initialization of the thermophysical solver. It would have been nice if you had provided us with the information which solver you are using, but from the type of the error it must be a compressible one. One very popular mistake with those is that p=0 somewhere (either internal or boundary). When OF tries to calculate rho (using the perfect gas relation) it dies with a division by zero.

Have a look at your intial conditions (either with a text editor or paraFoam)

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   January 20, 2009, 06:24
Default Hi, Thank you for your answ
  #9
New Member
 
Bastien Holbek
Join Date: Mar 2009
Posts: 15
Rep Power: 8
bholbek is on a distinguished road
Hi,

Thank you for your answer. Actually, what makes me think that it could be a problem with snappyHexMesh is that i have run successfully the same simulation on an other mesh.
I just create a new mesh, it means, i replace the polymesh directory and i run exactly the same simulation. I have also to say that i use the mapFields utility with the "-consistent" option, to interpolate the results of a "buoyantSimpleFoam" run. Maybe is there something wrong?

I'm using buoyantFoam solver. It's a transient simulation. I'm trying to modify the mesh because i have high courant numbers, only around my inlet. My mean courant number is really lower. Actually, i impose a quite high velocity on an inlet, which corresponds to one of my stl files for snappyHexMesh. SnappyHexMesh creates quite small cells around this inlet and then i have to use really small time steps so that my courant number is not too high and that my simulation runs fine.
Thus, i'm now trying to play with global or local refinement parameters to avoid small cells near my inlet. But maybe, is it not the good way to resolve my problem?

Any suggestions for these two problems?

Thank you

Bastien
bholbek is offline   Reply With Quote

Old   January 23, 2009, 04:48
Default HI, i'm still searching sol
  #10
New Member
 
Bastien Holbek
Join Date: Mar 2009
Posts: 15
Rep Power: 8
bholbek is on a distinguished road
HI,

i'm still searching solutions for my two problems (Post 20 January).
For the first one, i ahve found that the following error appears when i launch a simulation that i have initialized from a solution obtained on a different grid. If i initialize it with a simulation run on the same grid, i do not receive this error. For initialisations, i use the mapField utility with the option concistent.

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 400


Reading environmentalProperties
Reading thermophysical properties

Selecting thermodynamics package hThermo<puremixture<consttransport<speciethermo<hc onstthermo<perfectgas>>>>>
#0 Foam::error::printStack(Foam:stream&) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 __restore_rt at sigaction.c:0
#3 Foam::hThermo<foam::puremixture<foam::consttranspo rt<foam::speciethermo<foam::hc onstthermo<foam::perfectgas> > > > >::calculate() in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so"
#4 Foam::hThermo<foam::puremixture<foam::consttranspo rt<foam::speciethermo<foam::hc onstthermo<foam::perfectgas> > > > >::hThermo(Foam::fvMesh const&) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so"
#5 Foam::basicThermo::addfvMeshConstructorToTable<foa m::hthermo<foam::puremixture<f oam::consttransport<foam::speciethermo<foam::hcons tthermo<foam::perfectgas> > > > > >::New(Foam::fvMesh const&) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so"
#6 Foam::basicThermo::New(Foam::fvMesh const&) in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libbasicThermophysicalM odels.so"
#7 main in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/buoyantFoa m"
#8 __libc_start_main in "/lib64/tls/libc.so.6"
#9 Foam::regIOobject::readIfModified() in "/ric_home/ep4/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/buoyantFoa m"
Gleitkomma-Ausnahme

Any ideas?

Thank you

Bastien
bholbek is offline   Reply With Quote

Old   February 5, 2009, 05:25
Default Hi, we are trying to simula
  #11
Member
 
norman1981's Avatar
 
Norman Del Puppo
Join Date: Mar 2009
Location: Hinwil, CH
Posts: 57
Rep Power: 8
norman1981 is on a distinguished road
Hi,

we are trying to simulate a NACA foil 0012. We have just used blockMesh utility to generate a mesh and the simulatation run fine. Now we are trying to test the snappyHexMesh potentiality to study the same case but we are struggling to obtain a good quality mesh around the profile and this trouble has the drawback to substime the cd coefficient. We report next an image about the pressure field around naca's profile and an archive that contains the snappyHexMeshDict, blockMeshDict and naca.stl files we are using.



snappyHexMeshDict

Is there someone that has any good idea about what we can do to improve our solution?

Thank you in advance

Best Regards

Norman
norman1981 is offline   Reply With Quote

Old   February 5, 2009, 05:31
Default Sorry the archive was too huge
  #12
Member
 
norman1981's Avatar
 
Norman Del Puppo
Join Date: Mar 2009
Location: Hinwil, CH
Posts: 57
Rep Power: 8
norman1981 is on a distinguished road
Sorry the archive was too huge to be uploaded,

here are the blockMeshDict



and the naca.stl file



Thanks

Norman
norman1981 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
SnappyHexMesh with local refinement of ONE STLfile wolle1982 OpenFOAM Mesh Utilities 16 August 23, 2013 12:12
SnappyHexMesh and Snapping thomasr OpenFOAM Mesh Utilities 5 March 15, 2012 12:07
SnappyHexMesh erik023 OpenFOAM Mesh Utilities 19 October 17, 2010 10:09
SnappyHexMesh mp340 OpenFOAM Meshing & Mesh Conversion 1 November 13, 2008 14:30
SnappyHexMesh hangs wile mesh refinement bastil OpenFOAM Bugs 3 November 4, 2008 07:08


All times are GMT -4. The time now is 09:22.