Skip to main content

Questions tagged [crank-nicolson]

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

17 questions with no upvoted or accepted answers
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
3 votes
0 answers
88 views

Use of non-typical values of $\theta$ in theta-methods

The theta-method is a popular solution for solving time-transient PDEs (or ODEs), which consists of solving the general equation for each time step: $$ \frac{u^{n+1} - u^{n}}{\Delta t} + (\theta f(u^{...
gazoh's user avatar
  • 153
2 votes
0 answers
173 views

Error in implementation of Crank-Nicolson method applied to 1D TDSE?

Some context, I've posted this question on physics SE and stack overflow. The former had nothing to offer, the latter had a great commenter that agreed with the phase looking off being one of the ...
MinimalCodingIQ's user avatar
2 votes
0 answers
145 views

Advection diffusion equation using Crank-Nicolson with total flux and Diriclet BCs

I am trying to model the 1D advection-diffusion equation: $${\partial c \over \partial t} = D_c{\partial^2 c \over \partial x^2} -u{\partial c \over \partial x}.$$ With Robin boundary conditions that ...
DozerD's user avatar
  • 81
2 votes
0 answers
86 views

Linearising Nonlinear Coupled Partial Differential Equations - Alfvénic Diffusion

I am trying to solve the following coupled partial differential equations with a finite difference scheme: $$\partial_tf+v\partial_zf+\partial_z\frac{1}{W}\partial_zf=0$$ $$\partial_tW+v\partial_zW-\...
Hanno Jacobs's user avatar
1 vote
0 answers
42 views

How can I apply a mixed boundary condition to a multi-material heat transfer problem using Crank-Nicolson?

I am working on a mixed material model for a melting material and need to enforce both a Dirichlet and Neumann type condition at the interface. Subject to an external surface heat flux at the top of ...
ZebraEagle's user avatar
1 vote
0 answers
66 views

Deriving order of accuracy and interpreting a given discretization scheme when underlying method ( finite difference/volume) not known

If a spatial grid is given with time levels like this: to solve the following model problem Now consider the following discretization schemes: Scheme 1 Scheme 2 Usually, to determine order of ...
me10240's user avatar
  • 445
1 vote
0 answers
207 views

Solving PDE on a non-uniform grid with Crank-Nicolson scheme

I am solving a 1D diffusion-type equation with the finite-difference Crank-Nicolson (CN) scheme, and I need to densify the spatial grid around the central point. One could change the spatial variable ...
ottavio 's user avatar
1 vote
0 answers
125 views

Crank-Nicolson vs Spectral Methods for the TDSE

The time-dependent Schroedinger equation (TDSE) depends linearly on the system's initial state $\vert \psi(0) \rangle$, such that the solution can be generally written as $$ \vert \psi(t) \rangle = \...
QuantumBrick's user avatar
1 vote
0 answers
609 views

Time-dependent Schrodinger equation implementation in FEniCS

For our Bachelors thesis we're trying to solve the Schrodinger equation $i\partial_tu = -\nabla^2u+Vu$ in FEniCS. Given the domain $[-5, 5]^2$ with an initial value of $u_0(x, y)=e^{(-2(x^2+y^2))}$ ...
Anton Scotte's user avatar
1 vote
0 answers
53 views

Boundary conditions for a Non-linear Schrödinger equation using an extended crank nicolson scheme

I try to solve numerically the following PDE for $E(r, z)$ with a cylindrical symmetrie (i. e. $E(r, z) = E(-r, z)$). $\frac{\partial E}{\partial z} = \frac{i}{2k} \Delta E + \mathcal{N}(E)$ Where $...
user30548's user avatar
1 vote
0 answers
339 views

Crank-Nicolson scheme in space for advection equation

Consider the equation $$\frac{\partial}{\partial t}v(t,x)=\frac{\partial}{\partial x}v(t,x)$$, for $t,x\in\mathbb{R}$. I'd like to solve this equation forward in space and backward in time, ...
Jason Born's user avatar
1 vote
0 answers
320 views

Why can I not solve the negative advection equation (backwards in time)?

Suppose we have the negative, inhomogeneous advection equation: $$\left(\frac{\partial}{\partial x}-\frac{1}{c}\frac{\partial}{\partial t}\right)v(t,x)=u(t,x)\qquad(t\in\mathbb{R}_{+},x\in\mathbb{R})$$...
Jason Born's user avatar
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

15 30 50 per page