| 15 | |
| 16 | = Implementation = |
| 17 | |
| 18 | Two fundamental objects are used by this module: |
| 19 | - [wiki:AmbientObjects Ambients] |
| 20 | - [wiki:Profiles Profiles] |
| 21 | - PointGravity |
| 22 | |
| 23 | For this module, the first step to recreate the solution is to determine a 1D profile in hydrostatic equilibrium, this profile can then be applied to a spherically symmetric 3D model using interpolation. [[BR]][[BR]] |
| 24 | With a little bit of imagination we can think of a 1D column of gas as an array of values: |
| 25 | |
| 26 | ||COLUMN TOP|| |
| 27 | |
| 28 | ||h,,5,,||ρ,,5,,||P,,5,,|| |
| 29 | ||h,,4,,||ρ,,4,,||P,,4,,|| |
| 30 | ||h,,3,,||ρ,,3,,||P,,3,,|| |
| 31 | ||h,,2,,||ρ,,2,,||P,,2,,|| |
| 32 | ||h,,1,,||ρ,,1,,||P,,1,,|| |
| 33 | ||h,,0,,||ρ,,0,,||P,,0,,|| |
| 34 | |
| 35 | ||COLUMN BASE|| |
| 36 | |
| 37 | We can relate each level of the column to an position in an array which contains height (h), density(ρ) and pressure(P). |