Questions tagged [numerical-modelling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
0 answers
31 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
54 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
94 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
  • 21
1 vote
1 answer
77 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
88 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
0 votes
0 answers
36 views

Refluxing step on Finite difference AMR

Hi I am a computer scientist working on MHD code for astrophysics simulation. We use a finite difference scheme where we first solve the spatial derivatives and with them solve the right hand side and ...
Touko Puro's user avatar
2 votes
1 answer
118 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
135 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
  • 21
1 vote
0 answers
92 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
92 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
98 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
69 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
85 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
582 views

ValueError: array must not contain infs or NaNs; When using solve_ivp in the scipy library

I am solving an initial value problem using solve_ivp. The problem consists of computing the concentration profile of a set of reactions over time, given the initial concentrations and some of the ...
HWIK's user avatar
  • 23
0 votes
0 answers
41 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
118 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
57 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
75 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
599 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
337 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
336 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
87 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
24 views

I'm working on a problem to proof the two-grid cycle, with ν1 pre-smoothing and ν2 post-smoothing steps

I'm facing trouble while proving the given formula. Could you please help me with this? Thanks :)
Abdul Mannan's user avatar
0 votes
0 answers
59 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
1k 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
275 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
206 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
68 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
945 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
64 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
122 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
  • 337
9 votes
6 answers
899 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,102
7 votes
1 answer
281 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
117 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
137 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
186 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
73 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
94 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
131 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
1 vote
1 answer
232 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
138 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
104 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
3 votes
0 answers
63 views

Change in Variables applied to biharmonic equation

Background I want to solve the following biharmonic equation: $$\frac{ \partial^4 s }{ {\partial \xi}^4 }+\frac{ \partial^4 s }{ {\partial \xi}^2{\partial t}^2 }+\frac{ \partial^4 s }{ {\partial t}^4 }...
Tom Tenor's user avatar
0 votes
1 answer
452 views

Can I use periodic boundary conditions for `U` but not for `p`?

Cross-posted from Stack Overflow. (https://stackoverflow.com/questions/70686368/can-i-use-periodic-boundary-conditions-for-u-but-not-for-p) I am trying to numerically compute the drag force around a ...
K.defaoite's user avatar
3 votes
1 answer
102 views

How to model the dynamic impact of transport on boxes containing vials?

Let's consider that we have large number of boxes being transported in a truck. These boxes contain certain number of vials which in turn contain some other products. Now one would like to simulate ...
Dude's user avatar
  • 570
1 vote
1 answer
488 views

Solving ODE with Spectral Method using Chebyshev Polynomials

I would like to solve following the basic equation of linear elasticity (for simplicity in 1D) $$ \frac{d}{dx} \left( E \frac{du}{dx} \right) = 0 \quad \textrm{with} \quad u(1)=0, \; u(-1)=b $$ ...
PS-Elas's user avatar
  • 13
0 votes
0 answers
201 views

Is a 2021 MacBook Air sufficient for modeling and simulations research in fluid dynamics?

I code mostly in Matlab, simulating various simple fluid dynamics models. One particular simulation has the potential to become sort of complex, though I believe the set of coupled equations will ...
user42169's user avatar
3 votes
1 answer
137 views

Mineral dissolution and solute transport around a solid

I am trying to simulate solute transport of acid (HCl) and consequent mineral dissolution around a grain (calcite). The governing equation for transport is the advection-diffusion equation, given as: ...
oma11's user avatar
  • 55
3 votes
1 answer
150 views

Solving and Plotting Mutualism Model in Python

I am a beginner in programming. I need to program a mutualism model of two species in python that would solve and graph using the following equations: $$ \frac{dN_1}{dt} = N_1(r_1 - e_1N_1 + \alpha _{...
Mikasa Kirigiri's user avatar

1
2 3 4 5