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

OpenFOAM - structured or unstructured Grids ?

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

Like Tree6Likes
  • 1 Post By thomasduerr
  • 4 Post By egp
  • 1 Post By alberto

Reply
 
LinkBack Thread Tools Display Modes
Old   April 29, 2010, 03:15
Default OpenFOAM - structured or unstructured Grids ?
  #1
New Member
 
Join Date: May 2009
Posts: 21
Rep Power: 8
thomasduerr is on a distinguished road
Hi everybody,

For a change, I have a more general question to the community:
I have been using OpenFOAM now for about 1 year and we were running in massive trouble using unstructured grids (non isothermal). We have heard now that most applications are actually on structured grids and that OF actually in reality needs structured grids.

Can you confirm that? Isn't there anybody who runs complex geometries on unstructured grids?
For us this would mean that we need to think about the use of an improved snappyHexMesher.

Thanks a lot to you all,
Thomas
flowAlways likes this.
thomasduerr is offline   Reply With Quote

Old   April 30, 2010, 02:24
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
Quote:
Originally Posted by thomasduerr View Post
We have heard now that most applications are actually on structured grids and that OF actually in reality needs structured grids.
Where did you hear this misinformation? OpenFOAM definitely handles unstructured grids. Indeed it handles arbitrary polyhedral meshes http://www.openfoam.com/docs/user/me...#x23-1260005.1
Of course, a tet mesh may still give you problems.

Quote:
Isn't there anybody who runs complex geometries on unstructured grids?
How do you define a "complex geometry"?
Do the geometries pictured on page 20 of the following document qualify? http://www.opensourcecfd.com/conference2009/proceedings/documents/Session%20III/OSCIC2009_Hinterberger.pdf
olesen is offline   Reply With Quote

Old   April 30, 2010, 11:39
Default
  #3
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by thomasduerr View Post
Hi everybody,

For a change, I have a more general question to the community:
I have been using OpenFOAM now for about 1 year and we were running in massive trouble using unstructured grids (non isothermal). We have heard now that most applications are actually on structured grids and that OF actually in reality needs structured grids.
As Mark said, OF can deal with polyhedral grids. You're probably referring to some discussion where using tetrahedral grids problems appeared.
OpenFOAM is, in my experience, quite sensitive to the mesh quality, so you need to be a bit careful when generating the grid to avoid very skewed cells. Many of the users I saw reporting problems were using salomé or gmsh to generate their grid. They're good tools, but, in my experience, their meshing capabilities are not always the best for finite-volume codes.

Quote:
Can you confirm that? Isn't there anybody who runs complex geometries on unstructured grids?
For us this would mean that we need to think about the use of an improved snappyHexMesher.
Yes, many. Just take a look at the slides of workshops and conferences about OpenFOAM.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   May 3, 2010, 05:06
Default
  #4
New Member
 
Join Date: May 2009
Posts: 21
Rep Power: 8
thomasduerr is on a distinguished road
Yes, we saw that there was some discussion about problems with tetras, we are using the commercial mesher Centaur to generate the mesh and have some problems in particular with high aspect ratio cells...

We have also seen that OF can handle polyheder meshes, however the background of my question was that we heard that most industry projects with OF generally use an improved snappyHexMesher to generate robust meshes since OF is so sensitive to mesh quality.

@Mark, yes on page 20, those would be complex geometries.

I guess the iteration process to generate a good, unstructured OF mesh will just take a little bit longer...
thomasduerr is offline   Reply With Quote

Old   May 3, 2010, 07:14
Default
  #5
egp
Senior Member
 
egp's Avatar
 
Eric Paterson
Join Date: Mar 2009
Location: Blacksburg, VA
Posts: 197
Blog Entries: 1
Rep Power: 9
egp is on a distinguished road
For unstructured meshes with high skewness, I've seen that choice of schemes is quite important. I might recommend fvScheme settings (for simpleFoam with kOmegaSST_lowRe) such as:

//************************************************** ******

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default cellLimited leastSquares 1.0;
}

divSchemes
{
default none;
div(phi,U) Gauss reconCentral cellLimited leastSquares 1.0;
div(phi,k) Gauss vanLeerDC;
div(phi,omega) Gauss vanLeerDC;
div(R) Gauss linear;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear limited 0.5;
laplacian((1|A(U)),p) Gauss linear limited 0.5;
laplacian(DkEff,k) Gauss linear limited 0.5;
laplacian(DomegaEff,omega) Gauss linear limited 0.5;
laplacian(1,p) Gauss linear corrected;
}

interpolationSchemes
{
default reconCentral phi leastSquares;
interpolate(U) reconCentral phi leastSquares;
}

snGradSchemes
{
default limited 0.5;
}

fluxRequired
{
default no;
p ;
}

//************************************************** ******


FYI: you will need to use 1.5-dev with these settings (reconCentral doesn't exist in 1.6.x).
egp is offline   Reply With Quote

Old   July 1, 2010, 05:45
Default
  #6
New Member
 
Ramnik Singh
Join Date: Jun 2009
Location: Stuttgart, Germany
Posts: 17
Rep Power: 8
Ramnik is on a distinguished road
Hellp epg,

Can u please suggest similar schemes for unstructured mesh for openFoam1.6x.

Thanks in Advance
Ramnik
Ramnik is offline   Reply With Quote

Old   July 1, 2010, 05:51
Default
  #7
egp
Senior Member
 
egp's Avatar
 
Eric Paterson
Join Date: Mar 2009
Location: Blacksburg, VA
Posts: 197
Blog Entries: 1
Rep Power: 9
egp is on a distinguished road
Ramnik,

If you want advanced functionality such as the reconCentral scheme, I would advise that you use the OpenFOAM-extend version. There is significant capability there that doesn't exist in 1.6.x or 1.7.
egp is offline   Reply With Quote

Old   July 1, 2010, 06:18
Default
  #8
New Member
 
Ramnik Singh
Join Date: Jun 2009
Location: Stuttgart, Germany
Posts: 17
Rep Power: 8
Ramnik is on a distinguished road
Egp,

Changing the version is not possible as i am required to show my results for 1.6.

I am running a 3D simulation for an emptying process of a surge tank design using interfoam. I have an unstructured grid and i have been facing this problem for a very long time now. The Courant's number jumps to a very high value suddenly.

the mesh check is completely ok except around 230 non-orthogonal faces.

here is the error
Quote:
Courant Number mean: 0.000727639 max: 0.505194
deltaT = 0.000700614
Time = 6.09586

MULES: Solving for alpha1
Liquid phase volume fraction = 0.882692 Min(alpha1) = -1.04471e-26 Max(alpha1) = 1.0017
MULES: Solving for alpha1
Liquid phase volume fraction = 0.882691 Min(alpha1) = -1.94937e-26 Max(alpha1) = 1.0017
DICPCG: Solving for p, Initial residual = 8.64688e-05, Final residual = 4.06583e-06, No Iterations 10
DICPCG: Solving for p, Initial residual = 4.95736e-05, Final residual = 2.44067e-06, No Iterations 49
DICPCG: Solving for p, Initial residual = 3.388e-05, Final residual = 9.60513e-08, No Iterations 393
time step continuity errors : sum local = 5.02498e-11, global = 5.25651e-13, cumulative = 3.27921e-06
smoothSolver: Solving for epsilon, Initial residual = 0.00107067, Final residual = 2.84845e-10, No Iterations 2
smoothSolver: Solving for k, Initial residual = 0.000243268, Final residual = 2.27668e-11, No Iterations 2
ExecutionTime = 19025.8 s ClockTime = 19573 s

Courant Number mean: 0.000717944 max: 0.504811
deltaT = 0.000691189
Time = 6.09656

MULES: Solving for alpha1
Liquid phase volume fraction = 0.88269 Min(alpha1) = -1.94937e-26 Max(alpha1) = 1.0017
MULES: Solving for alpha1
Liquid phase volume fraction = 0.882689 Min(alpha1) = -6.94741e-27 Max(alpha1) = 1.0017
DICPCG: Solving for p, Initial residual = 9.61413e-05, Final residual = 4.61993e-06, No Iterations 16
DICPCG: Solving for p, Initial residual = 5.59775e-05, Final residual = 2.57609e-06, No Iterations 19
DICPCG: Solving for p, Initial residual = 2.65742e-05, Final residual = 9.36751e-08, No Iterations 191
time step continuity errors : sum local = 4.70235e-11, global = -9.4174e-14, cumulative = 3.27921e-06
smoothSolver: Solving for epsilon, Initial residual = 0.0010941, Final residual = 2.90639e-10, No Iterations 2
smoothSolver: Solving for k, Initial residual = 0.000243594, Final residual = 2.29966e-11, No Iterations 2
ExecutionTime = 19051.5 s ClockTime = 19599 s

Courant Number mean: 0.000708467 max: 0.504495
deltaT = 0.000685017
Time = 6.09724

MULES: Solving for alpha1
Liquid phase volume fraction = 0.882688 Min(alpha1) = -6.33288e-27 Max(alpha1) = 1.0017
MULES: Solving for alpha1
Liquid phase volume fraction = 0.882687 Min(alpha1) = -2.79288e-26 Max(alpha1) = 1.0017
DICPCG: Solving for p, Initial residual = 8.89488e-05, Final residual = 4.39486e-06, No Iterations 49
DICPCG: Solving for p, Initial residual = 7.38401e-05, Final residual = 3.55002e-06, No Iterations 29
DICPCG: Solving for p, Initial residual = 3.7267e-05, Final residual = 9.31492e-08, No Iterations 217
time step continuity errors : sum local = 4.69723e-11, global = -1.33004e-12, cumulative = 3.27921e-06
smoothSolver: Solving for epsilon, Initial residual = 0.00112341, Final residual = 3.04919e-10, No Iterations 2
smoothSolver: Solving for k, Initial residual = 0.000245285, Final residual = 2.38875e-11, No Iterations 2
ExecutionTime = 19081.9 s ClockTime = 19629 s

Courant Number mean: 0.000702325 max: 0.506536
deltaT = 0.000675924
Time = 6.09792

MULES: Solving for alpha1
Liquid phase volume fraction = 0.882687 Min(alpha1) = -1.89938e-26 Max(alpha1) = 1.0017
MULES: Solving for alpha1
Liquid phase volume fraction = 0.882686 Min(alpha1) = -1.42845e-26 Max(alpha1) = 1.0017
DICPCG: Solving for p, Initial residual = 0.000106261, Final residual = 5.31081e-06, No Iterations 9
DICPCG: Solving for p, Initial residual = 5.51595e-05, Final residual = 2.71885e-06, No Iterations 21
DICPCG: Solving for p, Initial residual = 2.47782e-05, Final residual = 9.58574e-08, No Iterations 221
time step continuity errors : sum local = 4.62714e-11, global = 8.75967e-13, cumulative = 3.27921e-06
smoothSolver: Solving for epsilon, Initial residual = 0.00115054, Final residual = 3.11431e-10, No Iterations 2
bounding epsilon, min: -0.700262 max: 2173.43 average: 0.23601
smoothSolver: Solving for k, Initial residual = 0.000247784, Final residual = 2.41797e-11, No Iterations 2
ExecutionTime = 19109.2 s ClockTime = 19657 s

Courant Number mean: 0.000693187 max: 0.506359
deltaT = 0.00066703
Time = 6.09858

MULES: Solving for alpha1
Liquid phase volume fraction = 0.882685 Min(alpha1) = -1.25557e-26 Max(alpha1) = 1.0017
MULES: Solving for alpha1
Liquid phase volume fraction = 0.882684 Min(alpha1) = -1.06496e-26 Max(alpha1) = 1.0017
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.0443623, No Iterations 144
DICPCG: Solving for p, Initial residual = 0.654218, Final residual = 0.0322806, No Iterations 14
DICPCG: Solving for p, Initial residual = 0.431166, Final residual = 9.76228e-08, No Iterations 824
time step continuity errors : sum local = 0.129724, global = 0.000486648, cumulative = 0.000489928
smoothSolver: Solving for epsilon, Initial residual = 1, Final residual = 9.40959e-09, No Iterations 42
smoothSolver: Solving for k, Initial residual = 1, Final residual = 2.07907e-11, No Iterations 3
ExecutionTime = 19191.8 s ClockTime = 19739 s

Courant Number mean: 671044 max: 1.52481e+11
[1] [2] [0] ###0 00Foam::error:rintStack(Foam::Ostream&) Foam::error:rintStack(Foam::Ostream&) Foam::error:rintStack(Foam::Ostream&)
And the residuals

residual2.jpg

Can u please have a look and suggest solution

Regards
Ramnik
Attached Files
File Type: txt error.txt (7.0 KB, 19 views)
Ramnik is offline   Reply With Quote

Old   July 1, 2010, 12:38
Default
  #9
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Could you publish your fvScheme and fvSolution dictionaries?

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   July 1, 2010, 12:40
Default
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by egp View Post
Ramnik,

If you want advanced functionality such as the reconCentral scheme, I would advise that you use the OpenFOAM-extend version. There is significant capability there that doesn't exist in 1.6.x or 1.7.
What does exactly reconCentral do?

Thanks,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   July 1, 2010, 14:02
Default
  #11
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
I answered myself, and compiled it for 1.7.x. You find it attached (wmake libso to build it, and then include it in controlDict), but I doubt this will fix the problems you are facing, so it would still be useful to see your numerical setup.

Best,
Attached Files
File Type: gz reconCentral_1.7.x.tar.gz (3.6 KB, 87 views)
nozaki likes this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   July 2, 2010, 18:39
Default
  #12
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 471
Rep Power: 11
bastil is on a distinguished road
Quote:
Originally Posted by alberto View Post
I answered myself, and compiled it for 1.7.x
I agree that choice of schemes is important for bad meshes. However, I al also onderwing what reconCentral and vanLeerDC exactly do?
Eric: How did you find these scheme-settings? I will give them a try.

Regards Bastian
bastil is offline   Reply With Quote

Old   July 2, 2010, 19:38
Default
  #13
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by bastil View Post
However, I al also onderwing what reconCentral and vanLeerDC exactly do?
reconCentral computes the interpolated value on the face centroid introducing a correction based on the gradient on both sides of the face, which is pretty widespread practice.

vanLeerDC is the vanLeer scheme with deferred correction.

I never used them in OF since they're not in the 1.7.x, but I am a bit doubtful about the improvements they can bring on poor meshes. Sometime it is just easier to fix the mesh than waste time fiddling with schemes. You'll also gain in quality of the results.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   July 3, 2010, 05:11
Default
  #14
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 471
Rep Power: 11
bastil is on a distinguished road
Quote:
Originally Posted by alberto View Post
reconCentral computes the interpolated value on the face centroid introducing a correction based on the gradient on both sides of the face, which is pretty widespread practice.
Thanks Alberto. So it is a modification of "linear" in terms that it still is cental differencing and second order?
bastil is offline   Reply With Quote

Old   April 27, 2012, 08:00
Default
  #15
Member
 
ms
Join Date: Mar 2009
Location: West London
Posts: 44
Rep Power: 8
anothr_acc is on a distinguished road
Well, I'm interested in the reconCentral approach now, too. My openFoam is version 2.1.0 and I downloaded it for Ubuntu without building it. My questions are....

1) Is openFoam-ext still going? The website shows little / no forum activity that I could see.

2) Can I insert components from openFoam-ext into openFoam 2.1.0, given that I didn't build it?

3) Do openFoam-ext components find their way into openFoam after time or is it completely separate? (This seems a little odd, given the open/free nature of the code).

Best regards all,

Mark.
anothr_acc is offline   Reply With Quote

Old   April 27, 2012, 11:07
Default
  #16
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by anothr_acc View Post
Well, I'm interested in the reconCentral approach now, too. My openFoam is version 2.1.0 and I downloaded it for Ubuntu without building it. My questions are....
You can easily adapt reconCentral to OpenFOAM 2.1.x. There might be some changes required for the code to compile.

Quote:
1) Is openFoam-ext still going? The website shows little / no forum activity that I could see.
The project is active. I do not have a lot of information either on the progress, but probably it will be available after their workshop.

Quote:
2) Can I insert components from openFoam-ext into openFoam 2.1.0, given that I didn't build it?
It depends on what you need. Some parts are easily ported to the 2.1.x version, others are not as easy to adapt, since the two code trees are independent and developed by different people.

Quote:
3) Do openFoam-ext components find their way into openFoam after time or is it completely separate? (This seems a little odd, given the open/free nature of the code).
This has not happened until now.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   October 16, 2012, 14:59
Default
  #17
New Member
 
andres
Join Date: Jul 2011
Posts: 28
Rep Power: 6
greel is on a distinguished road
Quote:
Originally Posted by alberto View Post
I answered myself, and compiled it for 1.7.x. You find it attached (wmake libso to build it, and then include it in controlDict), but I doubt this will fix the problems you are facing, so it would still be useful to see your numerical setup.

Best,
I´m trying to compile reconCentral in OF 2.0 but I´m not familiarized with the code and I don´t know which lines needs modifications. May you give some tips??
Thanks!

Andrés
greel is offline   Reply With Quote

Old   April 5, 2013, 06:18
Default
  #18
New Member
 
sirshosona
Join Date: Jan 2013
Posts: 4
Rep Power: 4
Sirshendu is on a distinguished road
Quote:
Originally Posted by egp View Post
For unstructured meshes with high skewness, I've seen that choice of schemes is quite important. I might recommend fvScheme settings (for simpleFoam with kOmegaSST_lowRe) such as:

//************************************************** ******

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default cellLimited leastSquares 1.0;
}

divSchemes
{
default none;
div(phi,U) Gauss reconCentral cellLimited leastSquares 1.0;
div(phi,k) Gauss vanLeerDC;
div(phi,omega) Gauss vanLeerDC;
div(R) Gauss linear;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear limited 0.5;
laplacian((1|A(U)),p) Gauss linear limited 0.5;
laplacian(DkEff,k) Gauss linear limited 0.5;
laplacian(DomegaEff,omega) Gauss linear limited 0.5;
laplacian(1,p) Gauss linear corrected;
}

interpolationSchemes
{
default reconCentral phi leastSquares;
interpolate(U) reconCentral phi leastSquares;
}

snGradSchemes
{
default limited 0.5;
}

fluxRequired
{
default no;
p ;
}

//************************************************** ******


FYI: you will need to use 1.5-dev with these settings (reconCentral doesn't exist in 1.6.x).
I want to use the vanLeerDC scheme. Where should I get it as it is not officially available in OpenFOAM?
Sirshendu is offline   Reply With Quote

Old   October 10, 2014, 06:31
Default fv-schemes- unstructured- no extended ?
  #19
Member
 
Tobias Adam
Join Date: Oct 2013
Location: Siegen
Posts: 55
Rep Power: 3
Tobias Adam is on a distinguished road
Hello everyone

What settings for unstructured Mesh do you prefer for people who don´t use the extended version of OpenFoam?

Greets
Tobi
Tobias Adam 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
combining structured and unstructured grids Shane FLUENT 2 January 23, 2007 21:57
structured & unstructured grids Samir FLUENT 1 February 7, 2005 01:48
Structured and Unstructured grids Samir FLUENT 0 February 5, 2005 22:21
combined structured and unstructured grids phil FLUENT 0 March 5, 2003 07:00
Structured versus unstructured grids Siobhan O'Callaghan FLUENT 0 April 9, 2002 09:25


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