SEVN
Loading...
Searching...
No Matches
Lambda_Nanjing_interpolator Class Reference

#include <lambda_nanjing.h>

Inheritance diagram for Lambda_Nanjing_interpolator:
Lambda_Nanjing Lambda_Base

Public Member Functions

 Lambda_Nanjing_interpolator ()
 
 Lambda_Nanjing_interpolator (_UNUSED const Star *s)
 
 Lambda_Nanjing_interpolator (_UNUSED const IO *io)
 
double operator() (const Star *s) override
 

Protected Types

typedef unsigned int coeff_status
 

Protected Member Functions

double operator() (unsigned int Phase, double Mzams, double Z, double Radius, double Menv, double lambda_th)
 
void find_interpolators (double Mzams)
 
virtual double lambda_Giant (const Star *s)
 
virtual double lambda_Giant (_UNUSED double Mzams, _UNUSED double Z, _UNUSED double Radius, _UNUSED double Menv, _UNUSED double lambda_th)
 
virtual double lambda_Cheb (const Star *s)
 
virtual double lambda_Cheb (_UNUSED double Mzams, _UNUSED double Z, _UNUSED double Radius, _UNUSED double Menv, _UNUSED double lambda_th)
 
virtual double lambda_AGB (const Star *s)
 
virtual double lambda_AGB (_UNUSED double Mzams, _UNUSED double Z, _UNUSED double Radius, _UNUSED double Menv, _UNUSED double lambda_th)
 
virtual double lambda_pureHe (const Star *s)
 
virtual double lambda_pureHe (_UNUSED double Mzams, _UNUSED double Z, _UNUSED double Radius, _UNUSED double Menv, _UNUSED double lambda_th)
 
virtual coeff_status set_coeff_Giant (double Mzams, double Z, double Radius)
 
virtual coeff_status set_coeff_Cheb (double Mzams, double Z, double Radius)
 
virtual coeff_status set_coeff_AGB (double Mzams, double Z, double Radius)
 
std::vector< double > fitting_equation (double x)
 
int reset ()
 

Protected Attributes

double Mzams_cache {0}
 
double Z_cache {0}
 
sevnstd::SevnLogging svlog
 
std::vector< double > coeff_lambdab
 
std::vector< double > coeff_lambdag
 
std::vector< double > maxBG = {}
 
std::vector< double > lambdaBG = {}
 

Static Protected Attributes

static std::vector< double > Mzams_list = {1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,12.,14.,16.,20.,50.,100.}
 

Private Member Functions

double lambda_estimate (double lambda_th)
 

Private Attributes

double Mzams_interpolators [2] = {0.,0.}
 
double wM [2] = {0., 0.}
 
const double ZpopI = 0.0085
 

Static Private Attributes

static constexpr unsigned int COEF_SET = 1
 
static constexpr unsigned int COEF_NOT_SET = 0
 

Detailed Description

Class to estimate the Lambda using fitting equations in Xi&Liu10. See the documentation of the base class for more information.

With respect to the base class, the lambda is not estimated in a quantised form, bur rather using an interpolation considering the Mzams. The interpolating Mzams are the one reported in the Xu&Li errata (https://iopscience.iop.org/article/10.1088/0004-637X/722/2/1985): (1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,12.,14.,16.,20.,50.,100.) Msun.

Each time a lambda estimate is needed for a star with Mzams=Mzams*, two interpolating masses are defined so that Mzams_track0<=Mzams*<=Mzams_track1, if Mzams*<1 Msun or Mzams*>100 Msun, the lambda is estimated using Mzams=1 Msun and Mzams1=100 Msun respectively The lambda of the interpolating tracks are estimated considering the current Radius, envelope mass and metallicity of the current track

Member Typedef Documentation

◆ coeff_status

typedef unsigned int Lambda_Nanjing::coeff_status
protectedinherited

Constructor & Destructor Documentation

◆ Lambda_Nanjing_interpolator() [1/3]

Lambda_Nanjing_interpolator::Lambda_Nanjing_interpolator ( )
inline

◆ Lambda_Nanjing_interpolator() [2/3]

Lambda_Nanjing_interpolator::Lambda_Nanjing_interpolator ( _UNUSED const Star s)
inline

◆ Lambda_Nanjing_interpolator() [3/3]

Lambda_Nanjing_interpolator::Lambda_Nanjing_interpolator ( _UNUSED const IO io)
inline

Member Function Documentation

◆ find_interpolators()

void Lambda_Nanjing_interpolator::find_interpolators ( double  Mzams)
protected

◆ fitting_equation()

std::vector< double > Lambda_Nanjing::fitting_equation ( double  x)
inlineprotectedinherited

Polynomial fitting equation for lambda (Eq. 13 in Xu&Li10)

Parameters
xargument of the fitting equation
Returns
results (2) of the fifth order polynomial equation, the coefficients are taken from coeff_lambdab and coeff_lambdag

◆ lambda_AGB() [1/2]

virtual double Lambda_Nanjing::lambda_AGB ( _UNUSED double  Mzams,
_UNUSED double  Z,
_UNUSED double  Radius,
_UNUSED double  Menv,
_UNUSED double  lambda_th 
)
protectedvirtualinherited

◆ lambda_AGB() [2/2]

double Lambda_Nanjing::lambda_AGB ( const Star s)
protectedvirtualinherited

◆ lambda_Cheb() [1/2]

virtual double Lambda_Nanjing::lambda_Cheb ( _UNUSED double  Mzams,
_UNUSED double  Z,
_UNUSED double  Radius,
_UNUSED double  Menv,
_UNUSED double  lambda_th 
)
protectedvirtualinherited

◆ lambda_Cheb() [2/2]

double Lambda_Nanjing::lambda_Cheb ( const Star s)
protectedvirtualinherited

◆ lambda_estimate()

double Lambda_Nanjing::lambda_estimate ( double  lambda_th)
inlineprivateinherited

Wrapper for the simple equation lambdab*lambda_th + lambdag*(1-lambda_th)

Parameters
lambda_thFraction of the internal energy to use (0-only gravitational energy, 1-gravitational+all internal energy)
Returns
final lambda

◆ lambda_Giant() [1/2]

virtual double Lambda_Nanjing::lambda_Giant ( _UNUSED double  Mzams,
_UNUSED double  Z,
_UNUSED double  Radius,
_UNUSED double  Menv,
_UNUSED double  lambda_th 
)
protectedvirtualinherited

◆ lambda_Giant() [2/2]

double Lambda_Nanjing::lambda_Giant ( const Star s)
protectedvirtualinherited

Methods to estimate lambda in various phases

◆ lambda_pureHe() [1/2]

virtual double Lambda_Nanjing::lambda_pureHe ( _UNUSED double  Mzams,
_UNUSED double  Z,
_UNUSED double  Radius,
_UNUSED double  Menv,
_UNUSED double  lambda_th 
)
protectedvirtualinherited

◆ lambda_pureHe() [2/2]

double Lambda_Nanjing::lambda_pureHe ( const Star s)
protectedvirtualinherited

◆ operator()() [1/2]

double Lambda_Nanjing_interpolator::operator() ( const Star s)
overridevirtual

Estimate lambda for a given star

Parameters
sPointer to the star
Returns
lambda

Reimplemented from Lambda_Nanjing.

◆ operator()() [2/2]

double Lambda_Nanjing_interpolator::operator() ( unsigned int  Phase,
double  Mzams,
double  Z,
double  Radius,
double  Menv,
double  lambda_th 
)
protected

◆ reset()

int Lambda_Nanjing::reset ( )
inlineprotectedinherited

Reset (clear) members (coeff_lambdab, coeff_lambdag, maxBG, lambdaBG)

Returns
EXIT_SUCCESS

◆ set_coeff_AGB()

Lambda_Nanjing::coeff_status Lambda_Nanjing::set_coeff_AGB ( double  Mzams,
double  Z,
double  Radius 
)
protectedvirtualinherited

◆ set_coeff_Cheb()

Lambda_Nanjing::coeff_status Lambda_Nanjing::set_coeff_Cheb ( double  Mzams,
double  Z,
double  Radius 
)
protectedvirtualinherited

◆ set_coeff_Giant()

Lambda_Nanjing::coeff_status Lambda_Nanjing::set_coeff_Giant ( double  Mzams,
double  Z,
double  Radius 
)
protectedvirtualinherited

Member Data Documentation

◆ COEF_NOT_SET

constexpr unsigned int Lambda_Nanjing::COEF_NOT_SET = 0
staticconstexprprivateinherited

◆ COEF_SET

constexpr unsigned int Lambda_Nanjing::COEF_SET = 1
staticconstexprprivateinherited

Metallicity boundary between popI and popII stars

◆ coeff_lambdab

std::vector<double> Lambda_Nanjing::coeff_lambdab
protectedinherited

coefficient to estiamate Lambda from Xi&Liu considering both the gravitational + internal energy. Set in set_coeff**

◆ coeff_lambdag

std::vector<double> Lambda_Nanjing::coeff_lambdag
protectedinherited

coefficient to estiamate Lambda from Xi&Liu considering the gravitational energy only. Set in set_coeff**

◆ lambdaBG

std::vector<double> Lambda_Nanjing::lambdaBG = {}
protectedinherited

array storing the values estimated for lambdab and lambdag. Set in set_coeff**

◆ maxBG

std::vector<double> Lambda_Nanjing::maxBG = {}
protectedinherited

array storing the maximum value allows for lambdab and lambdag. Set in set_coeff**

◆ Mzams_cache

double Lambda_Nanjing_interpolator::Mzams_cache {0}
protected

◆ Mzams_interpolators

double Lambda_Nanjing_interpolator::Mzams_interpolators[2] = {0.,0.}
private

Mzams of the two interpolator

◆ Mzams_list

std::vector< double > Lambda_Nanjing_interpolator::Mzams_list = {1.,2.,3.,4.,5.,6.,7.,8.,9.,10.,12.,14.,16.,20.,50.,100.}
staticprotected

list of all zams masses in the Xu&Li10 and Dominik+12 tables

◆ svlog

sevnstd::SevnLogging Lambda_Nanjing::svlog
protectedinherited

◆ wM

double Lambda_Nanjing_interpolator::wM[2] = {0., 0.}
private

interpolator weights for the two Mzams

◆ Z_cache

double Lambda_Nanjing_interpolator::Z_cache {0}
protected

Last Mzams and Z used to estimate lambda

◆ ZpopI

const double Lambda_Nanjing::ZpopI = 0.0085
privateinherited

The documentation for this class was generated from the following files: