Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
EvolvingStar.h
Go to the documentation of this file.
1 
9 #ifndef __EVOLVING_STAR_H
10 #define __EVOLVING_STAR_H
11 
12 #include "../Core/SharedLibraryExportMacros.h"
15 #include "../StellarEvolution/Interpolator.h"
16 #include "EvolvingStellarCore.h"
18 
19 namespace Star {
20 
21  class LIB_PUBLIC InterpolatedEvolutionStar :
24  private:
32 
34  double __lifetime;
35 
38 
41 
42  public:
45  double mass,
46 
48  double feh,
49 
51  double wind_strength,
52 
54  double wind_saturation_frequency,
55 
57  double diff_rot_coupling_timescale,
58 
60  const StellarEvolution::Interpolator &interpolator
61  ) :
62  SaturatingSkumanichWindBody(wind_strength,
63  wind_saturation_frequency),
64  ExponentialDecayDiffRotBody(diff_rot_coupling_timescale),
65  __luminosity(interpolator(StellarEvolution::LUM, mass, feh)),
66  __lifetime(__luminosity->range_high()),
67  __envelope(mass,
68  interpolator(StellarEvolution::RADIUS,
69  mass,
70  feh),
71  interpolator(StellarEvolution::ICONV,
72  mass,
73  feh)),
74  __core(std::max(__envelope.min_interp_age(),
75  interpolator.core_formation_age()),
76  interpolator(StellarEvolution::MRAD, mass, feh),
77  interpolator(StellarEvolution::RRAD, mass, feh),
78  interpolator(StellarEvolution::IRAD, mass, feh))
79  {}
80 
82  unsigned number_zones() const {return 2;}
83 
85  Evolve::DissipatingZone &zone(unsigned zone_index)
86  {
87  assert(zone_index<=1);
88 
89  if(zone_index == 0) return __envelope;
90  else return __core;
91  }
92 
94  const EvolvingStellarEnvelope &envelope() const {return __envelope;}
95 
97  EvolvingStellarEnvelope &envelope() {return __envelope;}
98 
100  const EvolvingStellarCore &core() const {return __core;}
101 
103  EvolvingStellarCore &core() {return __core;}
104 
106  const Evolve::DissipatingZone &zone(unsigned zone_index) const
107  {
108  assert(zone_index<=1);
109 
110  if(zone_index==0) return __envelope;
111  else return __core;
112  }
113 
115  double lifetime() const {return __lifetime;}
116 
118  double luminosity(double age) const {return (*__luminosity)(age);}
119 
121  ~InterpolatedEvolutionStar() {delete __luminosity;}
122 
126  virtual void reached_critical_age(double age)
127  {
128  __core.reached_critical_age(age);
129  __envelope.reached_critical_age(age);
130  }
131 
134  virtual double next_stop_age() const
135  {return std::min(__core.next_stop_age(),
136  __envelope.next_stop_age());}
137 
144  virtual void select_interpolation_region(double age) const
145  {
146  __core.select_interpolation_region(age);
147  __envelope.select_interpolation_region(age);
148  }
149  };//End InterpolatedEvolutionStar class
150 
151 }//End Star namespace.
152 
153 #endif
Declaration of the class representing stellar cores.
double lifetime() const
The lifetime of the star (where tracks end).
Definition: EvolvingStar.h:115
RADIUS
The derivative w.r.t. the radius of the body in .
Declares a DissipatingBody with exponentially decaying differential rotation coupling.
double core_formation_age(const EvolvingStar *star)
The age at which the core of a star forms.
Definition: CInterface.cpp:126
EvolvingStellarCore __core
The core of the star (NULL if high mass).
Definition: EvolvingStar.h:40
const Evolve::DissipatingZone & zone(unsigned zone_index) const
See Evolve::DissipatingBody::zone().
Definition: EvolvingStar.h:106
Definition: Common.cpp:10
EvolvingStellarCore & core()
The core of the star.
Definition: EvolvingStar.h:103
Declares a class representing convective zones in low mass evolving stars or the whole star for high ...
const int LUM
Identifier for the stellar luminosity as an interpolation quantity.
Definition: CInterface.cpp:13
Evolve::DissipatingZone & zone(unsigned zone_index)
See Evolve::DissipatingBody::zone().
Definition: EvolvingStar.h:85
Radiative core for low mass evolving stars.
EvolvingStellarEnvelope __envelope
The surface zone of the star (the entire star if high mass).
Definition: EvolvingStar.h:37
const EvolvingStellarCore & core() const
The core of the star.
Definition: EvolvingStar.h:100
A class for stellar properties that depend on age.
virtual void select_interpolation_region(double age) const
Prepare the zone quantities for interpolation around the given age.
A class that interpolates among stellar evolution tracks.
Definition: Interpolator.h:42
double next_stop_age() const
The next age when the evolution needs to be stopped for a change in one of the bodies.
Decrales a body subject to angular momentum loss .
A layer of a system body for which the tidal bulge is not exactly in phase with the tidal potential...
InterpolatedEvolutionStar(double mass, double feh, double wind_strength, double wind_saturation_frequency, double diff_rot_coupling_timescale, const StellarEvolution::Interpolator &interpolator)
Definition: EvolvingStar.h:43
void reached_critical_age(double age)
Change the body as necessary at the given age.
Surface convective zone for low mass evolving stars or the entire star for high mass stars...
const StellarEvolution::EvolvingStellarQuantity * __luminosity
The luminosity of the star in as a function of age in Gyr.
Definition: EvolvingStar.h:31
unsigned number_zones() const
The number of zones the body consists of.
Definition: EvolvingStar.h:82
Moment of inertia of the radiative zone of the star (low mass stars only) in .
Definition: IOColumns.h:114
const EvolvingStellarEnvelope & envelope() const
The envelope of the star - inmodifiable.
Definition: EvolvingStar.h:94
Moment of inertia of the convective zone of the star (low mass stars only) in .
Definition: IOColumns.h:110
~InterpolatedEvolutionStar()
Cleanup after the star.
Definition: EvolvingStar.h:121
double __lifetime
The age at which the star leaves the main sequence in Gyrs.
Definition: EvolvingStar.h:34
virtual void reached_critical_age(double age)
Change the star as necessary at the given age.
Definition: EvolvingStar.h:126
EvolvingStellarEnvelope & envelope()
The envelope of the star - modifiable.
Definition: EvolvingStar.h:97
Radius of the stellar core in (low mass stars only).
Definition: IOColumns.h:123
double luminosity(double age) const
The luminosity of the star at the given age.
Definition: EvolvingStar.h:118
A DissipatingBody which loses angular momentum at a rate .
A body with differential rotation torque between two zones given by: .
Mass of the stellar core in (low mass stars only).
Definition: IOColumns.h:126
virtual double next_stop_age() const
The next age when the evolution needs to be stopped for a change in one of the bodies.
Definition: EvolvingStar.h:134
virtual void select_interpolation_region(double age) const
Prepare the stellar quantities for interpolation around the given age.
Definition: EvolvingStar.h:144