CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   How to get steady result in pitzDaily using LES model (https://www.cfd-online.com/Forums/openfoam/208343-how-get-steady-result-pitzdaily-using-les-model.html)

yuanjiahui October 15, 2018 05:19

How to get steady result in pitzDaily using LES model
 
Hi Foamers,
I am trying to use simpleFoam to solve pitzDaily with LES model and compare the results between LES model and RAS model (k-epsilon model). And I change part codes in tutorials(incompressibel/pisoFoam/les/pitzDaily), but the caculation is not convergent no matter how long the running time I set. Here is my changes:
1.fvsolution
solvers
{
p
{
solver GAMG;
tolerance 1e-06;
relTol 0.1;
smoother GaussSeidel;
}

pFinal
{
$p;
smoother DICGaussSeidel;
tolerance 1e-06;
relTol 0;
}

"(U|k|B|nuTilda|s)"
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-05;
relTol 0;
}
}

SIMPLE
{
nNonOrthogonalCorrectors 0;
consistent yes;

residualControl
{
p 1e-2;
"(pFinal|U|B|nuTilda|s)" 1e-3;
}
}

relaxationFactors
{
equations
{
U 0.9; // 0.9 is more stable but 0.95 more convergent
".*" 0.9; // 0.9 is more stable but 0.95 more convergent
}
}

2.conrtolDict

application simpleFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 2000;

deltaT 1;

writeControl timeStep;

writeInterval 100;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

Please tell why I can not get steady result in LES model

Best regards,
yuanjiahui

RobertHB October 16, 2018 05:01

Do your calculations with a transient solver like pisoFoam or pimpleFoam. Then compare similar time steps.

mzzmrt October 16, 2018 07:05

You have to use a transient solver for LES but for comparison with RAS results, you can add "fieldAverage" function within controlDict for getting the mean values of U and p.

yuanjiahui October 16, 2018 07:48

Hi mzzmrt.Can I get a steady result with a transient solver like pisoFoam in LES model?

yuanjiahui October 16, 2018 07:57

Quote:

Originally Posted by RobertHB (Post 710178)
Do your calculations with a transient solver like pisoFoam or pimpleFoam. Then compare similar time steps.

Hi RobertHB. I intended to caculate with simpleFoam, but then I found that LES model does not work with simpleFoam. So can I get steady result with pisoFoam in LES model and compare it with RANS model?

RobertHB October 16, 2018 08:36

In short, no. pisoFoam calculates a transient, time dependant solution. And you use LES to resolve the transient flow without averaging like RAS does.
If you want a steady, time independant, solution use simpleFoam and a RAS model.
If you want to compare LES and RAS, you can do so by comparing the steady RAS and the transient RAS and LES results.

yuanjiahui October 16, 2018 08:57

Quote:

Originally Posted by RobertHB (Post 710206)
In short, no. pisoFoam calculates a transient, time dependant solution. And you use LES to resolve the transient flow without averaging like RAS does.
If you want a steady, time independant, solution use simpleFoam and a RAS model.
If you want to compare LES and RAS, you can do so by comparing the steady RAS and the transient RAS and LES results.

I sorry to bother you again. But I do not understand your last words "you can do so by comparing the steady RAS and the transient RAS and LES results". The problem for me is that how to caculate a case like pitzDaily with both LES and RANS and compare the final results of them.

regards

RobertHB October 16, 2018 09:20

Quote:

Originally Posted by yuanjiahui (Post 710208)
The problem for me is that how to caculate a case like pitzDaily with both LES and RANS and compare the final results of them.

Do two simulations, one with pisoFoam RAS and a second one with pisoFoam LES.
Conduct both for the same runtime.

mzzmrt October 16, 2018 13:02

Add this to your controlDict, solve LES with pisoFoam and check the results in paraview:



functions
{
fieldAverage1
{
type fieldAverage;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl outputTime;

fields
(
U
{
mean on;
prime2Mean off;
base time;
}

p
{
mean on;
prime2Mean off;
base time;
}
);
}
}

yuanjiahui October 16, 2018 20:37

Quote:

Originally Posted by RobertHB (Post 710209)
Do two simulations, one with pisoFoam RAS and a second one with pisoFoam LES.
Conduct both for the same runtime.

No, one is with simpleFoam RAS and the second one is with pisoFoam LES and there is measurement data in steady state need to be comparaed.

RobertHB October 17, 2018 03:06

Quote:

Originally Posted by yuanjiahui (Post 710264)
No, one is with simpleFoam RAS and the second one is with pisoFoam LES and there is measurement data in steady state need to be comparaed.

Compare whatever you want, but notice that LES is a transient turbulence simulation, not steady. So either compare different timesteps to your steady solution or use a long runtime and the average approach suggested by mzzmrt. You can also use the "Temporal Statistics" filter of paraview to get an average over the total runtime.


All times are GMT -4. The time now is 21:36.