# Questions tagged [crank-nicolson]

The tag has no usage guidance.

39 questions
Filter by
Sorted by
Tagged with
6k 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)...
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 ...
13k 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?
231 views

659 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-...
53 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{...
105 views

I want to use the Crank-Nicolson scheme to solve the equation $$u_t = iu_{xx}+2iu$$ Here's the analysis: Suppose we make a grid, with $k = dt$ and $h = dx$, the usual notation, and also $u_j^n = u(... 0answers 70 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-\... 1answer 671 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} (... 1answer 97 views ### Finite difference methods I am currently applying the finite difference method to the solution of the diffusion equation. I think that a problem has occurred, and is as follows, my explicit method is the most accurate when ... 1answer 280 views ### How can I numericaly solve a convection-diffusion equation with a large diffusion term? I want to numerically solve the advection-diffusion equation: $$u_t(x,t) + cu_x(x,t) = v u_{xx}(x,t)$$ for x \in [0,1] and t \geq 0 subject to the boundary conditions ... 2answers 1k views ### Numerical solution of burgers equation with finite volume method and crank-nicolson I'm having difficulty with numerically solving the inviscid burgers equation.Godunov's scheme is used in most of what I've found in literature . Now my question is if using a crank nicolson shceme is ... 1answer 145 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 ... 1answer 191 views ### Finite difference - Explicit / Implicit / Crank Nicolson - Does the implicit method require the least memory? Examine a dynamic 2D heat equation \dot{u} = \Delta u with zero boundary temperature. A standard finite difference approach is used on a rectangle using a n\times n grid. For the resulting linear ... 1answer 253 views ### Numerical solution of non-linear heat-diffusion PDE using the Crank-Nicolson Method I am trying to solve numerically the following 1D EBM: C\frac{\partial T[x,t] }{\partial t} - \frac{\partial }{\partial x}\left ( D(1-x^2)\frac{\partial T[x,t] }{\partial x} \right ) + I[T] = S[x,t](... 0answers 38 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 ... 0answers 291 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, ... 0answers 263 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})$$... 0answers 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-... 1answer 312 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 ... 1answer 101 views ### FDM on nonlinear PDEs I'm working with a 2D Navier Stokes PDE in the unstabilized version - the equation is a linear equation of the type$\frac{∂u}{∂t} = F(u,t)$. In order to perform time discretization with FDM (finite ... 1answer 941 views ### Crank–Nicolson method for nonlinear differential equation I want to solve the following differential equation from a paper with the boundary condition: The paper used the Crank–Nicolson method for solving it. I think I understand the method after googling ... 1answer 194 views ### implicit method (crank-Nicolson) I not understand the procedure [closed] I'm trying to understand the passage through this equation can be written for easily solved with the fortran alghorithm in particular i don't understood the meaning of L_x and L_xx ... what (-1,0,1) ... 1answer 485 views ### Solving an equation in space and time using the Crank-Nicolson approach Assume I have the following equation (light propagating in$z$-direction through the matter): $$id_zu+d^2_ru=0$$ with$u(z, r)$being a complex wave. The time scale in this equation is $$t\equiv t_\... 0answers 51 views ### Crank-Nicolson solution of parabolic PDE with Newumann boundary conditions I am trying to solve the non-linear parabolic PDE in c(t,r)$$c_t=\frac{1}{r}(rDc_r-\alpha r^2 c)_r$$with initial condition$c(0,r)=f(r)$and boundary conditions$c_r(t,r_1)=\alpha r_1c_1/D$and$...
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))}$ ...