Questions tagged [numerical-modelling]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
74 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,...
6 votes
1 answer
204 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 ...
1 vote
1 answer
111 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)$, ...
0 votes
1 answer
82 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 $\...
0 votes
1 answer
51 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 ...
0 votes
1 answer
48 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 ...
2 votes
2 answers
146 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,...
3 votes
3 answers
128 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 ...
1 vote
1 answer
76 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 ...
2 votes
2 answers
133 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?
2 votes
1 answer
668 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 $$ ...
2 votes
0 answers
39 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 ...
0 votes
0 answers
91 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 ...
0 votes
0 answers
103 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 ...
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 ...
3 votes
1 answer
104 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 ...
1 vote
1 answer
138 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 ...
0 votes
0 answers
41 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 ...
2 votes
1 answer
121 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 ...
10 votes
2 answers
997 views

CFL condition in Discontinuous Galerkin schemes

I have implemented an ADER-Discontinuous Galerkin scheme for the resolution of linear systems of conservation laws of the type of $\partial_t U + A \partial_x U + B \partial_y U=0 $ and observed that ...
1 vote
0 answers
114 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 ...
4 votes
3 answers
909 views

How numerical diffusion is related to advection term?

I have crude idea that numerical diffusion arises while using upwind scheme and causes solution to deviate from its original one. But I am unable to understand how numerical diffusion phenomenon is (...
1 vote
2 answers
119 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 ($...
2 votes
0 answers
106 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 ...
7 votes
3 answers
4k views

Spectral Element vs Finite Element

I am trying to understand the difference between SEM and FEM. If I go by this paper, spectral element methods are a subset of FEM methods and the only difference lies in the choice of basis functions. ...
1 vote
0 answers
80 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 ...
2 votes
0 answers
97 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$ ...
4 votes
3 answers
194 views

combination of field and particle methods for fluid dynamics

In numerical fluid dynamics there are field methods like finite-volume, finite-element, etc. and particle methods like Smoothed-Particle-Hydrodynamics – SPH and others. Both approaches have advantages ...
0 votes
0 answers
703 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 ...
0 votes
0 answers
42 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 (\...
-2 votes
1 answer
452 views

How to solve this differential equation using RK4 in C++?

I have been given the following homework question to solve: I am having trouble writing a RK4 solver in C++ for this ODE. I am also not sure how to plot my solution. Here is my code so far: ...
9 votes
6 answers
912 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 ...
-1 votes
1 answer
120 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?
0 votes
0 answers
62 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 ...
1 vote
0 answers
80 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 ...
0 votes
1 answer
134 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 ...
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 ...
1 vote
1 answer
456 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 ...
2 votes
2 answers
744 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?
2 votes
1 answer
565 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 ...
2 votes
0 answers
119 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 ...
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 ...
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 ...
3 votes
2 answers
389 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 ...
2 votes
1 answer
236 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-...
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 ...
1 vote
0 answers
67 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 ...
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 ...
3 votes
2 answers
126 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 ...
7 votes
1 answer
327 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 ...

1
2 3 4 5