Questions tagged [numerics]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
29 views

Implementation of nonlinear optimization for Generalized Nash-Equilibrium

I have to find a solver for $\begin{equation} \min_{x^{\nu}} \Theta_{\nu}(x^{\nu},x^{-\nu}) \end{equation}$ with $x^{\nu} \in X_{\nu}$ which is a convex set. $x^{*}$ needs to satisfy $$\nabla_{x^{\nu}...
6
votes
1answer
253 views

What kind of a researcher am I?

So far, I've worked a bit in modeling, simulations and simple lab experiments, and I've really enjoyed all three research methods to approach a single research question. I can write tricky (in terms ...
0
votes
0answers
28 views

Markov chain Monte Carlo with stopping time

I asked the same question two days ago on MSE, but received no answer. So I post it here in hope to get any suggestion. As long as I have answer, I will close the other one. Let $(X_t)$ be a ...
0
votes
1answer
93 views

Normalized legendre and quadrature basis for discontinous Galerkin method

I've successfully implemented a 1D DG code with non-normalized Legendre basis and I've now moved onto developing a 2D code using tensor products. For my 2D code I've chosen to have normalized ...
2
votes
0answers
46 views

2-dimensional Gauss-Hermite quadrature in R

A similar question was asked here and the given answer is perfect for a unidimensional integration. I need to make bidimensional integration in R with a Gauss-Hermite quadrature: $$\int_{R^2} h(p1,p2)...
0
votes
0answers
15 views

Shallow water equations: boundary conditions for sub- and super-critical flow

This question is (sort of) a continuation of this previously asked question. I am wondering about, in general, how we construct well-posed boundary conditions (both continous and numerical) for flow ...
1
vote
0answers
38 views

Advice for a topic in a seminar

I am a master student in Mathematics, and I have to prepare a seminar for a course in mathematical methods for applied sciences. I have a good background in numerical analysis for ODEs, PDEs and hence ...
0
votes
3answers
74 views

Changing variables in integral to avoid infinity

I want to write a code in Fortran to solve this integral numerically: $$\int_{1095}^\infty \frac{dx}{x\sqrt{(x+644.153)(4.17 \cdot 10^{-5} x+0.145)}}$$ What is the best method for it? I tried Monte-...
0
votes
1answer
45 views

Reinch's modification to the Clenshaw recurrence gives no improvement

The classical Clenshaw recurrence (see Algorithm 3.1 here) is less accurate as $x\to \pm 1$. So Reich proposed a modification to it, which is discussed as Algorithm 3.2 as well as by Oliver. While ...
1
vote
0answers
25 views

Unable to achieve semi-linear running time in computation of continuant

I am trying to compute the continuant of a list of numbers $a_0, a_1,...,a_n$, defined by the recursion relation: $K_{n+1} = a_{n+1} K_n + K_{n-1}$ and $K_0 = 1$ (see Wikipedia). I am trying to use ...
1
vote
0answers
20 views

Convection equation expanded in Legendre polynomials

In some areas of physics, for example radiation transport in plasmas, it is beneficial to re-express the convection equation in terms of a Legendre polynomial expansion. This results in a set of ...
0
votes
1answer
36 views

Coupled pdes of the first order

May question is about possible approaches to solve the following system $$ \begin{array}{rcl} \nabla{n}&=&n\,\mathbf{E},\\ \nabla\cdot\mathbf{E}&=&1-n, \end{array} $$ in general with ...
15
votes
1answer
2k views

How to Run MPI-3.0 in shared memory mode like OpenMP

I am parallelizing code to numerically solve a 5 Dimensional population balance model. Currently I have a very good MPICH2 parallelized code in FORTRAN but as we increase parameter values the arrays ...
1
vote
0answers
59 views

Bifurcation points on homotopy path by numerical continuation?

I am trying to implement an algorithm that finds (possibly) all solutions of a system of nonlinear polynomial equations $$F(X) = 0$$ I thought about using the (convex) homotopy $$H(X,T) = TF(X) + (1-T)...
2
votes
1answer
379 views

1-D turbulent energy spectra in homogeneous direction (non-isotropic)

I am trying to compute the one-dimensional energy spectra for my channel-flow simulation. I have already written a post-processing script to achieve this; however, I need to validate my code before ...
2
votes
0answers
71 views

Numerical method for harmonic oscillator with jumping constant

Let $k_1 \neq k_2$ be positive reals, $t_0 > 0$ and consider the following Cauchy problem in $[0,+\infty)$: \begin{cases} y(t) + k(t)y''(t) = 0 \newline y(0) = 1/\sqrt{k_1} \newline y'(0) = 0, \end{...
9
votes
2answers
599 views

Time discretization of the variational formulation of the Navier-Stokes equation

I've asked this question on mathoverflow too. Let $T>0$ $I:=(0,T]$ $d\in\mathbb N$ $\Lambda\subseteq\mathbb R^d$ be nonempty and open, $$\mathcal V:=\left\{\phi\in C_c^\infty(\Lambda,\mathbb R^d):...
1
vote
0answers
28 views

Tackling multiscale problem in numerical simulation

In a dusty plasma system there are more than one component with different masses, i.e, electrons, ions,neutrals and dust grains. Accordingly, there are more than one temporal and spatial scales ...
0
votes
1answer
110 views

Time complexity of numerical finite differences

I have a function $f:\mathbb R^N\to \mathbb R$ and I would like to compute all the partial derivatives of $f$ w.r.t. the $N$ input. What is the computational complexity using the (ones-sided) finite ...
6
votes
2answers
216 views

Numerical flux and source term in FVM (Burger's like equation)

I'm trying to solve the following equation with FVM $$u_t + f(u)_x = g(u)$$ where $g$ is some smooth function of $u$ and $f(u) = \frac{u^2}{2}$. This is really similar to Burger's equation, except ...
1
vote
2answers
52 views

What space-time points should a known coefficient function be evaluated at when using the Lax-Friedrichs scheme to solve the transport equation?

For a scalar quantity $u = u(x, t)$, I'm considering the transport equation \begin{align} u_t + au_x &= 0, \qquad{x\in[0, L], \ t\in[0, T]} \\ u(0, t) &= u_{\text{in}}, \\ u(x, 0) &= f(x). ...
1
vote
0answers
68 views

Compute mass matrix in vibrations problem by using finite element method

I have to compute the mass matrix of a Hexahedral mesh. There are 3 methods to compute mass matrix. I'm interested in one method which consists of dividing the mass of the element by the number of ...
4
votes
1answer
121 views

Which optimization method can be used to do the following?

I've the following system of equations for studying information flow in the below graph, $$ \frac{d \phi}{dt} = -M^TDM\phi + \text{noise effects} \hspace{1cm} (1)$$ Here, M is the incidence ...
0
votes
1answer
42 views

Showing stability of numerical scheme: Decaying norm implies stability?

I have a little trouble formulating my question since I am not really sure what conclusions I am supposed to draw from the results I have obtained. I am sorry for the long problem formulation below, ...
3
votes
2answers
139 views

Mass conservation for hyperbolic relaxation problem

I have solved numerically the following system: \begin{cases} \partial_t{u} + \partial_x{v} = 0 \\ \partial_t{v} + \frac{1}{\varepsilon^2}\partial_x{u} = -\frac{1}{\varepsilon^2}(v-f(u)) \end{cases} ...
2
votes
1answer
54 views

Using linear regression to find the ideal point given a set of trajectory's data

I have a set of points in 2D obtained from a pendular movement with some noise. I want to determine where is equilibrium point ($x_0$, $y_0$) from which the rope is fixed. There are at least two ...
2
votes
4answers
134 views

Testing the time dependent Schrodinger Equation with an analytical solution?

I am numerically solving the Schrodinger Equation in 1D first and in higher dimension later, but I want to know the convergence rate of my numerical solver in different grid size and numerical methods....
2
votes
1answer
123 views

Gradient-jump penalty term in FEM

I am slightly confused regarding the meaning of the $i-th$ gradient-jump term $[\nabla \phi_i]$ in the context of finite element methods, used in the assembly of the stiffness matrix (an example with <...
2
votes
0answers
40 views

Evaluating integral $F(r_2) = \frac{1}{r_2^n} \int_0^{r_2} r_1^n f(r_1)\ \mathrm{d}r_1$ without growing instability

I have the following expression to be numerically integrated in a vector-based library (e.g. numpy, MATLAB, etc), $$ F(r_2) = \frac{1}{r_2^n} \int_0^{r_2} r_1^n f(r_1)\ \mathrm{d}r_1, $$ where $n$ is ...
4
votes
1answer
204 views

The velocity Verlet method and variable time steps

Does the velocity Verlet handle variable time steps? I found controversial statements about it. In the paper Skeel, R. D., "Variable Step Size Destabilizes the Stömer/Leapfrog/Verlet Method", BIT ...
1
vote
0answers
63 views

Are linear, CTCS codes always stable?

I would like to solve some equations which basically look like this $$\frac{\partial u}{\partial x}=F\left(v,\frac{\partial v}{\partial y},\frac{\partial^2 v}{\partial y^2}\right),$$ $$\frac{\partial ...
1
vote
0answers
39 views

Comparison of convection time - theoretical value vs computed

This is a follow up to my previous post here, I'm solving for convection in 1D $$\frac{\partial C}{\partial t} = - v\frac{\partial C}{\partial x}$$ The discretization of the above equation is ...
1
vote
0answers
44 views

Unsteady diffusion equation with spatial finite elements and Forward Euler in time

I have solved the unsteady diffusion equation using piece-wise linear Finite elements(triangles) for spatial discretisation and Forward Euler for temporal discretisation. I have the following mesh ...
4
votes
1answer
96 views

Parareal for particle simulations

Recently I have stumbled upon this video of M. J. Gander https://www.youtube.com/watch?v=dn5vqN8ezuE and the coresponding notes that he wrote on Time Parallel Time Integration and I find it a quite ...
0
votes
1answer
98 views

Question on comparing the accuracy of numerical schemes

This is a follow up to my previous post here I'm solving the following 1D transport equation . $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2}-v\frac{\partial C}{\partial x}$$...
2
votes
1answer
150 views

Question on how MATLAB's pdepe solver works

I'm solving the following 1D transport equation in MATLAB's pdepe solver. $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2}-v\frac{\partial C}{\partial x}$$ At the inlet (left ...
4
votes
2answers
128 views

Effect of mesh size on solution curves for a 1D problem

I'm interested in studying the effect of mesh size on the behavior of the solution curves of 1D convection-diffusion problem. $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - ...
2
votes
1answer
115 views

Slope limiting for discontinuous Galerkin (DG) method

I had a question regarding the implementation of the TVB limiter for the RKDG method by Cockburn. I have seen that some implementations of the DG method use normalized Legendre polynomials such that ...
1
vote
0answers
59 views

Conjugacy in Non-linear Conjugate Gradient Descent

In linear conjugate gradient method, our goal is to solve the system of linear equations $$Ax = b$$ where A is a symmetric positive definite matrix, and that is equivalent to finding the minimizer of ...
1
vote
1answer
33 views

How to compute the mean 2D slice of a 3D set of data in MPI

I have a 3D set of data v(i,j,k), and I want to compute the mean 2D slice vmean(i,j) summing up the ...
1
vote
0answers
59 views

How to minimize a integral function using a constant step gradient method in Python?

I am developing a practical work of the following system of ode \begin{align}x'(t) &= k_1h(t) - (k_2+k_3)x(t)\\ y'(t) &= k_3x(t)\end{align} and $z(t) = (1-k_4)(x(t)+y(t))+k_4h(t)$, where $h(...
7
votes
1answer
166 views

evaluating $\coth(x) - 1/x$ for real $x$, on 2 “pieces”

The function $\coth(x) - 1/x$ has a removable singularity at 0. Its Taylor series is: $$ \coth(x) - 1/x = \frac{x}{3} - \frac{x^3}{45} + \frac{2x^5}{945} + \ldots $$ I would like to evaluate the ...
3
votes
1answer
196 views

log-sum-exp trick for signed/complex numbers

I need to evaluate a sum of values that are on many different orders of magnitude in scale but might be signed. I’ve had great luck with the “log-sum-exp” trick for an unsigned version of my problem, ...
0
votes
0answers
63 views

A name for a numerical phenomena when using numerical methods

I have a nonlinear solver for equation $g= c_1f(x_1,y_1)+c_2f(x_2,y_2)$. Note that $c_1$ is much bigger than $c_2$. So after using Levenberg–Marquardt algorithm, I could only get $x_1$, $y_1$ and $...
1
vote
1answer
65 views

Type of Rosenbrock method by its coefficients

A Fortran code that solves stiff PDE systems contains the following arrays of Rosenbrock-Wanner method coefficients: ...
1
vote
1answer
508 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
83 views

pdepe or Crank-Nicolson? How much is pdepe good?

I am beginner in MATLAB and similar. I sow and discussed with my professors doing simulations some times: they wrote down a lot of calculus, most of them using Crank-Nicolson Method and so implement ...
5
votes
1answer
145 views

Complex differentiation of linear solvers

I have a linear system $$Ax=b$$ which I'm solving approximately, and I need to take the frechet derivative of x with respect to z. Were I solving the problem exactly (either analytically or to machine ...
0
votes
0answers
69 views

Comparison of diffusion time - theoretical value vs computed

This is a follow up to my previous post I've been trying to compare the diffusion time obtained from theoretical derivation(answered in my previous post) and what is obtained computationally, for a ...
2
votes
1answer
163 views

mesh dependence of numerical adjoint solution

I am solving the steady, two-dimensional adjoint Euler equations, $$A_x^T \partial_x \Psi + A_y^T \partial_y \Psi = 0$$, where $A_x = \partial F_x/\partial U$ and $A_y= \partial F_y/\partial U$ are ...

1
2
3 4 5
17