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

ddt schemes in openFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 5 Post By msuaeronautics
  • 2 Post By msuaeronautics

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 29, 2015, 03:35
Default ddt schemes in openFoam
  #1
New Member
 
M. Salman Siddiqui
Join Date: Mar 2015
Posts: 16
Rep Power: 11
muhammss is on a distinguished road
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!
muhammss is offline   Reply With Quote

Old   October 30, 2015, 09:17
Default
  #2
Member
 
Eric Robertson
Join Date: Jul 2012
Posts: 95
Rep Power: 14
msuaeronautics is on a distinguished road
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.
infinity, granzer, piu58 and 2 others like this.
msuaeronautics is offline   Reply With Quote

Old   October 30, 2015, 09:25
Default
  #3
New Member
 
M. Salman Siddiqui
Join Date: Mar 2015
Posts: 16
Rep Power: 11
muhammss is on a distinguished road
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.
muhammss is offline   Reply With Quote

Old   October 30, 2015, 09:40
Default
  #4
Member
 
Eric Robertson
Join Date: Jul 2012
Posts: 95
Rep Power: 14
msuaeronautics is on a distinguished road
Quote:
Originally Posted by muhammss View Post
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.
emjay and EddySouth like this.
msuaeronautics is offline   Reply With Quote

Old   November 19, 2015, 01:58
Default Euler & men values
  #5
New Member
 
Amir
Join Date: Jul 2011
Location: Shiraz
Posts: 15
Rep Power: 14
infinity is on a distinguished road
Quote:
Originally Posted by msuaeronautics View Post
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?
infinity is offline   Reply With Quote

Old   November 19, 2015, 11:01
Default
  #6
Member
 
Eric Robertson
Join Date: Jul 2012
Posts: 95
Rep Power: 14
msuaeronautics is on a distinguished road
Quote:
Originally Posted by infinity View Post
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.
msuaeronautics is offline   Reply With Quote

Old   April 30, 2016, 09:48
Default
  #7
Member
 
SM
Join Date: Dec 2010
Posts: 97
Rep Power: 15
canopus is on a distinguished road
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
canopus is offline   Reply With Quote

Old   July 4, 2016, 08:17
Default
  #8
Senior Member
 
Timofey Mukha
Join Date: Mar 2012
Location: Stockholm, Sweden
Posts: 118
Rep Power: 14
tiam is on a distinguished road
Quote:
Originally Posted by canopus View Post
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
tiam is offline   Reply With Quote

Reply

Tags
openfoam ddt schemes


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
implementation of schemes in openfoam venkataramana OpenFOAM 24 February 21, 2018 11:09
OpenFOAM Foundation Releases OpenFOAM v2.3.0 opencfd OpenFOAM Announcements from OpenFOAM Foundation 3 December 23, 2014 03:43
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 13:50


All times are GMT -4. The time now is 19:09.