Skip to content
Snippets Groups Projects
Commit 23c102a5 authored by Henry's avatar Henry
Browse files

CrankNicolsonDdtScheme: Add documentation

parent 74ff7796
Branches
Tags
No related merge requests found
......@@ -25,9 +25,37 @@ Class
Foam::fv::CrankNicolsonDdtScheme
Description
Second-oder CrankNicolson implicit ddt using the current and
Second-oder Crank-Nicolson implicit ddt using the current and
previous time-step fields as well as the previous time-step ddt.
The Crank-Nicolson scheme is often unstable for complex flows in complex
geometries and it is necessary to "off-centre" the scheme to stabilize it
while retaining greater temporal accuracy than the first-order
Euler-implicit scheme. Off-centering is specified via the mandatory
coefficient in the range [0,1] following the scheme name e.g.
\verbatim
ddtSchemes
{
default CrankNicolson 0.9;
}
\endverbatim
With a coefficient of 1 the scheme is fully centred and second-order,
with a coefficient of 0 the scheme is equivalent to Euler-implicit.
A coefficient of 0.9 has been found to be suitable for a range of cases for
which higher-order accuracy in time is needed and provides similar accuracy
and stability to the backward scheme. However, the backward scheme has
been found to be more robust and provides formal second-order accuracy in
time.
The advantage of the Crank-Nicolson scheme over backward is that only the
new and old-time values are needed, the additional terms relating to the
fluxes and sources are evaluated at the mid-point of the time-step which
provides the opportunity to limit the fluxes in such a way as to ensure
boundedness while maintaining greater accuracy in time compared to the
Euler-implicit scheme. This approach is now used with MULES in the
interFoam family of solvers. Boundedness cannot be guaranteed with the
backward scheme.
SourceFiles
CrankNicolsonDdtScheme.C
......@@ -173,7 +201,7 @@ public:
(
"CrankNicolsonDdtScheme(const fvMesh& mesh, Istream& is)",
is
) << "coefficient = " << ocCoeff_
) << "Off-centreing coefficient = " << ocCoeff_
<< " should be >= 0 and <= 1"
<< exit(FatalIOError);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment