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/)
-   -   ddt schemes in openFoam (https://www.cfd-online.com/Forums/openfoam-solving/161803-ddt-schemes-openfoam.html)

muhammss October 29, 2015 03:35

ddt schemes in openFoam
 
Hi guys!

I am new to openFoam, my first task is to check the difference in results for different ddt schemes available in openFoam (Euler, backward, crankNicholson) using pimpleFoam algorithm on a NACA foil. But developed the case files and ran it as well. But can someone please explain me what is the difference between these temporal schemes? And once, we switch from one scheme to another what changes are been made in the background solution of Navier Stokes Equations?
Your quick help is highly appreciated!

msuaeronautics October 30, 2015 09:17

The Euler scheme is first-order accurate. Crank-Nicholson is second-order, but in my personal research can be unstable for a range of problems. It can actually be blended with Euler for boundedness. The backward scheme uses a three-point difference (uses n-1 and n-2) and is also second-order, but is not bounded.

Euler will generally give you fastest convergence. A lot of the tutorial cases use the Euler scheme. However, you should not expect it to give you the best accuracy in transient space. I suggest you choose a variable X(t), record it over a time range for each temporal scheme, and record the results.

One example where having a 2nd-order temporal scheme may be important is when predicting the Strouhal number (St) of oscillation in the flow past a sphere using DES or LES. St is simply a measure of wake shedding frequencies. If you choose Euler, you might expect a lag with respect to higher order- though it is something I have not studied.

muhammss October 30, 2015 09:25

The Euler scheme is first-order accurate. (Do you mean the leading term in the truncation error is of the order of 1st order?). And is it forward Euler or backward Euler? We need to take the value of Crank Nicholson to be 0.5 in order to solve a point midway between n and n+1, right? If we take the value of 1 it will be implicit and if 0 it will be explicit, right?
What do you really mean by boundedness, i didn’t get it?

And one thing, does open form solves the time term using finite difference? if it does that how come it is a finite volume code. I am actually confused about it.

msuaeronautics October 30, 2015 09:40

Quote:

Originally Posted by muhammss (Post 571035)
The Euler scheme is first-order accurate. (Do you mean the leading term in the truncation error is of the order of 1st order?). And is it forward Euler or backward Euler? We need to take the value of Crank Nicholson to be 0.5 in order to solve a point midway between n and n+1, right? If we take the value of 1 it will be implicit and if 0 it will be explicit, right?
What do you really mean by boundedness, i didn’t get it?

And one thing, does open form solves the time term using finite difference? if it does that how come it is a finite volume code. I am actually confused about it.

Yes, the leading term is 1st order.

For the remainder of your questions, the best resource is Hrv Jasak's thesis:

http://powerlab.fsb.hr/ped/kturbo/Op...jeJasakPhD.pdf

Particularly, section 3.6.2 gives a good explanation.

infinity November 19, 2015 01:58

Euler & men values
 
Quote:

Originally Posted by msuaeronautics (Post 571033)
The Euler scheme is first-order accurate. Crank-Nicholson is second-order, but in my personal research can be unstable for a range of problems. It can actually be blended with Euler for boundedness. The backward scheme uses a three-point difference (uses n-1 and n-2) and is also second-order, but is not bounded.

Euler will generally give you fastest convergence. A lot of the tutorial cases use the Euler scheme. However, you should not expect it to give you the best accuracy in transient space. I suggest you choose a variable X(t), record it over a time range for each temporal scheme, and record the results.

One example where having a 2nd-order temporal scheme may be important is when predicting the Strouhal number (St) of oscillation in the flow past a sphere using DES or LES. St is simply a measure of wake shedding frequencies. If you choose Euler, you might expect a lag with respect to higher order- though it is something I have not studied.

Hi, is it a good conclusion from what you said that ddt scheme does not affect mean flow values like UMean and Uprime2Mean ?

I'm running a LES case and I have to report the mean value of the results so is Euler scheme a good choice to increase the courant number to 1 or 0.7?

msuaeronautics November 19, 2015 11:01

Quote:

Originally Posted by infinity (Post 573978)
Hi, is it a good conclusion from what you said that ddt scheme does not affect mean flow values like UMean and Uprime2Mean ?

I'm running a LES case and I have to report the mean value of the results so is Euler scheme a good choice to increase the courant number to 1 or 0.7?

I would still recommend using second-order ddt schemes in this case. I don't think using a first-order scheme would necessarily allow you to use a higher Courant number for LES.

canopus April 30, 2016 09:48

I get decent results for RANS of 2D channel flow (channel 395) using simpleFoam on same mesh with y+ < 1 with SSTkomega.

On Same mesh when using pimpleFoam and fvOptions to check the ddtSchemes -
backward scheme simulation runs but gives kind of laminar velocity profile
Euler gives again decent results with everything remaining same
CrankNicolson 1 explodes!

The Courant number ~ 0.3 for Euler and Backward cases that run.
Starting with Euler and then moving to second order later on works fine too.

  1. Can anyone explain why results are worse with a 2nd order scheme even with small Co?
  2. And does that mean that one should use Euler scheme for truly transient cases where you don’t attain a steady state to switch ddtSchemes?
Thanks in advance

tiam July 4, 2016 08:17

Quote:

Originally Posted by canopus (Post 597450)
I get decent results for RANS of 2D channel flow (channel 395) using simpleFoam on same mesh with y+ < 1 with SSTkomega.

On Same mesh when using pimpleFoam and fvOptions to check the ddtSchemes -
backward scheme simulation runs but gives kind of laminar velocity profile
Euler gives again decent results with everything remaining same
CrankNicolson 1 explodes!

The Courant number ~ 0.3 for Euler and Backward cases that run.
Starting with Euler and then moving to second order later on works fine too.

  1. Can anyone explain why results are worse with a 2nd order scheme even with small Co?
  2. And does that mean that one should use Euler scheme for truly transient cases where you don’t attain a steady state to switch ddtSchemes?
Thanks in advance

Hi!

So you are doing unsteady rans then, right?
With LES I get good results using both backward and CN.

Best,
Timofey


All times are GMT -4. The time now is 11:34.