Questions tagged [time-integration]

For questions about the particulars of solving differential equations with time as the independent variable.

Filter by
Sorted by
Tagged with
1 vote
1 answer
76 views

Estimating the spectral radius when applying the method of lines

Some time integrators, notably the Runge-Kutta-Chebyshev method, implemented in the RKC code from Sommeijer & Verwer, gives the user an option to provide a callback with an estimate of the ...
IPribec's user avatar
  • 454
2 votes
1 answer
142 views

Does this second-order implicit Runge-Kutta method have a name?

I am studying the time-integration of the following paper, Young, L. C. (1981). A finite-element method for reservoir simulation. Society of Petroleum Engineers Journal, 21(01), 115-128. A copy (PDF)...
IPribec's user avatar
  • 454
2 votes
0 answers
69 views

How can I validate my time integration scheme for my dynamic linear elasticity FEM code with a manufactured solution or similar?

I am solving for a dynamic linear elasticity problem: \begin{equation} \dfrac{\partial^2 u}{\partial^2 t} - \nabla \cdot \sigma = f \end{equation} where $ u \in R^2 $ with sufficient BCs and ...
CuteCompute's user avatar
4 votes
1 answer
583 views

Why do I get an oscillatory solution when applying the implicit trapezoidal method to the linear diffusion equation?

I wish to solve the following equation, $$\frac{\partial f}{\partial t}=\frac{\partial}{\partial x}\left(D(x)\frac{\partial f}{\partial x}\right)$$ using an exponential integrator. I discretize this ...
Sayan's user avatar
  • 87
2 votes
0 answers
56 views

Example: Velocity Verlet reduced accuracy

Velocity Verlet is often held to far more accurate than forward Euler while being no more expensive. Technically, this requires some degree of regularity on the potential. But, is there a convincing ...
msm's user avatar
  • 201
2 votes
1 answer
101 views

Need help to fully understand SciPy's odeint's reported step sizes, eval times, # of funct calls & total proc. time (re. question in Astronomy SE)

A recent question in Astronomy SE Numerical Programming using odeint takes more than 17 minutes got me interested in looking closer at SciPy's odeint. The problem is a modified orbital mechanical ...
uhoh's user avatar
  • 1,016
1 vote
1 answer
100 views

Velocity Verlet leading to faster simulation than Euler in an n-Body simulation?

I have all the constants set to the same values for each set of code, G, the timestep, the masses of the planets etc. But using Velocity Verlet doesn't work unless I lower the gravitational constant ...
ght007's user avatar
  • 95
5 votes
1 answer
757 views

Why is velocity Verlet better than Verlet for gravity if it has a worse order of magnitude for the error term

Even though this method is more widely used than the simple Verlet method mentioned above, it unfortunately has an error term of O(Δt^2) , which is two orders of magnitude worse. That said, if you ...
ght007's user avatar
  • 95
0 votes
0 answers
46 views

Numerov Method with Time Varying Potential

Is it possible to use the Numerov method to solve the Time Dependent Schrodinger Equation ($\frac{i\partial\Psi(x, y, z, t)}{\partial t} = \nabla^2\Psi(x, y, z, t) + \Psi(x, y, z, t)V(x, y, z, t)$) ...
cgbsu's user avatar
  • 33
0 votes
0 answers
80 views

Best approach to solve this system of equations?

I have the following 1D (in space, that is) system of equations I would like to solve: \begin{equation} \rho_{fs}\frac{\partial x_{fs}}{\partial t} = h_m\left(W_a - W_{fs}\right) - D_{eff}\left(\...
HVdB's user avatar
  • 9
4 votes
1 answer
100 views

Stabilized Many Stage Runge-Kutta methods instead of Local/Multirate Time Stepping

Locally refined meshes are often inevitable for accurate, yet feasible computations. In the context of time-dependent PDEs, however, this comes at the cost that (due to the CFL condition) reducing the ...
Dan Doe's user avatar
  • 904
0 votes
1 answer
248 views

Passing additional arguments to `odeint` from `torchdiffeq` to solve an IVP

In Python I use the package torchdiffeq (as provided here) to solve initial value problems. Given an arbitrary function ...
eldorado's user avatar
2 votes
1 answer
191 views

Using velocity verlet algorithm for nbody simulation results in planet leaving orbit

I'm new to computational physics and attempting an n-Body simulator in java but for some reason the planet in orbit leaves the orbit when it reaches the fastest accelaration aka the closest point to ...
ght007's user avatar
  • 95
7 votes
1 answer
281 views

How does non-dimensionalization improve the behavior of ODE solvers?

I have a set of coupled ODEs that I'm solving numerically. The independent variable is time and runs from values of $10^{15}$ to $10^{17}$ in units of seconds. The state variables in their usual ...
quantumflash's user avatar
2 votes
1 answer
488 views

Solving the time dependent Schrödinger equation with leapfrog integration in 1D

To my frustration I am struggling to implement leapfrog integration for the time dependent Schrödinger equation. To the best of my knowledge this was first explicitly done in "A fast explicit ...
Martin C.'s user avatar
  • 229
2 votes
1 answer
94 views

Time Integrators for Water Wave Simulation

I am interested in using a numerical wave tank (NWT) to study the performance of various water wave dampers using MATLAB. I am looking at nonlinear water waves. My current NWT (2d, periodic) is based ...
Gary Moon's user avatar
  • 123
2 votes
0 answers
100 views

FEM applied to heat equation and incompatible conditions

Consider the problem $$u_t - \Delta u = f \text{ on } \Omega\times (0,T)\\u=0 \text{ on } \partial \Omega\times (0,T) \\ u(x,0)=g(x) \text{ on } \Omega$$ with $g$ NOT vanishing on the boundary. If I ...
brtw's user avatar
  • 21
1 vote
0 answers
64 views

Preserving conservation properties across time-integration schemes

I am interested in deriving an accurate, implicit discretization of a nonlinear advection-diffusion equation $$ \partial_t f = \frac{1}{v^2} \partial_v J(f,v) \equiv F(f,v) \tag{$\star$} $$ with flux ...
Endulum's user avatar
  • 725
0 votes
1 answer
286 views

How to deal with solving coupled ODE systems where variables are updated multiple times within each timestep?

I'm solving a system of coupled ODEs using Euler integration for simplicity. To make this concrete, please see the (extremely simplified) minimal working example below in Python. Imagine we have a box ...
quantumflash's user avatar
0 votes
1 answer
118 views

Time & Space matlab discretization Finite Differences confusion

I have been trying to solve this equation and write the finite difference scheme in matlab for months, but I still am not successful. Given the KdV Equation $$\tag{1}u_{t} -6uu_x+u_{xxx}=0$$ I have ...
bc_eng's user avatar
  • 23
2 votes
0 answers
379 views

Numerical evaluation of Duhamel's integration

I am trying to numerically evaluate the following Duhamel's integration: $$ x = \frac{-1}{\omega_d} \int_0^t \ddot{x}_g (\tau) e^{-\zeta \omega_n(t - \tau)} \sin{\left( \omega_d (t - \tau) \right)} d\...
Quang Thinh Ha's user avatar
2 votes
1 answer
113 views

Implicit integrator for ODE with quadratic right-hand side

I have an ODE for an unknown $x(t):[0,\infty)\to\mathbb R^n$ of the following form: $$ x_i'(t)=a_i^\top x(t) + x(t)^\top Q_i x(t), $$ for $i\in\{1,\ldots,n\}$. Here, the vectors $a_i\in\mathbb R^n$ ...
Justin Solomon's user avatar
3 votes
1 answer
66 views

Jos Stam's stable fluids — why is the timestep multiplied by the number of grid cells?

One more question about Jos Stam's GDC tutorial on stable fluids: in the advection step on page 8, the timestep for each dimension is implemented as dt * N, where <...
jogloran's user avatar
  • 145
5 votes
1 answer
239 views

Write incompressible Navier Stokes as ODE in $(\mathbf{u},p)$

Consider the Navier stokes equation after the discretization with conforming finite elements with source term $f=0$. We have the algebraic structure of a saddle point problem: $$M \dot{u} = f- Au -B^...
FEGirl's user avatar
  • 261
0 votes
0 answers
91 views

Transient advection equation with stabilized FEM

I am interested in solving the transient advection equation $\left\{\begin{array}{ll}\partial_{t} u+\beta \cdot \nabla u=f & \text { in } \Omega, t>0 \\ u=0 & \text { on } \partial \Omega^{-...
balborian's user avatar
  • 601
0 votes
0 answers
69 views

Expression for numerical amplification factor for Euler time integration and CD2 scheme for one degree hyperbolic function

This is the expression to be derived but I am not getting the exact expression as given in the image. Is the given expression given for the implicit Euler method? Here $N_c = c (\delta t)/h$ and $\tan(...
Avii's user avatar
  • 121
5 votes
0 answers
352 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
  • 435
1 vote
1 answer
105 views

Numerical integrator for $a'(t)=e^{-a(t)}f(t)$

Suppose I know a function $f(t)$ and all its derivatives in $t$ in closed form. Given $a(0)$ and some $t_0>0$, I'm looking for an explicit integrator that can estimate $a(t_0)$, where $a(\cdot)$ ...
Justin Solomon's user avatar
2 votes
0 answers
57 views

N-body correct scaling

I realized an usual way to scale an N-body problem for an N-body simulation is by choosing units such that gravitational constant $G = 1$, but I'm probably doing it the wrong way. Suppose I simply ...
Martrin's user avatar
  • 31
-1 votes
1 answer
188 views

Numerical solution of the advection equation with Crank–Nicolson finite difference method

I need to implement a numerical scheme for the solution of the one-dimensional advection equation $$\\\frac{\partial u}{\partial t} + C(x, t) \frac{\partial u}{\partial x} = 0 \\\\$$ $$ \\ C(x,t) = \...
Winabryr's user avatar
0 votes
0 answers
185 views

Conservation of energy test for 2-body problem

I'm trying to implement a C++ code for the evaluation of the solution of an N-body system of ODE. I've started with a 2-body problem just to set the methods ...
Martrin's user avatar
  • 31
2 votes
1 answer
152 views

Second Order Time Integration for Stiff Linear System Avoiding any Explicit Step

I have a linear system $$ \dot x(t) = Ax(t), \quad x(0)=x_0 \tag{*} $$ with $A$ being Hurwitz (i.e. the solutions may oscillate but will eventually tend to zero) but really stiff. $A$ might be large, ...
Jan's user avatar
  • 3,408
0 votes
1 answer
71 views

Handling time derivative as source term in SDIRK methods

I am currently facing some challenge implementing a less traditional PDE which take a form similar to the Navier-Stokes equation, except that the continuity equation is modified such that: $$\epsilon \...
BlaB's user avatar
  • 1,147
2 votes
1 answer
354 views

How to select initial time step in adaptive time step ODE solver (TR-BDF2)

The Problem I am currently reconstructing a TR-BDF2 scheme which contains the following two stages: \begin{align} y_{n+\gamma} & = y_n + \gamma \frac{h}{2}\left( f_n + f_{n+\gamma} \right) \...
kostas1335's user avatar
2 votes
1 answer
116 views

Best practice for ADTs in computational science with Fortran

I have been writing a software package in Fortran for solution of the Vlasov-Poisson system in 2D2V. I want this software to be useful beyond its current application (e.g. systems with different ...
user31765's user avatar
  • 101
3 votes
0 answers
99 views

Explicit DG time step restriction for compressible Navier-Stokes equations

Hesthaven's book 1 mentions the following time step restriction for Navier-Stokes equations (see (7.32) in 2008 edition) $$ \Delta t \approx \frac{h}{N^2} \frac{C}{|u| + |c| + \frac {N^2 \mu}{h}} $$ ($...
Zxcvasdf's user avatar
  • 141
1 vote
0 answers
54 views

Multigrid Reduction In Time Convergence

I am trying to solve a 2D dynamic linear elasticity model parallel in time using Xbraid. The spatial domain is [0,1]x[0,1] and time domain [0,1]. For time integration I am using a backward Euler ...
spyros's user avatar
  • 481
2 votes
2 answers
208 views

Heat equation in non-dimensional form behaving differently than in usual format

Starting from $$ c_p \frac{\partial u }{\partial t} = k \nabla^2 u $$ in a one dimensional domain [0,1] where $c_p$ and $k$ are modeling two different materials: $$ k = \begin{cases} 1 ~\text{if} ~x &...
balborian's user avatar
  • 601
2 votes
0 answers
156 views

Parallel In Time with Multigrid

I am trying to solve the linear finite element equation $M\ddot{u}+Ku=F(t)$, where $M$ is the mass matrix ,$K$ the stiffness matrix and $F(t)$ the external load vector, parallel in time using XBraid ...
spyros's user avatar
  • 481
3 votes
1 answer
94 views

Numerical integration in time for finite elements

I am trying to solve $M\ddot{u}=-Ku+F_\text{ext}$ for a 2D linear elastic model with $M$ be the mass matrix,$K$ the stiffness matrix and $F_\text{ext}$ the external load vector coming from a uniformly ...
spyros's user avatar
  • 481
2 votes
1 answer
214 views

How do I apply BDF2 in a STRANG splitting

I have a 3D diffusion equation that I want to solve using a time splitting (2D+1D). Assume that $A$ is the 2D discrete diffusion operator and $B$ is the 1D discrete diffusion operator. I want to use a ...
Chack.Flack's user avatar
0 votes
0 answers
522 views

How to calculate the average velocity over a surface through time using paraview?

My problem is a little more complex, but here is a simplified similar model. Let us consider a fire source inside a box and the hot gases (burnt or unburnt) from the combustion are going out of the ...
Emotional Damage's user avatar
3 votes
2 answers
170 views

Mass conservation for hyperbolic relaxation problem

I have solved numerically the following system: \begin{cases} \partial_t{u} + \partial_x{v} = 0 \\ \partial_t{v} + \frac{1}{\varepsilon^2}\partial_x{u} = -\frac{1}{\varepsilon^2}(v-f(u)) \end{cases} ...
Dadeslam's user avatar
  • 133
4 votes
1 answer
1k views

The velocity Verlet method and variable time steps

Does the velocity Verlet handle variable time steps? I found controversial statements about it. In the paper Skeel, R. D., "Variable Step Size Destabilizes the Stömer/Leapfrog/Verlet Method", BIT ...
plasmacel's user avatar
  • 143
2 votes
1 answer
245 views

Lumped matrices in thermal analysis using finite elements

The governing equation of the transient heat transfer problem is $$C \frac{dT}{dt}+K T = Q$$ $C$ is the heat capacity matrix. $K$ is the thermal conductivity matrix. $T$ is the temperature vector. $...
vydesaster's user avatar
0 votes
0 answers
136 views

Lax-wendroff for stiff source terms

I am interested in problems of the form $$ u_t = F(u) + S(u) $$ where $F(u) = - div(f(u))$ and $S(u)$ is a stiff source term. I am looking for any existing works which develop Lax-Wendroff type ...
cfdlab's user avatar
  • 2,993
1 vote
2 answers
66 views

Numerical integral with symbolic integral in exponent

Many times in fourier approximation we come across integrals such as $$\int_0^1 e^{-\gamma\int_0^xu_0(\eta)d\eta}dx$$ where $\gamma$ is a constant and the data for $u_0$ is provided as a discretely ...
Turbo's user avatar
  • 149
3 votes
1 answer
204 views

Time integration of wave equation

My question is: how come that certain formulations of the wave equation can be time integrated more efficiently then others? Le me expand a bit on that. Consider the wave equation: $$ \frac{d^2 p(t,...
user21's user avatar
  • 382
0 votes
0 answers
38 views

What will PDE discretization matrix look like for time and space? [duplicate]

Please note: this question is not a duplicate of this question since, while the PDE is the same, the nature of this question is different, i.e. the other question treats a different aspect of this PDE....
sequence's user avatar
  • 216
1 vote
1 answer
156 views

Stability Criteria for Numerical Solution of Windkessel Ordinary Differential Equation

I'm trying to solve this equation (Windkessel equation) numerically as: $$C \frac{d P}{d t} + \frac{P}{R} = Q(t)$$ Where $C$ is compliance, $R$ is resistance, $P$ is pressure, and $Q(t)$ is a known ...
GGG's user avatar
  • 173