ODE & PDE Dynamics Simulation

ODE

Simulates a particle of mass \( m \) using Newton's second law \[ m\dfrac{d^2 x}{dt^2} = F, \quad x(0) = x_0, \:\, v(0) = v_0 \] in either an external potential \[ V(x) = \frac{1}{2} \Omega^2 x^2 + A \, \text{sech}^2(bx) \]

or a "patched" variational potential: \[ U_{\text{patched}}(x;A,b,\Omega,\epsilon)= \begin{cases} U_{\text{eff}}(x;A,b,\Omega) & \text{if }|x|\ge\epsilon,\\[4pt] U_{\text{Taylor}}(x;A,b,\Omega) & \text{if }|x|<\epsilon, \end{cases} \] with \[ \begin{aligned} U_{\text{eff}} &= {} -\frac{256A b^{2} x}{\!\bigl(e^{2bx}-1\bigr)^{5}} -\frac{256A b(2bx-1)}{\!\bigl(e^{2bx}-1\bigr)^{3}} -\frac{128A b(5bx-1)}{\!\bigl(e^{2bx}-1\bigr)^{4}} \\[-2pt] &\hphantom{={}} -\frac{32A b(12bx-13)}{3\bigl(e^{2bx}-1\bigr)^{2}} +\frac{32A b}{3\bigl(e^{2bx}-1\bigr)} +\frac{2\Omega^{2} b x^{2}}{3},\\[6pt] U_{\text{Taylor}} &= {} -\frac{64A b^{3}x^{2}}{105} +\frac{16A b}{15} +\frac{2\Omega^{2} b x^{2}}{3}. \end{aligned} \]

PDE

Evolves the focusing 1D nonlinear Schrödinger equation (NLS) \[ i u_t = -\frac{1}{2} u_{xx} + V(x) u - |u|^2 u, \] with periodic boundary conditions, using a finite-difference RK4 scheme.

Initial Condition PDE \[ u(x, 0) = A_{\text{sol}} \, \text{sech}(A_{\text{sol}} (x - x_0)) \cdot e^{i v_0 x}, \] optionally refined via Newton's method or Levenberg–Marquardt.

Shared Parameters

ODE Parameters


PDE Parameters

Scan ranges