CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Crank-Nicolson scheme

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 17, 2011, 07:38
Question Crank-Nicolson scheme
  #1
New Member
 
Join Date: Nov 2009
Posts: 17
Rep Power: 7
misakagan is on a distinguished road
Hi Foamers,

I'm trying to implement a second order solver for incomresssible flows which uses Crank-Nicolson (CN) method for the diffusive term and Adams-Bashfort method for the convective term.

I am confused about how CN method is implemented in OpenFOAM, as I don't see any coefficient like 1/2 on the convective and viscous term. How can you apply CN scheme without using these coefficients? As far as I see it is only covered by ddt(U) term.

Best,

Asim
misakagan is offline   Reply With Quote

Old   November 17, 2011, 09:12
Default
  #2
New Member
 
Join Date: Nov 2009
Posts: 17
Rep Power: 7
misakagan is on a distinguished road
The intention for implementing a second order solver is that PisoFOAM is only FIRST order accurate in time whatever scheme you use for time discretization. The reason for this is the explicit treatment of the flux phi in the convective term. They limit the accuracy in time to first order and this is not preferred in turbulent flow simulations.

I don't understand why nobody cares about this, and I read a lot of papers Openfoam users claiming they have second order accuracy. It confuses me a lot. Am I missing something?
misakagan is offline   Reply With Quote

Old   November 25, 2011, 09:33
Exclamation
  #3
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 7
Fransje is on a distinguished road
Dear Asim,

I don't think it's the explicit treatment of the flux in the convective terms which reduces the order of the pisoFoam algorithm. In fact, even by doing everything explicitly you should be able to retrieve second order accuracy. It will however impact stability as your time integration is no longer purely implicit.

But I think (and I've also heard via-via from developpers) that the main issue comes from the Rhie-Chow flux correction ddtPhiCorr in:
Code:
phi = (fvc::interpolate(U) & mesh.Sf())
     + fvc::ddtPhiCorr(rAU, U, phi);
Why nobody seems to care, I don't know.. I do! But apparently the fix of ddtPhiCorr is not trivial..
And as for the second order claim in papers.. Well.. A 'small' distortion of the truth perhaps?

Kind regards,

Francois
Fransje is offline   Reply With Quote

Reply

Tags
crank nicolson, incompressible flows

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crank Nicolson scheme msrinath80 OpenFOAM Running, Solving & CFD 6 November 14, 2010 14:59
Crank Nicholson scheme for Laplacian failed Cyp OpenFOAM 3 July 19, 2010 07:58
About the Use of Crank Nicholson scheme And OpenFOAM 0 November 19, 2009 08:11
Crank Nicolson scheme contd msrinath80 OpenFOAM Running, Solving & CFD 0 December 12, 2006 23:41
Crank Nicolson. ! Main CFD Forum 0 September 5, 2005 12:52


All times are GMT -4. The time now is 20:38.