Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [numerics]

The tag has no usage guidance.

3
votes
1answer
67 views

Derivatives of Approximate Matrix inverses

I am cross posting this question to the mathermatics stack exchange. please find it either at this link, https://math.stackexchange.com/q/2952989/430980, or below: I have a question concerning the ...
2
votes
0answers
56 views

Efects from the boundary in advection equation [duplicate]

I am implementing the advection equation $u_x+(1/c)u_t=0$ following a Crank-Nicholson finite difference scheme. The equation for this is \begin{eqnarray*} -\frac{\gamma}{4} w_{n-3 j+1} + w_{n-2 j+1} ...
1
vote
0answers
72 views

How to solve an implicit ODE with forward Euler?

Consider the implicit ODE $$ M(y)\dot{y} = F(t,y) $$ If $M$ is non-singular for all $y$ How to use the forward-Euler method to numerically solve for $y$ without inverting $M(y)$? I only came out ...
0
votes
0answers
29 views

What is the difference between Abaqus and Calculix contact input?

I would like to say first that am new at using Calculix. I'm using Abaqus/CAE to create a cup deep drawing simulation and everything worked perfectly but my objective is to run the same exact ...
2
votes
1answer
52 views

PML boundary conditions

I set up two one-way wave equations for constant velocity $c$ in one-dimension. When I implement them I get a highly unstable (divergent) solution. I wonder if someone could give me a suggestion about ...
2
votes
0answers
68 views

How to numerically optimize affine transformations?

I need to optimize affine transformations for of a set of triangles using energy function based on the connectivity. The energy of an edge $e_j$ between triangles $T_a, T_b$ is given by $$ E_j = \...
1
vote
1answer
82 views

Euler Method Instability. Why?

I am currently enjoying writing computational codes as a hobby. Right now I've worked out an Euler method and results are pretty good with up to $x=1$. Over $x=1$, instability starts to kick in. May I ...
-2
votes
1answer
40 views

Calculate accuracy order/rate

I was doing error analysis of numerical scheme and I get $L_1$ error for each grid size with $N$ element. I was searching reference to compute accuracy order/rate from that error data but doesn't find ...
-2
votes
0answers
61 views

Stiffness Matrix Computation for 6-nodes Iso-parametric Triangle

Hi Guys so basically i'm dealing with a neutron diffusion equation. I am concerned with the fission term: I am concern with the integral of following term: and i am using 6-nodes iso-parametric ...
0
votes
4answers
221 views

Which Linux OS for computer science and numerical analysis

I am switching from OSX to Linux, which I am familiar with but have no greater experience. There are several different alternatives: archlinux, gnome, ubuntu etc. Which would you recommend for a PhD ...
0
votes
0answers
19 views

Globalization strategy for semismooth Newton methods

Currently, I'm trying to implement a semismooth Newton method for a nonlinear problem of the form \begin{align*} a(y,v) + \langle F(y), v\rangle = \langle f,v\rangle \quad \forall v\in V \end{align*} ...
2
votes
0answers
30 views

Sensitivity Lagrangian solution general case

I have asked this question already on maths and mathoverflow. Just a question about a literature reference. I am writing a paper for engineers. Usually for the Lagrange multiplier problem $$ \...
1
vote
0answers
30 views

Efficient numerical optimization of an “almost separable” function

I have come across an optimization problem with the following objective function: $$f(x_0,y_0,z_0,x_1,y_1,z_1,...,x_N,y_N,z_N) = \sum_{i=0}^N f_i(x_i,y_i,z_i, \alpha(x_{i+1}-x_i) + \beta(y_{i+1}-y_i))...
9
votes
0answers
98 views

Are there shortcuts for numerically approximating systems of ordinary differential equations when autonomous?

Existing algorithms for solving ODEs handle functions $\frac{dy}{dt} = f(y, t)$, where $y \in \mathbb R^n$. But in many physical systems, the differential equation is autonomous, so $\frac{dy}{dt} = f(...
4
votes
2answers
101 views

Estimating error at mid timesteps for Runge-Kutta methods

When a timestep $h$ is rejected using a Runge-Kutta pair, such as Dormand–Prince, the algorithm resumes from the same initial point $t$ with a smaller timestep. A different idea is to resume at an ...
4
votes
0answers
102 views

Compile-time error control vs. interval arithmetic?

I use interval arithmetic for reliable computing. Now, a procedure coded in a good implementation of interval arithmetic takes perhaps about eight times as much as the same procedure carried out ...
1
vote
0answers
73 views

Evaluating 3D surface integral over an unstructured surface

I want to evaluate this integral numerically over an unstructured set of points in three-dimensional space: $$\int_{\Gamma} \mathbf{u}(\mathbf{r}) \cdot \hat{\mathbf{n}} d \gamma$$ Where $\Gamma$ is ...
6
votes
1answer
57 views

Benchmark problems for eigenvalue reordering algorithms sought

Every real matrix $A$ can be reduce to real Schur form $T = U^T A U$ using an orthogonal similiary transform $U$. Here the matrix $T$ is quasi-triangular form with 1 by 1 or 2 by 2 blocks on the main ...
1
vote
1answer
125 views

Does a generic method for solving a system of PDEs exist?

There are generic methods for solving systems of ODEs numerically. Are there generic methods for PDEs? If so, what are they? If not, why not? To elaborate... Any set of ODEs can be written in ...
1
vote
0answers
29 views

What does the Jackson Kernel measure?

A certain filter I'm writing uses two different kernels. The Fejer kernel (which is common) and the Jackson kernel: $$ \Delta_T(x) = T \,\left( \frac{\sin \pi T x}{\pi T x}\right)^2 \quad\text{and}...
3
votes
1answer
114 views

How does fmincon in MATLAB calculate gradients?

I am trying to solve numerically a constrained optimisation problem in MATLAB, and I am wondering how the fmincon function calculates gradients when one isn't ...
5
votes
0answers
63 views

Cressman interpolation and objective analysis

I have read this question and answer – Interpolation of scattered data to a regular grid in python and I am doing something similar as I have temperature values of the atmosphere at different heights ...
2
votes
1answer
64 views

How can a CG solver solve a non positive definite sparse matrix

I am using the CUSP CG solver and I ran it on couple of sparse matrices from the University of Florida sparse matrix collection. The solver was able to solve non positive definite sparse matrices. My ...
2
votes
1answer
130 views

Solve 3-D Heat equation with Neumann boundaries

I want to solve the Poisson PDE for heat flow in a 3-D solid cube with given dimensions $x$, $y$, and $z$: $$\rho C\frac{\partial T}{\partial t} = k \Delta T$$ The cube is irradiated with a constant ...
1
vote
0answers
78 views

Basic approach for numerical solution of PDE

I'm looking for some guidance on how to write a program to numerically solve a PDE. As an example for comparison in 1D: $$\frac{d^2u}{dx^2} = f\;\;\;\;u(0) = 0\;\;\;\;u(1) = 0$$ We could try 6 ...
2
votes
1answer
50 views

Oscillation term in a posteriori error estimator

Assume that in the a (residual type) posteriori error estimator of some PDE is a term of the form $h_T\|g\|_{L^2(\Omega)}$ involved where $h_T$ is the diameter of an element and $g$ is some known data ...
1
vote
1answer
58 views

Numerical solution for eigenvectors and eigenvalues of a Sturm-Liouville problem

I have to deal with the following problem in my research: $$\left[\frac{1}{D}F_{x}\right]_{x} + \frac{f D_{x}}{c D^{2}}F = 0$$ with boundary conditions $$F(0) = 0$$ $$F_{x}(L) = 0$$ where $f$ is ...
5
votes
2answers
116 views

Methods for precise solution of an ODE whose solution terminates at a singularity

I'm working on a fun open-source project to calculate the trajectories of objects near black holes. This is obviously not the first time anyone has done this sort of thing, but I have some design ...
1
vote
0answers
72 views

Comparison between FEM and FDM methods for flow simulations

What are the main differences between finite element and finite difference approach for incompressible flow simulations? I have a vague idea about how FE methods rely on minimizing the residual over ...
6
votes
1answer
190 views

Is it possible to proof a-b+b = a for all double floating-point numbers?

I want to know whether the equation : a-b+b = a is always true for a, b belongs to double precision floating-point number and |a|>=|b|. If the equation is true, how can I proof it? If not, what ...
1
vote
0answers
49 views

Equal area algorithm to find shock location

I am looking to solve 1D burgers equation with various random initial conditions. What is the best algorithm to find the exact solution? One method that is covered in literature is the equal area ...
5
votes
0answers
43 views

Discrete sine and cosine transform for mixed derivatives

Using sine and cosine transforms to solve Poisson's equation with Dirichlet boundary conditions seem quite standard nowadays (see, e.g., here or Table 2 in this paper). In the case of Poisson's ...
0
votes
0answers
83 views

Using Gram-Schmidt to obtain Spherical Harmonics

If we don't know the Spherical Harmonics offhand, we could try to observe they are stratified by degree. So that $x^a y^b z^c$ will have degree $n = a+b+c$. These do not form an orthonormal basis, ...
2
votes
1answer
62 views

Von Neumann's stability analysis on non linear and coupled equations

I'd like to know if is possible to make a Von Neumann's stability analysis on an system of coupled equations, featuring quadratics: $$\begin{aligned} \frac{\partial u_1}{\partial t}&=D_1\Delta ...
2
votes
0answers
31 views

Computing Multivariate Cumulative Normal Distribution

I am trying to compute the CDF of a Multivariate Cumulative Normal Distribution in the 1000th dimension (I have a 1000 vectors and their covariance matrix). I haven't been able to find a fast way to ...
6
votes
2answers
71 views

What good are hard-sphere event-driven molecular dynamics simulations in the face of chaos?

Simple hard-sphere dynamical systems can exhibit chaotic dynamics. Due to finite-precision arithmetic when implemented on a computer, the presence of chaos implies that for a given set of initial data,...
1
vote
0answers
102 views

How to prevent BFGS from getting stuck on astronomically large gradient?

I have implemented BFGS myself from scratch in order to solve minimization problems. Part of BFGS, as I understand it, is that the approximation to the Hessian is supposed to be positive definite, ...
1
vote
1answer
63 views

Parallel integration of dynamical systems

I need to solve the following problem: $$ \begin{cases} \dot{\vec{x(t)}} = A\vec{x(t)} + u(t)D\vec{x(t)} + u(t)\vec{b}, & x \in (0, T), \\ \vec{x(0)} = \vec{0}, \end{cases}$$ where $u(t)$ is known ...
2
votes
0answers
68 views

Numerical solution to Time-dependent Schrodinger equation with time dependent hamiltonian

Currently I am facing the problem to solve numerically the following equation for a double well harmonic potential: $iℏ\frac{\partial}{\partial t}ψ(x,t)=−\frac{ℏ}{2m}\frac{\partial ^2}{∂x^2}ψ(x,t)+V(...
1
vote
0answers
90 views

Fixing catastrophic cancellation

I have been looking through the internet and this page quite some time, so if this might be similar to a solved question, please explain the similarity to me, as I could not see it myself. I am ...
0
votes
0answers
33 views

Numerically stable way to evaluate $\log{ \sum_i{e^{p_i}} }$ given $p_i$ [duplicate]

Typically the expression $\log{ \sum_i{e^{p_i}} }$ will have the same order of magnitude as the largest $p_i$, but numerically moderately large $p_i$ will result in overflow during floating-point ...
2
votes
0answers
61 views

2D reaction-diffusion system simulation

I am a complete beginner in numerical simulation and I am pretty lost about how to tackle this problem. I have been trying for some time to find the steady state (or simulate), the following system ...
0
votes
0answers
22 views

Time iteration no longer smooth after using scaled units

I have a time iteration function looked on a 2D surface like this. Since the numbers wee very small i.e. hbar=6.6260700404e-34./(2*pi), my professor told me to use our own "scaled unites" during the ...
1
vote
0answers
42 views

Global truncation error behavior at fixed time step

I am trying to solve the following diffusion equation problem: $\frac{\partial f}{\partial t}=\frac{\partial (D\frac{\partial f}{\partial x})}{\partial x}+S$ $D=1+x^{2}+\sin(x)$ $f(x,0)=1 , f(0,t)...
1
vote
2answers
307 views

Implementing no-flux boundary condition reaction-diffusion PDE

I'm having trouble figuring out how to implement boundary conditions for this problem: \begin{align} \frac{\partial n}{\partial t} &= D_n\nabla^2n - \nabla\cdot\left(\frac{\chi}{1+\alpha c}n\nabla ...
2
votes
1answer
42 views

Test on a set of high degree polynomials whose coefficients in {-1,0,1}

I'm looking for the best way of implementing the following algorithm: consider the set of all polynomials with a high degree (say, degree 30) whose coefficients ranges from a given set of values (say, ...
1
vote
0answers
52 views

Numerical analysis: Chebyshev coefficient representation error

If $x_k$ are the Chebyshev nodes, that is for $n \in \mathbb{N}^*$, we have $x_k = \cos(\pi \frac{2k + 1}{n})$. Now suppose you have approximated values of $x_k$ and $x_{k'}$ for $k,k' \leq n$. In the ...
1
vote
3answers
71 views

Discretization Error amplification instead of stagnation to machine precision

I wrote a code on Python 2.7.5 to solve numerically the following differential equation. $\frac{\partial^2f}{\partial x^2}=-S$ $S=\pi^{2}\sin(\pi x)$ S is chosen that way in order to have $f= \sin(\...
2
votes
0answers
79 views

Why would someone use empirical sum instead of numerical integration methods?

In the context of a scientific computing application, using data coming from (powerful) embedded systems, acquiring raw data (but from calibrated acquisition electronics), I have been asked to ...
1
vote
1answer
183 views

Applying Neumann boundaries to Crank-Nicolson solution in python

Consider the heat equation $$u_t = \kappa u_{xx}$$ with boundary conditions of $$u(x,0)=0\\ u(0,t)=100\\ u(l,t)=0$$ Numerical analysis by pyton can be done with ...