49 double get(
Star* s,
size_t ID)
const;
108 if (value<0 or value>1){
109 svlog.
critical(
"Xspin in Bhrem has to be between 0 and 1, current value is "
132 inline double XspinGeneva(
const double z0,
const double mco)
const {
134 double a, b, m1, m2, alow;
138 b = 2.258, m1 = 16.0, alow = 0.13;
140 b = 3.578, m1 = 31.0, alow = 0.25;
141 else if (z0 > 0.0012)
142 b = 2.434, m1 = 18.0, alow = 0.0;
144 b = 3.666, m1 = 32.0, alow = 0.25;
164 inline double XspinMESA(
const double z0,
const double mco)
const {
167 double a1{0.}, b1{0.};
169 if (z0 > 0.0012 && z0 <= 0.004){
171 a1 = 0.0076, b1 = 0.05;
173 a1 = -0.0019, b1 = 0.165;
176 a1 = -0.0016, b1 = 0.115;
178 a1 = -0.0006, b1 = 0.105;
180 a1 = -0.0010, b1 = 0.125;
185 return std::max(a1 * mco + b1,0.0);
207 std::normal_distribution<double> gaussian_xspin{0.0, sigma_xspin};
#define _UNUSED
Definition: BinaryProperty.h:20
double XspinMESA(const double z0, const double mco) const
Definition: remnant.h:164
double XspinAccretion(Star *s) const
Definition: remnant.cpp:121
double OmegaRem(_UNUSED Star *s) const override
Definition: remnant.h:90
double XspinFuller() const
Definition: remnant.h:194
void default_initialiser(Star *s)
Definition: remnant.cpp:93
double XspinGeneva(const double z0, const double mco) const
Definition: remnant.h:132
double XspinZeros() const
Definition: remnant.h:229
BHrem(Star *s, double Mremnant)
Definition: remnant.h:82
double XspinMaxwellian(const double sigma_xspin) const
Definition: remnant.h:203
BHrem(_UNUSED Star *s, double Mremnant, double time)
Definition: remnant.h:79
double Bmag(_UNUSED Star *s) const override
Definition: remnant.h:92
int set_Xspin(double value)
Definition: remnant.h:107
double Inertia(_UNUSED Star *s) const override
Definition: remnant.h:91
int apply_Bavera_correction_to_Xspin(double period, double mass_wr)
Definition: remnant.cpp:98
double estimate_Xspin(_UNUSED Star *s) const
Definition: remnant.cpp:59
double xspin
Definition: remnant.h:245
double Luminosity(_UNUSED Star *s) const override
Definition: remnant.h:89
Definition: property.h:1451
Definition: remnant.h:397
COWDrem(_UNUSED Star *s, double Mremnant, double time)
Definition: remnant.h:401
void default_initialiser()
Definition: remnant.h:410
COWDrem(_UNUSED Star *s, double Mremnant)
Definition: remnant.h:405
Definition: remnant.h:377
void default_initialiser()
Definition: remnant.h:391
HeWDrem(_UNUSED Star *s, double Mremnant)
Definition: remnant.h:385
HeWDrem(_UNUSED Star *s, double Mremnant, double time)
Definition: remnant.h:381
Inertia.
Definition: property.h:999
Definition: property.h:921
Definition: property.h:776
Definition: remnant.h:318
NSCCrem(Star *s, double Mremnant)
Definition: remnant.h:324
NSCCrem(_UNUSED Star *s, double Mremnant, double time)
Definition: remnant.h:321
Definition: remnant.h:329
NSECrem(_UNUSED Star *s, double Mremnant, double time)
Definition: remnant.h:332
NSECrem(Star *s, double Mremnant)
Definition: remnant.h:336
Definition: remnant.h:250
NSrem(_UNUSED Star *s, double Mremnant, double time)
Definition: remnant.h:254
double Radius(_UNUSED Star *s) const override
Definition: remnant.h:264
double generate_uniform(double a, double b)
Definition: remnant.h:299
double B0
Definition: remnant.h:312
double get_alpha() const
Definition: remnant.h:281
double tau_magnetic
Definition: remnant.h:314
double get_salpha() const
Definition: remnant.h:287
double get_Bmin() const
Definition: remnant.h:293
void default_initialiser(_UNUSED Star *s)
Definition: remnant.cpp:204
double Xspin(_UNUSED Star *s) const override
Definition: remnant.h:275
double Bmin
Definition: remnant.h:312
std::uniform_real_distribution< double > root_distribution
Definition: remnant.h:297
static constexpr double Rns
Definition: remnant.h:308
void print_log_message(_UNUSED Star *s)
Definition: remnant.cpp:241
double sinalpha
Definition: remnant.h:311
NSrem(Star *s, double Mremnant)
Definition: remnant.h:259
double Omega0
Definition: remnant.h:313
Definition: remnant.h:416
void default_initialiser()
Definition: remnant.h:428
ONeWDrem(_UNUSED Star *s, double Mremnant)
Definition: remnant.h:424
ONeWDrem(_UNUSED Star *s, double Mremnant, double time)
Definition: remnant.h:420
Definition: property.h:1476
Definition: property.h:697
virtual double Xspin(_UNUSED Star *s) const =0
virtual ~Staremnant()=default
double Mremnant_at_born
Definition: remnant.h:68
Lookup::Remnants remnant_type
Definition: remnant.h:63
virtual double Luminosity(_UNUSED Star *s) const =0
virtual double OmegaRem(_UNUSED Star *s) const =0
double get_born_time() const
Definition: remnant.h:32
double get(Star *s, size_t ID) const
Definition: remnant.cpp:11
SevnLogging svlog
Definition: remnant.h:28
Staremnant(_UNUSED Star *s, double Mremnant, double time)
Definition: remnant.h:26
double age(Star *s) const
Definition: remnant.cpp:37
double born_time
Definition: remnant.h:67
double InertiaSphere(Star *s) const
Definition: remnant.cpp:33
virtual double Bmag(_UNUSED Star *s) const =0
double get_Mremnant_at_born() const
Definition: remnant.h:33
virtual double Inertia(_UNUSED Star *s) const =0
virtual double Radius(_UNUSED Star *s) const =0
Lookup::Remnants get_remnant_type() const
Definition: remnant.h:51
Definition: remnant.h:342
double Bmag(_UNUSED Star *s) const override
Definition: remnant.h:367
double OmegaRem(_UNUSED Star *s) const override
Definition: remnant.h:365
double Xspin(_UNUSED Star *s) const override
Definition: remnant.h:368
double A_luminosity
Definition: remnant.h:371
double Inertia(_UNUSED Star *s) const override
Definition: remnant.h:366
void default_initialiser()
Definition: remnant.h:373
WDrem(Star *s, double Mremnant)
Definition: remnant.h:349
WDrem(_UNUSED Star *s, double Mremnant, double time)
Definition: remnant.h:346
Definition: property.h:1973
Definition: remnant.h:439
double Luminosity(_UNUSED Star *s) const override
Definition: remnant.h:452
double Inertia(_UNUSED Star *s) const override
Definition: remnant.h:454
double radius
Definition: remnant.h:464
void initialise(Star *s)
Definition: remnant.cpp:268
double Bmag(_UNUSED Star *s) const override
Definition: remnant.h:455
double luminosity
Definition: remnant.h:463
double Radius(_UNUSED Star *s) const override
Definition: remnant.h:451
double Xspin(_UNUSED Star *s) const override
Definition: remnant.h:456
double OmegaRem(_UNUSED Star *s) const override
Definition: remnant.h:453
Zombierem(Star *s, double Mremnant)
Definition: remnant.h:447
Zombierem(Star *s, double Mremnant, double time)
Definition: remnant.h:443
void critical(std::string errstate, const char *file_input=nullptr, int line_input=-1) const
Definition: sevnlog.cpp:85
Definition: errhand.h:167
Remnants
NOTICE, the order is important (mass ordered): WD, NS, BH.
Definition: lookup_and_phases.h:78
@ COWD
Definition: lookup_and_phases.h:83
@ HeWD
Definition: lookup_and_phases.h:82
@ ONeWD
Definition: lookup_and_phases.h:84
@ NS_ECSN
Definition: lookup_and_phases.h:85
const std::string n2s(T val, const char *file_input, const int line_input, const unsigned int precision=6)
Definition: utilities.h:144
constexpr double km_to_RSun
Definition: utilities.h:74
std::mt19937_64 mtrand
Definition: utilities.cpp:9