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.

-1
votes
0answers
16 views

Using Modules; creating files and importing ? Please see attached links [on hold]

I am a super n00b beginner, I have been teaching myself python concepts for the last couple of months using juptyer notebook, and lessons in CFD & similar subjects that I am conceptually familiar ...
0
votes
1answer
38 views

Numerical solution of non-linear first order partial differential equation (HJB)

I am trying to solve a simple optimal control problem using the Hamilton-Jacobi-Bellman equation, numerically in Python. This is proving to be rather difficult as I end up having to solve the ...
0
votes
0answers
39 views

Classifying a nonlinear numerical instability

I am using a piece of code to study magnetohydrodynamics and I have encountered a problem. The code is solving the ideal MHD equations, i.e. the Euler equations with the Lorentz force and Faraday's ...
4
votes
0answers
60 views

Comparing sum of floating points

I am currently working on a numerical algorithm involving a lot of floating point arithmetic, involving some badly conditioned problem sets. I am using the relation $|x - y| / (\max(|x|, |y|, 1)) \...
0
votes
0answers
22 views

Generalization of a matrix known for some values [on hold]

Preliminaries: and  I wrote Maple code for above. Download the Maple code for Above:   Now, we can calculate the Matrix    as follows  for $k=2, M=3$, Question:  How can we write (Maple or ...
0
votes
1answer
65 views

Operation count for GMRES

One can use GMRES as it is, but there is also a version of GMRES called k-step restarted GMRES, which is used for large matrices, where $k$ is some fixed number of steps after which we take a new $x_0$...
0
votes
0answers
28 views

Point-based multigrid method

Most algebraic multigrid methods are scalar or variable based. This means that the initial grid size is identical to the number of unknowns of the problem. It has been stated, that this approach is ...
-1
votes
0answers
26 views

Non linear system using Gauss Newton

I'm trying to solve this question whose growth function is given as: Pk = (r^k) * P0 Where pk = [0.19 0.36 0.69 1.3 2.5 4.7 8.5 14] k = [1 2 3 4 5 6 7 8] The unknowns I'm trying to solve for is r ...
5
votes
1answer
45 views

Mass matrix and BDF time integration

I have a system of nonlinear equations on the general form: \begin{align} \mathbf{M}(\bar{y})\dot{\bar{y}} =\bar{f}(\bar{y},t) \end{align} Where $\mathbf{M}(\bar{y})$ is a matrix and $\bar{f}$ is a ...
3
votes
2answers
120 views

Asymptotic error of forward Euler

I'm trying to understand the asymptotic error behaviour of forward Euler (finite difference method), as timesteps are decreased (refined), so I feel trust in the method of manufactured solutions (MMS)....
3
votes
0answers
75 views

Why the MIRACLE of Lanczos/CG-like?

Lanczos/Arnoldi/Rietz/CG-like algorithm share the same core strategy... In each, a little miracle appears, most of the Gram-Schmidt inner products are zeroes! In others words, new direction need only ...
3
votes
1answer
151 views

Computational complexity of Newton's method

the classical Newton's method for non-linear systems of equations is $x_{k+1} =x_k-J_F(x_n)^{-1} F(x_n)$. In pratice, rather than compute the inverse of the Jacobian matrix, one solves the systems $...
0
votes
0answers
22 views

Model transformation of a point cloud based on a differential rule

Suppose I have an arbitrary 3-D point cloud. It can be for instance a regular rectangular mesh, with a fixed average distance between points. Now there is a certain rule to how this point cloud has ...
1
vote
0answers
34 views

Numerically solving a system of parabolic PDEs and 1st order ODEs

I'm trying to solve the following system of differential equations numerically. What are the available finite difference approaches and matlab solvers to solve such a system? Other approaches to solve ...
6
votes
1answer
106 views

How do I integrate a function defined over an arbitrary area?

Let's say, I have a compact area $S$ (for example a circle, a square or some arbitrary polygon) and a function $f: S \rightarrow \mathbb{R}$. I want to numerically calculate the Integral $$ \int_S f(\...
-1
votes
0answers
42 views

Implementing Danckwert’s boundary condition for the PDE

This is a follow-up to my previous question posted here. I was suggested to use the pdepe function in MATLAB to solve the PDE, $ \frac{\partial C}{\partial t} = -v\...
-1
votes
0answers
21 views

Finite difference Problem Boundary Value Problem in Matlab

I am trying to solve boundary value problem using matlab.I have implemented algorithm from Numerical Analysis-Richard L. Burden book. But it is very difficult. Is there any way to generate the ...
-1
votes
0answers
50 views

Question regarding implementation of boundary condition

I have the following code, which solves for the change in concentration of a species along the length of a channel of length L . The equation is , $ \frac{\partial C}{\partial t} = -v\frac{\partial C}...
2
votes
0answers
27 views

Numerical stability while modeling wave equation in staggered grid

I have modeled a simple wave equation given by: \begin{align} & \begin{cases} u_t = v_x \\ v_t = u_x \end{cases} \end{align} Boundary conditions given on interval $M=[-1,1]$ by: \begin{align} u(...
5
votes
1answer
93 views

Numerical solution of two coupled nonlinear eigenvalue problems

I would like to numerically solve the following system of coupled nonlinear differential equations: $$ -\frac{\hbar^2}{2m_a} \frac{\partial^2}{\partial x^2}\psi_a + V_{ext}\psi_a + \left( g_a |...
-1
votes
1answer
65 views

Relation of Condition of a Matrix and Convergency

Can anybody explain me the relation between the condition of a Matrix and the convergency of a problem. For example how is the relation between the condition of the stiffness Matrix occuring in FEM ...
1
vote
0answers
68 views

why I cannot find explicit finite difference for elliptic equation

Let us think on the Poisson equation $\nabla^2 u(\bf{x})=\rho(x)$ with Neumann boundary conditions, with $\bf{x}=\it (x,y)$ in 2D. Here is a stencil with central differences in both $x$ and $y$ (...
1
vote
2answers
62 views

Guaranteed equality between binary results with increasing MPI processes

Testing on an MPI scientific code for compressible flow dynamics I noticed that the results may depend on the number of processors used for the calculation. In fact, comparing the binary files they ...
3
votes
1answer
71 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
63 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
81 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 ...
1
vote
1answer
82 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
53 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
72 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 = \...
2
votes
1answer
85 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
43 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 ...
0
votes
4answers
231 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 ...
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
103 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
104 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
103 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 ...
8
votes
1answer
63 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
128 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
36 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
187 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
89 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
67 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
150 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
79 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
60 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
120 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
73 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
192 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 ...