Skip to main content

Questions tagged [crank-nicolson]

For questions about the Crank-Nicolson method, an approach for discretizing and solving partial differential equations.

29 votes
1 answer
7k views

Conservation of a physical quantity when using Neumann boundary conditions applied to the advection-diffusion equation

I don't understand the different behaviour of the advection-diffusion equation when I apply different boundary conditions. My motivation is the simulation of a real physical quantity (particle density)...
boyfarrell's user avatar
  • 5,429
8 votes
2 answers
16k views

How to discretize the advection equation using the Crank-Nicolson method?

The advection equation needs to be discretized in order to be used for the Crank-Nicolson method. Can someone show me how to do that?
pandoragami's user avatar
2 votes
1 answer
785 views

Crank-Nicolson algorithm for coupled PDEs

Assumed I have the following two coupled equations $$\begin{split} \partial_tA&=a_0AB\\ \partial_tB&=b_0AB \end{split} $$ but I am not sure how to calculate them. One approach is a crank-...
arc_lupus's user avatar
  • 563
0 votes
2 answers
417 views

Can the Crank-Nicolson Method Be used to Solve The Schrodinger Equation with a Time Varying Potential?

I have been following an excellent article about how to use the Crank-Nicolson method to solve the Schrodinger equation. In the article, it starts with a $V(x, y, t)$ but the potential seems to become ...
cgbsu's user avatar
  • 33
10 votes
2 answers
1k views

Is the maximum/minimum principle of the heat equation maintained by the Crank-Nicolson discretization?

I'm using the Crank-Nicolson finite difference scheme to solve a 1D heat equation. I'm wondering if the maximum/minimum principle of the heat equation (i.e. that the maximum/minimum occurs at the ...
foobarbaz's user avatar
  • 105
1 vote
1 answer
939 views

Crank-Nicolson method for inhomogeneous advection equation

Suppose we have the inhomogeneous advection equation $$\left(\frac{\partial}{\partial x}+\frac{1}{c}\frac{\partial}{\partial t}\right)u(t,x)=v(t,x)$$ for $u,v:\mathbb{R}\times\mathbb{R}\to\mathbb{R}$ (...
Jason Born's user avatar
1 vote
1 answer
323 views

Crank-Nicholson for diffusion-advection vs diffusion equation

Let's consider the following 1D diffusion equation: $\frac{\partial u}{\partial t} = xk \frac{\partial}{\partial x}(\frac{1}{x}\frac{\partial u}{\partial x})$ where we assume that the diffusion ...
mfnx's user avatar
  • 172
1 vote
0 answers
1k views

Crank-Nicolson for 2nd- and 4th-order finite differences

I modeled the heat equation, $$ u_t = au_{xx} $$ using the common 2nd-order Crank-Nicolson scheme, $$ \frac{u^{n+1}_i-u^{n}_i}{dt} = \frac{a}{2\,dx}\left(u_{i-1}^{n+1}+u_{i+1}^{n+1}-2u_i^{n+1} + u_{i-...
Kyle Kanos's user avatar