# Questions tagged [numerics]

The tag has no usage guidance.

732 questions
Filter by
Sorted by
Tagged with
38 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: ...
44 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 ...
372 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 ...
48 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 ...
7k views

### Use of machine learning in computational fluid dynamics

Background: I have only built one working numeric solution to 2d Navier-Stokes, for a course. It was a solution for lid-driven cavity flow. The course, however, discussed a number of schemas for ...
140 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 ...
52 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 ...
100 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 ...
167 views

### What are the most important theorems in computational science? [closed]

I was reading the book: The Finite Element Method: Theory, Implementation, and Applications by Mats Larson and Fredrik Bengzon, in page 140 of this book they say this: "The Lax-Milgram Lemma is one ...
67 views

### Defining Current Density in a FEM model (MATLAB)

I'm attempting to solve the Poisson equation in 3D for a magnetic vector potential in the presence of a current source. To validate my code, I'm initially looking to reproduce the model described in ...
33 views

### How to account for a corner node with zero-flux condition at an extrapolated distance

I am trying to implement a numerical solver and am having troubles dealing with boundary conditions, especially in the corners. I have a 2D mesh, and on the left I have a Dirichlet condition, on the ...
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 ...
954 views

### Conserving Energy in Physics Simulation with imperfect Numerical Solver

I am creating a C++ Physics Simulation where I need to move an rigid body through an acting force field. Problem: simulation does not conserve energy. Quesiton: abstractly, how is conservation of ...
27 views

81 views

### Modelling flow through pipe networks

I'm trying to educate myself on modelling solute flows through pipe networks. This is a follow up of my previous post here $$\frac{\partial C}{\partial t} = - v\frac{\partial C}{\partial x}$$ While ...
111 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 ...
82 views

97 views

### How to check if my stiffness matrix is correct

I built the stiffness matrix for the Poisson equation on a 2-dimensional domain with the shape of "almost" an octagon, using pyramid basis functions. I used almost to intend the fact that I have an "...
43 views

### Numerical integration of the dataset of a function

The energy equation for a spherically symmetric system is given by $$\mathscr{E}=\frac{v^2(r)}{2}+\frac{c_s^2(r)}{\gamma-1}+\phi(r)$$ where $\mathscr{E}$ is the total energy, $v$ is the velocity of ...
100 views

### Integrators for Nonlinear/Stiff PDE

It was suggested I ask this question in this section. Anyway: I have a particular nonlinear PDE of the form $$u_t(x,t)=iu_{xx}(x,t)+f(x,u(x,t)) \tag{1}$$ Where f is some nonlinear function. With ...
145 views

I need to calculate the integral $$I = \int_0^R f(r)J_n\left(\frac{z_{nm}r}{R}\right)rdr$$ where $J_n$ is the $n^{\mathrm{th}}$ order Bessel functions of the first kind, $z_{nm}$ is its $m^{\mathrm{... 1answer 90 views ### Solve linear system with Newton-Raphson method Is it possible to solve a linear matrix system$A x = b$using the Newton-Raphson method? If yes, how can this be done? More special, how is the derivative build? 1answer 39 views ### Integrate using Composite Simpson's rule In a question, we have been given the speed of a car at time t= 0,2,4,6,.......,20 minutes.But it asks us to approximate the distance travelled by the car in 30 minutes using Composite Simpson's rule. ... 1answer 122 views ### Numerically estimating expected value of f(x) when x is normally distributed I need to estimate $$\mathbb{E}_x[f_i(x)] = \int_{\mathbb{R}^n} f_i(x) p(x) dx$$ for many functions$f_i(x)$, where$p(x)$is the density of a normal distribution. The evaluation of all the ... 1answer 54 views ### Recursive Algorithm to Calculate Determinant via Expansion of Minors in C# I have been recently trying to attempt to write an algorithm in C# that would calculate the determinant of a matrix via recursion using the expansion of minors method. I understand that there are ... 1answer 304 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 ... 0answers 95 views ### What exactly is the cause(s) of blow-up for too-large step size in a method like RK4? I have been working on creating a few home-made numerical methods, and I am using them to visualize text-book problems from my Strogatz dynamics textbook. It feels like a good way to learn numerical ... 0answers 22 views ### Interpreting results of using no-flux boundary condition I am solving for solute transport in 1 D. $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - v\frac{\partial C}{\partial x}$$ No-flux boundary condition is imposed at both the ... 1answer 69 views ### Implementing Robin Boundary condition (finite difference) I'm interested in applying Robin boundary condition to a convection-diffusion problem in 1D. In the following system, $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - v\frac{\... 0answers 85 views ### Extracting FEM matrices in matlab pde toolbox I am trying to follow the dynamic linear elasticity in Matlab, link here. My goal is to extract the FE Matrices using the function assembleFEMatrices in matlab and solve the resulting system of second-... 1answer 109 views ### Imposing periodic boundary condition for linear advection equation - Node problem I've spent the whole day trying to figure out what is the correct way to impose (and implement) periodic boundary conditions u(0,t)=u(1,t) for all t>0 for the simple advection equation u_t + v ... 1answer 118 views ### Runge-Kutta fourth order method. Integrating backwards I am using a Runge-Kutta fourth order method to solve numerically the usual equation of motion of a background scalar field in curved spacetime with a quartic potential: \phi^{''}=-3\left(1+\frac{H^{... 1answer 73 views ### How to Break Coupled ODEs down to first order for Runge-Kutta My question might seem a bit simple. I am trying to solve a system of ODEs using Runge-Kutta method. I am having difficulty breaking down the equations into a system of first order ones required ... 1answer 62 views ### How to robustly and numerically expand a k-order polynomial in two variables defined on a polygon domain? Given a k-order polynomial in two variable p(x, y) defined on a polygon domain K. And I want to numerically expand it to the following form$$ p(x, y) = c_0 + c_1 x + c_2 y + c_3 x^2 + c_4 xy + ... 0answers 51 views ### Numerical Method for Equation System of two depending Equation Systems I am searching a solution method for the following equation system of equation systems: Let$A \in \mathbb{R}^{n \times n}$be an invertible Matrix,$f, b_1, b_2 \in\mathbb{R}^n$given vectors and$ ...
Many times in fourier approximation we come across integrals such as $$\int_0^1 e^{-\gamma\int_0^xu_0(\eta)d\eta}dx$$ where $\gamma$ is a constant and the data for $u_0$ is provided as a discretely ...
I need an efficient way to take square root of a matrix which is a sum of diagonal matrix and rank-1 matrix. More specifically it's the following matrix $$A=D-uu'=\text{diag}(u)-uu'$$ Where entries ...