New answers tagged

2

There are two main questions you are asking: Can I solve Lotka-Volterra problem using explicit Euler time stepping method? Answer: Probably, but you will need to take very small time steps. It is non-linear, it sometimes has chaotic behaviour depending on the parameters. So the choice of $\Delta t$ will be important. I would probably use other time steppers,...


4

The correct dynamic equations in the polar coordinates should be $ \dot{v_r} = \omega^2 r - \alpha/r^2 \\ \dot{\omega} = - 2 v_r \omega /r\\ \dot{\theta} = \omega \\ \dot{r} = v_r $ Here is the fixed Python code: from math import * import numpy as np from matplotlib import pyplot as plt from scipy.integrate import odeint def vec(w,t): r,vr,theta,omega=...


1

n-body problem would be dense (of course, if you don't do any filtering to remove "weak" couplings. As Maxim Umansky mentioned in the comments, some discretizations of time-dependent PDEs give rise to sparse ODE systems. Some others, like spectral methods, are dense ODE systems. In terms of parallel computing, I don't think there would be much ...


2

For debugging the code, there is a set of analytic solutions here for several reduced models corresponding to subsets of terms on the right-hand side. These analytic solutions have to be reproduced by the code. Verification testing of this kind is a standard practice for debugging simulation models. Reduced model 1: $ m \ddot{x} = - \gamma \dot{x} $ Solution:...


0

I don't know about a generalized approach, but satellite around Earth can not physically orbit around it in less than about 87 minutes; at an altitude of 100 km the period is about 5190 seconds, but of course so low it will burn up quickly! That means that no matter where you are on Earth, those peaks can only reach maxima that are greater than zero (i.e. ...


Top 50 recent answers are included