From 985a7cabe2d2866599d8dee886008cb6f909de9f Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Fri, 17 Mar 2023 20:02:21 -0600 Subject: [PATCH] Moving integrator to model.md, adding note about radius, see https://github.com/phetsims/my-solar-system/issues/96, https://github.com/phetsims/my-solar-system/issues/120 --- doc/implementation-notes.md | 4 ---- doc/model.md | 10 +++++++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/implementation-notes.md b/doc/implementation-notes.md index ded0b62f..b2bf83a3 100644 --- a/doc/implementation-notes.md +++ b/doc/implementation-notes.md @@ -31,7 +31,3 @@ Some important properties to keep track of during the sim: - `isAnyBodyEscapedProperty`: As name suggests, is false unless any body is offscreen. Toggles the visibility of the 'Return Bodies' button, and when that is pressed, the escaped bodies are returned to their original positions. - `isLab`: Even though Intro and Lab have independent model files, there are still some common components which are shown or hidden depending on the value of this variable. - There are also time scales and zoom level scales which control the size and speed of the sim. - -## Integrator Algorithm - -The [numerical engine](https://github.com/phetsims/my-solar-system/blob/d55f4e68c494be3d6f31d64e7085e5ad2ca9c6f6/js/common/model/NumericalEngine.ts) on this sim relies on the Position Extended Forest-Ruth Like algorithm (PEFRL) to compute the motion of the bodies [(Omelyan, Myrglod & Folk, 2001)](https://arxiv.org/abs/cond-mat/0110585). PEFRL is a numerical integration scheme that provides high accuracy and stability for simulations involving many bodies, especially those with periodic or quasi-periodic behavior. It essentially integrates the position and velocity over time in multiple intermediate steps. \ No newline at end of file diff --git a/doc/model.md b/doc/model.md index b75f9dff..6c2a1fde 100644 --- a/doc/model.md +++ b/doc/model.md @@ -26,4 +26,12 @@ The presets used in the simulation are the same ones from the original flash ver Some elements of the sim might be hidden before the user first interactions. Here we list three situations to keep an eye out for: - **Centering the system**: Gravitational systems have a tendency to drift off screen. By default, all the pre-sets are centered and followed, but any change could cause a system-drift, or more specifically, a Center of Mass net velocity. When that happens, the sim will display an orange button which says "Follow Center of Mass". When you press it, the reference frame of the simulation will shift to be the same as the center of mass. - **Scale of Forces**: Because astronomical objects have a wide range of masses, the gravitational force acted upon them also will vary in several orders of magnitude. To aid the visual representation these forces, we placed a force scale slider under the Gravity checkbox. In most pre-sets, the gravitational force may be hidden from view because it's relatively small compared to other forces shown in the sim. With the slider you can bring them to view. -- **Bodies escaping**: Some bodies might fly off-screen. When that happens, a button will appear that let's the user bring escaped bodies back. \ No newline at end of file +- **Bodies escaping**: Some bodies might fly off-screen. When that happens, a button will appear that let's the user bring escaped bodies back. + +## Integrator Algorithm + +The [numerical engine](https://github.com/phetsims/my-solar-system/blob/d55f4e68c494be3d6f31d64e7085e5ad2ca9c6f6/js/common/model/NumericalEngine.ts) on this sim relies on the Position Extended Forest-Ruth Like algorithm (PEFRL) to compute the motion of the bodies [(Omelyan, Myrglod & Folk, 2001)](https://arxiv.org/abs/cond-mat/0110585). PEFRL is a numerical integration scheme that provides high accuracy and stability for simulations involving many bodies, especially those with periodic or quasi-periodic behavior. It essentially integrates the position and velocity over time in multiple intermediate steps. + +## Radii of Bodies + +For the purposes of collisions and display, the radii of bodies are modeled somewhat non-proportionally, as spheres with an additional minimum radius. \ No newline at end of file