Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
EvolvingStellarCore.h
Go to the documentation of this file.
1 
8 #ifndef __EVOLVING_STELLAR_CORE_H
9 #define __EVOLVING_STELLAR_CORE_H
10 
11 #include "../Core/SharedLibraryExportMacros.h"
12 #include "EvolvingStellarZone.h"
13 
14 #include "../Core/Functions.h"
15 #include "../StellarEvolution/EvolvingStellarQuantity.h"
16 
17 namespace Star {
18 
20  class LIB_PUBLIC EvolvingStellarCore : public EvolvingStellarZone {
21  private:
22  const double __NEGLIGIBLE_INERTIA = 0.0;
23  const double __NEGLIGIBLE_MASS = 0.0;
24  const double __NEGLIGIBLE_RADIUS = 0.0;
25 
28 
34  MASS,
37  };
38 
40  double positive_definite_quantity(size_t quantity,
41  double age,
42  unsigned deriv_order,
43  double min_value) const;
44 
46  double current_positive_definite_quantity(size_t quantity,
47  unsigned deriv_order,
48  double min_value) const;
49 
50  public:
54  double formation_age=Core::Inf,
55 
58 
60  const StellarEvolution::EvolvingStellarQuantity *radius = NULL,
61 
64  *moment_of_inertia = NULL
65  ) :
66  EvolvingStellarZone({mass, radius, moment_of_inertia}),
67  __formation_age(formation_age)
68  {}
69 
71  double moment_of_inertia(int deriv_order = 0) const
72  {
73  return current_positive_definite_quantity(INERTIA,
74  deriv_order,
75  __NEGLIGIBLE_INERTIA);
76  }
77 
79  double moment_of_inertia(double age, int deriv_order = 0) const
80  {
81  return positive_definite_quantity(INERTIA,
82  age,
83  deriv_order,
84  __NEGLIGIBLE_INERTIA);
85  }
86 
88  double outer_radius(int deriv_order = 0) const
89  {
90  return current_positive_definite_quantity(RADIUS,
91  deriv_order,
92  __NEGLIGIBLE_RADIUS);
93  }
94 
96  double outer_radius(double age, int deriv_order = 0) const
97  {
98  return positive_definite_quantity(RADIUS,
99  age,
100  deriv_order,
101  __NEGLIGIBLE_RADIUS);
102  }
103 
105  double outer_mass(int deriv_order = 0) const
106  {
107  return current_positive_definite_quantity(MASS,
108  deriv_order,
109  __NEGLIGIBLE_MASS);
110  }
111 
113  double outer_mass(double age, int deriv_order = 0) const
114  {
115  return positive_definite_quantity(MASS,
116  age,
117  deriv_order,
118  __NEGLIGIBLE_MASS);
119  }
120 
122  double formation_age() const {return __formation_age;}
123  }; //End EvolvingStellarCore class.
124 
125 }//End Star namespace.
126 
127 #endif
RADIUS
The derivative w.r.t. the radius of the body in .
Base class for zones of low mass evolving stars.
QuantityIndex
Identifiers for the various age dependent values which are only computed once per fixed age...
Radiative core for low mass evolving stars.
A class for stellar properties that depend on age.
Declares a base class for all stellar zones.
double outer_radius(int deriv_order=0) const
See DissipatingZone::outer_radius(int).
The outer mass boundary of the zone.
double moment_of_inertia(int deriv_order=0) const
See DissipatingZone::moment_of_inertia(int).
double __formation_age
The age at which the core first forms.
double outer_mass(int deriv_order=0) const
See DissipatingZone::outer_mass(int).
EvolvingStellarCore(double formation_age=Core::Inf, const StellarEvolution::EvolvingStellarQuantity *mass=NULL, const StellarEvolution::EvolvingStellarQuantity *radius=NULL, const StellarEvolution::EvolvingStellarQuantity *moment_of_inertia=NULL)
Create a stellar core with the specified properties.
The outer radius boundary of the zone.
double outer_mass(double age, int deriv_order=0) const
See DissipatingZone::outer_mass(double, int).
double formation_age() const
The age at which the core forms in Gyr.
double outer_radius(double age, int deriv_order=0) const
See DissipatingZone::outer_radius(double, int).
double moment_of_inertia(double age, int deriv_order=0) const
See DissipatingZone::moment_of_inertia(double, int).