Skip to main content

Questions tagged [crank-nicolson]

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

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
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
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
0 votes
0 answers
101 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 $...
Woody20's user avatar
  • 171
0 votes
1 answer
187 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 ...
Rubi C.g.'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
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
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
1 vote
1 answer
128 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 ...
Peter's user avatar
  • 33
2 votes
2 answers
122 views

Stability of Crank-Nicolson for $u_t = iu_{xx}+2iu$

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(...
Rick Joker'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
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
1 vote
1 answer
313 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 ...
user29635's user avatar
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
2 votes
1 answer
4k views

Applying Neumann boundaries to Crank-Nicolson solution in python

Consider the heat equation $$u_t = \kappa u_{xx}$$ with boundary conditions of $$u(x,0)=0\\ u(0,t)=100\\ u(l,t)=0$$ Numerical analysis by pyton can be done with ...
Googlebot's user avatar
  • 131

15 30 50 per page