Hey guys,(adsbygoogle = window.adsbygoogle || []).push({});

I know i really shouldn't be doing n-body simulations in mathematica and i'm trying to cobble together some c++ stuff but in the meantime...

i have a system of say 2000 non-interacting particles in a central potential and am solving for their orbits via the Euler-Lagrange equation, ie generating a table of euler-lagrange equations for each particle (they have different initial positions) and then solving using NDsolve. Its all fine and dandy when the mass of the central potential is within about 1000 of the mass of the incoming particle but as soon as i make that difference larger (which i need to) the RAM usage blows out and it keeps giving kernel errors. I've taken into account (or at least tried to) the fact that in a larger potential they will move faster and so the algorithm needs more steps and also i've reduced the time interval but it still blows up in my face and its quite irritiating, any ideas?

Cheers

-G

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# [Mathematica] NDsolve eating stacks of RAM

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

Loading...

Similar Threads - Mathematica NDsolve eating | Date |
---|---|

Mathematica Rescaling equations in Mathematica | May 5, 2017 |

Mathematica NDSolve different solutions same eq's | Jul 23, 2015 |

Solving ODE numerically in Mathematica - I get 'ndnum' error | Mar 17, 2015 |

Mathematica NDSolve initial condition | Mar 5, 2015 |

Mathematica Ndsolve periodic boundary conditions | Feb 12, 2015 |

**Physics Forums - The Fusion of Science and Community**