Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
38 views

Finite differences stability issue for PDE

Lets say I have the following centered space (x, first index) forward time (t, second index) scheme for a coupled system of partial DEs: $$u[j, k+1] = u[j, k] - \frac{\Delta t} {2 \cdot \Delta x} \...
MichaelW's user avatar
  • 151
1 vote
0 answers
45 views

On reproducing the Poincare section figure in a paper by Sato, Akiyama and Doyne Farmer

This is a repost of a question I posted on MathOverflow, but was suggested to post here due to relevance. I am trying to reproduce Figure 1 in the paper "Chaos in learning a simple two-person ...
Kshitij Kulkarni's user avatar
2 votes
0 answers
71 views

Can I change the coordinates of the problem to avoid dynamic mesh?

I am looking to simulate the velocity field of a fluid around a fish. Fortunately, some analytical functions have been derived for specific cases (e.g., A Generalized Slender-Body Theory for Fish-Like ...
Gum's user avatar
  • 21
4 votes
1 answer
185 views

Why do different ODE solvers give very different solutions to this problem?

I want to simulate the system defined by the following ordinary differential equations with periodic boundary conditions with $N$ lattice sites \begin{equation} i\frac{d}{dt}\phi_n = (1 + |\phi_n|^2)\...
KZ-Spectra's user avatar
10 votes
3 answers
2k views

Numerical integration of ODEs: Why does higher accuracy and precision not lead to convergence?

I'm trying to integrate numerically a non-linear ODE that, on paper, is simple (just the damped, forced pendulum), but that, as well known, its dynamics displays a chaotic behavior and is very ...
Mark's user avatar
  • 233
3 votes
0 answers
70 views

Numerical integration of ODEs: Why does higher accuracy and precision not lead to convergence? [duplicate]

I'm trying to integrate numerically a non-linear ODE that, on paper, is simple (just the damped, forced pendulum), but that, as well known, its dynamics displays a chaotic behavior and is very ...
Mark's user avatar
  • 233
0 votes
0 answers
128 views

Heat Equation for fast source with FiPy

I'm trying to solve the following differential equation with FiPy, basically laser irradiation on a surface $$ \rho_{s}C_{p,s}\frac{\partial T}{\partial t} = k_{s}\frac{\partial^{2}T}{\partial x^{2}} +...
clope99's user avatar
  • 11
1 vote
1 answer
65 views

How to solve three coupled differential equations in python using RK-4 and shooting method? or using solve_bvp?

I am trying to solve three coupled differential equations in Python. I am using RK-4 techniques with Shooting method. I am trying to plot the f and N functions. ...
Prosenjit Paul's user avatar
3 votes
0 answers
53 views

Datasets for inverse heat transfer problems

I was wondering if there is an available, real-life known inverse heat transfer problem dataset to benchmark oneselfs algorithm, as in MNIST for deep learning. Talking about... (well in this case I ...
Aner's user avatar
  • 191
1 vote
1 answer
123 views

Solving TOV equations that describes neutron stars in modified f(R, T) gravity

Sorry for the long post, tldr at bottom. I'm trying to use standard RK4 code in C/C++ to solve a coupled system of 2 modified TOV equations in f(R,T) gravity and reproduce some of the results of this ...
hidenori's user avatar
6 votes
2 answers
435 views

Time integration of first-order ODE with higher-order information

Suppose I wish to derive a numerical integrator for the first-order ODE $$x'(t)=F(x(t)).$$ By differentiating both sides of the expression in $t$, I can write a second-order relation also satisfied ...
Justin Solomon's user avatar
1 vote
1 answer
256 views

Coupled Partial Differential Equations

I'm trying to solve the following system of coupled differential equations, the two-temperature model for $e$ = electrons and $l$ = lattice. $$ \rho_{e}C_{p,e}\frac{\partial T_{e}}{\partial t} = k_{e}\...
clope99's user avatar
  • 11
1 vote
0 answers
50 views

How can I apply a mixed boundary condition to a multi-material heat transfer problem using Crank-Nicolson?

I am working on a mixed material model for a melting material and need to enforce both a Dirichlet and Neumann type condition at the interface. Subject to an external surface heat flux at the top of ...
ZebraEagle's user avatar
0 votes
0 answers
38 views

Thermo Hydraulic Mechanical modeling of energy wall slab in Comsol multiphysics

I am currently working on a complex simulation project involving an energy wall slab, and I need assistance in accurately modeling and validating it using COMSOL Multiphysics. Here are the details of ...
Hizbullah's user avatar
1 vote
1 answer
101 views

Moving least square method in finite volume method

Consider a differntial equation like : $\nabla .(\nabla u)=cte$, using finite volume method we can write $\int\nabla .(\nabla u) dv =\int n.(\nabla u) dA $. Here we want to use the moving least square ...
mojijoon's user avatar
1 vote
1 answer
290 views

Numerically solving the Advection-diffusion equation with no-flux boundary condition leads to violation of mass conservation

I am trying to solve numerically the advection-diffusion equation of the following form $$\frac{\partial C}{\partial t}=\alpha\frac{\partial^2 C}{\partial x^2}+\beta \frac{\partial C}{\partial x}$$ ...
Ornate's user avatar
  • 11
3 votes
0 answers
156 views

Galerkin Method - Why does integration-by-parts eliminate need to enforce Neumann boundaries?

I've posted this to MathStackexchange but I figured I'd also post here as well as I have yet to receive an answer on my original post, and that I would be more likely to encounter users of the ...
Timothy Leong's user avatar
1 vote
1 answer
133 views

Can I combine the backward and forward euler methods - simialr to modified euler method?

Constructing Modified Euler Using the same strategy as done in the construction of Modified Euler. Starting from Trapezoidal Method $$y_1 = y_0 + \dfrac{h}{2}\left(f(x_0,y_0) + f(x_1,y_1)\right)$$ ...
ray_lv's user avatar
  • 11
1 vote
2 answers
121 views

How to handle non bilinear weak form?

I solved the 2D heat equation using the finite element method. It all went well first with the adiabatic case, however problems occured when I introduced cooling with the enviroment. I modeled the ...
Boiler4562's user avatar
0 votes
0 answers
29 views

Help in solving Quintessential scalar field using Steep Potential in cosmology

I am attempting to solve the differential equation $\ddot\phi + 3H\dot\phi + \dfrac{dV}{d\phi} = 0.$ For $V(\phi) = V_{0}e^{-\lambda\phi}$, where $V_{0} = 0.7$, $\lambda = 0.1$ and $V'(\phi) = \dfrac{...
user avatar
0 votes
0 answers
72 views

Solving coupled 2nd-order differential equation

I would appreciate it if you could help me solve the following coupled equation numerically $$ [-\frac{1}{2} \partial_r^2 + v_0(r) -E]\psi_{\ell} + v_1(r) \psi_{1-\ell}(r) = 0, $$ where $\ell = 0 , 1$ ...
Ghoti's user avatar
  • 1
0 votes
0 answers
88 views

Unable to solve numerically this system of differential equation

I'm trying to obtain the graph of x(y) from the following system : Therefore I tried to solve this system using an Euler Method : ...
Mipix's user avatar
  • 1
1 vote
1 answer
210 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
1 vote
0 answers
126 views

How to vectorise numerical differentiation

I have a 2-D matrix with 2 spatial coordinates and I want to be able to vectorise the process of numerically differentiating with respect to its 2 coordinates, rather than just looping along the rows ...
THATS MY QUANT MY QUANTITATIVE's user avatar
2 votes
1 answer
212 views

Numerical calculation of Lyapunov exponents using SciPy's built-in solve_ivp

I have previously successfully implemented the QR decomposition method in MATLAB to calculate Lyapunov exponents for Lorenz equations. See here. This method integrates the stacked system, i.e. the ...
Axel Wang's user avatar
  • 307
2 votes
1 answer
411 views

Where am I making a mistake in solving the heat equation using the spectral method (Chebyshev's differentiation matrix)?

I would like to numerically solve the following heat equation problem: $$ u_t = \Bigg(2{a \over l}\Bigg)^2 u_{xx} \tag 1$$ $$ x \in [ -1, 1 ] \tag 2$$ $$ u(x, 0) = 0 \tag 3$$ $$ u(1, t) = A \sin \Bigg(...
FriendlyNeighborhoodEngineer's user avatar
1 vote
1 answer
143 views

Step size constraint in Euler backward

I am dealing with an assignment in MATLAB. It has to do with 'self-driving' cars which are driving in-front/behind eachother. Assuming M cars on a single-lane road, each car adjusts its speed based on ...
user46892's user avatar
1 vote
0 answers
47 views

Implementation of operator splitting method for Wigner equation

I am dealing with the integro-differential equation for Wigner function, $$\frac{\partial f}{\partial t}+p\frac{\partial f}{\partial x}+\\+\frac{1}{\chi}\left\{\int_{-\pi}^{+\pi}dy\,\int_{-\infty}^{+\...
Artem Alexandrov's user avatar
1 vote
0 answers
155 views

FEM for nonlinear first-order ODE

Currently I am trying to solve nonlinear Ricatti equation using FEM (Matlab language): $$\frac{d r(z)}{dz} = i k(z) r(z) + \frac{i k(z)}{2}(\epsilon(z) - 1)(1 + r(z))^2$$ $z = [-h/2, h/2]$ and $r(-h/2)...
Andrew's user avatar
  • 31
1 vote
2 answers
141 views

Is there any way to reduce an RK4 method's dependence on step size?

I am working in the sphere of orbital simulations, where orbital trajectories are computed using the differential equations describing gravity. Due to the great timescales of orbits, a step size of ...
JS4137's user avatar
  • 133
1 vote
1 answer
72 views

Why does a two-body simulation result in no change of the y-component?

I've been attempting to create a model of a heliocentric orbit based on Newton's law of gravitation: $$ \frac{d^2 \vec r}{dt^2} = -\frac{GM}{|r|^2} \hat r $$ This is what I have so far: ...
JS4137's user avatar
  • 133
2 votes
2 answers
979 views

Numerical implementation of ODE differs largely from analytical solution

I am trying to solve the ODE of a free fall including air resistance. I therefore defined my ODE as: def f(v, g, k, m): return g - k/m * v**2 which in my ...
Axel's user avatar
  • 123
2 votes
1 answer
218 views

Using Sundials CVODE in MATLAB

I'm currently using ode15s to solve a set of stiff differential equations. I am trying to use the MATLAB profiler to understand the section of the ode solver code which calls BLAS routines. Since the ...
Natasha's user avatar
  • 433
4 votes
1 answer
687 views

Is my differential equation solving code wrong?

I am trying to simulate LLG equation without damping. The equation is $$\frac{d\vec{m}}{dt} = \vec{m}\times\vec{H}$$ I am solving in spherical coordinates as LLG equation is known to have problems in ...
User's user avatar
  • 141
1 vote
0 answers
39 views

How does the time needed for force propagation increase with the discretization (using symplectic Euler schemes)?

I am trying to model a physical system by (lets say the system is a long deformable object, on which I can apply forces). It can be described by Cosserat Rod theory and discretized, by modelling it ...
the2second's user avatar
0 votes
1 answer
110 views

Computing discrete laplacian matrix for mesh fairing

I asked this question on the math stack exchange and got an answer, but I am just as utterly confused as before. My fundamental goal is to actually construct the matrix, that is, a series of steps I ...
Makogan's user avatar
  • 379
1 vote
0 answers
79 views

Solving perturbed Einstein Boltzmann equations using RK4

I'm trying to learn to numerically solve the perturbed Boltzmann-Einstein equations in cosmology using the RK4 method. These are the equations: $$\dot{\Theta}_{r,0}+k\Theta_{r,1}=-\dot{\Phi}$$ $$\dot{\...
hidenori's user avatar
3 votes
1 answer
231 views

First derivative central differences with reflecting boundary conditions

I have the following problem in 1-D: \begin{equation} \partial_t u(t,x) = v(x)\partial_x u(t,x) + \kappa(x) \partial_{xx} u(t,x),\,x\in\Omega;\quad \partial_{\nu}u(t,x) = 0, \,x\in\partial\Omega. \end{...
lightxbulb's user avatar
  • 2,892
0 votes
0 answers
61 views

Algorithm for 1-dimensional minimal surfaces

Consider a set of points. For simplicity, let's say that those are 2D points (although the problem works in higher dimensions as well). The goal is to find the minimum possible length of a connected 1-...
Relja Šegvić's user avatar
1 vote
1 answer
338 views

Why does scipy Conjugate Gradient solver fail to converge for non-steady heat equation using Crank-Nicolson method

Could someone please explain why my implementation of the Crank-Nicolson method applied to the non-steady heat equation won't converge? There shouldn't be any nonlinear aspects to my implementation ...
n1ck94's user avatar
  • 13
0 votes
0 answers
108 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
1 vote
1 answer
314 views

Euler's Method for fast moving particle trajectory

I'm trying to figure out how a magnet affects the trajectory of a particle travelling near the speed of light downwards toward the ground. The equation for the force of the magnetic field is pretty ...
summersfreezing's user avatar
0 votes
1 answer
489 views

computing Lyapunov exponents numerically

I am trying to compute numerically the Lyapunov exponents of an ODE. I follow the method described in Parker, Chua "Practical Numerical Algorithms for Chaotic systems" There is also relevant ...
0x11111's user avatar
  • 101
0 votes
0 answers
54 views

Does a warning in solve_bvp mean that the solution has to be discarded?

I am trying to solve a nonlinear and discontinuous fourth order BVP using the solve_bvp function of SciPy. My equation is $y^{(4)}=cf(y)$, where $f(y)$ is a ...
Mechanician's user avatar
2 votes
2 answers
557 views

Solving IVP backward in time via python

I'm having difficulty solving an initial value problem (IVP) in Python backwards in time. The code is at the end of this post. First, please let me state my simplified problem. The forward IVP is ...
JesseJC's user avatar
  • 21
2 votes
0 answers
114 views

Efficient heat diffusion implementation with varying coefficients

I have the following heat diffusion equation: \begin{alignat}{3} \partial_t u(t, \vec{x}) &= g(\vec{x})\Delta u(t,\vec{x}), &\quad& \vec{x} \in\Omega, \, t\in(0,\infty],\\ \partial_n u(t,\...
lightxbulb's user avatar
  • 2,892
1 vote
1 answer
108 views

Isolating decaying solutions to nonlinear second-order ode

I need to solve a nonlinear ODE of the form $$ \frac{d^2 y}{dx^2} + \frac{1}{x}\frac{dy}{dx}-\frac{1}{x^2}\sin(y)\cos(y)+\frac{2}{\alpha}\frac{\sin^2(y)}{x}-\sin(y)=0 $$ numerically, subject to the ...
Ali Shakir's user avatar
1 vote
1 answer
284 views

How to solve coupled differential equations numerically?

I've just started a project, trying to do simulation of electrodynamics using the well-known Maxwell equations: $$ \nabla \cdot \mathbf E = \rho \\ \; \\ \nabla \cdot \mathbf B = 0 \\ \; \\ \nabla \...
Álvaro Rodrigo's user avatar
6 votes
2 answers
829 views

How do people know the classic Lorenz attractor is actually deterministically chaotic at infinite time?

Correct me if I am wrong, but I take it that people actually think the classic Lorenz system is fully characterized, i.e. we know what the attractor looks like and the various fractal dimensions of it,...
Axel Wang's user avatar
  • 307
1 vote
1 answer
189 views

how to solve a coupled nonlinear partial differential equations(Boundary Value Problem)

So far, I have been looking into linear and nonlinear differential equations(Boundary value problem) that look like the following: $\frac{d^2 \theta}{dz^2} + \sin(\theta) = 0$ I am now familiar with ...
Hari Sam's user avatar

1
2 3 4 5 6