Questions tagged [numerics]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
875 views

Courant Friedrichs Lewy condition - how to get it?

I am interested, how can we get CFL condition for every type of PDE? It's known that for 1st order linear equation $$\frac{\partial u}{\partial t}+a\frac{\partial u}{\partial x}=0 $$ CFL is get from ...
0
votes
0answers
129 views

Algorithms to compute largest gap between smallest nonzero eigenvalues of sparse symmetric matrix

I am looking mainly for c/c++ implementations but also for theoretical algorithms to compute gaps between smallest positive eigenvalues of symmetric, singular matrix or real numbers. To be precise, I ...
1
vote
0answers
257 views

Numerical integral with a weakly singular kernel with a satisfactory precision

I am working on a numerical method for time fractional PDE. One problem is that I must compute a numerical integral of the following form: $$ \begin{equation} \int_0^{t_m} (t_m-s)^{-\beta}f(s)ds \end{...
3
votes
2answers
687 views

C# implementation of the gamma function that produces correct answers at positive integer inputs?

I need a C# implementation of the gamma function that produces correct exact answers at positive integer inputs. I took a look at MathNet.Numerics Meta.Numerics. In both cases, if you calculate ...
2
votes
1answer
322 views

Finite difference discretization on a circle

I am trying to discretize the differential operator $\frac{d^2}{dx^2}$ acting on $S^1 = [0,1]$ using finitely many points around a circle at $0, \frac{1}{N}, \frac{2}{N}, \dots, \frac{N-1}{N}$. Here ...
4
votes
2answers
180 views

Solving system of differential equations with interconnected boundary conditions

I am trying to solve the following system of differential equations numerically over the domain $x=0$ to $x=D$. The main difficulty is that the boundary conditions are interconnected and depend on the ...
5
votes
1answer
849 views

Numerical gradient in spherical coordinates

Assume that we have a function $u$ defined in a ball in a discrete way: we know only the values of $u$ in the nodes $(i,j,k)$ of spherical grid, where $i$ is a radius coordinate, $j$ is a coordinate ...
1
vote
1answer
531 views

“boundary” vs “interface”?

I am working with biofilm and there are many documents talking about boudary conditions while others talks about interface or both of boundary and interface. So, boundary and interface are the same (...
2
votes
1answer
150 views

Extended finite element method vs $P_k$-bubble element

Can you show me the main differences between 2 methods? I find out 2 reasons but I don't know they are right or not. XFEM is constructed base on enrichment functions whereas P1-bubble is constructed ...
9
votes
3answers
2k views

Finite Element Method vs Extended Finite Element Method (FEM vs XFEM)

What are main differences between FEM and XFEM? When should we (not) use XFEM intead of FEM and vice versa? In other words, when I meet a new problem, how I can know to use which one of them?
3
votes
1answer
284 views

Methods for solving BVP for DAE

I look for a numerical method to solve boundary value problems for systems of differential and algebraic equations of the form F(x,y,y') = 0, G(x,y) = 0, y(a) = ya, y(b) = yb, where y = (y1, y2, ... ...
7
votes
2answers
165 views

For a non-linear PDEs should the source term be discretised at $u_j$ or averaged over $(u_{j+1} + u_{j-1})/2$?

The non-linear Poisson equation in one-dimension, $$ 0 = \frac{\partial^2u}{\partial x^2} - f(u) $$ can be discretised as to give, $$ u_{j-1} -2u_{j} + u_{j+1} = h^2 f(u_j) $$ where $h$ is the ...
2
votes
1answer
93 views

Implicit Finite difference scheme for a PDE with only one boundary

I am looking at a few reaction-diffusion equations of the form $\frac{dP}{dt} = D\left(\frac{d^2P}{dr^2} + \frac{2}{r}\frac{dP}{dr}\right) - a(P)$ I know the initial conditions and the boundary ...
4
votes
2answers
191 views

Is there a method to examine numerical diffusion for non-linear PDE?

I have a nasty non-linear partial differential equation. I wonder if there exists a method that would allow me to examine what numerical errors (like numerical diffusion or dispersion) are introduced ...
3
votes
2answers
1k views

How to plot orbit of binary star and calculate its orbital elements?

I have a set of dates, position angles ($\theta$) and angular separations ($\rho$) for visual binary star. For example: ...
12
votes
2answers
200 views

numerical integration in many variables

Let $\vec{x} = (x_1, x_2, \dots, x_n) \in [0,1]^n$ and $f(\vec{x}): [0,1]^n \to \mathbb{C}$ be a function in these variables. Is there a recursive scheme for this iterated integral? $$\int_{[0,1]^n}...
4
votes
0answers
82 views

Computing linear combinations of sines and cosines (phasors)

I have a finite series that looks like this: $f(t) = \sum^n_{i=0} A_i cos(\Theta_i + \omega_i t) + B_i sin(\Theta_i + \omega_i t)$ That is, a finite series of pairs of phasors. What's the state of ...
15
votes
3answers
6k views

Efficient computation of the matrix square root inverse

A common problem in statistics is computing the square root inverse of a symmetric positive definite matrix. What would be the most efficient way of computing this? I came across some literature (...
0
votes
0answers
638 views

how to visualize velocity from Lagrangian particle tracking method

I have few particle's position and velocity information as a function of time. Particle is following a trajectory path, while doing so, one particle may disappear, other particle may appear. Particle ...
-1
votes
1answer
525 views

Pde problem with robin boundary condition

I have my pde 2D problem with robin condition (form: du/dn +ku=g) to solve with matlab. i have the exact function u and I want to find the function g in robin condition. How can i do it? thanks for ...
8
votes
1answer
554 views

Second derivative of the Associated Legendre functions

I would like to compute, as part of the solution of the Laplace equation using the Fast Multipole Method, the second derivative of the associated legendre functions of the first kind . Specifically, I ...
3
votes
1answer
969 views

Finite difference method (diffusion equation) for 3D spherical case

There is one 3D-diffusion IBVP for sphere (Dirichlet problem with zero conditions on the surface of sphere). The equation has the following view: $$\frac{\partial u}{\partial t}=\operatorname{div}\...
5
votes
2answers
359 views

Finite element discretization of Reaction-diffusion problem with Dirac source term

I'm writing a code using continuous piecewise linear finite elements on triangular grids to solve the diffusion-reaction problem. the source function f is a Dirac mass at the center. How can i compute ...
3
votes
1answer
192 views

Can one use incompressible flow approximation for fluid flow in heated pipes?

I was wondering if the use of incompressible flow approximation for fluid flow in heated pipes is reasonable. A previous question (Definition of incompressible flow) seemed to focus on Natural ...
11
votes
1answer
832 views

Numerical methods for inverting integral transforms?

I'm trying to numerically invert the following integral transform: $$F(y) = \int_{0}^{\infty} y\exp{\left[-\frac{1}{2}(y^2 + x^2)\right]} I_0\left(xy\right)f(x)\;\mathrm{d}x$$ So for a given $F(y)$ ...
1
vote
1answer
5k views

Numerically determining convergence order of Euler's method

I need to numerically determine the convergence order of Euler's method for various step-sizes. I am unsure how to go about doing this. Here is the question: Problem statement: $\frac{dy}{dt}=\alpha ...
3
votes
1answer
324 views

Linear Algebra / Numerical Solution Of Matrix With Nullspace

I have a question relating to linear algebra. We have a fluid solver that solves the poisson equation for pressures. When there are areas of the domain that are entirely enclosed by Neumann ...
2
votes
2answers
270 views

Research in Inverse Problem and Numerical PDE

I am taking a Thesis-based Master degree now and I am going to choose my supervisor soon. I plan to take a PHD degree after graduation, so if possible, I wish my PHD research area could be an ...
7
votes
2answers
158 views

How do you numerically solve a multivariable ODE system with different time steps per state variable?

If you have a large multivariable ODE system, and certain processes occur at a much smaller time scale, how can you implement a solver that uses smaller time steps for state variables involved in fast ...
1
vote
0answers
84 views

Prove $T_n(x)$ of Chebyshev Polynomial given the recurrence relation [closed]

Using the recursion formula for Chebyshev polynomials, show that $T_n(x)$ can be written as $$T_n(x)=2^{n-1}(x-x_1)(x-x_2)...(x-x_n)$$ where $x_i$ are the $n$ roots of $T_n$ The recurrence relation:...
1
vote
1answer
78 views

Transfrom a Legendre polynomial from $\int_{-1}^{1}\phi_j(x)\phi_k(x)dx $ into $\int_{a}^{b}\phi_j(t)\phi_k(t)dt$ given $t=\dfrac{1}{2}[(b-a)x+(a+b)]$

The Legendre polynomials satisfy $$\int_{-1}^{1}\phi_j(x)\phi_k(x)dx = \begin{cases} 0 &j\neq k\\\\ \dfrac{2}{2j+1} &j=k \end{cases}$$ Suppose that the best fit problem is given on the ...
3
votes
0answers
192 views

Choosing good basis functions to approximate a Lipschitz function

Let $D = \left\{0, t_1, t_2, \ldots, t_n\right\} \times [0,1]$ and $$ f: D\to [0,1], $$ be a function of time and a one-dimensional space. There is no analytical formula for $f$, but $f(t_i, \cdot)$ ...
1
vote
1answer
3k views

Newton's method in interpolation

I've seen that in Newton's method for interpolating polynomials, the coefficients can be found algorithmically using (in Python-ish): ...
1
vote
3answers
1k views

Capacitance in freefem++

I would like to simulate a capacitor in 2d with freefem++. This is the code I used: ...
4
votes
1answer
154 views

What is the origin of the preasymptotic convergence behaviour in FEM?

When you have fine-scale features (e.g. boundary layers) in the solution, its FEM approximation on coarse meshes converge at strange apparent rates. Looking at Cea's lemma, is this behaviour because ...
2
votes
2answers
241 views

How can i solve this first order system of differential equations

Edit: I am trying to solve $$\frac{\partial u}{\partial t}+u\frac{\partial u}{\partial x}=\nu\frac{\partial^{2}u}{\partial x^{2}}\\ u(0,t)=0\nonumber \\ u(1,t)=0\nonumber \\ u(x,0)=\sin(\pi x)\\ 0<...
3
votes
1answer
112 views

Efficient computation of tangent of fraction of angle

I want to compute $a = \tan(f \theta)$ for $f\in [0,1]$, given $g = \tan\theta$. Obviously, I can compute $a = \tan(f\tan^{-1}g)$, but I'm wondering if there's a more efficient way that avoids having ...
4
votes
0answers
222 views

Negative viscosity stabilized by fourth order terms

I am trying to solve a "Navier-Stokes"-type problem where the viscosity is negative. Of course this renders the equation unstable and thus I add a fourth order term, so the entire equation becomes: $$...
1
vote
0answers
155 views

Numerically evaluate 1D inhomogeneous wave equation solution

I am trying to solve the following 1D inhomogeneous wave equation. Forgive me if I a miss any rigorous mathematical concept. $$ \frac{\partial^2 u}{\partial x^2} - \frac{1}{c^2}\frac{\partial^2 u}{\...
4
votes
1answer
199 views

How can exponential fitting be used with the finite element method?

Restricted to one dimensional problem, is it possible to dynamically adapt the finite element method (FEM) discretisation based on the local value of the Péclet number ($P_e$) for advection-diffusion ...
3
votes
1answer
88 views

numerical inaccuracy ellipsoid-ellipsoid collision

I am trying to implement ellipsoid-ellipsoid collision in my C++ code. Briefly this task can described as next: Let's assume that we have two arbitrarily oriented ellipses in the in space and this ...
5
votes
2answers
2k views

Does the finite element method impose any restrictions on the Peclet number for numerical stability?

Background on finite volume method When discretising the flux with a central difference stencil of the the advection-diffusion equation restriction $\frac{ah}{d} < 2$ must be observed for the ...
2
votes
1answer
1k views

Implicit heat diffusion with kinetic reactions

I am using the implicit finite difference method to discretize the 1-D transient heat diffusion equation for solid spherical and cylindrical shapes: $$ \frac{1}{\alpha}\frac{\partial T}{\partial t} = ...
8
votes
5answers
835 views

Is Discrete Exterior Calculus currently a focusing point in numerial computing world or simulation in industry,

I am just wondering if Discrete Exterior Calculus, as a new numerical method , is good at numericall solving problems in elasticity, fluids or other physical/real area.
5
votes
1answer
379 views

When is discrete Fourier transform a good approximation to the continuous one?

I am looking for help in understanding the use of discrete Fourier transform as an approximation to continuous Fourier transforms. As an exercise, I considered a Gaussian $$f(x) = \exp\left(-2x^2\...
0
votes
1answer
138 views

Simulating the motion of a elastic body under gravity [closed]

I am doing a numerical simulation of a elasticity problem. It is very simple. A cuboid elastic body with the right end fixed on the wall, under the gravity(but here I set it to be 1 along the z-axis ...
0
votes
1answer
465 views

Are these coefficients correctly calculated?

I'm solving a problem (page 16 is in English) in numerical analysis and this is the solution: ...
6
votes
2answers
187 views

Continuation procedure to solve for a 2D curve that satisfies f(x,y) = 0

I have some function of $R^2$, that must be numerically computed. For instance, I might be interested in a real-valued contour integral that begins from (x,y) = 0. $$ f(x,y) = \Re\left[\int_0^{x + iy}...
7
votes
3answers
549 views

A problem in 1D linear finite element method

When applying Galerkin method, we have two conventions, i.e. multiply the test function $v$ at left/right, $(v,u)/(u,v)$. Both ways won't matter for a simple problem like Poisson's equation, since the ...