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

CrankNicolson time discretisation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 3, 2015, 05:43
Default CrankNicolson time discretisation
  #1
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
I am trying to warp my head around the time integration basics of OpenFOAM.

The semi-discretised governing equations end up in such a form:

ddt(x) + S * x = b

Thus, when dealing with time, we need to discretize the time derivative (1st term on LHS) and make a choice which time level to assign to the second term on the LHS.

The discretisation of the time derivative is controlled by the setting ddtSchemes in fvSchemes. In the programmers manual the formulas for Euler and backward differencing are given. However, we could also choose CrankNicolson, for which no formula is given.

Here is my problem, whenever I google CrankNicolson I find explanations dealing with the second term of the LHS. In nearly all explanations of the Crank-Nicolson method the time derivative is discretized with an implicit Euler scheme.

However, in OpenFOAM the ddt-schemes are used to discretize the time derivatives, and I am unable to find the formula that is used.
GerhardHolzinger is offline   Reply With Quote

Old   May 4, 2017, 00:31
Default
  #2
New Member
 
Weiwen Zhao
Join Date: Dec 2013
Posts: 19
Rep Power: 12
wwzhao is on a distinguished road
Hi, Gerhard

Did you find the answer?

I've also confused with the CrankNicolson schemes in OpenFOAM, as it only operates on time derivatives.

When using CrankNicolson, how is the diffusion term and advection term discretized by a blending form of forward Euler and backward Euler? Did I miss something?


Best,
Weiwen
wwzhao is offline   Reply With Quote

Old   May 4, 2017, 01:21
Default
  #3
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
There exist a decent wiki page about the Crank-Nicolson method.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   November 15, 2019, 09:27
Default
  #4
Senior Member
 
Jianrui Zeng
Join Date: May 2018
Location: China
Posts: 157
Rep Power: 8
calf.Z is on a distinguished road
When I use CrankNicolson 0.9, the courant number will blow up. When I change CrankNicolson 0.9 to backward, it becomes normal. How should I use CrankNicolson properly to eliminate instability?
calf.Z is offline   Reply With Quote

Reply

Tags
crank nicolson, crank-nicolson, time derivative, time discretization


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
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 32 June 16, 2021 07:55
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 17, 2019 00:12
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 03:20
Help for the small implementation in turbulence model shipman OpenFOAM Programming & Development 25 March 19, 2014 11:08
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 04:34


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