**Are you an EPFL student looking for a semester project?**

Work with us on data science and visualisation projects, and deploy your project as an app on top of GraphSearch.

Concept# Crank–Nicolson method

Summary

In numerical analysis, the Crank–Nicolson method is a finite difference method used for numerically solving the heat equation and similar partial differential equations. It is a second-order method in time. It is implicit in time, can be written as an implicit Runge–Kutta method, and it is numerically stable. The method was developed by John Crank and Phyllis Nicolson in the mid 20th century.
For diffusion equations (and many other equations), it can be shown the Crank–Nicolson method is unconditionally stable. However, the approximate solutions can still contain (decaying) spurious oscillations if the ratio of time step \Delta t times the thermal diffusivity to the square of space step, \Delta x^2, is large (typically, larger than 1/2 per Von Neumann stability analysis). For this reason, whenever large time steps or high spatial resolution is necessary, the less accurate backward Euler method is often used, which is both stable and immune to oscillations.

Official source

This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.

Related publications

Loading

Related people

Loading

Related units

Loading

Related concepts

Loading

Related courses

Loading

Related lectures

Loading

Related publications (10)

Loading

Loading

Loading

Related concepts (9)

Related people (2)

Finite difference method

In numerical analysis, finite-difference methods (FDM) are a class of numerical techniques for solving differential equations by approximating derivatives with finite differences. Both the spatial d

Von Neumann stability analysis

In numerical analysis, von Neumann stability analysis (also known as Fourier stability analysis) is a procedure used to check the stability of finite difference schemes as applied to linear partial di

Mathematical finance

Mathematical finance, also known as quantitative finance and financial mathematics, is a field of applied mathematics, concerned with mathematical modeling of financial markets.
In general, there exi

Related units (1)

Related courses (16)

MATH-456: Numerical analysis and computational mathematics

The course provides an introduction to scientific computing. Several numerical methods are presented for the computer solution of mathematical problems arising in different applications. The software MATLAB is used to solve the problems and verify the theoretical properties of the numerical methods.

ME-474: Numerical flow simulation

This course provides practical experience in the numerical simulation of fluid flows. Numerical methods are presented in the framework of the finite volume method. A simple solver is developed with Matlab, and a commercial software is used for more complex problems.

ChE-312: Numerical methods

This course introduces students to modern computational and mathematical techniques for solving problems in chemistry and chemical engineering. The use of introduced numerical methods will be demonstrated using the MATLAB programming language.

Related lectures (38)

We developed a space and time adaptive method to simulate electroosmosis and mass transport of a sample concentration within a network of microchannels. The space adaptive criteria is based on an error estimator derived using anisotropic interpolation estimates and a post-processing procedure. In order to improve the accuracy of the numerical solution and to reduce even further the computational cost of the numerical simulation, a time adaptive procedure is combined with the one in space. To do so, a time error estimator is derived for a first model problem, the linear heat equation discretized in time with the Crank-Nicolson scheme. The main difficulty is then to obtain an optimal second order error estimator. Applying standard energy techniques with a continuous, piecewise linear approximation in time fail in recovering the optimal order. To restore the appropriate rate of convergence, a continuous piecewise quadratic polynomial function in time is needed. For this purpose, two different quadratic functions are introduced and two different time error estimators are then derived. It turns out that the second error estimator is more efficient than the first one when considering our adaptive algorithm. Thus, using the second quadratic polynomial, an upper bound for the error is derived for a second model problem, the time-dependent convection-diffusion problem discretized in time with the Crank-Nicolson scheme. The corresponding space and time error estimators are finally used for the numerical simulation of mass transport of a sample concentration within a complex network of microchannels driven by an electroosmotic flow and/or by a pressure-driven flow. Numerical results presented show the efficiency and the robustness of this approach.

Marco Picasso, Virabouth Prachittham

An a posteriori upper bound is derived for the nonstationary convection-diffusion problem using the Crank-Nicolson scheme and continuous, piecewise linear stabilized finite elements with large aspect ratio. Following Lozinski et al. (2009) [13], a quadratic time reconstruction is used.

The modeling of a system composed by a gas phase and organic aerosol particles, and its numerical resolution are studied. The gas-aerosol system is modeled by ordinary differential equations coupled with a mixed-constrained optimization problem. This coupling induces discontinuities when inequality constraints are activated or deactivated. Two approaches for the solution of the optimization-constrained differential equations are presented. The first approach is a time splitting scheme together with a fixed-point method that alternates between the differential and optimization parts. The ordinary differential equations are approximated by the Crank-Nicolson scheme and a primal-dual interior-point method combined with a warm-start strategy is used to solve the minimization problem. The second approach considers the set of equations as a system of differential algebraic equations after replacing the minimization problem by its first order optimality conditions. An implicit 5th-order Runge-Kutta method (RADAU5) is then used. Both approaches are completed by numerical techniques for the detection and computation of the events (activation and deactivation of inequality constraints) when the system evolves in time. The computation of the events is based on continuation techniques and geometric arguments. Moreover the first approach completes the computation with extrapolation polynomials and sensitivity analysis, whereas the second approach uses dense output formulas. Numerical results for gas-aerosol system made of several chemical species are proposed for both approaches. These examples show the efficiency and accuracy of each method. They also indicate that the second approach is more efficient than the first one. Furthermore theoretical examples show that the method for the computation of the activation is of second order for the first approach and exact for the second one.