Questions tagged [numerics]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
0answers
140 views

About the condition $\ker(B_h) \subset \ker(B)$ in mixed finite elements formulation

I'm studying mixed finite elements. The problem is a classical saddle-point one: we seek for $(u,p)$ in $V \times Q$: $$A u + B^t p = f$$ $$Bu = g$$ where $A: V \rightarrow V', B:V \rightarrow Q'$ ...
1
vote
1answer
85 views

Classical global estimate for $H^1$ error

I'm having lots of troubles in understanding the proof the estimation of the classical $H^1$ error using finite elements of degree $r$. $$||u-u_h||_{H^1(\Omega)} \leq \frac{M}{\alpha} C h^r |u|_{H^{r+...
1
vote
2answers
163 views

Sum of norms over elements is not equal to norm over the whole $\Omega$

In my finite element notes, after the proof of the global estimate for the interpolation error, assuming a regular triangulation with triangles $T_m$: $$\sum_m|v - \Pi_h^r v|_{s,p,T_m} \leq \sigma^{-s}...
4
votes
1answer
135 views

Discrete divergence free functions

I'm studying the weak formulation of NS equations. During the analysis, the book I'm using (Quarteroni-Valli, page 301-302), defined $$Z_h=\{v_h \in V_h: (\operatorname{div}(v_h),q_h)=0 \quad \forall ...
7
votes
0answers
138 views

Is there a graphical interpretation or explanation of automatic differentiation compared to numerical differentiation

I have been looking at automatic differentiation for solving differential equations lately. I understand the basic ideas of using Dual numbers and such for finding derivatives, etc. However, I feel ...
4
votes
2answers
157 views

What is the difference between $u_h$ and $I_h(u)$ in finite element literature?

In finite element books, we have estimates for $$||u-u_h||$$ and also estimates for $$||u - I_h(u)||$$ where $I_h(u): V \mapsto V_h$ projects a function from the infinite dimensional space to the ...
1
vote
0answers
48 views

How to numerically solve PDE that governs the free vortex wake model?

Crossposted at Math SE I am reading a paper on the free vortex wake model for a helicopter rotor blade, which is described by the following PDE: $$\frac{\partial \vec{r}}{\partial \psi} (\psi, \zeta) ...
0
votes
0answers
48 views

How to prove the stability of the interpolation?

From the book (Vidar Thomee, Galerkin finite element methods for parabolic problems), there holds (see Lemma 13.3) \begin{align}\label{eq} \|\nabla I_h u\|_{L_{\infty}}\leq C\|\nabla u\|_{L_{\infty}},\...
0
votes
1answer
62 views

How do you find the Jacobian matrix of a coordinate transformation given only dynamical data points?

Suppose you have a record of coordinates X(t) for every s units of time from 0 to time T. Suppose in addition you have more data Q(T) that is supposed to be output from some complex numerical ...
2
votes
1answer
100 views

How to couple the vibro-acoustic equations by Mortar method for non-matching meshes?

Assume we have two domains $\Omega_a$ a acoustic domain with boundary $\Gamma_a$ and $\Omega_s$ a domain of a solid body with boundary $\Gamma_s$. $\Omega_a$ and $\Omega_s$ have the common interface $\...
0
votes
0answers
57 views

Ritz projection error estimate for bilinear Lagrange element?

For second order elliptic problem \begin{align} -\Delta u=f,\quad in ~~\Omega\\ u=0,\quad on~~ \partial\Omega, \end{align} we have for the Ritz projection for $P_1$ conforming element \begin{align} \|...
5
votes
0answers
349 views

Fast integration scheme for path integral of Gaussian over a cubic curve

I need to numerically compute an integral of the following form: $$\int_0^1 \frac{1}{2\pi\sigma^2}\exp\left(-\frac{\|(q_0t^3 + q_1t^2 + q_2t + q_3) - a\|^2}{2\sigma^2}\right)\|3q_0t^2 + 2q_1t + q_2\|\,...
2
votes
0answers
40 views

Does the time-dependent 1D advection-diffusion with point sources have an analytical solution?

I am looking for the analytical solution of 1-dimensional advection-diffusion equation with several point sources, Q, along the axial length of a cylinder through which the fluid flow occurs. Neumann ...
0
votes
1answer
33 views

Numerical algorithm to calculate stream of discounted cash flows

Is it possible to calculate the flow of cash in each period given a certain fixed net present value with a numerical algorithm? I would like to be able to apply a certain weighting that can be applied ...
5
votes
4answers
892 views

How important is learning hardware/architecture for scientific computing?

Apologies if this is a bit of a soft, unclear, or opinion-based question. I'm a relatively new PhD student in a (computational) quantum chemistry group. My group develops and maintains a few software ...
2
votes
2answers
257 views

How to implement point source or volume source in finite element implementations

I'm trying to do a simple implementation to study the advection-diffusion-reaction dynamics in a straight pipe. I have points positioned along the length of the pipe (blue dots in the image above). I ...
1
vote
0answers
57 views

For a hyperbolic PDE, is there any proof that the BDF2 method is stable for integrating them?

I would like to ask a question on the stability of BDF2 applied to hyperbolic PDEs. Say I have a hyperbolic equation as $\frac{\partial c}{\partial t} + {\bf U} \cdot {\bf \nabla}c=0$. This system is ...
0
votes
0answers
34 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(...
4
votes
0answers
78 views

Unstable Algorithms which become stable when hardware provides Kulisch exact dot product instruction

In John Gustaffson's book The End of Error, he discusses Ulrich Kulisch's exact dot product, which (in double precision) requires a 2100 bit fixed point register which rounds only once after the ...
0
votes
1answer
46 views

How can the Lipschitz continuity be shown with power iteration method?

I know that the definition of the Lipschitz continuity is defines as $$||f(y) - f(x)|| \leq L ||y-x||$$ My professor told me that by knowing $f$ we can find constant $L$ using the power iteration ...
3
votes
1answer
71 views

Why do we have to resort to Higher order schemes for solving the 1-D advection equation/ continuity equation?

\begin{equation} \begin{aligned} \frac{\partial N}{\partial t} &+ \frac{\partial J}{\partial r} = 0, \\ \frac{\partial N}{\partial t} &+ \frac{\partial }{\partial r}(N \upsilon ...
-1
votes
1answer
59 views

Howo to implement complex step derivative for complex functions?

I have a complex analytic function of which I want to take the numerical derivative. \begin{align} f(z) &\equiv f(x,y) = u(x,y) + i v(x,y) \\ \frac{d f(z)}{d z} & = \lim_{h \to 0} \frac{f(z + ...
2
votes
1answer
139 views

Solving numerically the 1D Kuramoto-Sivashinsky Equation using spectral methods

Lately, I've been trying to solve numerically the 1D Kuramoto-Sivashinsky Equation using spectral methods. Let $\nu$ be the viscosity and $[0,L]$ the domain. The 1D equation is, $$ u_t + uu_x + u_{xx} ...
3
votes
2answers
205 views

How to solve second order coupled non linear differential equations

For a project I am doing, I have to solve the following system of differential equations numerically using my own code: $$ x^2K'' = KH^2 + K(K^2-1) $$ and, $$ x^2H'' = 2K^2H + \alpha H(H^2-x^2) $$ ...
2
votes
4answers
148 views

Eigenvalue decomposition for a very huge matrix of medical images (such as the pixel physical coordinates of CT images)

I am trying to do eigenvalue decomposition for a huge matrix larger than 788000×788000 for medical image analysis. The matrix is not sparse and every element in the matrix has a real value. And, for ...
1
vote
1answer
85 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)$ ...
0
votes
0answers
38 views

How to efficiently perform this 2D integral in Quadpy?

I need to integrate a function defined in 2Dims (z and radius r), for which I don't have an expression. I can just query the ...
1
vote
1answer
107 views

Accuracy gap for apparently stable solution

I was reasoning about the behaviour of the methods I'm using for my simulation and I noticed that, considering $h_s$ as the timestep over which I have unstable solutions and $h_a$ as the timestep ...
0
votes
0answers
39 views

Blown-up iterates in Gauss-Newton method

I am working on a non-linear least squares problem with standard form, in which I need to calibrate a parameter vector $\Theta$ to a set of inputs $\mathbf{x}$ and outputs $\mathbf{y}$: $$\begin{align}...
2
votes
3answers
158 views

Linear solver recommendation(s) for small problems

I am interested in solving many linear systems $Ax = b$, where $A$ is symmetric positive definite and small (i.e. less than 25,000 rows) --- $b$ will be changing. We can assume that $A$ arises from ...
0
votes
1answer
120 views

Error using scipy.integrate.solve_ivp: index error: the index 0 is out of bounds for axis 0 with size 0

I am recently working on the code based on the stick-slip phenomenon in Python. It's the stick-slip oscillator (chapter 3.4) in https://www.sciencedirect.com/science/article/pii/S0888327020301205. And ...
1
vote
0answers
38 views

discretization of advection diffusion with variable coefficients

I am looking for help to find a somewhat stable FD numerical scheme for the advection diffusion equation posed on a curve $(x(r),y(r))$. The equation becomes $$u_t=\alpha(r) u_r +\beta(r) u_{rr}+f(r,t)...
2
votes
0answers
69 views

Errors in Integral Estimate of Gaussian using Trapezoidal Rule

I'm trying to estimate the percentage error in computing the integral of a Gaussian via composite trapezoidal rule versus via an exact formula. To do this I've generated a gaussian with mean 0, ...
0
votes
1answer
54 views

finding boundary conditions when transforming a higher order ode to system of first order ode

given the following ODE: $$\frac{d^{4}w}{dx^{4}} + B\frac{d^{2}w}{dx^{2}} = 1$$ with boundary conditions $w(0) =0 , w(1) = 0,w'(0) = 0,w'(1) = 0$ its possible to solve analytically but I am attempting ...
0
votes
1answer
68 views

High Running Time and Suboptimal Accuracy of 2D Wave Equation Solver with Finite Differences

Im trying to solve the following 2D wave equation: $$u_{tt} = u_{xx} + u_{yy}, \hspace{3mm} u(x,y,0) = \cos(4 \pi x) \sin(4 \pi y), \hspace{3mm} u_t(x,y,0) = 0$$ with the periodic boundary condition ...
2
votes
1answer
58 views

Initial condition precision

Is there a way to have an estimate of the error propagated on an ode numerical solution by the error of the initial conditions? I suppose this depend on the numerical method used and on the problem ...
0
votes
1answer
64 views

2 point BVP solver: how to compute errors

Background I am working with chapter 2 in LeVeque's book: https://faculty.washington.edu/rjl/fdmbook/ I have build my own solver in Python to solve the 2 point BVP: $$ \epsilon u''+u(u'-1) =0 , \\ u(0)...
1
vote
0answers
42 views

Solving two field Schrodinger-Poisson system numerically

I want to solve the system of Schrodinger-Poisson equations numerically: \begin{align} \chi_1''(r) + \frac{2}{r}\chi_1'(r)&=2U(r)\chi_1(r) \\ \chi_2''(r) + \frac{2}{r}\chi_2'(r)&=2\...
0
votes
1answer
109 views

Trouble Implementing 1d Wave Equation Finite Difference Solver

Im trying to solve the 1d Wave Equation on $x \in \mathbb{R}, t > 0$: $$u_{tt} = c^2u_{xx}, \hspace{5mm} u(x,0) = \cos(4 \pi x), \hspace{5mm} u_t(x,0) = 0$$ with $c = 1$ and a periodic boundary ...
2
votes
1answer
221 views

Solving Cahn-Hilliard equation using semi-implicit Fourier spectral methods

So, I have written both a C and python code to solve the 2D Cahn-Hilliard equation: \begin{equation} \frac{\partial c}{\partial t} = \nabla^2\left(c^3 - c - \kappa\nabla^2c\right) \end{equation} ...
-2
votes
1answer
73 views

Forward Euler Adaptive Step Size Stability

Given with a generalization using adaptive times-stepping as then is it still reasonable to assume that to ensure stability of the Euler’s forward method we need the growth factor for all n to be ...
1
vote
0answers
35 views

Energy cannot decent during optimization despite non-zero gradient

Assume we have an (at least) 2nd-order differentiable energy $f(x), x\in R^n.$ And $n$ is very big. Mathematically, I think it is impossible to find a point $\bar{x}$ where the energy cannot be ...
-1
votes
1answer
71 views

illegal use of ODEINT

given the following system: $$\frac{dP}{dt} = \alpha P(1-\frac{P}{K}) - \beta P I$$ $$\frac{dI}{dt} = \beta P I - \rho I$$ how do I solve the system numerically. as when I attempt to solve this is the ...
3
votes
0answers
50 views

Difference between wave vector and density matrix in numerical calculation of Schrödinger equation

I solved Schrödinger equation for a following tow-level time-dependent Hamiltonian numerically in two ways: ...
1
vote
1answer
202 views

Drawing saddle node bifurcation diagram for a non-linear ODE in Python

I'm trying to draw the bifurcation diagram of the following ODE, This ODE leads to a saddle-node bifurcation (see wiki) However what I get is not exactly right. There's a lot of "noise" as ...
0
votes
0answers
183 views

Numerov method for solving Schrödinger equation

I have just begun learning computer science to apply it to Physics and I am trying to write a code for solving Schrödinger's equation of the harmonic oscillator (setting $V=\frac{x^2}{2}$) in one ...
0
votes
1answer
149 views

Perturbation problem using Runge-Kutta 4

I'm trying to evaluate the perturbations magnitude between 2 body orbiting a central one in three dimensions. In order to do this I need to have an estimate of the error, which I did using Richardson ...
2
votes
1answer
250 views

Reference request: C++ and numerical analysis book

I'm a master student with a good Numerical analysis background. I'm going to do a master thesis in the same subject, but I need to use C++ since my advisor loves it, and I also believe it's the best ...
1
vote
1answer
84 views

Calculate the arc length of a Steinmetz curve numerically

I'd like to know the length made by the intersection curve of two orthogonal cylinders of different radii a and b where a > b >0. I came across this post that provides a solution with an ...
-2
votes
1answer
42 views

Solving differential equation by setting vectorization `on` in MATLAB

This is a follow up to my previous question posted here. I've set up an ode system in MATLAB and I'm trying to vectorize the code to increase the speed of computation. The follow is the code for my ...

1
2 3 4 5
18