Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [stability]

The study of the propagation of errors in a numerical algorithm.

Filter by
Sorted by
Tagged with
4 votes
1 answer
218 views

Stepping over a rapid oscillation in advection

As a model of a more complex problem, I am studying a linear advection equation with a rapidly oscillating velocity $$ \partial_t u + a \cos(\omega t) \partial_x u = 0 $$ with initial condition $u(x,0)...
3 votes
1 answer
114 views

Franco Brezzi's didactic paper on the Inf-Sup condition

I am trying to recover the title of a very didactic paper by Franco Brezzi in which he explains the Inf-Sup condition with a very simple case. As I recall, it was a simple Laplacian equation in 1D ...
2 votes
1 answer
270 views

Why do we use modified pressure in incompressible multiphase solvers with gravity?

The context of my question is two-phase incompressible solvers such as interFoam in OpenFOAM, but I have seen this trick used ...
11 votes
1 answer
648 views

How to derive an Implicit Runge-Kutta method from Pade approximation

I was reading some work by Butcher and I came across Pade approximations and the correlation between them and stability functions for some Implicit Runge-Kutta methods. For example, in this Pade table ...
4 votes
1 answer
157 views

Numerically stable computation of $x^T A x$

We have a large sparse symmetric positive-definite matrix $A \in \mathbb R^{N \times N}$ and a vector $x \in \mathbb R^N$. How do I practically compute the inner product $x^T A x$ when the matrix $A$ ...
0 votes
0 answers
45 views

2nd-order backward difference approximation for temporal terms of Euler–Bernoulli beam

I am trying to solve the Euler–Bernoulli beam numerically in structural dynamics analysis: $$\frac{\partial^2w(x,t)}{\partial t^2}= \frac {q(x,t)}{\mu(x)}-\frac {1}{\mu(x)}\frac {\partial^2}{\partial ...
2 votes
2 answers
72 views

How to improve and stabilize this code simulating a damped mass-spring oscillator? Runge-Kutta?

I wrote the following function which is simulating a damped mass-spring oscillator. It is being driven by the audio sample input at 44.1 kHz sampling to create the same effect as a resonant bandpass ...
0 votes
2 answers
2k views

When can I use finite differences for differentiation?

Finite differences are usually used to integrate ODE's and PDE's. However, sometimes they can be used for differentiation which I illustrated simply by using the Matlab code below to differentiate the ...
2 votes
0 answers
80 views

Preventing an Overflow in Exponential Integrating Factor

The following is the Discrete Spectral Vorticity Evolution PDE for incompressible flow: $$ \frac{\partial \Omega_{pq}}{\partial t} = \nu \left( \frac{\partial^2 \Omega_{pq}}{\partial x^2} + \frac{\...
1 vote
1 answer
116 views

Step size constraint in Euler backward

I am dealing with an assignment in MATLAB. It has to do with 'self-driving' cars which are driving in-front/behind eachother. Assuming M cars on a single-lane road, each car adjusts its speed based on ...
0 votes
0 answers
44 views

Which numerical method can I use to solve this system of hyperbolic PDEs?

Backround The mathematical model I am trying to numerically solve models wave propagation inside a cylinder with specific material properties suited for dynamic loading. The cylinder's upper base is ...
3 votes
1 answer
184 views

Stability of Euler forward method

I am trying to solve a linear system of ODEs of the form: $$ \frac{du}{dt} = A u, \quad u(0)=k$$ where $A$ is a 2x2 matrix and $u(t)$ is a 2x1 column vector. I want to solve this numerically, using ...
2 votes
1 answer
145 views

Can this finite difference dispersion be eliminated somehow?

I am trying to solve the wave equation $$ {\partial ^2u(t,x) \over \partial x^2} = {\partial ^2u(t,x) \over \partial t^2} \tag1 $$ with the following boundary and initial conditions: $$ {\partial u \...
3 votes
2 answers
759 views

Python bifurcation diagram of seasonally forced epidemiological models

TL:DR How can one implement a bifurcation diagram of a seasonally forced epidemiological model such as SEIR (susceptible, exposed, infected, recovered) in Python? I already know how to implement the ...
5 votes
0 answers
87 views

optimization scaling techniques

Consider a convex QP of the form $$ \min_x \bigl\{\tfrac12 x^\top Q x + q^\top x : Ax\leq b\bigr\}\tag{P} $$ with dual $$ \min_y \bigl\{\tfrac12 (A^\top y + q)^\top Q^{\dagger} (A^\top y+q) + b^\top y ...
1 vote
0 answers
127 views

Stability for the 2d diffusion equation

I'm reading this set of notes on numerical stability of the diffusion equation. I can't seem to derive equation (7.17) from the previous equation. I've tried using $\sin^2(\theta)=\frac{1-\cos(2\theta)...
6 votes
1 answer
1k views

Why is matrix inversion unstable when svd is stable?

I've heard that matrix is inversion is unstable whereas the SVD is stable. Now, if $A$ is an invertible matrix, then its SVD is $$ A = USV^T $$ Then wouldn't it's inverse just be $$ A^{-1} = (USV^T)^{...
1 vote
1 answer
158 views

Conditioning and Stability of generalized eigenvalue problem

The (generalized) eigenvalue problems with a multiple eigenvalue are the ill-posed ones. I have two questions that should be simple for experts: (1) Is the eigenvalue problem much more sensitive to ...
0 votes
1 answer
282 views

computing Lyapunov exponents numerically

I am trying to compute numerically the Lyapunov exponents of an ODE. I follow the method described in Parker, Chua "Practical Numerical Algorithms for Chaotic systems" There is also relevant ...
2 votes
0 answers
68 views

Literature request for pinning the corner singularities in finite differences

Corner singularities cause instability of finite difference solutions. They occur at the intersection of boundary conditions. I was recently going through an online video course that was explaining ...
1 vote
1 answer
92 views

Improved euler on hybrid methods where both time and space are discretized?

I am trying to understand how to use the improved euler method on MPM simulations. In the kind of MPM simulation I am doing with forward euler the order of operations is as follows: Write particle ...
7 votes
1 answer
172 views

Automatic differentiation of barycentric rational functions

By a barycentric rational interpolant we understand a function of the form \begin{align*} r(t) := \frac{\sum_{i=0}^{n-1} \frac{w_i y_i}{t-t_i} }{ \sum_{i=0}^{n-1} \frac{w_i}{t-t_i}} \end{align*} In ...
0 votes
1 answer
54 views

RFEM: Tensile force in member in buckling analysis

Here is a simple T-shaped structure in RFEM. The structure is loaded from above, into the intersection of all members. I performed a buckling analysis, and obtained the buckling modes that I'm ...
2 votes
1 answer
128 views

Ways to fix block Lanczos tridiagonalisation numerical instability for matrix with degenerate, closely spaced eigenvalues?

I want to run a block Lanczos block-tridiagonalization on a hermitian, sparse matrix (of relatively small size $\sim 10^2 \times 10^2$). However the matrix typically has many eigenvalues that are ...
1 vote
2 answers
134 views

Numerical code to solve LLG is not preserving norm

I am new to this thread. I am trying to do a simple exercise on solving the LLG equation. The equation reads: $\frac{d\vec{m}}{dt} = -\gamma(\vec{m} \times\vec{H})$. Given a normalized input state ($...
0 votes
0 answers
131 views

2D wave equation is numerically unstable using Finite Difference Method

I'm working with simulating both the heat and wave equation in 2D in a Python code. When simulating the heat equation, I learned about the CFL which I used to get a numerical stable solution. I found ...
0 votes
2 answers
244 views

Practical implementation of the discrete compatibility condtion

I've recently started looking into writing a finite-differences-based solver for the Poisson equation of the form $$\nabla\left(\varepsilon\nabla\varphi\right)=\rho$$ in 2D for arbitrary geometries (...
0 votes
0 answers
43 views

Instability due to different lumping dimensions in second-order linear system

I have a problem that consists of a linear hyperbolic differential equation with some boundary and initial conditions which leads after discretization in space using finite elements to the following ...
2 votes
0 answers
111 views

Numerical precision on tricky coupled nonlinear boundary value problem on infinite interval

I am trying to solve with high precision the following coupled system $(f,h)$ on $[0,\infty]$: $$-h''-\frac{1}{r}h'+\lambda_c h(f^2-1)+4\lambda_h h^3=0$$ $$-f''-\frac{1}{r}f'+\frac{1}{r^2}f+ f(-\...
1 vote
1 answer
198 views

Boundary value problem solver fails on trivial case

I am trying to solve a boundary value problem on $[0, \infty]$, using scipy's scipy.integrate.solve_bvp and I am seeing that the solutions are not converging even ...
2 votes
3 answers
170 views

Should reaction be taken into account in the CFL condition when solving advection-diffusion-reaction equations numerically?

I'm dealing with the numerical resolution of advection-diffusion-reaction equations. I've encountered references on CFL conditions for conservation laws as well as advection-diffusion equations. I'm ...
1 vote
0 answers
34 views

How to classify ODE equilibria that are stable but slowly changing in value with time?

I'm numerically solving a system of coupled ODEs where time is the independent variable. At each time, I can solve for the equilibrium values of my state variables where their respective derivatives ...
1 vote
1 answer
70 views

stability of a numercial scheme for a hyperbolic system?

This is related to my question here https://math.stackexchange.com/questions/4447383/lax-wendroff-scheme-stability-analysis-for-a-linear-system-of-conservation-laws . Consider the numerical scheme ...
4 votes
0 answers
85 views

Numerical algorithms made stable by unums which are unstable on IEEE floats

For unums, there is good evidence (see figure 5) that accuracy is better than IEEE floats. (Note: I use the term "unum" broadly to refer to any of the various iterations and revisions to the ...
0 votes
0 answers
96 views

How to estimate stability and stiffness of a system of coupled ODEs?

I'm running into issues with Python/Julia ODE solvers requiring prohibitively small timesteps to evolve a system of 4 coupled ODEs (the order of magnitude of the state variables and time unit span ~40-...
2 votes
0 answers
229 views

Numerical instability in the inverse Laplace transform

I have a problem with Laplace inversion and my function is not numerically stable for the Laplace inverse, but I do not understand the cause of this problem. Here is my code and graph of this problem. ...
1 vote
0 answers
48 views

Generate numerically stable equation automatically

I remember there is a software (and its website interface) that can generate numerically stable equation from an expression automatically. To see the problem it tries to solve, let’s take a look at a ...
2 votes
1 answer
963 views

More Smearing with decreasing timestep in advection problems

I find it kind of counter intuitive, that the result of an advection gets more smeared out at the borders when decreasing the timestep (which should make it more accurate). Let there be a equally ...
5 votes
2 answers
2k views

Solution oscillations with a small timestep in backward Euler

I am using backward Euler in a FEM scheme for a convection-diffusion problem. On a given mesh, I can take arbitrarily large time steps, as expected. But if I decrease time step, at some point it will ...
2 votes
5 answers
4k views

Why are upwind schemes stable in convection flow calculation?

It is well known that upwind schemes are stable when calculating convection flows with $|\text{Pe}|>2$, $\text{Pe}$ is the Peclet number. Why is that, and why is central difference unstable? Is ...
2 votes
0 answers
59 views

robust numerical calculation with large (almost) offsetting terms

I am attempting to evaluate an expression that defines a probability of a particular event. With 3 different events, I can (under some statistical assumptions) characterize the probability of event 1 (...
2 votes
0 answers
130 views

About the the stability of using an explicit scheme on the heat equation

Before I get to the heat equation I'd like to talk about the advection equation. Descritize that with FD in time and BD in space: \begin{equation} \dfrac{u^{n+1}_i - u^{n}_i}{\Delta t} + v \dfrac{u^{n}...
3 votes
1 answer
403 views

How to interpret if $\displaystyle \sum_{j = 0}^{n} \frac {1}{j!}$ is a stable algorithm for computing $e$?

I am trying to solve problem $15.1$ from Numerical Linear Algebra by Trefethen and Bau, which reads Determine whether the algorithm is backward stable, stable but not backward stable, or unstable. ...
2 votes
1 answer
851 views

Why is subtraction a stable operation?

In Numerical Linear Algebra by Trefethen & Bau, it is claimed that subtraction is backward stable. Here is the proof: Let $f(x, y) = x-y$ and let $\tilde f(x,y)$ be the answer you get when doing $...
2 votes
0 answers
137 views

Floquet theory for periodic delay differential equations: current numerical routines

I would like to determine the stability of a system of periodic delay differential equations (a seasonal host-parasite model). I've tried to implement the method described in Lemma 2.5 in this paper: ...
4 votes
1 answer
535 views

Computing second derivatives with Neumann boundary condition

I am implementing a finite difference method for a PDE with a Neumann boundary condition. I will simplify my question to a single dimension. Suppose I have a PDE $$\frac{\partial u}{\partial t} = \...
3 votes
1 answer
423 views

How to include negative number in the log-sum-exp?

I want to know summation of some small numbers, such as {e^-1000, -e^1001, e^1002...} If all numbers are positive, I can use log-sum-exp algorithm. But unfortunately, negative numbers are also ...
2 votes
0 answers
482 views

2d advection-diffusion: cell Péclet number and numerical stability

I am studying the numerical resolution of 2d advection-diffusion problems with finite element methods. $$\frac{\partial u}{\partial t} + \beta\cdot\nabla u = \nabla\cdot(\nabla u) \, .$$ It is said in ...
2 votes
1 answer
222 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 ...
4 votes
1 answer
146 views

Stability analysis simplification for PDE

I have the nonlinear PDE $$\frac{\partial U(z,t)}{\partial t} + A(U)\frac{\partial U(z,t)}{\partial z} + B(U)U(z,t) + C(z,t) = 0,$$ where $A(U)$ and $B(U)$ are guaranteed to be real and positive. I ...

1
2 3 4 5