# CrankNicolson time discretisation

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

 August 3, 2015, 04:43 CrankNicolson time discretisation #1 Senior Member   Gerhard Holzinger Join Date: Feb 2012 Location: Austria Posts: 339 Rep Power: 28 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.

 May 3, 2017, 23:31 #2 New Member   Weiwen Zhao Join Date: Dec 2013 Posts: 19 Rep Power: 12 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

 May 4, 2017, 00:21 #3 Senior Member     Uwe Pilz Join Date: Feb 2017 Location: Leipzig, Germany Posts: 744 Rep Power: 15 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)

 November 15, 2019, 08:27 #4 Senior Member   Jianrui Zeng Join Date: May 2018 Location: China Posts: 157 Rep Power: 8 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?