#include <Processes.h>
|
| typedef std::map< std::string, size_t > | _PrintMap |
| |
|
| | RocheLobe (_UNUSED IO *_io=nullptr, bool reg=true) |
| |
| RocheLobe * | Instance (IO *_io) override |
| |
| std::string | name () override |
| |
| int | evolve (Binstar *binstar) override |
| |
| int | special_evolve (Binstar *binstar) override |
| |
| std::string | log_message_start (Binstar *binstar, double q, double qcrit, bool swap_donor_accretor=false) |
| |
| std::string | log_message_end (Binstar *binstar, bool swap_donor_accretor=false) |
| |
| std::string | log_message_swallowed (Binstar *binstar, double DM_accreted) |
| |
| virtual double | NS_DBmag_accretion (_UNUSED Binstar *b, _UNUSED Star *s, _UNUSED double DM) const |
| |
| virtual double | NS_DOmegaRem_accretion (_UNUSED Binstar *b, _UNUSED Star *s, _UNUSED double DM) const |
| |
| virtual Process * | Instance (_UNUSED IO *_io) |
| |
| virtual int | evolve (_UNUSED Binstar *binstar) |
| |
| virtual int | special_evolve (_UNUSED Binstar *binstar) |
| |
| double | get (const size_t &id) |
| |
| double | get_var (const size_t &starID, const size_t &propID) |
| |
| std::string & | get_msg () |
| |
| void | restore () |
| |
| int | modify_SemimajorDV_by_a_factor (double factor) |
| |
| int | modify_EccentricityDV_by_a_factor (double factor) |
| |
| bool | is_mass_transfer_happening () |
| |
| virtual bool | is_process_ongoing () const |
| |
| void | set_event (double code) |
| | Events handling. More...
|
| |
| double | get_event () |
| |
| void | reset_event () |
| |
| void | special_evolution_alarm_switch_on () |
| | Three methods to handle the private member special_evolution_alarm. More...
|
| |
| void | special_evolution_alarm_switch_off () |
| |
| bool | is_special_evolution_alarm_on () const |
| |
| virtual double | estimate_accreted_mass (_UNUSED double DM, _UNUSED Star *donor, _UNUSED Star *accretor, _UNUSED Binstar *binstar) const |
| |
◆ _PrintMap
◆ RocheLobe()
| RocheLobe::RocheLobe |
( |
_UNUSED IO * |
_io = nullptr, |
|
|
bool |
reg = true |
|
) |
| |
|
inline |
◆ _log_message()
| std::string RocheLobe::_log_message |
( |
Binstar * |
binstar, |
|
|
bool |
swap_donor_accretor = false |
|
) |
| |
|
protected |
Base method to print the log message
- Parameters
-
| binstar | pointer to the binary class |
| swap_donor_accretor | if false: use the default order for printing the star properties: first the donor, then the accretor if true: use the reverse order: first the accretor, then the donor |
- Returns
- the base log message
◆ accrete_mass()
| virtual int MaccretionProcess::accrete_mass |
( |
_UNUSED Binstar * |
binstar | ) |
|
|
inlineprotectedvirtualinherited |
Function in which the mass accretion is handled. This function should take care of changing all the single stellar evolution properties (not only the mass) The change of binary parameters such as Semimajor axis and Eccentricity are instead changed inside evolve using the methods DA and DE.
- Parameters
-
| binstar | Pointer to the binary star |
- Returns
- EXIT SUCCESS
◆ check_and_handle_swapping_condition()
| bool RocheLobe::check_and_handle_swapping_condition |
( |
Binstar * |
binstar | ) |
|
|
protected |
Check if during the RLO the donor and accretor have swapped. This can happens when, for example, the donor becomes a nakedHe so that R<RL in the same phase
in which the other starts trigger a R>RL. Since the start and the end of a RLO is checked only during the binary evolution, the processes recognises that the RLO is still ongoing and does not trigger the procedure to setup the end of the RLO. With this method we check if the donor/accretor swapped (using the member id_donor and RLOswapped). Then, we set properly the flags the id_donor and RLOswapped and RLO_last_step (to false, to let the evolve to properly set everything)
- Parameters
-
| binstar | pointer to the binary class |
- Returns
- true if the donor/accretor swapped, false otherwise
◆ estimate_accreted_mass()
Public interface to allow the user to get information without actually evolving the systems. NOTICE: to be self-consistent the protected and private methods (such DA and DE should use these methods) when changing the properties of stars and binaries. This function should be an interface for the user to return the amount of mass accreted on the accretor given the binary, the donor and the available amount of mass DM. NOTICE: internally the accrete mass should use this method to be self-consistent
- Parameters
-
| DM | amount of mass available to be accreted in Msun. |
| donor | Pointer to the Star that is donating the mass |
| accretor | Pointer to the star that is receiving the mass |
| binstar | Pointer to the binary system hosting the donor and the accretore |
- Returns
- the amount of accreted mass
Reimplemented in WindaccretionHurley.
◆ evolve() [1/2]
◆ evolve() [2/2]
| int RocheLobe::evolve |
( |
Binstar * |
binstar | ) |
|
|
override |
precheck for swapped cases
Check peculiar accretion before to start
Donor Check
ORBITAL CHANGES
◆ get()
| double Process::get |
( |
const size_t & |
id | ) |
|
|
inlineinherited |
◆ get_event()
| double Process::get_event |
( |
| ) |
|
|
inlineinherited |
◆ get_msg()
| std::string & Process::get_msg |
( |
| ) |
|
|
inlineinherited |
◆ get_var()
| double Process::get_var |
( |
const size_t & |
starID, |
|
|
const size_t & |
propID |
|
) |
| |
|
inlineinherited |
◆ handle_NS_massaccretion()
|
|
protectedvirtualinherited |
It is a wrapper of all the necessray function calls to set the DV of NS properties after mass accretion
- Parameters
-
| s | Pointer to the ns star |
| dM | Mass accreted in Msun |
◆ Instance() [1/2]
◆ Instance() [2/2]
◆ is_mass_transfer_happening()
| bool Process::is_mass_transfer_happening |
( |
| ) |
|
|
inlineinherited |
Check if this process is changing the mass
- Returns
- false if the DV regarding the Mass of both stars is currently set to 0, true otherwise
◆ is_process_ongoing()
| virtual bool Process::is_process_ongoing |
( |
| ) |
const |
|
inlinevirtualinherited |
◆ is_special_evolution_alarm_on()
| bool Process::is_special_evolution_alarm_on |
( |
| ) |
const |
|
inlineinherited |
◆ log_message_end()
| std::string RocheLobe::log_message_end |
( |
Binstar * |
binstar, |
|
|
bool |
swap_donor_accretor = false |
|
) |
| |
Build the log message at the end of the RLO
- Parameters
-
| binstar | pointer to the binary class |
| swap_donor_accretor | if false: use the default order for printing the star properties: first the donor, then the accretor if true: use the reverse order: first the accretor, then the donor |
- Returns
- a string containing the log message
◆ log_message_start()
| std::string RocheLobe::log_message_start |
( |
Binstar * |
binstar, |
|
|
double |
q, |
|
|
double |
qcrit, |
|
|
bool |
swap_donor_accretor = false |
|
) |
| |
Build the log message at the beginning of the RLO
- Parameters
-
| binstar | pointer to the binary class |
| q | donor to accretor mass-ration |
| qcrit | critical mass ratio |
| swap_donor_accretor | if false: use the default order for printing the star properties: first the donor, then the accretor if true: use the reverse order: first the accretor, then the donor |
- Returns
- a string containing the log message
◆ log_message_swallowed() [1/2]
| std::string RocheLobe::log_message_swallowed |
( |
Binstar * |
binstar, |
|
|
double |
DM_accreted |
|
) |
| |
◆ log_message_swallowed() [2/2]
| std::string RocheLobe::log_message_swallowed |
( |
Binstar * |
binstar, |
|
|
Star * |
swallowed, |
|
|
Star * |
other, |
|
|
double |
DM_accreted |
|
) |
| |
|
static |
◆ modify_EccentricityDV_by_a_factor()
| int Process::modify_EccentricityDV_by_a_factor |
( |
double |
factor | ) |
|
|
inlineinherited |
Correct the VB cell containing the Eccentricity variation
- Parameters
-
| factor | correction factor the new DE will be DE*factor. |
- Returns
- EXIT_SUCCESS
◆ modify_SemimajorDV_by_a_factor()
| int Process::modify_SemimajorDV_by_a_factor |
( |
double |
factor | ) |
|
|
inlineinherited |
Correct the VB cell containing the Semimajor variation
- Parameters
-
| factor | correction factor the new DA will be DA*factor. |
- Returns
- EXIT_SUCCESS
◆ name()
| std::string RocheLobe::name |
( |
| ) |
|
|
inlineoverridevirtual |
◆ NS_DBmag_accretion()
This function estimate the increment or decrement of NS Bmag due do the accretion of material
- Parameters
-
| s | Pointer to the star that is accreting |
| dM | Mass accreted in Msun |
- Returns
- THe difference in Bmag after accretion
Checks
◆ NS_DOmegaRem_accretion()
This function estimate the increment or decrement of NS angular velocity OmegaRem due do the accretion of material
- Parameters
-
| s | Pointer to the star that is accreting |
| dM | Mass accreted in Msun |
- Returns
- THe difference in OmegaRem after accretion
Checks
◆ Register()
| void Process::Register |
( |
Process * |
_p, |
|
|
size_t * |
id, |
|
|
const std::string & |
_name |
|
) |
| |
|
inlineprotectedinherited |
◆ reset_DM_global()
| int RocheLobe::reset_DM_global |
( |
| ) |
|
|
inlineprotected |
◆ reset_dMcumul_RLO_in_stars()
| int RocheLobe::reset_dMcumul_RLO_in_stars |
( |
Binstar * |
binstar | ) |
|
|
protected |
◆ reset_event()
| void Process::reset_event |
( |
| ) |
|
|
inlineinherited |
◆ restore()
| void Process::restore |
( |
| ) |
|
|
inlineinherited |
◆ set()
| void Process::set |
( |
const size_t & |
id, |
|
|
const double & |
value |
|
) |
| |
|
inlineprotectedinherited |
◆ set_event()
| void Process::set_event |
( |
double |
code | ) |
|
|
inlineinherited |
◆ set_msg()
| void Process::set_msg |
( |
const std::string & |
str | ) |
|
|
inlineprotectedinherited |
◆ set_V_to_0()
| void Process::set_V_to_0 |
( |
| ) |
|
|
inlineprotectedinherited |
◆ set_var()
| void Process::set_var |
( |
const size_t & |
starID, |
|
|
const size_t & |
propID, |
|
|
const double & |
value |
|
) |
| |
|
inlineprotectedinherited |
◆ special_evolution_alarm_switch_off()
| void Process::special_evolution_alarm_switch_off |
( |
| ) |
|
|
inlineinherited |
◆ special_evolution_alarm_switch_on()
| void Process::special_evolution_alarm_switch_on |
( |
| ) |
|
|
inlineinherited |
Three methods to handle the private member special_evolution_alarm.
◆ special_evolve() [1/2]
◆ special_evolve() [2/2]
| int RocheLobe::special_evolve |
( |
Binstar * |
binstar | ) |
|
|
override |
Roche Lobe speciale evolve: dynamic_swallowing. The star is entirely swallowed through the RLO, but we don't have a mix, rather just a certain amount of mass can be accreted on the other star.
- Parameters
-
| binstar | Pointer to the binary |
- Returns
- EXIT_SUCCES
LAST STUFF
◆ _rochelobe
◆ _uniform_real
| std::uniform_real_distribution<double> Process::_uniform_real |
|
protectedinherited |
◆ accretor
| Star* Process::accretor = nullptr |
|
protectedinherited |
◆ all
| std::vector< Process * > Process::all |
|
staticinherited |
◆ DM_global_0
| double RocheLobe::DM_global_0 =0.0 |
|
private |
◆ DM_global_1
| double RocheLobe::DM_global_1 =0.0 |
|
private |
◆ donor
| Star* Process::donor = nullptr |
|
protectedinherited |
◆ event_code
| double Process::event_code =-1 |
|
privateinherited |
◆ ID
◆ id_donor
| double RocheLobe::id_donor =-1. |
|
private |
◆ message
| std::string Process::message |
|
privateinherited |
◆ orb_change
◆ PrintMap
◆ RLO_last_step
| bool RocheLobe::RLO_last_step =false |
|
protected |
◆ RLOswapped
| bool RocheLobe::RLOswapped =false |
|
private |
If true the donor/accretor swapped during the last timestep without exting from the RLO
◆ size
Instruction for adding new property PROC 1- Add the size_t PROC::ID 2- Initialise the static (fake) instance PROC PROC::_proc. NB: take care of the order of initialisation. The processes will be evolved exactly in the same order in which they are initialised here Define: @size: total number of instances of Process and derived classes (both fake and real). @all: vector containing all the (pointers) to the processes. @PrintMap: map containing the pair (process_name, process_id) for output purpose. Note all and PrintMap are filled during the instantiation of the fake Processes (see below)
◆ special_evolution_alarm
| bool Process::special_evolution_alarm =false |
|
privateinherited |
Member used to check if a special evolution is required
◆ svlog
◆ VB
| std::vector<double> Process::VB |
|
privateinherited |
values of the properties of the binary system (e.g. processes change eccentricity, semimajor...)
◆ VS
| std::vector<std::vector<double> > Process::VS |
|
privateinherited |
variations of the single star parameters due to binary stellar evolution processes (e.g. mass, radius...)
The documentation for this class was generated from the following files:
- /Users/giulianoiorio/Documents/sevn_public/src/binstar/Processes.h
- /Users/giulianoiorio/Documents/sevn_public/src/binstar/Processes.cpp
- /Users/giulianoiorio/Documents/sevn_public/include/static_main.h