# Questions tagged [numerics]

The tag has no usage guidance.

747 questions
Filter by
Sorted by
Tagged with
19 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 ...
39 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 ...
73 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 ...
75 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}$$...
100 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 ...
112 views

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 $... 1answer 57 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: ... 1answer 392 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 ... 1answer 53 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 ... 2answers 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 ... 1answer 143 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 ... 0answers 64 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 ... 1answer 120 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 ... 2answers 178 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 ... 1answer 69 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 ... 0answers 34 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 ... 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 ... 1answer 983 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 ... 0answers 31 views ### Computing convolution of two characteristic function over a 1D Cartesian mesh I am trying to compute the convolution of two characteristic functions over a Cartesian mesh. First, I define my Cartesian mesh of the interval$[0,1]$as follows $$x_{i} = i \Delta x, i = 0, 1, 2\... 1answer 85 views ### Solution of thermal analysis using finite element I want to solve a thermal analysis using finite elements. The governing equation is$$C \frac{dT}{dt}+K T = Q$$. When using backward differencing for time, the resulting equation is quite straight ... 0answers 139 views ### Ising model simulation offset critical temperature and interal ernergy I'm writing a code for the Ising model using WHAM (the weighted histogram analysis method)，But it seems to produce critical temperature and internal energy wrong. (newest rewritten code is below) <... 1answer 679 views ### Local truncation error of Dufort Frankel Scheme The scheme is given by$$\frac{v_m^{n+1}-v_m^{n-1}}{2k} + b\frac{v_m^{n+1}+v_m^{n-1}-v_{m-1}^n-v_{m+1}^n}{h^2} = 0$$where v_m^n is the numerical solution at the m^\text{th} spatial coordinate ... 0answers 53 views ### Stably solve transport equation with source term I am trying to solve a transport equation of the form for the variable \psi(t,r) \begin{equation} \partial_t\psi-\alpha(r)\partial_r\psi-\beta(r)^2\psi-f(t,r)=0 , \end{equation} where I am solving ... 2answers 292 views ### Boundary conditions for streamlines in enclosed flow I am trying to solve Lid driven square cavity flow problem of Stokes equation using finite element method. I have boundary conditions for velocity as zeros on every boundary but u=1 on top boundary. ... 1answer 545 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):... 1answer 85 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 ... 1answer 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 ... 1answer 85 views ### Does mass balance hold in convective diffusion I'm trying to understand how convection-diffusion equations are solved in pipe flow modules available in CFD solvers. $$\frac{\partial C}{\partial t} + \nabla \cdot (\mathbf{v} C) = \nabla \cdot (D \... 1answer 71 views ### How do I get power from gaussian beam numerically? I would like to get the power from a Gaussian beam given a set of points at which electric field is evaluated. Please follow my reasoning and tell me what assumption maybe are wrong Power definition ... 1answer 71 views ### Solving differential equation in Python with discretized variable coefficients I am trying to solve a differential equation with discretized variable coefficients which are calculated from a time serie. In this case the Runge-Kutta step size is fixed by the frequency in the time ... 2answers 127 views ### Is the diffusion equation with Neumann and Dirichlet BCs well-posed? I am considering the following diffusion equation:$$\frac{\partial f}{\partial t} = \frac{\partial}{\partial x}[D(x,t)\frac{\partial f}{\partial x}]$$over a grid ... 0answers 65 views ### Numerical integration with singularity term In https://www.johndcook.com/blog/2012/02/21/care-and-treatment-of-singularities, the author explains the subtraction method to get rid of singularities when performing numerical integration. The ... 2answers 265 views ### Chebyshev and Legendre expansions I am looking at approximating my function f(x) using a Chebyshev and Legendre series and I ran into this question. Is interpolation using n+1 Chebyshev nodes the same as representing the ... 2answers 1k views ### Runge-Kutta in the presence of an attractor Suppose you are solving a system of equations numerically that possesses an attractor (no matter the initial conditions set, all the different solutions will approach a specific set of values that ... 1answer 88 views ### Robin Boundary Condition with Implicit Upwind - Finite Difference Method for 2D Convection-Diffusion Equation I am trying to solve a problem with 2D Convection-Diffusion equation with U = Concentration (mg/m^{2}) using Implicit Upwind Finite Difference Method like this$$ \frac{\partial U}{\partial t} + ... 0answers 102 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 "... 1answer 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 ... 0answers 101 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 ... 1answer 145 views ### Radial integration of expensive function with Bessel weights 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{...
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?