Skip to main content

Questions tagged [numerical-modelling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2 votes
0 answers
83 views

stability issues - how to find and fix them? [closed]

When reading about the stability of the softmax function, I found a nice trick one can use during implementation: subtracting the maximal element from all elements. That way none of elements "...
Przemek B's user avatar
1 vote
1 answer
104 views

Educational Purpose: How to synchronize chaotic systems

The graph plots the X coordinate of the synchronized Lorenz chaotic system. I am self learning by reading research articles on how to synchronize identical chaotic systems. But as seen from the figure,...
Sm1's user avatar
  • 119
6 votes
1 answer
236 views

Roadmap for Career Transition to Computational Science

What sort of path should I follow to make a the transition from high school physics to computational science? Context 15 years teaching experience in physics and general science. Maths is currently ...
Kishan Bhatt's user avatar
1 vote
1 answer
125 views

Best finite difference scheme in 2D for the mixed derivative

The are good methods to deduce finite difference schemes for derivatives of functions of one variable. But how to get a good one for the mixed derivative of a function of two variables $u=u(x,y)$, ...
Bogdan's user avatar
  • 113
0 votes
1 answer
86 views

shooting method to compute the interface shape

I am trying to use a shooting method to compute the shape of liquid-gas interface given by the following differential equation: $$ \frac{d^2 \theta}{ds^2} = \frac{f(\theta)}{h(h + 3\lambda)} $$ with $\...
Sthavishtha Bhopalam's user avatar
0 votes
1 answer
52 views

Preventing accumulation of state errors in surrogate models?

For surrogate models which predict derivatives based on the current state: how do you avoid the accumulation of state errors due to modeling error in each state update? It seems to me that if you used ...
profPlum's user avatar
  • 149
0 votes
1 answer
63 views

MIP - Large Piecewise Linear Constraints Over Continuous Intervals

I'm currently trying to run a MIP (have access to both Gurobi and CBC) with a piecewise linear function having ~200 intervals for each of the ~30 x values I have. I am using the standard decomposition ...
davidwashere's user avatar
3 votes
3 answers
165 views

Discretization of 2D advection equation with non-constant speed

Suppose I have a 2D advection equation $$\frac{\partial \rho}{\partial t}=-\nabla\cdot(\vec{w}\rho)$$ with $\vec{w}=(u,v)$ non-constant and having zero divergence. I want to numerically solve this ...
KnobbyWan's user avatar
  • 173
1 vote
1 answer
81 views

Does anyone know how to add a forcing term at the center of a cicular membrane?

I am here once again searching for wisdom, as some of you might notice I asked a related question a few days ago. And now I am struggling to add a forcing term at the center of the membrane, in order ...
Manuel Borra's user avatar
2 votes
2 answers
138 views

How is entropy taken into account in a FV solver?

When solving for a given PDE, how is the entropy taken into account? Does the fluxes has another form? Or is the entropy PDE for a given entropy-flux included in the solver?
L Maxime's user avatar
2 votes
0 answers
50 views

In electromagnetic simulation, how much does the feed model impact an antenna's directivity performance and E-field phase readings?

Question: How much would a simplified feed model in an EM simulation alter an antenna's directivity and the E-field phase reading when compared to using a more complicated/realistic feed model? I am ...
Xingda Chen's user avatar
0 votes
0 answers
138 views

Solving system of ODEs, where time derivative approaches infinity due top initial condition

I am trying to solve a problem in python using scipy's solve_ivp. The system of ODEs I am trying to solve is for coupled where I am solving for two time-dependent ...
HWIK's user avatar
  • 23
0 votes
0 answers
104 views

What is the difference between approximations of mixed derivative and how to implement it

currently I am solving 2D nonlinear second order differential equation containing mixed derivative. I started searching how to descretisize it and found two formulas for 4th order approximation. First ...
Andrew's user avatar
  • 31
2 votes
2 answers
147 views

Shallow water model for year-round watershed runoff

I have an (maybe not so clever) idea to apply the shallow water model for computing the year-round watershed runoff of a catchment. It means using of real topography with variable slopes and roughness,...
Ilia Popstoyanov's user avatar
1 vote
1 answer
92 views

Improved euler on hybrid methods where both time and space are discretized?

I am trying to understand how to use the improved euler method on MPM simulations. In the kind of MPM simulation I am doing with forward euler the order of operations is as follows: Write particle ...
Makogan's user avatar
  • 263
2 votes
1 answer
124 views

How do the navier stoke equations model materials who "forget" their original form?

Sorry for the screenshot but I don't want to try to format this on latex: We have this annotation of the Navier-Stokes equations: I am particularly puzzled by the viscosity/stress term. For an ...
Makogan's user avatar
  • 263
1 vote
1 answer
140 views

Which analogs of Newton's multivariate method are faster?

Currently, I am studying a 2D nonlinear Schroedinger equation and searching for the fastest method. $$ \begin{equation} i \frac{\partial \psi}{\partial t} = [-\frac{1}{2} \nabla^2 + V_0(r) - i\gamma ...
Andrew's user avatar
  • 31
1 vote
0 answers
121 views

A staggered grid for an eigenvalue problem (linear stability analysis)

I'm interested in extending the concept of a staggered grid (commonly used to solve the incompressible Navier-Stokes equations) to a linear stability analysis context. For example, we can consider ...
Samantha B.'s user avatar
1 vote
2 answers
135 views

Numerical code to solve LLG is not preserving norm

I am new to this thread. I am trying to do a simple exercise on solving the LLG equation. The equation reads: $\frac{d\vec{m}}{dt} = -\gamma(\vec{m} \times\vec{H})$. Given a normalized input state ($...
rahman62's user avatar
2 votes
0 answers
110 views

Conceptual doubt regarding 2D conjugate heat transfer modelling (COMSOL and Mathemtica)

I have been dealing with some conceptual flaws in my understanding of modelling, which I will elaborate herein. I am modelling conjugate heat transfer of a reciprocating fluid, which flows with ...
Avrana's user avatar
  • 41
1 vote
0 answers
81 views

Fortran - Lid-Driven Cavity Boundary Conditions Error when using SIMPLE method

I am studying Numerical Methods for incompressible flows. part of the tasks is to model the lid driven cavity problem in 2D using the SIMPLE method. I have been provided with Fortran code that is ...
Xray25's user avatar
  • 21
2 votes
0 answers
100 views

Compact Finite Differences for the Heat Equation with Robin Boundary Conditions

I am trying to solve the Heat equation with Robin Boundary condition: $$ u_t(x,t) = u_{xx}(x,t), \\ u(x,0) = g(x), \\ u(0,t) + u_x(0,t) = h_0(t), \\ u(1,t) + u_x(1,t) = h_1(t)$$ for $ 0\leq x\leq1$ ...
Jules's user avatar
  • 21
0 votes
0 answers
43 views

Numerical Method for Multivariate Inversion Formula

For my research, I need to evaluate the density of a random vector $\boldsymbol{X} \in \mathbb{R}^p$ using the multivariate inversion formula. Let the density function of $\boldsymbol{X}$ be $f (\...
little_sky's user avatar
-1 votes
1 answer
121 views

Can numerical calculations be accepted as proof/refutation of a mathematical axiom?

In many cases, an algorithm can be designed and implemented to prove/disprove a mathematical axiom, but could it be accepted as proof or refutation by rigorous mathematicians?
user avatar
0 votes
0 answers
64 views

Faster convergence for minimizing least squares of forward modelling problems

This specific question was raised from optimizing parameters of column experiments in the hydrogeological context. I want to optimize a parameter of interest (in this case $D$), based on experimental ...
Michael Gao's user avatar
1 vote
0 answers
82 views

Linear PDE solution with constraints

Consider the following linear PDE: $$\nabla_q V(q) - M_d(q)M^{-1}(q)\nabla_q V_d(q) = 0,$$ where $V(q)$ and $M(q)$ are known and $M_d(q)$ is a grey box function (e.x., $M_d(q)$ is fitted using a ...
Evan's user avatar
  • 11
8 votes
2 answers
2k views

Energy conservation in RK4 integration scheme in C++

My colleague and I are trying to study the three-body problem, with different integration schemes, starting from the two-body problem. We implemented the symplectic Euler scheme and the Runge–Kutta ...
jack23456's user avatar
  • 171
2 votes
2 answers
802 views

Using backward and forward Euler method to solve a certain stiff ODE

When using the backward and forward Euler methods to solve a certain stiff differential equation, what criteria does one look at before drawing the conclusion that one is more stable than the other?
Simon's user avatar
  • 23
2 votes
1 answer
716 views

How to extract intermediate calculation results from an SciPy ODE function in python?

I have a bit lengthier ODE function which was simulated by using Scipy solve_ivp function. During this simulation I calculated many parameters but as the output, I am taking out put only some other ...
Nis's user avatar
  • 21
1 vote
1 answer
557 views

RK4 integration of the three-bodies problem with C++

first of all thank you for all the answers you gave me yesterday for the integration via Symplectic Euler's method of the three-body problem. We managed to implement both Euler's and Runge Kutta 4's ...
jack23456's user avatar
  • 171
2 votes
0 answers
135 views

Boundary conditions for compressible Euler equations

I want to solve the compressible 1D Euler equations numerically. Theory says that for subsonic inflows, one can prescribe two variables, e.g. pressure and temperature. Density can then be computed ...
DozerD's user avatar
  • 81
0 votes
0 answers
62 views

Can I use MOL to solve 2D steady state PDE in terms of r and z spatial coordinates?

recently I need to solve a 2D steady state PDE equation. It’s not time dependent, and the only two independent variables are z and r direction. So far for this solution, I was thinking using Method ...
Chi Chi 's user avatar
2 votes
1 answer
2k views

scipy.optimize.root not converging and RuntimeWarning

I am trying to solve the following problem: $$ \frac{d^2y}{dx^2}=\sinh(y) $$ Where the boundary conditions are: $y(0)=-1$, and $ \frac{dy(x\rightarrow \infty)}{dx}=0 $. Through central difference ...
HWIK's user avatar
  • 23
3 votes
2 answers
451 views

Automatic differentiation of a numerical solver

We often want to use numerical methods to evolve a system in time. That is, for a set of differential equations, we can specify some parameters $\bar{\theta}$ and pass these into our numerical solver ...
user1887919's user avatar
2 votes
1 answer
264 views

Modelling a spring interpolation

I have parameters $T$ for tension, $b$ for bounciness and $P_t$ for target value that should be approached as t goes to infinity. Currently I have written an equation like so: $\ddot{f}(t)=\frac{T(P_t-...
Krys's user avatar
  • 23
3 votes
0 answers
70 views

Looking for non-trivial examples of solutions to 3D wave equations?

We have developed a (new) numerical scheme to solve the classical wave equation in 3 dimensions and we aim to publish the results. We can read in the aim and scope of the journal of computational and ...
NotaChoice's user avatar
2 votes
1 answer
1k views

How do you handle the singularity in polar or cylindrical coordinates?

Governing equations in polar or cylindrical coordinates often have terms with $\frac{1}{r}$ involved. At $r = 0$, such terms blow up to become a "singularity." The Cartesian version of such ...
Steve M's user avatar
  • 29
1 vote
0 answers
71 views

A direct numerical method for determining a relaxation function from a known creep function

Both the creep function and the relaxation function are connected by the convolution integral. The usual method for calculating the relaxation function from a creep function or vice versa is to ...
Ali AlCapone's user avatar
3 votes
2 answers
132 views

Solving detailed combustion kinetics in CFD, where to start?

I have some experience solving single- and multicomponent Euler equations for modeling of gas flows, including combustible ones. The code (variations of finite-difference WENO methods) is written with ...
omican's user avatar
  • 347
9 votes
6 answers
923 views

What are good particle dynamics ODEs for an introductory scientific computing course?

I'm teaching an introductory course on scientific computing (programming in C/C++) and am looking for application problems which the assignments can be centered around. I'm thinking of ODEs for ...
Jesse Chan's user avatar
  • 3,142
7 votes
1 answer
366 views

How does non-dimensionalization improve the behavior of ODE solvers?

I have a set of coupled ODEs that I'm solving numerically. The independent variable is time and runs from values of $10^{15}$ to $10^{17}$ in units of seconds. The state variables in their usual ...
quantumflash's user avatar
0 votes
1 answer
144 views

Solving PDE with a non-linear constraint in MATLAB

I am trying to solve a DAE with a non-linear constraint. The governing equations have the following form. The second equation is a constraint and it must be satisfied everywhere. Is there a way to ...
penghao zhang's user avatar
0 votes
1 answer
191 views

Is the Alternating-Directions Implicit method dependent on the space increment?

I am writing an Alternating-Directions Implicit Method for simple 2D diffusion ( \begin{equation*} \frac{df(x,y,t)}{dt}=D\Delta u \end{equation*}). Tridiagonal matrices are solved via Thomas ...
Roman Kirillov's user avatar
2 votes
0 answers
299 views

Can someone explain why RK4 is less accurate for very small timesteps?

I am currently working on a project where I have used an RK4 integrator to attempt to solve the three-body problem. An interesting result that I found, was that decreasing the size of the time steps ...
DaSquire's user avatar
0 votes
0 answers
109 views

Recursion relations for integrating Gaussian functions

I'm trying to implement a numerical method used in quantum chemistry from scratch. I'm using this paper as a reference. It's also available on Sci-Hub. So, the method requires calculating integrals of ...
Dmitry Govorov's user avatar
1 vote
1 answer
97 views

Accurately solving system of differential equations

So I am trying to solve two equations simultaneously. The goal is to find values for $\frac{de}{dt}$ and $\frac{d}{dt}$ which are the rates of change of the variables $a$ and $e$. I am then ...
Peter Smith's user avatar
2 votes
0 answers
200 views

Generalized Eigenvalue Problem using MATLAB

I'm trying to solve a generalized eigenvalue problem. I have two matrices $H$ and $S$ such that: $$ HX=λSX $$ I need to find the eigenvalues $\lambda$. The matrices $H$ and $S$ are real, asymmetric, ...
Beginner Noob's user avatar
2 votes
1 answer
412 views

What does the Chebyshev differentiation matrix look like for third and fourth derivative?

I have a PDE that contains both the 3rd derivative and 4th derivative. Example shown below $$ \frac{\partial u}{\partial t} =\frac{\partial}{\partial x}(u^3\frac{\partial^3u}{\partial x^3}) $$ $$ \...
dazemood's user avatar
2 votes
1 answer
147 views

Numerical diagonalization of Hamiltonian

Framework I am trying to diagonalize the Bogoliubov-de Gennes Hamiltonian. The problem is that the Hamiltonian contains a Laplacian. This could be solved by using a discretized Laplacian. How I tried ...
Guest's user avatar
  • 21
3 votes
1 answer
112 views

Nondimensionalization of a multi-component chemical diffusion equation

Edit I've modified the equations because they were wrong and I added the whole system, as asked by @Wolfgang I am trying to nondimensionalize a system of partial differential equations similar to 2nd ...
Iddingsite's user avatar

1
2 3 4 5