Questions tagged [crank-nicolson]
For questions about the Crank-Nicolson method, an approach for discretizing and solving partial differential equations.
53
questions
1
vote
1
answer
409
views
Numerical Solution of non-linear diffusion equation using Finite Differencing
I'm trying to solve the following non-linear diffusion equation:
$$
\frac{\partial}{\partial t} u(x,t)= \frac{\partial^{2}}{\partial x^{2}}u(x,t)^{3}$$ $$ -1\leq x \leq1, t \geq 0
$$ with the boundary ...
3
votes
1
answer
2k
views
How to solve the advection equation in 2 dimension using the Crank-Nicolson method?
I've an equation like this to solve with the crank-nicolson method
$$U_t -\frac{y}{2} U_x + \frac{x}{2}U_y = 0,$$
where $x$ and $y$ are: [-2,5:2,5] and the time $T$ ...
4
votes
1
answer
628
views
My algorithm for the heat equation is unstable
I have implemented the 2D heat equation with what I thought was the Crank-Nicolson algorithm in the following way:
...
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-...
5
votes
0
answers
85
views
Order of convergence of Scrodinger eq. with CN scheme
I'm trying to solve numerically the 1-dim time dependent Schrodinger equation using the Crank Nicolson scheme and the Thomas algorithm to solve the tridiagonal matrix.
The physical system consists of ...
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?
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 ...
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)...