5
$\begingroup$

From Wikipedia:

Explicit methods calculate the state of a system at a later time from the state of the system at the current time, while implicit methods find a solution by solving an equation involving both the current state of the system and the later one.

Then why the Crank-Nicolson is considered implicit in time, if a later time is calculated by solving a system of linear equations that depend only on the previous time?

$\endgroup$
8
$\begingroup$

A simplification - the Crank-Nicolson method uses the average of the forward and backward Euler methods.

The backward Euler method is implicit, so Crank-Nicolson, having this as one of its components, is also implicit.

More accurately, this method is implicit because $u^{n+1}_i$ depends on $F^{n+1}_i$, not just $F^{n}_i$

This is means that the state at time $t=n+1$ is defined in terms of itself, and not just the previous time step.

Or as stated in another answer, if the $F^{n+1}_i$ term is non-zero, the method is implicit.

$\endgroup$
  • $\begingroup$ But $F_i^{n+1}$ is spatial dependence and not temporal, no? $\endgroup$ – Sparkler Oct 9 '15 at 6:22
  • $\begingroup$ $F^{n+1}_{i}$ depends on $u^{n+1}_{i}$ meaning it depends on the next state of the system and as a result it depends on space and time. This is not surprising given that there are both temporal $n+1$ and spatial $i$ indicies $\endgroup$ – James Oct 9 '15 at 6:31
  • $\begingroup$ No, $n+1$ is the temporal dependence. You can see this on wikipedia, $u=(i∆x, n∆t)$ $\endgroup$ – Roland Heath Oct 9 '15 at 6:39
3
$\begingroup$

The Crank-Nicolson method is:

$\frac{u^{n+1}_{i}-u^{n}_{i}}{dt} = \frac{1}{2}(F^{n+1}_{i}+F^{n}_{i})$

This method calculates the next state of the system, i.e. $u^{n+1}_{i}$, by solving an equation involving the previous states and the next state. In the case of the heat equation for example we would get a linear system and if we are using finite elements this system would look like:

$M(\frac{u^{n+1}-u^{n}}{dt}) = -\frac{1}{2}K(u^{n+1}+u^{n})$

or

$(M+\frac{1}{2}dtK)u^{n+1} = (M-\frac{1}{2}dtK)u^{n}$

where M is the mass matrix and K is the stiffness matrix. Because the heat equation is linear we could separate the $u^{n+1}_{i}$'s from the $u^{n}_{i}$'s however the cost of this separation is that we must solve a linear system. In the case of a nonlinear $F^{n+1}_{i}$ and $F^{n}_{i}$ this separation would not be possible and instead we would have to use something like Newtons method to iterate our way to a solution.

More generally, if we have a timestepping scheme of the form:

$\frac{u^{n+1}_{i}-u^{n}_{i}}{dt} = \alpha_{-1}F^{n+1}_{i}+\alpha_{0}F^{n}_{i}+\alpha_{1}F^{n-1}_{i}+\alpha_{2}F^{n-2}_{i}+...$

it is implicit if $\alpha_{-1}$ is non-zero.

Edit:

If you are more familiar with finite differences rather than finite elements then the Crank-Nicolson solution to the heat equation would look like:

$\frac{u^{n+1}-u^{n}}{dt} = \frac{1}{2}A(u^{n+1}+u^{n})$

or

$(I-\frac{1}{2}dtA)u^{n+1} = (I+\frac{1}{2}dtA)u^{n}$

where $I$ is the identity matrix and $A$ is the finite difference tridiagonal discretization matrix.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.