![]() |
SEVN
|
Go to the source code of this file.
Classes | |
| class | MTstability |
| class | MT_Stable |
| class | MT_UnStable |
| class | MT_Qcrit |
| class | Qcrit_Hurley |
| class | Qcrit_Hurley_Webbink |
| class | Qcrit_Hurley_Webbink_Shao |
| class | Qcrit_COSMIC_Neijssel |
| class | Qcrit_COSMIC_Claeys |
| class | Qcrit_StarTrack |
| class | Qcrit_Radiative_Stable |
| class | Qcrit_HRadiative_Stable |
| class | MT_Zeta |
Macros | |
| #define | set_prop(star, prop, old) old ? star->getp_0(prop::ID) : star->getp(prop::ID) |
| #define set_prop | ( | star, | |
| prop, | |||
| old | |||
| ) | old ? star->getp_0(prop::ID) : star->getp(prop::ID) |
The class MTstability is used to estimate the stability of the RLO mass transfer. The idea behind the class is that the instability is "in general" checked through the condition: value > tshold (or < tshold). For example in a classical qcrit implementation, q > qcrit is the condition for unstable mass transfer. The key methods are:
NOTICE: WE ASSUME that MTstability and the inherited classes are used during the BInary processes RLO, therefore the stellar properties ARE THE OBTAINED WITH GETP_0 (properties at the previous sse step), while the binary properties are always OBTAINED WITH GETP HOW TO ADD A NEW MTstability IMPLEMENTATION
1- Define the new class, public inherited from MTstability, or another class (e.g. MT_Qcrit) e.g. class Qcrit_Hurley : public MT_Qcrit
2- Implement the constructor e.g. Qcrit_Hurley(bool reg = true){ if (reg){ Register(this, name()); } }
3- Override the method name, it returns the name of this MT_stability option NOTICE this will be the same name used to choice this MT formalism through the parameter rlo_stability. e.g. inline std::string name() override { return "qcrit_hurley"; } this particular MT formalism can be called with -rlo_stability qcrit_hurley.
4- Define a static class member that is an instance of the same class we are defining e.g. static Qcrit_Hurley _qcrit_hurley;
5- Define the method instance that return a new a pointer to a dinamically allocated instance of the class e.g.
Qcrit_Hurley* instance() {
return (new Qcrit_Hurley(false));
} NOTICE: remember to use false when calling the constructor here
6- If the class is derived directly from MT_stability, you have to define the following public pure virtual classes
7- Add the static class member in general/static_main.h e.g. Qcrit_Hurley Qcrit_Hurley::_qcrit_hurley;