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.

10
votes
3answers
2k views

Scientific computing vs numerical analysis

I'm a double major in computer science and mathematics. I love both subjects. I'm thinking in taking a graduate career, perhaps in scientific computing. What's the real difference between scientific ...
4
votes
0answers
88 views

Closed form PDF/CDF using Orthogonal Polynomial Expansion (gPC)

Consider a random variable which is given by an orthogonal polynomial expansion in one parameter (or polynomial chaos expansion PCE), i.e. , $$ f(\alpha) = \sum\limits_{n=0}^{\infty} \hat{f} (n) \psi ...
1
vote
0answers
43 views

Shallow water equations with moving body

I was wondering if there are any shallow water equation solvers out there that can include rigid body motion for the surface the water flows on?
3
votes
3answers
185 views

Numerically solving $\nabla u(x,y) = f(x,y,u)$ on a rectangular domain having initial value of $u$ at some point

Problem description: I want to numerically solve system of two time-independent partial differential equations (pde) of the following simple form $$\frac{\partial u(x,y)}{\partial x} = f_1(x,y,u),$$ ...
0
votes
1answer
79 views

How to recognize boundary nodes and sides from the given element node connectivity data

I'm writing a code in C++ to parse abaqus/calculix input file for 2D plane stress problems. I'm not a user of abaqus/calculix but I noticed that the input file doesn't ask complete boundary details. ...
1
vote
1answer
211 views

How can I numericaly solve a convection-diffusion equation with a large diffusion term?

I want to numerically solve the advection-diffusion equation: \begin{equation} u_t(x,t) + cu_x(x,t) = v u_{xx}(x,t) \end{equation} for $x \in [0,1]$ and $t \geq 0$ subject to the boundary conditions ...
1
vote
0answers
88 views

Order of local and global truncation error in a finite volume scheme

Can the order of the local truncation error be higher than the order of global truncation error in a finite volume method?
1
vote
0answers
98 views

Numerically compute PDF given a function

Consider $[0,1]$ with the Lebesgue measure $m$ and $f:[0,1]\to \mathbb{R}$, and $x$ a uniformly distributed random variable in $[0,1]$. Then, $f(x)$ itself define a new random variable. We can then ...
1
vote
0answers
45 views

A stable method for solving monontoe HJB equation

I am considering solving HJB equation of the form $$ v_t=g(a(x)v_x),\quad x\in \mathbb{R}, t>0, $$ with initial condition $v(0)=v_0$. Here $g:\mathbb{R}\to \mathbb{R}$ is Lipschitz and monotone ...
4
votes
1answer
123 views

Stable method for solving a HJB equation

I am considering finite difference methods and their error analysis for solving HJB equation of the following form: $$ v_t=|\sigma(x)v_x|,\quad x\in \mathbb{R}, $$ where $\sigma$ is a given function ...
3
votes
0answers
114 views

How one could choose the value of viscous coefficient for obtaining stable solution of Burgers' equation?

Burgers' equation is a fundamental PDE used in various fields such as number theory, gas dynamics, heat conduction, elasticity, etc. It is crucial especially for developing numerical models for ...
3
votes
1answer
411 views

Chebyshev approximation by projection vs interpolation

Suppose we want to approximate a function $f: [a, b] \rightarrow \Re$ with a Chebyshev series: $$ f(x) \approx \sum_{k=0}^n c_k \, T_k\left( \frac{2x-b-a}{b-a} \right) $$ where $T_k(x) = \cos(k\, \...
11
votes
1answer
228 views

Solving a difficult system of equations numerically

I have a system of $n$ non-linear equations that I want to solve numerically: $$\mathbf{f}(\mathbf{x})=\mathbf{a}$$ $$\mathbf{f}=(f_1,\dots,f_n)\quad\mathbf{x}=(x_1,\dots,x_n)$$ This system has a ...
7
votes
1answer
211 views

Numerically stable computation of the Characteristic Polynomial of a matrix for Cayley-Hamilton Theorem

I was wondering if there is any known way to compute the Charactaristic Polynomial P of a matrix A numerically stable in the sense of realizing the Cayley-Hamilton Theorem, i.e. that P(A)=0. I've ...
0
votes
1answer
82 views

Numerical integration of given points, simple/easy way

I have the x and the f(x) for a set of x. I don't know the function, actually. This is ...
1
vote
1answer
159 views

Line integral along the edge of an isoparametrically mapped quadrilateral

I need to integrate a function along the edge of a quadrilateral (boundary integral). For example, the function is $f(x,y)=x^3+y^3$, the quadrilateral coordinates are $(0,0),(2,-1),(3,2),(1,3)$ and ...
0
votes
3answers
223 views

What type of computer science/engineering knowledge someone need to have to study graduate level course in compurational physics?

I am wondering if this is the right place to ask this question. I found a related question on stack overflow https://stackoverflow.com/questions/814312/physics-in-computer-science but it was closed. ...
1
vote
0answers
38 views

Trying to find a correlation in data from 2 sensors

I've been trying to find a way to correlate data sets from two sensor types. In theory these measure the same signal. One is in a known format expressed in meters while the other is in numeric form ...
4
votes
2answers
165 views

Optimization of known function with respect to two unknown function arguments

I have a data set, composed of points $(x_i, y_i)$ for $i=1,N$. I also have a known function $F$, which maps these points $x_i$ to $y_i$ as such $F(x_i, a(x_i),b(x_i)) = y_i$, where $a(x_i)$ and $b(...
0
votes
1answer
223 views

How can an engineering student become a computational scinece expert in a short time [closed]

How can a student with zero computing or programming language knowledge, few engineering mathematics knowledge, understand computational science especially Finite Element Modelling (FEM) from ...
2
votes
0answers
360 views

Numeric integration over Dirac delta

I'm trying to solve the following integral numerically. $$H(y) = \int dx \, f(x) \, \delta(g(x,y)).$$ For this I chose a representation of the delta-function and employ convergence with respect to $\...
-4
votes
1answer
153 views

Use Finite Difference Discretization to find approximate solution to the Poisson's equation

I've just been introduced to the Poisson's equation. I've never had the need to dealt with PDE, so I'm a bit lost. Apparently we can compute an approximate solution of the Poisson's equation $$\frac{...
1
vote
1answer
158 views

Is lapack getri numerically the same as getrs with identity matrix as RHS?

I was just wondering, in case of computing B=inv(A), suppose I is the identity matrix (diagonal), After obtaining the ...
1
vote
4answers
331 views

Numerical solution to 2D divergence equation

Is there any way to numerically solve the following two-dimensional equation: \begin{equation} \nabla_{xy} \cdot \vec{f}(x,y) = a(x,y) \end{equation} on a rectangular grid, knowing that $\vec{f}(x,y)$ ...
2
votes
1answer
189 views

Solving a second-order nonlinear ODE with a singularity on x=0

I'm doing some reasearch on electromagnetic nanostructures and I have to solve this differential equation (the exact values of the constants don't matter, I just want all the possible solutions of y(x)...
2
votes
1answer
142 views

What is the error associated with Fornberg's algorithm?

Bengt Fornberg derived a general way to compute the weights for arbitrary finite difference schemes in two papers: his 1988 paper and (better) his 1998 paper. What are the numerical errors ...
0
votes
2answers
65 views

Accuracy between ill-conditioned matrix-free vs. matrix-based operators

As far as I know, precision errors become larger as the condition number of a matrix increases. Consider a matrix-based operator: $$A = \nabla \bullet k \nabla $$ And a matrix-free operator: $$\...
1
vote
2answers
77 views

Best numerical scheme for this problem

I have a set of data, $x, y$ and $ z$, each with length n: $x \rightarrow \{x_{1}...x_{n}\}$ $y \rightarrow \{y_{1}...y_{n}\}$ $z \rightarrow \{z_{1}...z_{n}\}$ $y$ and $z$ are parameterised by $x$...
1
vote
0answers
146 views

Limit to precision of step-size

When solving an equation of the following form: $$ \begin{aligned} \frac {\partial A}{\partial t} &= EB - A \\ \frac {\partial B}{\partial t} &= EA - B \\ \frac {\partial E}{\partial t} &...
2
votes
0answers
140 views

Does applying the Newton-Raphson iteration for matrix reciprocal refine a matrix inverse from LU/GE?

This is a follow-up to this answer. Suppose you have a possibly very ill-conditioned matrix $A$, and you compute its inverse with LU/GE to get $X_{\text{lu}}\approx A^{-1}$. The Newton-Raphson ...
1
vote
1answer
83 views

Classification of method for solving PDEs

If I have a system of equations as follows (where $i = \sqrt{-1}$): $$ \frac {\partial A}{\partial t} = iA^*B - A \tag{1} \\ $$ $$ \frac {\partial B}{\partial z} = AB^* - B \tag{2} $$ Using the ...
-1
votes
2answers
77 views

how to estimate convergence orders? what about this formula?

I have solved a PDE with an analytical equation. Through operator splitting I divided the PDE into one PDE and one ODE, using a sequential approach. Finally for different $dt$, I got euclidian norm ...
2
votes
0answers
273 views

Numerical solution of Dirac equation (eigenvalue problem)

Suppose we have equation of the form: $$H \Psi = E \Psi $$ where $H$ is Dirac Hamiltonian (also my question can be answered by people who are not familiar with Dirac Hamiltonian but familiar with ...
4
votes
1answer
133 views

CG question: is symmetry always necessary?

Consider the 1D Poisson equation $$\nabla^2 u = f.$$ Using finite difference method on cell corner data and a uniform grid with ghost points, I think we can write the system of equations with Neumann ...
1
vote
0answers
124 views

Using backward difference approximations for higher order derivatives

I am trying to solve a system of equations and have a question regarding the validity of my approach when implementing a fifth-order Cash-Karp Runge-Kutta (CKRK) embedded method with the method of ...
3
votes
1answer
120 views

Will the numerical solving of the differential equation be wrong if I take the step too small? [closed]

If I take the step too large I will get error, while if I take the step too small I also get an error. In my case, instead of seeing the function decreasing, i have it increasing if I take the step ...
1
vote
1answer
56 views

nodal lines of wave-function $\psi(x,y) = \sin 12x \sin y + (1 + \epsilon) \sin x \sin 12y$

I am trying to reproduce this figure of nodal lines of a wavefunction from this work of Berry $$\psi = \sin 2r\,x \sin y + (1 + \epsilon) \sin x \sin 2r\,y$$ Here the image. The first is $\epsilon = ...
3
votes
1answer
87 views

Numerical evaluation of gaussian-like integral expressible as a recurrence relation

I'm looking to numerically evaluate $\log f_p(z)$ and its derivative $f^\prime_p(z)/f_p(z)$ accurately and efficiently in floating-point, where $$ f_p(z)=\int_0^\infty r^{p-1} \exp\left(-\tfrac{1}{2} ...
3
votes
2answers
95 views

Learning computational science through guided discovery

I am currently trying to get through Pattern Classification by Duda et al (for a course). However, the book seems too dense for me. Pattern recognition seems like a topic that could be better learned ...
3
votes
2answers
352 views

PageRank using Inverse Iteration Method by Cleve Moler

I was trying to understand how to use the inverse interation method to compute the page rank as an exercise. In this chapter (page 4) about page rank (by Cleve Moler), the author suggests to use the ...
2
votes
1answer
193 views

An interesting numerical pde problem

I'm somewhat struggling with how they are getting this scheme. This is a problem from Morton & Mayers book on numerical pde solutions. I think they are using a forward difference approximation for ...
4
votes
1answer
454 views

Thomas algorithm for 3D finite difference

For 1D finite difference, the resulting linear system is tri-diagonal and can be solved in O(n) using the Thomas algorithm. I am trying to solve a finite ...
7
votes
2answers
3k views

Which Runge-Kutta method is more accurate: Dormand-Prince or Cash-Karp?

I simply want to know whether the Dormand-Prince Numerical Method or the Cash-Karp Numerical Method is more accurate.
1
vote
2answers
1k views

What makes a computer fast and powerful to run numerical simulations?

I need to compare two computers and decide which one I want. My goal is to run faster simulations. The current run time is 3.5 hours and I would like to reduce that as much as possible. The code I am ...
3
votes
1answer
189 views

How to define a non-square Legendre pseudospectral differentiation matrix?

I am going to discuss my reasons for wanting this first, as this may in fact not be what I am looking for. My reason for asking this that I have finished writing a piece of code that solves, $-\nabla ...
3
votes
2answers
464 views

Discrete conservation and Finite Element methods

What would be the rigorous mathematical expression of the fact that a conservation law discretized with a Finite Element method with Galerkin discretization does not result in a conservative scheme ?
4
votes
1answer
117 views

In constructing matrices to model physical phenomena, are real matrices superior to complex matrices, in terms of computational cost?

Just studying some toy examples of $2\times 2$ and $3 \times 3$ matrices, complex number multiplication already gets a bit messy. From a numerical analysis point of view, if one were to try and build ...
1
vote
1answer
56 views

Transforming a 1D cartesian variable-coefficient diffusion code into a 1D adially symmetric one

So I have a code that I use which solves a 1D variable coefficient diffusion problem in cartesian coordinates: $\frac{\partial u}{\partial t}=\frac{\partial}{\partial x}\left(D(x)\frac{\partial u}{\...