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

why pisoFoam take such a long time to converge?

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2013, 12:38
Default why pisoFoam take such a long time to converge?
  #1
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
izna is on a distinguished road
Hello

I have a PC with 4GB RAM 2 processors..
Ihave run a simulation with pisoFOam and today is 48 hours since i last start.. and still convergence not acheived..!!

Can anyone give me a better way to acheive convergence easier with pisoFoam?

I am attaching my fv solution just so that you may know what i did..

Quote:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
p
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.1;
}

pFinal
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
}

U
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}

k
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}

epsilon
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}

R
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}

nuTilda
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}
}

PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}

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


// ************************************************** *********************** //
and my control dict
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application pisoFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 10;

deltaT 0.0005;

writeControl timeStep;

writeInterval 100;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;


// ************************************************** *********************** //
izna is offline   Reply With Quote

Old   October 14, 2013, 14:50
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good evening,

pisoFoam is intended for transient simulations, which does not necessarily have a steady state solution. Also, to my knowledge, the pisoFoam does not check for the residualControls, which you have in your fvSolution file.

For steady state simulations you would probable want to look into e.g. simpleFoam.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   October 14, 2013, 23:56
Default
  #3
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
izna is on a distinguished road
hi..

simpleFoam is not working at all for the case that running... hence am running with pisoFoam, and its working with pisoFoam.. but taking such a long time!!!!
izna is offline   Reply With Quote

Old   October 15, 2013, 04:35
Default
  #4
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Is this a transient simulation or steady state?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 15, 2013, 04:47
Default
  #5
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
izna is on a distinguished road
steady state..

Quote:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div(phi,R) Gauss limitedLinear 1;
div(R) Gauss linear;
div(phi,nuTilda) Gauss limitedLinear 1;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}


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


izna is offline   Reply With Quote

Old   October 15, 2013, 04:55
Default
  #6
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
You are using the wrong solver. You solve for a transient simulation, time-scheme is Euler and your time-step is 0.5ms.
This is not steady-state.

1) Use simpleFoam! Why do you say "simpleFoam is not working at all for the case that running"? SimpleFoam is a steady state solver.
2) Use GAMG solver for pressure.
3) "Linear" discretization doesn't converge very well. You can try some more dissipative scheme (upwind, linearUpwind,...).
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 15, 2013, 04:59
Default
  #7
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
izna is on a distinguished road
i already did all that with simpleFoam.. But after 300 timestep my solution crash.. and when i check in paraView, i see my domain as a blueeee one.. ie no velocity has enter... hence why i was soo desperate...
izna is offline   Reply With Quote

Old   October 15, 2013, 05:01
Default
  #8
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Then you did it wrong
Post your simple solver settings and then the residuals.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 15, 2013, 05:03
Default
  #9
Senior Member
 
Join Date: Dec 2011
Posts: 111
Rep Power: 19
haakon will become famous soon enough
You have specified Euler to be used as time integrator, hence your simulation is transient. Period.

Anyways, as others have mentioned, pisoFoam will not obey the residual limits you have specified. It will run until it reaches endTime, no matter how steady the simulation are.

If you want a steady-state result then simpleFoam is the one and only solver to use. However, some cases will not converge to a steady state, simply because they are transient by nature. For such cases steady solutions are difficult to obtain, and if you can get one, you are almost certain that it is non-physical. If your case involves geometries and flow conditions leading to for example vortex shedding, that forces you to use a transient solver if you want physical results. That is just how nature works.

(BTW: You can probably get almost any case to converge in steady state by using 1st order upwind schemes (=extreme diffusivity), heavy relaxation and other "stabilizing tricks", but will give you unusable results, so in practice it is not possible...)
haakon is offline   Reply With Quote

Old   October 15, 2013, 05:04
Default
  #10
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
izna is on a distinguished road
simple Solver settings..:

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

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;
}

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

SIMPLE
{
nNonOrthogonalCorrectors 0;
}

potentialFlow
{
nNonOrthogonalCorrectors 10;
}

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

cache
{
grad(U);
}

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

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss linearUpwindV grad(U);
div(phi,k) Gauss upwind;
div(phi,epsilon) 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;
}

// ************************************************** *********************** //
izna is offline   Reply With Quote

Old   October 15, 2013, 05:07
Default
  #11
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
izna is on a distinguished road
Quote:
Originally Posted by haakon View Post
You have specified Euler to be used as time integrator, hence your simulation is transient. Period.

(BTW: You can probably get almost any case to converge in steady state by using 1st order upwind schemes (=extreme diffusivity), heavy relaxation and other "stabilizing tricks", but will give you unusable results, so in practice it is not possible...)
HI

Can you please give me an example where the upwind scheme is 1strorder? me i am simulating 10 shapes in a domain..that is all and its in 2D.. so i guess it should converge normally right??

for 12 days i am with this problem..and with pisoFoam its nto crashing..but today is my 3rd day where simulation is running.. so am a bit desperate now...
izna is offline   Reply With Quote

Old   October 15, 2013, 05:16
Default
  #12
Senior Member
 
Join Date: Dec 2011
Posts: 111
Rep Power: 19
haakon will become famous soon enough
I guess that probably is just the "upwind" scheme, but I have never used it, as it produces just crap.

Why are you using zero non-orthogonal correctors? Have you tried increasing this value? Why are you only using relaxation for the pressure and not the velocities when running simpleFoam?

I would lie to emphasize a few things:
  1. If your flow is transient, you might never obtain a physical steady-state solution.
  2. Flows are very often transient by nature, even flow around streamlined bodies.
  3. If the simulation crash, the mesh is often sub-optimal, and improving the mesh will give you both increased stability and better results.
If simpleFoam crash, I guess your flow is either transient by nature or you have a bad mesh.
openfoam_aero likes this.
haakon is offline   Reply With Quote

Old   October 15, 2013, 05:24
Default
  #13
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
izna is on a distinguished road
my mesh is fine..

From the errors it say..
Quote:
Time = 33

--> FOAM Warning :
From function gaussConvectionScheme
in file finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H at line 123
Reading "/home/izna/Desktop/try/system/fvSchemes.divSchemes.div(phi,U)" at line 30
Unbounded 'Gauss' div scheme used in steady-state solver, use 'bounded Gauss' to ensure boundedness.
To remove this warning switch off 'boundedGauss' in "/opt/openfoam221/etc/controlDict"
smoothSolver: Solving for Ux, Initial residual = 0.0141504, Final residual = 0.000528872, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.00978783, Final residual = 0.000321816, No Iterations 2
GAMG: Solving for p, Initial residual = 0.0065193, Final residual = 0.00049538, No Iterations 2
time step continuity errors : sum local = 6.55324e+42, global = -3.32349e+37, cumulative = -3.32349e+37
--> FOAM Warning :
From function gaussConvectionScheme
in file finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H at line 123
Reading "/home/izna/Desktop/try/system/fvSchemes.divSchemes.div(phi,epsilon)" at line 32
Unbounded 'Gauss' div scheme used in steady-state solver, use 'bounded Gauss' to ensure boundedness.
To remove this warning switch off 'boundedGauss' in "/opt/openfoam221/etc/controlDict"
smoothSolver: Solving for epsilon, Initial residual = 1, Final residual = 0.982312, No Iterations 1000
bounding epsilon, min: -1.00779e+95 max: 4.55336e+109 average: 2.7097e+104
--> FOAM Warning :
From function gaussConvectionScheme
in file finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H at line 123
Reading "/home/izna/Desktop/try/system/fvSchemes.divSchemes.div(phi,k)" at line 31
Unbounded 'Gauss' div scheme used in steady-state solver, use 'bounded Gauss' to ensure boundedness.
To remove this warning switch off 'boundedGauss' in "/opt/openfoam221/etc/controlDict"
smoothSolver: Solving for k, Initial residual = 1.94401e-15, Final residual = 1.94401e-15, No Iterations 0
ExecutionTime = 289.79 s ClockTime = 290 s

Time = 34

--> FOAM Warning :
From function gaussConvectionScheme
in file finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H at line 123
Reading "/home/izna/Desktop/try/system/fvSchemes.divSchemes.div(phi,U)" at line 30
Unbounded 'Gauss' div scheme used in steady-state solver, use 'bounded Gauss' to ensure boundedness.
To remove this warning switch off 'boundedGauss' in "/opt/openfoam221/etc/controlDict"
smoothSolver: Solving for Ux, Initial residual = 0.533739, Final residual = 0.0426003, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.492054, Final residual = 0.0310399, No Iterations 4
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam221/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam221/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam221/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const in "/opt/openfoam221/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#5 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam221/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#6 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) in "/opt/openfoam221/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam221/platforms/linuxGccDPOpt/bin/simpleFoam"
#8
in "/opt/openfoam221/platforms/linuxGccDPOpt/bin/simpleFoam"
#9 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#10
in "/opt/openfoam221/platforms/linuxGccDPOpt/bin/simpleFoam"
Floating point exception (core dumped)
izna@izna-System-Product-Name:~/Desktop/try$

izna is offline   Reply With Quote

Old   October 15, 2013, 05:26
Default
  #14
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Can you post the residual plot?
1) What happens, if you set "relTol" for the pressure to 1.0e-3? Do the residuals change?
2) What happens, if you use some gradient limiter? Such as
Code:
 
gradSchemes
{
    default            faceLimited edgeCellsLeastSquares 1;
}
3) Write "bounded" at each div(phi,xxx)
Code:
 
...
div(phi,k)      bounded Gauss upwind;
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 15, 2013, 15:12
Default
  #15
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
izna is on a distinguished road
am sorry for late reply.. but for each of the above mentioned points. My solution crash..
Now am worried....
izna is offline   Reply With Quote

Old   October 16, 2013, 04:23
Default
  #16
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Can you send the whole log-output? So we can try to find the spot...
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 17, 2013, 13:59
Default
  #17
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
izna is on a distinguished road
hi..afte changing the fv solution and fv schemes.. I obtain a good simulation which i checked..

.. when arriving at 1760 iteration the solution crashed.. and when i checked in paraView.. I obtain a blue domain..
Why such a nice simulation suddenly crash ?
izna is offline   Reply With Quote

Old   October 18, 2013, 02:05
Default
  #18
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
You have to share all relevant data, otherwise no one will be able to help you.

1) log output
2) boundary condition files
3) screenshot of your domain with grid.

Additionally: It seems you use the k-epsilon model. In your fvSolution file you set relaxation factors, but not for k-epsilon but for k-omega. This could be the reason.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   October 18, 2013, 03:26
Default
  #19
New Member
 
Danesh S
Join Date: Jul 2013
Location: Bochum, Germany
Posts: 27
Rep Power: 12
DaSh is on a distinguished road
Hi all,

I have a question which is close to the topic. Niels said above, that pisoFoam does not check for residualControls.

Does that mean, that when running a transient turbulent simulation on pisoFoam, the residual output does not indicate the state of convergence of my simulation?

I have the problem at the moment with my simulation. The residual is not dropping anymore, so I have no convergence. (It is LES of Taylor Couette Flow). I use backward time scheme and gauß upwind for U divscheme. My schemes should be fine.

After reading this thread I am just worrying, that the solver is not able to produce what I want.

Can anybody comment on this?

Thx!
Danesh
DaSh is offline   Reply With Quote

Old   October 18, 2013, 03:38
Default
  #20
Senior Member
 
Join Date: Dec 2011
Posts: 111
Rep Power: 19
haakon will become famous soon enough
You are correct. pisoFoam does not obey the residual controls. This is because the solution is time-accurate, i.e. every step is a valid solution of the transient problem. Hence, each step is solved until the specified tolerance level in fvSolution, and not further. Then the time is advances and a new solution is found. The value of the time step is hence important, as the PISO-algorithm cannot handle large time steps.

Remember my earlier comments on fluid flows that generally are transient by nature. I do not feel that you have clearly out-ruled this issue yet.
openfoam_aero likes this.
haakon is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Unstabil Simulation with chtMultiRegionFoam mbay101 OpenFOAM Running, Solving & CFD 13 December 28, 2013 13:12
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 22:40
PisoFoam case terminating Solo Sails OpenFOAM Running, Solving & CFD 3 November 29, 2011 07:04
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 04:35


All times are GMT -4. The time now is 17:14.