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
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
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
7 votes
1 answer
3k views

What is the origin of the spurious oscillations in the Crank-Nicolson scheme?

I was reading about the Crank-Nicolson method, and it is often said that it can produce "spurious oscillations" or that this method is prone to "ringing", especially for large time step and stiff ...
Matthieu's user avatar
6 votes
2 answers
237 views

Is this system of diffusion equations well-posed?

I’m using a standard Crank-Nicholson algorithm to solve this system of two coupled diffusion equations: $$\dot{u} - \dot{v} = \frac{\partial}{\partial x} \left( \alpha(x) \frac{\partial u}{\partial x}...
user avatar
6 votes
2 answers
389 views

Is the diffusion equation with Neumann and Dirichlet BCs well-posed?

I am considering the following diffusion equation: $$\frac{\partial f}{\partial t} = \frac{\partial}{\partial x}[D(x,t)\frac{\partial f}{\partial x}]$$ over a grid ...
R Thompson's user avatar
5 votes
2 answers
2k views

Why is Crank-Nicolson considered implicit in time?

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 ...
Sparkler's user avatar
  • 153
5 votes
1 answer
779 views

Finite Differencing schemes for Convection-Diffusion equation

I'm using the Convection(/advection)-Diffusion(-Reaction) equation to calculate the temperature over time in different hydraulic parts like a pipe or a heat exchanger. The flow/convection is always 1D,...
JE_Muc's user avatar
  • 265
5 votes
0 answers
428 views

Stability of Crank-Nicholson for advection diffusion equation for spatial discretization other than finite differences second-order centered

Crank Nicholson is a time discretization method (see 4th equation here). From what I see around, you can use different space discretization, such as Finite elements. But for the linear advection-...
Millemila's user avatar
  • 445
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 ...
the_elder's user avatar
  • 151
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: ...
Daniel's user avatar
  • 85
4 votes
1 answer
207 views

Method to linearize highly nonlinear partial differential equation

I have a set of coupled pdes which I want to solve using finite-difference, of which one is nonlinear. The three linear pdes for quantities $T_f$, $T_s$ and $c$ are convection-diffusion-reaction-like ...
DozerD's user avatar
  • 81
4 votes
2 answers
3k views

How to handle boundary conditions in Crank-Nicolson solution of IVP-BVP?

I'm trying to solve the PDE for $c(r,t)$ $$c_t=(1/r)(rJ)_r$$ using Crank-Nicolson, and I'm having difficulty with the boundary conditions. $J$ is the flux, the initial condition is $c(0,r)=c_{init}$, ...
Woody20's user avatar
  • 171
3 votes
1 answer
148 views

Derivation of a parabolic PDE using Alternating Direction Implicit method

I have a very simple question concerning Alternating Direction Implicit (ADI) Scheme. If I have an equation of the form: \begin{equation*} \frac{df(x,y,t)}{dt} = \nabla^2 f(x,y,t) + f(x,y,t) \end{...
Iddingsite's user avatar
3 votes
1 answer
136 views

Maintain unitary time evolution for a nonlinear ODE

I want to solve a nonlinear ODE of matrix $A(t)$ $$\mathrm{i}\dot A = A(t)M(t),\:\mathrm{with}\: M(t)=A^\dagger(t)H(t)A(t)$$ where $H(t)$ and hence $M(t)$ are Hermitian. Therefore, I presume the time ...
xiaohuamao's user avatar

15 30 50 per page