Timeline for Conserving Energy in Physics Simulation with imperfect Numerical Solver
Current License: CC BY-SA 4.0
14 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 31, 2019 at 20:25 | comment | added | Lutz Lehmann | Symplectic methods preserve all linear and quadratic invariants. Which means that for a method of order $p$ they preserve a quantity to a higher order $h^{p+1})$ or better which itself is a $O(h^p)$ modification of the physical quantity. (This pattern breaks down where the field is singular, passing close to a singular state can change the constants of motion dramatically in their numerical versions.) | |
Dec 31, 2019 at 19:57 | vote | accept | akarshkumar0101 | ||
Dec 31, 2019 at 19:54 | comment | added | akarshkumar0101 | @Rahul however, will this still work and conserve translational kinetic AND rotational kinetic energy in weird and complex force fields? I am still solving a first order differential equation for both of these, so the semi-implicit Euler method should converge on the actual solution always? Is this true? | |
Dec 31, 2019 at 19:53 | comment | added | akarshkumar0101 | @Rahul This was my exact problem. I changed the code to semi-implicit Euler and it worked fantastically. Thanks so much! | |
Dec 31, 2019 at 19:52 | comment | added | akarshkumar0101 | @LutzLehmann Sorry, I made a type in my original post and fixed it. The force field should have said <-x, 0, 0> so the potential energy function I used was x^2/2. | |
Dec 31, 2019 at 19:36 | history | edited | akarshkumar0101 | CC BY-SA 4.0 |
wrong force field
|
Dec 31, 2019 at 18:00 | history | tweeted | twitter.com/StackSciComp/status/1212071031931846656 | ||
Dec 31, 2019 at 17:19 | history | became hot network question | |||
Dec 31, 2019 at 14:45 | comment | added | Lutz Lehmann | How do you compute the energy? For a point-mass, your force field $(-x,y,z)$ should have the potential energy $\frac12(x^2-y^2-z^2)$. Note that it is an oscillator only in $x$ direction. For an oscillation in all directions you would need a force field $-(x,y,z)=(-x,-y,-z)$. | |
Dec 31, 2019 at 12:52 | answer | added | Chris Rackauckas | timeline score: 30 | |
Dec 31, 2019 at 7:46 | comment | added | user3883 | You're probably encountering the instability of forward Euler time integration. The simplest fix, extremely popular in computer graphics, is to switch to a symplectic integrator like semi-implicit Euler. | |
Dec 31, 2019 at 5:45 | review | First posts | |||
Jan 2, 2020 at 15:09 | |||||
Dec 31, 2019 at 5:43 | comment | added | akarshkumar0101 | I had one idea of fixing this: Noting the inital kinetic and potential energy of the object and adjusting the kinetic energy at each timestep in order to match the compliment of the exact potential energy at that location. But this would imply that all force fields will have a computable potential function, which may not be true. And this would be increasingly hard with a more complex force field that I do not know at compile time. | |
Dec 31, 2019 at 5:42 | history | asked | akarshkumar0101 | CC BY-SA 4.0 |