Skip to main content

Questions tagged [crank-nicolson]

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

2 votes
1 answer
254 views

Asking advice for implementation of Conservative Finite Difference Scheme for numerically solving Gross-Pitaevskii equation

I am trying to numerically solve the Gross-Pitaevskii equation for an impurity coupled with a one-dimensional weakly-interacting bosonic bath, given by (in dimensionless units): \begin{align} i \frac{\...
sap7889's user avatar
  • 21
0 votes
0 answers
40 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
64 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
0 votes
1 answer
178 views

Using Crank-Nicolson to solve Non-Linear Schrödinger equation in Python

I aim to solve the (non-linear) Schrodinger equation using the Crank-Nicolson method in Python. Here are my two functions. ...
FairyLiquid's user avatar
1 vote
1 answer
302 views

Why does scipy Conjugate Gradient solver fail to converge for non-steady heat equation using Crank-Nicolson method

Could someone please explain why my implementation of the Crank-Nicolson method applied to the non-steady heat equation won't converge? There shouldn't be any nonlinear aspects to my implementation ...
n1ck94's user avatar
  • 13
1 vote
1 answer
352 views

Crank Nicolson Method with closed boundary conditions

I want to simulate 1D diffusion with a constant diffusion coefficient using the Crank-Nicolson method. $$\frac{\partial u (x,t)}{\partial t} = D \frac{\partial^2 u(x,t)}{\partial x^2}.$$ I take an ...
Jbag1212's user avatar
  • 111
0 votes
2 answers
410 views

Can the Crank-Nicolson Method Be used to Solve The Schrodinger Equation with a Time Varying Potential?

I have been following an excellent article about how to use the Crank-Nicolson method to solve the Schrodinger equation. In the article, it starts with a $V(x, y, t)$ but the potential seems to become ...
cgbsu's user avatar
  • 33
1 vote
0 answers
206 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
122 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
2 votes
0 answers
172 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
0 votes
0 answers
88 views

Transparent Boundary Conditions for Finite Difference ADI PR 2D TDSE solution

I want to put (non-dirichlet) boundary conditions inside the code I wrote to solve the 2dim TDSE using the alternating direction implicit Peaceman - Rachford method. $$ (1 + iB\Delta t/2 ) \psi^{n+1/2}...
velenos14's user avatar
  • 131
4 votes
1 answer
205 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
2 votes
1 answer
483 views

Solving Schrodinger Equation with finite element and Crank-Nicolson?

I have asked this in Mathematic section, but received no reply. Please let me ask here to see if threr is any difference. The Schrodinger equation without potential has the following form: $$\...
WhatsupAndThanks's user avatar
2 votes
0 answers
144 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
3 votes
1 answer
147 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

15 30 50 per page