Changes between Version 12 and Version 13 of HydroStaticStar


Ignore:
Timestamp:
11/01/12 16:22:45 (12 years ago)
Author:
idilernia
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • HydroStaticStar

    v12 v13  
    33== Purpose ==
    44
    5 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.
     5This 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:
    66
    77[[Image(Hydrostatic_equilibrium2.png, 250px)]]
     
    1111{{{
    1212#!latex
    13 \frac{dP}{dh} + \rho \cdot g = 0\\
     13\frac{dP}{dh} + \rho(r) \cdot g(r) = 0\\
    1414}}}
    1515
    16 where dP/dh is the change in pressure with respect to height, ρ is density and g is the gravitational potential.
     16where dP/dh is the change in pressure with respect to height, ρ(r) and g(r) are respectively density and gravitational potential.
    1717
    1818= Implementation =
    1919
    20 Two fundamental objects are used by this module:
     20First we determine a 1D profile in hydrostatic equilibrium, then the profile is ported to 2D/3D using interpolation. [[BR]][[BR]]
     21
     22=== Objects ===
     23
     24This module makes use of 3 objects:
    2125- [wiki:AmbientObjects Ambients]
    2226- [wiki:Profiles Profiles]
    2327- PointGravity
    2428
    25 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]]
    26 We can think of a 1D column of gas as an array of values:
     29=== Process ===
     30
     31We can think of a 1D column of gas as an array:
    2732
    2833||COLUMN TOP||
     
    4045
    4146{{{
    42     REAL(KIND=qPREC), DIMENSION(100,3) :: column !where the first indexing is the level
    43                                                  !2nd indexing determines the attribute (1 height, 2 rho, 3 pressure)
     47REAL(KIND=qPREC), DIMENSION(100,3) :: column !where 100 is the number of entries
     48                                             !3 is the number of attributes for each entry
     49                                             !(1 height or radius, 2 rho, 3 pressure) in this case
    4450}}}
    4551
    46 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.
     52This array need to be populated with a density profile, namely, the fields 1(height or radius) and 2(rho) for all 100 entries above. The module will be able to calculate the ideal pressure in order to create an HSE solution.
    4753
    48 In order to calculate the ideal pressure, we need to interpret:
     54To calculate a pressure profile we need to interpret:
    4955
    5056{{{
    5157#!latex
    52 \frac{dP}{dh} = - \rho \cdot g\\
     58\frac{dP}{dh} + \rho(r) \cdot g(r) = 0\\
    5359}}}
     60
    5461
    5562in a discrete way, this gives:
     
    6067}}}
    6168
    62 this simpler form can be applied to our profile array, you can check the [wiki:Profiles Profiles] page to see how this is done. After creating 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.
     69The condition above determines the pressure profile starting from the top of the column until its base. This implies we specify the pressure at the highest distance from the point mass, ideally infinity. This value can be adjusted in problem.data :
     70{{{
     71&ProblemData
     72mass=0.4d0         !PointGravity Mass
     73soft_radius=1d0    !Softening radius (in computational units)
     74soft_function=2    !Softening function (NOSOFT=0, SPLINESOFT=1, PLUMMERSOFT=2)
     75velocity=0,0,0     !PointGravity velocity
     76xloc=0,0,0         !PointGravity location
     77pressure_inf=1d0   !Ambient Pressure at infinity (cu)
     78/
     79}}}
    6380
     81You can check the [wiki:Profiles Profiles] page to familiarize with the code that handles these calculations.
     82[[BR]]
    6483This model assumes that the effects of self gravity are relatively small compared to the gravitational attraction of a point mass.
    6584
    66 == 2D,3D and Softening ==
     85== 2D, 3D and Softening ==
    6786
    68 Due to steep changes in density and gravitational potential close to the center of mass of a star, the point gravity in this model, some softening of these two parameters is needed.[[BR]]
     87Due to steep changes in density and gravitational potential close to the center of mass of a star, the point gravity in this model, softening is needed.[[BR]]
    6988With !PlummerSoftening being used to soften the gravitational potential and force in this module, a difference in the pressure and temperature profile arise between 2D and 3D models.[[BR]]
    70 You can see how the gravity force varies between 2D and 3D:[[BR]]
    71 2D:
     89Below is how gravitational acceleration is calculated for 2D and 3D respectively :[[BR]]
     90=== 2D: ===
    7291{{{
    73 GravityForce=-PlummerSoftening2D*mass*ScaleGrav
     92GravityAcceleration=-PlummerSoftening2D*mass*ScaleGrav
    7493PlummerSoftening2D=2d0*pos/(sum(pos(1:nDim)**2)+r_soft**2)
    7594}}}
    76 3D:
     95=== 3D: ===
    7796{{{
    78 GravityForce=-PlummerSoftening*mass*ScaleGrav
     97GravityAcceleration=-PlummerSoftening*mass*ScaleGrav
    7998PlummerSoftening=pos/((sum(pos**2)+r_soft**2)**(1.5d0))
    8099}}}
    81100[[BR]]
    82 Clearly, the 3D model shows a steeper gradient in pressure.[[BR]]
    83 The plot below indicates how the pressure gradient changes between 2D and 3D models and how it has important repercussions on the temperature profile as well.[[BR]]
     101Clearly, the 3D model shows a steeper gradient in pressure, this has important repercussions on the temperature profile as well.[[BR]]
     102The plot below indicates how the pressure profile changes between 2D and 3D models.[[BR]]
    84103[[Image(2Dvs3D.png, 400px)]]
    85104
    86105== Refence model comparison and results ==
    87106
    88 We divided the checking of our model accuracy into two stages:
    89 1) comparing module profiles with reference models in the literature
    90 2) running the model
     107Testing can be done in two ways:
     1081) by comparing model properties to analytic solutions
     1092) by running the model
    91110
    92111For the first testing stage, the density profile of an AGB star (can be found [http://www.public.iastate.edu/~sdk/models/ here]) was loaded into the module, after calculating pressure and temperature profiles needed for an HSE condition, the generated profiles were compared with the reference model.[[BR]]