CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

SimpleFoam: High residuals after increase in Reynolds Number

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

Like Tree1Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   September 7, 2012, 13:10
Default SimpleFoam: High residuals after increase in Reynolds Number
  #1
Member
 
Jason G.
Join Date: Sep 2009
Location: Clemmons, NC
Posts: 76
Rep Power: 7
JasonG is on a distinguished road
Hello,

I have been working with the SimpleFoam solver to model pressure drop of internally bounded flow through passages. For my current analysis I am assuming incompressible, steady-state, and smooth walls. I have been attempting to utilize the kOmegaSST model to account for turbulence.

On my initial runs with a Reynolds number below 1,000 at the inlet my solution converges nicely with P residuals of 1E-5. Once my inlet condition changes such that the Reynolds is in the "transitional" ~3,000 my Residuals seem to take more iterations to drop and drop to ~1e-5. I then change the inlet condition such that Re=8,000 and my P residuals does not drop below 0.01, with Ux,Uy,Uz, k at ~0.001 and omega ~ 1e-5. These residuals stay about the same for increasing Re up to 80,000 (highest I have attempted to run).

I am using standard approximations for initializing the inlet parameters for k and omega. I am also using approximations to determine the height of the first cell layer in my mesh. The mesh is comprised of 10-node tetrahedral elements with prismatic boundary layer with a fixed first cell height, layer compression for collision avoidance, and linear growth rate of 1.5.

I have played around with my first cell height to accommodate the reduction in cell height required for higher Re flow. Given that the solution converges with low Re I am thinking my general mesh is adequate and that the issue is related to something with the turbulent wall functions.

Any help is greatly appreciated!



My boundary field is set as follows:

K=
boundary
{
type kqRWallFunction;
value $internalField;
}

where: internalField uniform $turbulentKE; (this value is calculated and used as a fixed value for inlet BC)

nut=

boundary
{
type nutLowReWallFunction;
value uniform 0;
}

omega=

boundary
{
type omegaWallFunction;
value $internalField;
}

where internalField uniform $turbulentOmega; (this value is calculated and used as a fixed value for inlet BC)
JasonG is offline   Reply With Quote

Old   January 9, 2013, 11:40
Default
  #2
Member
 
Jason G.
Join Date: Sep 2009
Location: Clemmons, NC
Posts: 76
Rep Power: 7
JasonG is on a distinguished road
Bump.

I am still having difficulty. I suspect my high residuals for increased Re are an artifact of my mesh, but I am not certain if my turbulence model and choice of wall treatment are prone to cause these errors.
JasonG is offline   Reply With Quote

Old   January 9, 2013, 14:20
Default
  #3
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 8
danvica is on a distinguished road
I don't have the solution but it's an interesting issue.

I'm not sure that the increase of the residuals can affect the quality of your solution more than the normal approximations you're already taking (i.e. smooth walls)

Since your residuals stabilize I don't see any problem with them.
There is/was lots of discussion about their behavior and if I correctly remember Alberto express this concept some times ago.

I'm going to look for the thread...

What if you refine the mesh ?

Regards,
__________________
Daniele Vicario

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

Old   January 9, 2013, 14:33
Default
  #4
Member
 
Jason G.
Join Date: Sep 2009
Location: Clemmons, NC
Posts: 76
Rep Power: 7
JasonG is on a distinguished road
I have attempted various meshing approaches, most of which involve a tet mesh with a prismatic boundary layer. I started with setting a fixed first cell height for the boundary layer based on a hand-calc guideline, and then I started varying the growth rate and number of layers.

The meshing technique I use (Ansys Workbench) does generate non-orthogonal elements at many of the sharp corners, but it says it passes the checkMesh utility. I am still not convinced the residuals of 0.01 are very good since the model I am running now is predicting a delta P of 76 psi for a manifold that was tested to be 85 psi nominally. For the time being, I may have to increase my density by ~10% to build in a margin of safety on my pressure drop. Granted, I am assuming smooth walls when the actual manifold is not perfectly smooth.
JasonG is offline   Reply With Quote

Old   January 9, 2013, 14:48
Default
  #5
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 8
danvica is on a distinguished road
Sometime ago I tested a pressure driven flow in an almost cylindrical pipe just to see how the finess of the mesh and the kind (tet or hex) of it will influence the flow rate compared to a real pipe.

Sure, I used SimpleFoam and kOmegaSST...

More than the resolution it was the tet mesh that gave the biggest difference (about 10%).

You could try using SnappyHexMesh to get an hex mesh and see what's happen.

Can you post a picture of your mesh ?

Regards,
__________________
Daniele Vicario

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

Old   January 9, 2013, 14:58
Default
  #6
Member
 
Jason G.
Join Date: Sep 2009
Location: Clemmons, NC
Posts: 76
Rep Power: 7
JasonG is on a distinguished road
I have been using SimpleFoam and kOmegaSST as well. Attached is a quick image I found of one of my mesh iterations on a less complex model.


I am still not well versed in meshing within OpenFOAM so I have not yet attempted to use the SnappyHexMesh.
Attached Images
File Type: jpg 1.jpg (29.0 KB, 39 views)
File Type: jpg 2.jpg (70.2 KB, 43 views)
File Type: jpg 3.jpg (18.4 KB, 42 views)
JasonG is offline   Reply With Quote

Old   January 9, 2013, 15:41
Default
  #7
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
If you are using ANSYS for your meshes, why not convert your tets to arbitrary polyhedron and then import to OpenFOAM? In the past, this helped me when dealing with complicated meshes...especially with convergence. Its worth a try.
Alhasan likes this.
__________________
Dan

Find me on twitter @dancombest and LinkedIn
chegdan is offline   Reply With Quote

Old   January 9, 2013, 15:49
Default
  #8
Member
 
Jason G.
Join Date: Sep 2009
Location: Clemmons, NC
Posts: 76
Rep Power: 7
JasonG is on a distinguished road
Interesting. Could you explain this a little further? I am currently take my *.msh file from Ansys and running "fluentMeshToFoam *.msh -scale 39.36996" to convert my Ansys metric mesh into US units for OpenFOAM.
JasonG is offline   Reply With Quote

Old   January 9, 2013, 15:56
Default
  #9
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
well, this one is a bit complicated. In Fluent there use to be a drop down menu that was "convert my mesh to polyhedra" and you were left with a converted mesh. Then, you need to export the ascii .cas file and import it into OF using fluent3dMeshToFoam. The only downside is that the conversion requires a lot of memory, so make sure your computer has a lot of RAM, say something nice to it, and then let it do its converting business. In the mean time, go get a coffee. I did this for 40 million cell tet meshes and it reduced the cell count tremendously.
__________________
Dan

Find me on twitter @dancombest and LinkedIn
chegdan is offline   Reply With Quote

Old   January 9, 2013, 16:00
Default
  #10
Member
 
Jason G.
Join Date: Sep 2009
Location: Clemmons, NC
Posts: 76
Rep Power: 7
JasonG is on a distinguished road
I will look into this. I may not have access to that menu option since I do not have a license for Fluent, only the mesher for Ansys Mechanical which has CFX meshing criteria. I have 32 GB of ram and most of my .msh files are <150MB, so I should have sufficent ram.
JasonG is offline   Reply With Quote

Old   January 9, 2013, 16:10
Default
  #11
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
your other option is to use polyDualMesh and convert to arbitrary polyhedral cells in OpenFOAM. This requires your tet mesh to be of high-quality, Delaunay trianglated, and maybe a few other minor requirements (i forget at the moment). This is also worth a try if you do not have access to the features in ansys. Search the forum for polydualmesh and if it works then post back the solution to this thread for others to follow.
__________________
Dan

Find me on twitter @dancombest and LinkedIn
chegdan is offline   Reply With Quote

Old   January 9, 2013, 16:12
Default
  #12
Member
 
Jason G.
Join Date: Sep 2009
Location: Clemmons, NC
Posts: 76
Rep Power: 7
JasonG is on a distinguished road
Thanks for the suggestion, I appreciate it. I have been fair dissapointed with the lack of user meshing controls in Workbench, and routinely battle with less than desirable meshes that have many non-orthogonal elements.
JasonG is offline   Reply With Quote

Old   January 9, 2013, 17:03
Default
  #13
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 8
danvica is on a distinguished road
Just a note. In the very first post you wrote omega at the inlet is 1e-5. I've never used such a small value. Is it correct ?
__________________
Daniele Vicario

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

Old   January 9, 2013, 17:14
Default
  #14
Member
 
Jason G.
Join Date: Sep 2009
Location: Clemmons, NC
Posts: 76
Rep Power: 7
JasonG is on a distinguished road
That was my residual.
JasonG is offline   Reply With Quote

Old   January 9, 2013, 17:37
Default
  #15
Member
 
Jason G.
Join Date: Sep 2009
Location: Clemmons, NC
Posts: 76
Rep Power: 7
JasonG is on a distinguished road
Here is an example of my initial condition file:

Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

flowVelocity (284.31439 0 0);
pressure 0;
turbulentKE 357.81219;
turbulentOmega 986.73127041;
kinematicvis nu [ 0 2 -1 0 0 0 0 ] 0.0251; // in^2/s
density 9.5249E-005; // Value of the density(sslug/in^3)-> pstatic = lbf/in^2

//RAS PROPERTIES

RAS_MODEL kOmegaSST; //laminar;
turb_on_off on; //on


#inputMode merge

// ************************************************** *********************** //
k:

Quote:
#include "initialConditions"

dimensions [0 2 -2 0 0 0 0];

internalField uniform $turbulentKE;

boundaryField
{

inlet_1
{
type fixedValue;
value $internalField;
}


outlet_1
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}




boundary
{
type kqRWallFunction;
value $internalField;
}


}
nut:

Quote:
dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet_1
{
type calculated;
value uniform 0;
}



outlet_1
{
type calculated;
value uniform 0;
}




boundary
{
type nutLowReWallFunction;
value uniform 0;
}


}
omega:

Quote:
#include "initialConditions"

dimensions [0 0 -1 0 0 0 0];

internalField uniform $turbulentOmega;

boundaryField
{


inlet_1
{
type fixedValue;
value $internalField;
}



outlet_1
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}



boundary
{
type omegaWallFunction;
value $internalField;
}



}
p:

Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.0 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include "initialConditions"

dimensions [0 2 -2 0 0 0 0];

internalField uniform $pressure;

boundaryField
{

inlet_1
{
type outletInlet;
outletValue $internalField;
value $internalField;
}



outlet_1
{
type fixedValue;
value $internalField;
}


boundary
{
type zeroGradient;
}



}

// ************************************************** *********************** //
U:

Quote:
#include "initialConditions"

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
inlet_1
{
type inletOutlet;
inletValue $flowVelocity;
value $flowVelocity;
}




outlet_1
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}



boundary
{
type fixedValue;
value $internalField;
}
JasonG is offline   Reply With Quote

Old   January 9, 2013, 17:41
Default
  #16
Member
 
Jason G.
Join Date: Sep 2009
Location: Clemmons, NC
Posts: 76
Rep Power: 7
JasonG is on a distinguished road
RASProperties (which I admit, I am not well studied on the ramifications of the kOmegaSSTCoeffs)

Quote:
RASModel $RAS_MODEL;

turbulence $turb_on_off;

printCoeffs on;

kOmegaSSTCoeffs //can paste the values here to override the defaults
{
alphaK1 0.85034;
alphaK2 1;
alphaOmega1 0.5;
alphaOmega2 0.85616;
gamma1 0.5532;
gamma2 0.4403;
beta1 0.075;
beta2 0.0828;
betaStar 0.09;
a1 0.31;
c1 10;
}
transportProperties:

Quote:
#include "../0/initialConditions"


transportModel Newtonian;

nu $kinematicvis;

fvSchemes:

Quote:
ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss linearUpwindV grad(U);
div(phi,k) Gauss upwind;
div(phi,omega) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p;
}
fvSolution:

Quote:
solvers
{
p
{
solver GAMG;
tolerance 1e-7;
relTol 0.1;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
cacheAgglomeration on;
agglomerator faceAreaPair;
nCellsInCoarsestLevel 10;
mergeLevels 1;
}

U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}

k
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}

omega
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-20;
relTol 0.1;
nSweeps 1;
}
}

SIMPLE
{
nNonOrthogonalCorrectors 2;

residualControl
{
p 1e-5;
U 1e-5;
"(k|epsilon|omega)" 1e-6;
}

}

potentialFlow
{
nNonOrthogonalCorrectors 15;
}

relaxationFactors
{
fields
{
p 0.3;
}
equations
{
U 0.7;
k 0.7;
omega 0.7;
}
}

cache
{
grad(U);
}
JasonG is offline   Reply With Quote

Old   January 9, 2013, 21:17
Default
  #17
Member
 
Jason G.
Join Date: Sep 2009
Location: Clemmons, NC
Posts: 76
Rep Power: 7
JasonG is on a distinguished road
Attached are the residuals from a current run that has nNonOrthogonalCorrectors 2.
Attached Images
File Type: jpg residuals.jpg (39.5 KB, 34 views)
JasonG is offline   Reply With Quote

Old   January 10, 2013, 01:53
Default
  #18
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 8
danvica is on a distinguished road
Ops, i'm sorry for the misunderstanding about residual of omega

Other than using an hex mesh I would suggest you to try relTol=0 in your solution.

BTW a very good start to snappyhexmesh is into:

http://www.openfoam.org/docs/user/snappyHexMesh.php

and

http://www.openfoamworkshop.org/2012...ningSlides.tgz

Regards,
__________________
Daniele Vicario

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

Old   January 10, 2013, 09:55
Default
  #19
Member
 
Jason G.
Join Date: Sep 2009
Location: Clemmons, NC
Posts: 76
Rep Power: 7
JasonG is on a distinguished road
Thanks for the links. Attached are pictures of my current mesh I am working with. Below is the output from the checkMesh utility. I assume the non-orthogonal faces are setting a limit on my residuals, but it is interesting that I can take the same mesh and run with a viscosity that results in sufficiently laminar flow and obtain a nicely converging solution with 1e-5 residuals.

I am attempting to model steady-state, incompressible, turbulent flow so I assume the simpleFoam solver is best suited for my needs, is this a reasonable assumption? After some reading I came to the conclusion that the kOmegaSST model is best suited for my internally bounded flow with Reynolds numbers ranging from 2,000-9,000, typically.

Quote:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.1-221db2718bbb
Exec : checkMesh
Date : Jan 10 2013
Time : 05:57:17
Host : "ubuntu"
PID : 16426
Case : /home/jason/OpenFOAM/jason-2.1.1/run/737_lgsv/p_up_19gpm
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 351399
internal points: 327463
faces: 2129824
internal faces: 2082308
cells: 912279
boundary patches: 3
point zones: 0
face zones: 0
cell zones: 0

Overall number of cells of each type:
hexahedra: 0
prisms: 563016
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 349263
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
boundary 46918 23415 ok (non-closed singly connected)
inlet_1 306 284 ok (non-closed singly connected)
outlet_1 292 277 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-1.299996079 0.6369980788 3.25599018) (6.84997934 3.21299031 5.622983041)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (2.394909989e-20 -2.377063304e-19 8.627816757e-20) OK.
Max cell openness = 2.191854087e-16 OK.
Max aspect ratio = 69.3522967 OK.
Minumum face area = 3.569037162e-06. Maximum face area = 0.006245055058. Face area magnitudes OK.
Min volume = 3.366357362e-08. Max volume = 7.906465566e-05. Total volume = 4.183083856. Cell volumes OK.
Mesh non-orthogonality Max: 81.90879202 average: 20.88289136
*Number of severely non-orthogonal faces: 88.
Non-orthogonality check OK.
<<Writing 88 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
Max skewness = 3.795856847 OK.
Coupled point location match (average 0) OK.

Mesh OK.

End
Attached Images
File Type: jpg 1.jpg (17.0 KB, 25 views)
File Type: jpg 2.jpg (99.5 KB, 32 views)
JasonG is offline   Reply With Quote

Old   January 10, 2013, 14:01
Default
  #20
Senior Member
 
Daniele Vicario
Join Date: Mar 2009
Location: Novara, Italy
Posts: 142
Rep Power: 8
danvica is on a distinguished road
Well, this is again a good question. I consider kOmegaSST model trustable for my applications.

I could verify the results of some simplefoam turbulence cases up to Re about 1e5.

I have to say that I work mainly with pressure driven flow and we monitor the flow rate only...I don't know whether this can be judged a trustable verification (well, for me it can !)

But we need to wait someone more expert...anyone ?

Regarding your mesh:

Quote:
Mesh non-orthogonality Max: 81.90879202 average: 20.88289136
*Number of severely non-orthogonal faces: 88.
Yes, I think this is the problem.

Regards,
__________________
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
AMI speed performance danny123 OpenFOAM 19 October 24, 2012 07:44
Convergence problem suthichock Main CFD Forum 27 May 11, 2009 07:05
SimpleFOAM for steady globally unstable Reynolds number pbohorquez OpenFOAM Running, Solving & CFD 0 February 19, 2009 11:47
How to increase the Re number in a jet flow comput Novice Main CFD Forum 6 December 4, 2006 08:06
Obtaining Reynolds Number in FLUENT Emmanuel FLUENT 1 April 21, 2006 17:53


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