10 #ifndef __CONSERVED_LE_OBLIQUITY_EVOLUTION_H 11 #define __CONSERVED_LE_OBLIQUITY_EVOLUTION_H 13 #include "../../Core/Functions.h" 14 #include "../../Core/InterpSolutionIterator.h" 32 double value(
double lconv)
const 34 return std::acos((__total2_minus_orbital2 - lconv * lconv)
36 (2.0 * lconv * __orbital_angmom));
45 double orbital_angmom,
53 __lconv_evol(lconv_evol),
54 __orbital_angmom(orbital_angmom),
55 __total2_minus_orbital2(
std::pow(total_angmom, 2)
57 std::pow(orbital_angmom, 2)),
58 __disk_lifetime(disk_lifetime)
63 return (age < __disk_lifetime
74 "Finding all solutinos of ConservedLEConvObliquityEvolution " 88 "Derivatives not implemented for 1-0 obliquity evolution." 90 if(age < __disk_lifetime)
93 double obliquity =
value(lconv_deriv->
order(0)),
94 order1 = - 1.0 / std::sin(obliquity) * (
95 __total2_minus_orbital2
97 (2.0 * __orbital_angmom * std::pow(lconv_deriv->
order(0), 2))
138 double lconv_perp = lconv * std::sin(conv_obliq),
139 lconv_par = lconv * std::cos(conv_obliq),
140 repeated = (std::pow(__orbital_angmom, 2)
144 2.0 * __orbital_angmom * lconv_par);
146 return __initial_obliquity - std::acos(
148 (__orbital_angmom + lconv_par)
153 std::pow(__initial_lconv_perp, 2)
156 __initial_lconv_perp * lconv_perp
172 double orbital_angmom,
177 __lconv_evol(lconv_evol),
178 __conv_obliq_evol(conv_obliq_evol),
179 __orbital_angmom(orbital_angmom),
180 __initial_obliquity(conv_obliq_evol(disk_lifetime)),
181 __initial_lconv_perp(lconv_evol(disk_lifetime)
183 std::sin(__initial_obliquity)),
184 __disk_lifetime(disk_lifetime)
189 return (age < __disk_lifetime
204 "Solving ConservedLERadObliquityEvolution not implemented!" 217 "Differentiating ConservedLERadObliquityEvolution not implemented!" double __disk_lifetime
The lifetime to assume for the disk before evolution starts.
double __orbital_angmom
The orbital angular momentum (does not evolve).
double range_low() const
The upper end of the range over which the function is defined.
const Core::OneArgumentDiffFunction & __lconv_evol
The evolution of the convective zone angular momentum.
double operator()(double age) const
The value of the function at the given abscissa.
A class representing a once differentiable function of a single argument.
double operator()(double age) const
The value of the function at the given abscissa.
double __initial_lconv_perp
The initial component of the convective zone angular momentum perpendicular to the orbital angular mo...
const Core::OneArgumentDiffFunction & __lconv_evol
The evolution of the convective zone angular momentum.
const Core::FunctionDerivatives * deriv(double) const
Returns a pointer to the derivative of the function.
virtual double order(unsigned deriv_order=1) const =0
Derivative of the given order of the function with respect to its argument.
An iterator over a set of solutions to an interpolating function.
double __orbital_angmom
The orbital angular momentum magnitude (does not evolve).
Core::InterpSolutionIterator crossings(double=0) const
An iterator over the abscissas where the function takes the given y value.
ConservedLEConvObliquityEvolution(const Core::OneArgumentDiffFunction &lconv_evol, double orbital_angmom, double total_angmom, double disk_lifetime)
double value(double lconv) const
The value of the obliquity for the given convective angular momentum.
double value(double lconv, double conv_obliq) const
The radiative zone obliquity for the given parameters.
double __initial_obliquity
The obliquity at the time the disk dissipates.
double range_low() const
The upper end of the range over which the function is defined.
double __total2_minus_orbital2
A class representing arbitrary order derivatives of a function.
Core::InterpSolutionIterator crossings(double=0) const
An iterator over the abscissas where the function takes the given y value.
A class for the derivatives of a cubic spline (=0 for order>2).
double __disk_lifetime
See ConservedLEConvObliquityEvolution::__disk_lifetime.
ConservedLERadObliquityEvolution(const Core::OneArgumentDiffFunction &lconv_evol, const ConservedLEConvObliquityEvolution &conv_obliq_evol, double orbital_angmom, double disk_lifetime)
double range_high() const
The lower end of the range over which the function is defined.
const Core::FunctionDerivatives * deriv(double age) const
Returns a pointer to the derivative of the function.
double range_high() const
The lower end of the range over which the function is defined.
const ConservedLEConvObliquityEvolution & __conv_obliq_evol
The evolution of the convective zone obliquity.
virtual const FunctionDerivatives * deriv(double x) const =0
Returns a pointer to the derivative of the function.
virtual InputDataType range_high() const =0
The lower end of the range over which the function is defined.
virtual InputDataType range_low() const =0
The upper end of the range over which the function is defined.