CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   SimpleFoam: High residuals after increase in Reynolds Number (https://www.cfd-online.com/Forums/openfoam-solving/106770-simplefoam-high-residuals-after-increase-reynolds-number.html)

JasonG September 7, 2012 13:10

SimpleFoam: High residuals after increase in Reynolds Number
 
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 January 9, 2013 10:40

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.

danvica January 9, 2013 13:20

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,

JasonG January 9, 2013 13:33

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.

danvica January 9, 2013 13:48

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,

JasonG January 9, 2013 13:58

3 Attachment(s)
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.

chegdan January 9, 2013 14:41

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.

JasonG January 9, 2013 14:49

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.

chegdan January 9, 2013 14:56

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.

JasonG January 9, 2013 15:00

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.

chegdan January 9, 2013 15:10

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.

JasonG January 9, 2013 15:12

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.

danvica January 9, 2013 16:03

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 ?

JasonG January 9, 2013 16:14

That was my residual.

JasonG January 9, 2013 16:37

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 January 9, 2013 16:41

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 January 9, 2013 20:17

1 Attachment(s)
Attached are the residuals from a current run that has nNonOrthogonalCorrectors 2.

danvica January 10, 2013 00:53

Ops, i'm sorry for the misunderstanding about residual of omega :o

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,

JasonG January 10, 2013 08:55

2 Attachment(s)
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

danvica January 10, 2013 13:01

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,

JasonG January 10, 2013 13:09

88 is nothing compared to the 2000 I have been getting :(. I am fairly frustrated with the lack of controls in Workbench. Whenever I get some down time I will have to investigate using the native OpenFOAM meshing.

saakwave October 5, 2017 10:11

Unsteady flows at higher Reynolds number
 
Hello,
I noticed similar trends in which high Reynolds numbers or presence of bluff bodies in flow path at low Reynolds numbers causing this. Higher residuals in these cases I think is mostly due to the very fact of attempting to solve increasingly unsteady flows with a steady-state solver like simplefoam.


All times are GMT -4. The time now is 06:59.