Version 6 (modified by 12 years ago) ( diff ) | ,
---|
HydroStatic Star
Purpose
This module aims to reproduce a situation of hydrostatic equilibrium (HSE), a condition where a volume of a fluid is at rest or at constant velocity. This occurs when compression due to gravity is balanced by a pressure gradient force.
we can translate the image above into the condition:
where dP/dh is the change in pressure with respect to height, ρ is density and g is the gravitational potential.
Implementation
Two fundamental objects are used by this module:
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.
With a little bit of imagination we can think of a 1D column of gas as an array of values:
COLUMN TOP |
h_{5} | ρ_{5} | P_{5} |
h_{4} | ρ_{4} | P_{4} |
h_{3} | ρ_{3} | P_{3} |
h_{2} | ρ_{2} | P_{2} |
h_{1} | ρ_{1} | P_{1} |
h_{0} | ρ_{0} | P_{0} |
COLUMN BASE |
We can relate each level of the column to an position in an array which contains height (h), density(ρ) and pressure(P), that is:
REAL(KIND=qPREC), DIMENSION(100,3) :: column !where the first indexing is the level !2nd indexing determines the attribute (1 height, 2 rho, 3 pressure)
In this specific implementation, a density profile needs to be specified by the user, the module will be able to calculate the ideal pressure in order to create an HSE solution.
In order to calculate the ideal pressure, we need to interpret:
in a discrete way, this gives:
this simpler form can be applied to our profile array, you can check the Profiles page to see how this is done. After we created this abstraction of a column of gas in hydrostatic equilibrium, we can use interpolation to port this 1D object to a 2D or 3D model.
2D vs 3D
Accuracy test
Attachments (4)
- Hydrostatic_equilibrium2.png (13.0 KB ) - added by 12 years ago.
- 2Dvs3D.png (67.2 KB ) - added by 12 years ago.
- plotshse2.png (58.9 KB ) - added by 12 years ago.
- 3Dhse.gif (152.8 KB ) - added by 12 years ago.
Download all attachments as: .zip