SEVN
Loading...
Searching...
No Matches
Orbit.h
Go to the documentation of this file.
1//
2// Created by spera on 21/02/19.
3//
4
5#ifndef SEVN_ORBIT_H
6#define SEVN_ORBIT_H
7
8#include <lookup_and_phases.h>
9#include <iostream>
10#include <vector>
11#include <errhand.h>
12#include <memory>
13#include <sevnlog.h>
14#include <cmath>
15#include <map>
16#include <utilities.h>
17#include <star.h>
18#include <MTstability.h>
19
20#define _UNUSED __attribute__ ((unused))
21
22/*
23#ifdef HAVE_STD__MAKE_UNIQUE
24 using std::make_unique;
25#else
26 using utilities::make_unique;
27#endif
28*/
29
31
32class Binstar;
33class Process;
34class Star;
35struct Qcrit;
36
37
38
40
41
42public:
43
45
46 virtual ~Orbital_change(){
47 //std::cout<<"Orb "<< this << std::endl;
48 }
49
50 Orbital_change (const Orbital_change&) = delete;
51
53
54 Orbital_change( _UNUSED std::string argv){
55
56 }
57
58 virtual inline std::string name(){return "Orbital change (generic)";}
59
64 virtual void init(_UNUSED Binstar *b) {}
65 virtual double DA(_UNUSED Binstar *b, _UNUSED int procID){ return 0;}
66 virtual double DE(_UNUSED Binstar *b, _UNUSED int procID){ return 0;}
67 virtual double DM(_UNUSED Binstar *b, _UNUSED int procID, _UNUSED int starID){ return 0;}
68 virtual double DAngMomSpin(_UNUSED Binstar *b, _UNUSED int procID, _UNUSED int starID){ return 0;}
69
70
72
76 virtual inline bool is_process_ongoing(){return false;}
77
78
85 virtual int speciale_evolve(_UNUSED Binstar *b){ return EXIT_SUCCESS;}
86
87 virtual void set_options(_UNUSED IO* _io){return;}
88
89protected:
91};
92
93
94/**********Tides*****************/
96
97public:
98
100
101 }
102
104 //std::cout<<"Tid "<< this << std::endl;
105 }
106
107 virtual Orbital_change_Tides *instance(){ return nullptr;}
108
109 static Orbital_change_Tides *Instance(const std::string &name);
110
111 inline std::string name() override {return "Orbital change Tides";}
112
113
114protected:
115
116 void Register(Orbital_change_Tides *ptr, const std::string &_name) {
117 GetStaticMap().insert(std::make_pair(_name, ptr));
118 GetUsed().resize(GetStaticMap().size());
119 GetUsed()[GetUsed().size()-1] = 0;
120 }
121
122 inline static double f1(double e2) {
123 return 1+e2*(15.5+e2*(31.875+e2*(11.5625+e2*0.390625)));
124 }
125 inline static double f2(double e2) {
126 return 1.0+e2*(7.5+e2*(5.625+e2*0.3125));
127 }
128 inline static double f3(double e2) {
129 return 1.0+e2*(3.75+e2*(1.875+e2*7.8125e-02));
130 }
131 inline static double f4(double e2) {
132 return 1+e2*(1.5+e2*0.125);
133 }
134 inline static double f5(double e2) {
135 return 1.0+e2*(3.+e2*0.375);
136 }
137 inline static double pseudosync_spin(double e2, double omegaorb) {
138 double syncspin = f2(e2) / (f5(e2) * pow(1.0 - e2, 1.5)) * omegaorb;
139 return syncspin;
140 }
141
143 inline virtual double get_tconv(_UNUSED Star *star_wtides, _UNUSED Binstar *b) {return 1.0;}
144
153 double compute_kt_zahn_conv(double Mass, double Menv_cnv, double t_cnv, double tide_freq);
154
158 virtual double compute_kt_zahn_conv(Star *star_wtides, Binstar *binstar);
159
160
161
162
166 double compute_kt_zahn_rad(Star *star_wtides, Star *star_pert, Binstar *binstar);
167 double compute_tconv_rasio96(Star *star_wtides, Binstar *b);
168 double compute_tconv_pwheel18(Star *star_wtides, Binstar *b);
169 //inline double get_tconv_grom_tracks(Star *star_wtides) {return star_wtides->getp(Tconv::ID) }
170
174 double dadt_hut(Star *star_wtides, Star *star_pert, Binstar *binstar, double kt, double spin);
175
179 double dedt_hut(Star *star_wtides, Star *star_pert, Binstar *binstar, double kt, double spin);
180
184 double dspindt_hut(Star *star_wtides, Star *star_pert, Binstar *binstar, double kt, double spin);
185
190 virtual double Mcnv(Star *star_wtides) const;
191
196 virtual double Dcnv(Star *star_wtides) const;
197
198private:
199
200 static std::map<std::string, Orbital_change_Tides *> & GetStaticMap(){
201 static std::map<std::string, Orbital_change_Tides *> _locmap;
202 return _locmap;
203 }
204
205 static std::vector<int> & GetUsed(){
206 static std::vector<int> _used;
207 return _used;
208 }
209};
210
212
213public:
214
215 disabled_tides(bool reg = true){
216 if (reg) Register(this, name());
217 };
218
219 disabled_tides * instance() override { return new disabled_tides(false);}
220
222
223 inline std::string name() override { return Lookup::tidesmap_name.at(Lookup::TidesMode::_Tdisabled);}
224
225 inline bool is_process_ongoing() override {return false;}
226
227};
228
230
231public:
232
233 Tides_simple(bool reg = true){
234 if (reg){
235 Register(this, name());
236 }
237 };
238
240 //std::cout<<"T simple "<< this << std::endl;
241 }
242
243 Tides_simple * instance() override {return new Tides_simple(false);}
244
246
247 void init(_UNUSED Binstar *binstar) override;
248
249 inline std::string name() override { return Lookup::tidesmap_name.at(Lookup::TidesMode::_Tsimple);}
250
251 double DA(_UNUSED Binstar *binstar, _UNUSED int procID) override;
252
253 double DE(_UNUSED Binstar *binstar, _UNUSED int procID) override;
254
255 double DAngMomSpin(_UNUSED Binstar *b, _UNUSED int procID, _UNUSED int starID) override;
256
257
258protected:
259
261 inline double get_tconv(Star *star_wtides, Binstar *b) override { return compute_tconv_rasio96(star_wtides,b); }
262
263 double kt[2];
264 double syncspin;
265
266 double _DA=0.,_DE=0.;
267 double _DLspin[2]={0.,0.};
268
269};
270
272
273public:
274 Tides_simple_notab(bool reg = true){
275 if (reg){
276 Register(this, name());
277 }
278 };
279
281 //std::cout<<"T simple "<< this << std::endl;
282 }
283
284 Tides_simple_notab * instance() override {return new Tides_simple_notab(false);}
285
287
288 inline std::string name() override { return Lookup::tidesmap_name.at(Lookup::TidesMode::_Tsimple_notab);}
289
290protected:
291
296 double Mcnv(Star *star_wtides) const override;
297
302 double Dcnv(Star *star_wtides) const override;
303
304};
305
306/***************************/
307
308/**********GW*****************/
310
311public:
313
315 //std::cout<<"Orb GW "<< this << std::endl;
316
317 }
318
319 virtual Orbital_change_GW *instance(){ return nullptr;}
320
321 static Orbital_change_GW *Instance(const std::string &name);
322
323 inline std::string name() override {return "Orbital change GW";}
324
325
326protected:
327
328 void Register(Orbital_change_GW *ptr, const std::string &_name) {
329 GetStaticMap().insert(std::make_pair(_name, ptr));
330 GetUsed().resize(GetStaticMap().size());
331 GetUsed()[GetUsed().size()-1] = 0;
332 }
333
334private:
335
336 static std::map<std::string, Orbital_change_GW *> & GetStaticMap(){
337 static std::map<std::string, Orbital_change_GW *> _locmap;
338 return _locmap;
339 }
340
341 static std::vector<int> & GetUsed(){
342 static std::vector<int> _used;
343 return _used;
344 }
345
346};
347
349
350public:
351
352 disabled_gw(bool reg = true){
353 if (reg){
354 Register(this, name());
355 }
356 };
357
358 disabled_gw * instance() override {return new disabled_gw(false);}
359
361
362 inline std::string name() override { return Lookup::gwmap_name.at(Lookup::GWMode::_GWdisabled); }
363
364 inline bool is_process_ongoing() override {return false;}
365
366};
367
369
370 Peters_gw(bool reg = true){
371 if (reg){
372 Register(this, name());
373 }
374
375
376 };
377
379 //std::cout<<"Orb GW Peters "<< this << std::endl;
380
381 }
382
383 Peters_gw * instance() override {return new Peters_gw(false);}
384
386
387 inline std::string name() override { return Lookup::gwmap_name.at(Lookup::GWMode::_GWPeters); }
388
395 double DA(_UNUSED Binstar *b, _UNUSED int procID) override;
396
403 double DE(_UNUSED Binstar *b, _UNUSED int procID) override;
404
405
406protected:
407
408 //G^3/c^5 in sun units
410
411
412
413 //dat/dt/a = -K_a*G3_over_c5*m1*m2*(m1+m2)/(a^4 * (1-e^2)^7/2) * (1+c2_a*e^2+c4_a*e^4) (Eq. 5.6 Peter64)
414 const double K_a=64./5., c2_a=73./24., c4_a=37./96.;
415 // det/dt/e = -K_e*G3_over_c5*m1*m2*(m1+m2)/(a^4 * (1-e^2)^5/2) * (1+c2_e*e^2) (Eq. 5.7 Peter64)
416 const double K_e=304./15., c2_e=121./304.;
417
425 inline double function_core(double M1, double M2, double a){
426
427 double a4=a*a*a*a;
428
429 return G3_over_c5*M1*M2*(M1+M2)/a4;
430
431 }
432
433
442 inline double Peters_GW_de(double M1, double M2, double a, double e){
443
444 double cost=K_e*function_core(M1, M2, a);
445 double e2=e*e;
446
447 double num=(1+c2_e*e2);
448 double den=(1-e2);
449 den=std::sqrt(den*den*den*den*den); //(1-e^2)^(5/2)
450
451 return -cost*num/den;
452
453 }
454
455
464 inline double Peters_GW_da(double M1, double M2, double a, double e){
465
466 double cost=K_a*function_core(M1, M2, a);
467 double e2=e*e;
468 double e4=e2*e2;
469 double den=(1-e2);
470 den=std::sqrt(den*den*den*den*den*den*den); //(1-e^2)^(7/2)
471
472 double num=(1+c2_a*e2+c4_a*e4);
473
474 return -cost*num/den;
475
476 }
477
478
479
480
481};
482/***************************/
483
484/**********Roche Lobe*****************/
486
487public:
489
491 //std::cout<<"Orb RL "<< this << std::endl;
492 delete mt_stability;
493 mt_stability= nullptr;
494 }
495
496 virtual Orbital_change_RL *instance(){ return nullptr;}
497
498 static Orbital_change_RL *Instance(const std::string &name);
499
500 void set_options(IO* _io) override {
501
502 //Set MTstability pointer
503 std::string mtstability_option = _io->svpar.get_str("rlo_stability");
504 mt_stability = MTstability::Instance(mtstability_option);
505 if (mt_stability == nullptr)
506 svlog.critical("Unknown mtstability option: [" + mtstability_option + "]", __FILE__, __LINE__,
508 }
509
510 inline std::string name() override {return "Orbital change RL";}
511
516 void init(_UNUSED Binstar *b) override {};
517
518 int speciale_evolve(_UNUSED Binstar *b) override;
519
520 inline double get_DM(int ID){
521 if (ID!=0 && ID!=1)
522 svlog.critical("Stars ID in binary can be only 0 or 1, current value "+
523 utilities::n2s(ID,__FILE__,__LINE__),__FILE__,__LINE__,sevnstd::rl_error());
524
525 return _DM[ID];
526 };
527
528 double DM(_UNUSED Binstar *b, _UNUSED int procID, _UNUSED int starID) override {
529 return get_DM(starID);
530 }
531
532 inline bool is_swallowed(int starID){
533 return _is_swallowed[starID];
534 }
535
536 inline bool is_process_ongoing() override {return _is_RLO_happening;}
537 inline bool is_colliding() {return _is_colliding;}
538
539
540 virtual inline double get_mt_value() const {svlog.critical("get_q not implemented for class Orbital_change_RL",__FILE__,__LINE__,sevnstd::notimplemented_error());
541 return 0.0;}
542
543 virtual inline double get_mt_tshold() const {svlog.critical("get_qcrit not implemented for class Orbital_change_RL",__FILE__,__LINE__,sevnstd::notimplemented_error());
544 return 0.0;}
545
546 bool novae=false;
547 bool super_eddington=false;
548
549
550
551
552protected:
553 void Register(Orbital_change_RL *ptr, const std::string &_name){
554 GetStaticMap().insert(std::make_pair(_name, ptr));
555 GetUsed().resize(GetStaticMap().size());
556 GetUsed()[GetUsed().size()-1] = 0;
557 }
558
560
567 virtual void RLO(_UNUSED Star *donor,_UNUSED Star *accretor,_UNUSED Binstar *b){};
568
580 virtual double correct_accreted_mass(double DM_accreted, _UNUSED double DM_donor,
581 _UNUSED Star *donor,_UNUSED Star *accretor,_UNUSED Binstar *b) {
582 return DM_accreted;
583 }
584
591 virtual double fRL_radius(_UNUSED Star* star, _UNUSED Binstar *b){svlog.critical("fRL not implemented for this RLO option ("+name()+")",__FILE__,__LINE__,sevnstd::rl_error()); return -1;}
592
593 inline int set_DM(double DM,int starID){
594 if (starID!=0 && starID!=1) {
595 svlog.critical("Stars ID in binary can be only 0 or 1, current value " +
596 utilities::n2s(starID, __FILE__, __LINE__), __FILE__, __LINE__, sevnstd::rl_error());
597 }
598 _DM[starID] = DM;
599 return EXIT_SUCCESS;
600 };
601 inline int reset_DM(){
602 _DM[0]=_DM[1]=0;
603 return EXIT_SUCCESS;
604 }
605
606 inline int set_swallowed(int starID){
607 if (starID!=0 && starID!=1) {
608 svlog.critical("Stars ID in binary can be only 0 or 1, current value " +
609 utilities::n2s(starID, __FILE__, __LINE__), __FILE__, __LINE__, sevnstd::rl_error());
610 }
611 _is_swallowed[starID]=true;
612 return EXIT_SUCCESS;
613 }
614 inline int reset_swallowed(int starID){
615 _is_swallowed[starID]=false;
616 return EXIT_SUCCESS;
617 }
618 inline int reset_swallowed(){
619 _is_swallowed[0]=_is_swallowed[1]=false;
620 return EXIT_SUCCESS;
621 }
622
623 inline void set_mix(){mix= true;}
624 inline void unset_mix(){mix= false;}
625 inline bool get_mix(){ return mix;}
626 inline void set_comenv(){comenv= true;}
627 inline void unset_comenv(){comenv= false;}
628 inline bool get_comenv(){ return comenv;}
631 inline void set_is_colliding(){_is_colliding = true;}
632 inline void unset_is_colliding(){_is_colliding = false;}
633
635
640 virtual int dynamic_swallowing(_UNUSED Binstar *b){return EXIT_SUCCESS;}
641
642
644
650 virtual double estimate_q(Star *donor, Star *accretor);
651
653
659 virtual int outcome_double_RLO(_UNUSED Binstar *b){svlog.critical("outcome_double_RLO not implemented for this RLO option ("+name()+")",__FILE__,__LINE__,sevnstd::rl_error()); return -1;}
666 virtual int outcome_collision(_UNUSED Binstar *b){svlog.critical("outcome_collision not implemented for this RLO option ("+name()+")",__FILE__,__LINE__,sevnstd::rl_error()); return -1;}
673 virtual int outcome_collision(_UNUSED Star *donor, _UNUSED Star *accretor, _UNUSED Binstar *b){svlog.critical("outcome_collision not implemented for this RLO option ("+name()+")",__FILE__,__LINE__,sevnstd::rl_error()); return -1;}
674
680 virtual double Hfrac(Star *s);
681
688 virtual double dMdt_eddington(Star *donor, Star *accretor, Binstar *b);
689
695 inline bool is_giant_like(int star_type_bse){
696
697 if (star_type_bse>=2 && star_type_bse<=9 && star_type_bse!=7)
698 return true;
699 else
700 return false;
701
702 return false;
703 }
704
705
707
716 virtual double dynamic_dmdt(_UNUSED Star *s,_UNUSED Binstar *b){svlog.critical("dynamic_dmdmt not implemented for this RLO option ("+name()+")",__FILE__,__LINE__,sevnstd::rl_error()); return -1;};
725 virtual double nuclear_dmdt(_UNUSED Star *s,_UNUSED Binstar *b){svlog.critical("nuclear_dmdt not implemented for this RLO option ("+name()+")",__FILE__,__LINE__,sevnstd::rl_error()); return -1;}
734 virtual double thermal_dmdt(_UNUSED Star *s,_UNUSED Binstar *b){svlog.critical("thermal_dmdt not implemented for this RLO option ("+name()+")",__FILE__,__LINE__,sevnstd::rl_error()); return -1;}
735
743 virtual double thermal_nuclear_accreted_mass(_UNUSED double DM_donor, _UNUSED Star *donor, _UNUSED Star *accretor, _UNUSED Binstar *b){svlog.critical("accreted mass not implemented for this RLO option ("+name()+")",__FILE__,__LINE__,sevnstd::rl_error()); return -1;}
744
746
752 virtual double kelvin_helmotz_tscale(Star *s);
753
760 virtual double dynamic_tscale(Star *s);
761
763
771 virtual int check_compact_accretor(int donor_type_bse, int accretor_type_bse){
772
773
774 if (donor_type_bse>=10 && donor_type_bse<=12 && accretor_type_bse<10)
775 svlog.critical("RLO with a donor with bse type "+utilities::n2s(donor_type_bse,__FILE__,__LINE__)+
776 " and accretor with bse type "+utilities::n2s(accretor_type_bse,__FILE__,__LINE__)+" is not expected!",__FILE__,__LINE__,sevnstd::rl_error());
777 else if (donor_type_bse>=13 && accretor_type_bse<donor_type_bse)
778 svlog.critical("RLO with a donor with bse type "+utilities::n2s(donor_type_bse,__FILE__,__LINE__)+
779 " and accretor with bse type "+utilities::n2s(accretor_type_bse,__FILE__,__LINE__)+" is not expected!",__FILE__,__LINE__,sevnstd::rl_error());
780
781 return EXIT_SUCCESS;
782
783 }
784
785private:
786
787
788 static std::map<std::string, Orbital_change_RL *> & GetStaticMap(){
789 static std::map<std::string, Orbital_change_RL *> _locmap;
790 return _locmap;
791 }
792 static std::vector<int> & GetUsed(){
793 static std::vector<int> _used;
794 return _used;
795 }
796 double _DM[2]={0,0};
797 bool _is_swallowed[2]={false, false};
798 bool mix = false;
799 bool comenv = false;
801 bool _is_colliding=false;
802
803
804
805
806};
807
809
810public:
811 disabled_rl(bool reg = true){
812 if (reg){
813 Register(this, name());
814 }
815 }
816
818 //std::cout<<"Orb RL dis "<< this << std::endl;
819
820 }
821
822 disabled_rl * instance() override { return new disabled_rl(false);}
823
825
826 inline std::string name() override { return Lookup::rlmap_name.at(Lookup::RLMode ::_RLdisabled); }
827
828 inline bool is_process_ongoing() override {return false;}
829
830
831
832};
833
835
836public:
837
838 Hurley_rl(bool reg=true){
839 if (reg){
840 Register(this, name());
841 }
842 //std::cout<<"Make Orb RL H "<< this << std::endl;
843
844
845 }
846
847 Hurley_rl* instance() override { return new Hurley_rl(false);}
848
850 //std::cout<<"Orb RL H "<< this << std::endl;
851
852 }
853
855
856 inline std::string name() override { return Lookup::rlmap_name.at(Lookup::RLMode ::_RLHurley); }
857
858 void init(_UNUSED Binstar *b) override;
859
860 double DA(_UNUSED Binstar *b, _UNUSED int procID) override;
861
862 double DE(_UNUSED Binstar *b, _UNUSED int procID) override;
863
864 double DAngMomSpin(_UNUSED Binstar *b, _UNUSED int procID, _UNUSED int starID) override;
865
866
867protected:
868
875 void init_common_variable(Star *donor_star, Star *accretor_star, Binstar *b);
876
878
884 bool check_doubleRLO(Binstar *b);
885
893
900 int outcome_double_RLO(_UNUSED Binstar *b) override;
910
918
919
930 void RLO(_UNUSED Binstar *b);
931
932 virtual void set_orbital(_UNUSED Binstar *b);
933
935
943 double dynamic_dmdt(_UNUSED Star *s,_UNUSED Binstar *b) override;
951 double nuclear_dmdt(_UNUSED Star *s,_UNUSED Binstar *b) override;
961 double thermal_dmdt(_UNUSED Star *s,_UNUSED Binstar *b) override;
968 int dynamic_swallowing(_UNUSED Binstar *b) override;
969
981
982
989 double fRL_radius(_UNUSED Star* star,_UNUSED Binstar *b) override;
990
991
997 Star* get_donor(){ return donor;}
999 double get_rldonor(){ return rl1;}
1000 void set_DA(double DA){_DA=DA;}
1001 void set_DE(double DE){_DE=DE;}
1002
1003 inline double get_mt_value() const override {return mt_value;}
1004
1005 inline double get_mt_tshold() const override {return mt_tshold;}
1006
1007 /***Define common variables ***/
1008 //Stars
1011 //BSE type (1 for donor, 2 for accretor)
1014 //Radii
1015 double frl1 = utilities::NULL_DOUBLE; // RL over R1
1016 double rl1 = utilities::NULL_DOUBLE; //Radius of the Roche Lobe for the donor
1017 bool is_RL_in_core = false; //Is the RL inside the Core?
1021 double mt_value = utilities::NULL_DOUBLE; //Mdonor/Maccretore
1022 double mt_tshold = utilities::NULL_DOUBLE; //qcrit for dynamic mass transfer
1023
1025 double f_MT = utilities::NULL_DOUBLE; //Mass accretion efficenciecy
1026 double dmdt_edd = utilities::NULL_DOUBLE; //Eddingtont rate of the accretion on the accretor
1027
1029 double dt = utilities::NULL_DOUBLE;//Equations are in yr
1030 double tkh1 = utilities::NULL_DOUBLE;//KH timescale of the star filling the RL
1031 double tdyn1 = utilities::NULL_DOUBLE; //Dynamical timescale of the star filling the RL
1032 double taum = utilities::NULL_DOUBLE; //Time scale for dynamic Mass Loss through RL //TODO Why? Why not just tdyn1 as in Hurley, Time scale for Mass loss through
1033 double tkh2 = utilities::NULL_DOUBLE; //KH timescale of the accretor
1034
1035 //Orbital
1036 double _DA = 0;
1037 double _DE = 0;
1038
1039 //Spin
1040 double _DLspin[2]={0.,0.};
1041
1042
1043 /********************************/
1044
1045
1046
1047};
1048
1050public:
1051
1052 Hurley_rl_bse(bool reg=true){
1053 if (reg){
1054 Register(this, name());
1055 }
1056 }
1057
1058 Hurley_rl_bse* instance() override { return new Hurley_rl_bse(false);}
1059
1061 }
1062
1064
1065 inline std::string name() override {return Lookup::rlmap_name.at(Lookup::RLMode ::_RLHurleyBSE);}
1066
1067protected:
1078 double thermal_nuclear_accreted_mass(_UNUSED double DM_donor, _UNUSED Star *donor, _UNUSED Star *accretor, _UNUSED Binstar *b) override;
1079
1080
1086 int dynamic_swallowing(_UNUSED Binstar *b) override;
1087
1088};
1089
1091
1092public:
1093
1094 Hurley_rl_propeller(bool reg=true){
1095 if (reg){
1096 Register(this, name());
1097 }
1098 }
1099
1100 Hurley_rl_propeller* instance() override { return new Hurley_rl_propeller(false);}
1101
1102 inline std::string name() override { return Lookup::rlmap_name.at(Lookup::RLMode ::_RLHurleyprop); }
1103
1105
1106protected:
1107
1116 double correct_accreted_mass(double DM_accreted, _UNUSED double DM_donor,
1118
1119};
1120
1121
1122class Hurley_mod_rl : public Hurley_rl {
1123
1124public:
1125
1126 Hurley_mod_rl(bool reg=true){
1127 if (reg){
1128 Register(this, name());
1129 }
1130 }
1131
1132 Hurley_mod_rl* instance() override { return new Hurley_mod_rl(false);}
1133
1134 inline std::string name() override { return Lookup::rlmap_name.at(Lookup::RLMode ::_RLHurleymod); }
1135
1137
1138protected:
1139
1140 void set_orbital(_UNUSED Binstar *b) override;
1141
1142};
1143/*************************************/
1144
1145/**********Mix*****************/
1147
1148public:
1149
1151
1153 //std::cout<<"Orbital_change_Mix "<< this << std::endl;
1154
1155 }
1156
1157 virtual Orbital_change_Mix *instance(){ return nullptr;}
1158
1159 static Orbital_change_Mix *Instance(const std::string &name);
1160
1161 inline std::string name() override {return "Orbital change Mix";}
1162
1163protected:
1164
1165 void Register(Orbital_change_Mix *ptr, const std::string &_name) {
1166 GetStaticMap().insert(std::make_pair(_name, ptr));
1167 GetUsed().resize(GetStaticMap().size());
1168 GetUsed()[GetUsed().size()-1] = 0;
1169 }
1170
1171
1172private:
1173
1174 static std::map<std::string, Orbital_change_Mix *> & GetStaticMap(){
1175 static std::map<std::string, Orbital_change_Mix *> _locmap;
1176 return _locmap;
1177 }
1178
1179 static std::vector<int> & GetUsed(){
1180 static std::vector<int> _used;
1181 return _used;
1182 }
1183
1184};
1185
1187
1188public:
1189 disabled_mix(bool reg = true){
1190 if (reg){
1191 Register(this, name());
1192 }
1193 }
1194
1195 disabled_mix * instance() override { return new disabled_mix(false);}
1196
1198
1199 inline std::string name() override { return Lookup::mixmap_name.at(Lookup::MixMode::_Mixdisabled); }
1200
1201 inline bool is_process_ongoing() override {return false;}
1202
1203
1204};
1205
1207
1208public:
1209 simple_mix(bool reg = true){
1210 if (reg){
1211 Register(this, name());
1212 }
1213 }
1214
1216 //std::cout<<"simple mix "<< this << std::endl;
1217
1218 }
1219
1220 simple_mix * instance() override { return new simple_mix(false);}
1221
1223
1224 inline std::string name() override { return Lookup::mixmap_name.at(Lookup::MixMode::_Mixsimple); }
1225
1226
1227
1228};
1229
1230/**********SN kicks*****************/
1232
1233public:
1234
1236
1238 //std::cout<<"orb sn "<< this << std::endl;
1239
1240 }
1241
1242 virtual Orbital_change_SNKicks *instance(){ return nullptr;}
1243
1244 static Orbital_change_SNKicks *Instance(const std::string &name);
1245
1246 inline std::string name() override {return "Orbital change SNKicks";}
1247
1248 inline double get_cos_nu() const { return cos_nu;}
1249 inline double get_vcom() const { return vcom;}
1250
1251protected:
1252
1253 void Register(Orbital_change_SNKicks *ptr, const std::string &_name) {
1254 GetStaticMap().insert(std::make_pair(_name, ptr));
1255 GetUsed().resize(GetStaticMap().size());
1256 GetUsed()[GetUsed().size()-1] = 0;
1257 }
1258
1259 inline void set_cos_nu(double _cos_nu) { cos_nu=_cos_nu; return;}
1260 inline void set_vcom(double _vcom) { vcom=_vcom; return;}
1261
1262private:
1263
1264 static std::map<std::string, Orbital_change_SNKicks *> & GetStaticMap(){
1265 static std::map<std::string, Orbital_change_SNKicks *> _locmap;
1266 return _locmap;
1267 }
1268
1269 static std::vector<int> & GetUsed(){
1270 static std::vector<int> _used;
1271 return _used;
1272 }
1273
1274 double cos_nu; //Angle between old and new ang mom
1275 double vcom; //New centre-of-mas velocity
1276
1277};
1278
1279/***
1280 * Implement disabled SNkicks, i.e. does not apply the kicks and does not change orbital parameters
1281 */
1283
1284public:
1285 disabled_SNKicks(bool reg = true){
1286 if (reg){
1287 Register(this, name());
1288 }
1289 }
1290
1291 disabled_SNKicks * instance() override { return new disabled_SNKicks(false);}
1292
1294
1295 inline std::string name() override { return Lookup::snkmap_name.at(Lookup::SNKickMode::_SNKickdisabled); }
1296
1297 inline bool is_process_ongoing() override {return false;}
1298
1299};
1300
1302
1303public:
1304 Hurley_SNKicks(bool reg = true){
1305 if (reg){
1306 Register(this, name());
1307 }
1308 }
1309
1311 //std::cout<<"orb sn hu "<< this << std::endl;
1312
1313 }
1314
1315 Hurley_SNKicks * instance() override { return new Hurley_SNKicks(false);}
1316
1318
1319 inline std::string name() override { return Lookup::snkmap_name.at(Lookup::SNKickMode::_SNKickHurley); }
1320
1321 void init(_UNUSED Binstar *b) override;
1322
1323 double DA(_UNUSED Binstar *b, _UNUSED int procID) override;
1324
1325 double DE(_UNUSED Binstar *b, _UNUSED int procID) override;
1326
1327protected:
1328
1338 int kick_star(Star *sn, Star *other, Binstar *binstar, double &a_fin, double &ecc_fin);
1339
1340 //double Vorb(double Mass1, double Mass2, );
1341
1342 const double G = utilities::G;
1343
1344private:
1345
1346 std::uniform_real_distribution<double> _uniform_real;
1347
1348 inline void set_DA(double DA){_DA=DA;}
1349 inline void set_DE(double DE){_DE=DE;}
1350
1351 //Orbital
1352 double _DA = 0;
1353 double _DE = 0;
1354};
1355/*************************************/
1356
1357/**********Common Envelope*****************/
1359
1360public:
1361
1363
1365 //std::cout<<"orb ce "<< this << std::endl;
1366
1367 }
1368
1369 virtual Orbital_change_CE *instance(){ return nullptr;}
1370
1371 static Orbital_change_CE *Instance(const std::string &name);
1372
1373 inline std::string name() override {return "Orbital change CE";}
1374
1375protected:
1376
1377 void Register(Orbital_change_CE *ptr, const std::string &_name) {
1378 GetStaticMap().insert(std::make_pair(_name, ptr));
1379 GetUsed().resize(GetStaticMap().size());
1380 GetUsed()[GetUsed().size()-1] = 0;
1381 }
1382
1383private:
1384
1385 static std::map<std::string, Orbital_change_CE *> & GetStaticMap(){
1386 static std::map<std::string, Orbital_change_CE *> _locmap;
1387 return _locmap;
1388 }
1389
1390 static std::vector<int> & GetUsed(){
1391 static std::vector<int> _used;
1392 return _used;
1393 }
1394};
1395
1397public:
1398 energy_CE(bool reg = true){
1399 if (reg){
1400 Register(this, name());
1401 }
1402 }
1403
1405 //std::cout<<"orb CE energy "<< this << std::endl;
1406
1407 }
1408
1409 energy_CE * instance() override { return new energy_CE(false);}
1410
1412
1413 inline std::string name() override { return Lookup::cemap_name.at(Lookup::CEMode::_CEEnergy); }
1414
1415};
1416
1418public:
1419 disabled_CE(bool reg = true){
1420 if (reg){
1421 Register(this, name());
1422 }
1423 }
1424
1426 //std::cout<<"orb CE disabled "<< this << std::endl;
1427
1428 }
1429
1430 disabled_CE * instance() override { return new disabled_CE(false);}
1431
1433
1434 inline std::string name() override { return Lookup::cemap_name.at(Lookup::CEMode::_CEEnergy); }
1435
1436};
1437/*************************************/
1438
1439
1440#endif //SEVN_ORBIT_H
#define _UNUSED
Definition: Orbit.h:20
Definition: binstar.h:26
Definition: Orbit.h:1301
std::uniform_real_distribution< double > _uniform_real
Definition: Orbit.h:1346
double DA(_UNUSED Binstar *b, _UNUSED int procID) override
Definition: Orbit.cpp:1449
void set_DA(double DA)
Definition: Orbit.h:1348
double DE(_UNUSED Binstar *b, _UNUSED int procID) override
Definition: Orbit.cpp:1450
const double G
Definition: Orbit.h:1342
Hurley_SNKicks * instance() override
Definition: Orbit.h:1315
double _DA
Definition: Orbit.h:1352
Hurley_SNKicks(bool reg=true)
Definition: Orbit.h:1304
~Hurley_SNKicks()
Definition: Orbit.h:1310
double _DE
Definition: Orbit.h:1353
void init(_UNUSED Binstar *b) override
Definition: Orbit.cpp:1428
int kick_star(Star *sn, Star *other, Binstar *binstar, double &a_fin, double &ecc_fin)
Definition: Orbit.cpp:1452
void set_DE(double DE)
Definition: Orbit.h:1349
static Hurley_SNKicks _Hurley_SNKicks
Definition: Orbit.h:1317
std::string name() override
Definition: Orbit.h:1319
Definition: Orbit.h:1122
Hurley_mod_rl * instance() override
Definition: Orbit.h:1132
Hurley_mod_rl(bool reg=true)
Definition: Orbit.h:1126
void set_orbital(_UNUSED Binstar *b) override
Definition: Orbit.cpp:1269
static Hurley_mod_rl _Hurley_mod_rl
Definition: Orbit.h:1136
std::string name() override
Definition: Orbit.h:1134
Definition: Orbit.h:1049
int dynamic_swallowing(_UNUSED Binstar *b) override
Definition: Orbit.cpp:1213
Hurley_rl_bse * instance() override
Definition: Orbit.h:1058
double thermal_nuclear_accreted_mass(_UNUSED double DM_donor, _UNUSED Star *donor, _UNUSED Star *accretor, _UNUSED Binstar *b) override
Definition: Orbit.cpp:1158
~Hurley_rl_bse()
Definition: Orbit.h:1060
std::string name() override
Definition: Orbit.h:1065
static Hurley_rl_bse _Hurley_rl_bse
Definition: Orbit.h:1063
Hurley_rl_bse(bool reg=true)
Definition: Orbit.h:1052
Definition: Orbit.h:1090
double correct_accreted_mass(double DM_accreted, _UNUSED double DM_donor, _UNUSED Star *donor, _UNUSED Star *accretor, _UNUSED Binstar *b) override
Definition: Orbit.cpp:1632
static Hurley_rl_propeller _RLHurleyprop
Definition: Orbit.h:1104
std::string name() override
Definition: Orbit.h:1102
Hurley_rl_propeller * instance() override
Definition: Orbit.h:1100
Hurley_rl_propeller(bool reg=true)
Definition: Orbit.h:1094
Definition: Orbit.h:834
double _DA
Definition: Orbit.h:1036
int outcome_collision(_UNUSED Binstar *b) override
void RLO(_UNUSED Binstar *b)
Definition: Orbit.cpp:694
double tkh2
Definition: Orbit.h:1033
double get_mt_tshold() const override
Definition: Orbit.h:1005
static Hurley_rl _Hurley_rl
Definition: Orbit.h:854
double tdyn1
Definition: Orbit.h:1031
double DE(_UNUSED Binstar *b, _UNUSED int procID) override
Definition: Orbit.cpp:990
double mt_tshold
Definition: Orbit.h:1022
double fRL_radius(_UNUSED Star *star, _UNUSED Binstar *b) override
Definition: Orbit.cpp:1142
double frl1
Definition: Orbit.h:1015
double thermal_nuclear_accreted_mass(_UNUSED double DM_donor, _UNUSED Star *donor, _UNUSED Star *accretor, _UNUSED Binstar *b) override
Definition: Orbit.cpp:1097
double get_mt_value() const override
Definition: Orbit.h:1003
bool check_doubleRLO(Binstar *b)
AUX.
Definition: Orbit.cpp:571
Star * get_donor()
Definition: Orbit.h:997
Star * donor
Definition: Orbit.h:1009
double DAngMomSpin(_UNUSED Binstar *b, _UNUSED int procID, _UNUSED int starID) override
Definition: Orbit.cpp:992
double get_rldonor()
Definition: Orbit.h:999
double taum
Definition: Orbit.h:1032
std::string name() override
Definition: Orbit.h:856
double nuclear_dmdt(_UNUSED Star *s, _UNUSED Binstar *b) override
Definition: Orbit.cpp:1061
double rl1
Definition: Orbit.h:1016
double dynamic_dmdt(_UNUSED Star *s, _UNUSED Binstar *b) override
Mass transfer.
Definition: Orbit.cpp:1051
Star * accretor
Definition: Orbit.h:1010
double _DLspin[2]
Definition: Orbit.h:1040
bool check_collision_at_periastron(Star *donor, Star *accretor, Binstar *b)
Definition: Orbit.cpp:596
int outcome_double_RLO(_UNUSED Binstar *b) override
Definition: Orbit.cpp:639
double dt
Times.
Definition: Orbit.h:1029
double tkh1
Definition: Orbit.h:1030
void set_DE(double DE)
Definition: Orbit.h:1001
int star_type1
Definition: Orbit.h:1012
double mt_value
Definition: Orbit.h:1021
virtual void set_orbital(_UNUSED Binstar *b)
Definition: Orbit.cpp:856
bool is_RL_in_core
Definition: Orbit.h:1017
double thermal_dmdt(_UNUSED Star *s, _UNUSED Binstar *b) override
Definition: Orbit.cpp:1086
double DA(_UNUSED Binstar *b, _UNUSED int procID) override
Definition: Orbit.cpp:979
Hurley_rl * instance() override
Definition: Orbit.h:847
void init(_UNUSED Binstar *b) override
Definition: Orbit.cpp:493
~Hurley_rl()
Definition: Orbit.h:849
void init_common_variable(Star *donor_star, Star *accretor_star, Binstar *b)
Definition: Orbit.cpp:459
void set_DA(double DA)
Definition: Orbit.h:1000
double f_MT
Accretion efficency.
Definition: Orbit.h:1025
int star_type2
Definition: Orbit.h:1013
Star * get_accretor()
Definition: Orbit.h:998
Hurley_rl(bool reg=true)
Definition: Orbit.h:838
double dmdt_edd
Definition: Orbit.h:1026
int dynamic_swallowing(_UNUSED Binstar *b) override
Definition: Orbit.cpp:998
double _DE
Definition: Orbit.h:1037
Definition: IO.h:53
SEVNpar svpar
Definition: IO.h:198
Definition: MTstability.h:104
static MTstability * Instance(std::string const &name)
Definition: MTstability.cpp:10
Definition: property.h:776
Definition: Orbit.h:1358
std::string name() override
Definition: Orbit.h:1373
static Orbital_change_CE * Instance(const std::string &name)
Definition: Orbit.cpp:1622
virtual Orbital_change_CE * instance()
Definition: Orbit.h:1369
void Register(Orbital_change_CE *ptr, const std::string &_name)
Definition: Orbit.h:1377
Orbital_change_CE()
Definition: Orbit.h:1362
static std::vector< int > & GetUsed()
Definition: Orbit.h:1390
virtual ~Orbital_change_CE()
Definition: Orbit.h:1364
static std::map< std::string, Orbital_change_CE * > & GetStaticMap()
Definition: Orbit.h:1385
Definition: Orbit.h:309
virtual ~Orbital_change_GW()
Definition: Orbit.h:314
Orbital_change_GW()
Definition: Orbit.h:312
static std::map< std::string, Orbital_change_GW * > & GetStaticMap()
Definition: Orbit.h:336
virtual Orbital_change_GW * instance()
Definition: Orbit.h:319
static std::vector< int > & GetUsed()
Definition: Orbit.h:341
void Register(Orbital_change_GW *ptr, const std::string &_name)
Definition: Orbit.h:328
std::string name() override
Definition: Orbit.h:323
static Orbital_change_GW * Instance(const std::string &name)
Definition: Orbit.cpp:343
Definition: Orbit.h:1146
virtual ~Orbital_change_Mix()
Definition: Orbit.h:1152
static std::vector< int > & GetUsed()
Definition: Orbit.h:1179
virtual Orbital_change_Mix * instance()
Definition: Orbit.h:1157
std::string name() override
Definition: Orbit.h:1161
static Orbital_change_Mix * Instance(const std::string &name)
Definition: Orbit.cpp:1405
void Register(Orbital_change_Mix *ptr, const std::string &_name)
Definition: Orbit.h:1165
static std::map< std::string, Orbital_change_Mix * > & GetStaticMap()
Definition: Orbit.h:1174
Orbital_change_Mix()
Definition: Orbit.h:1150
Definition: Orbit.h:485
virtual double dynamic_tscale(Star *s)
Definition: Orbit.cpp:439
bool get_comenv()
Definition: Orbit.h:628
virtual double nuclear_dmdt(_UNUSED Star *s, _UNUSED Binstar *b)
Definition: Orbit.h:725
void init(_UNUSED Binstar *b) override
Definition: Orbit.h:516
void unset_comenv()
Definition: Orbit.h:627
void set_options(IO *_io) override
Definition: Orbit.h:500
void set_is_RLO_happening()
Definition: Orbit.h:629
bool novae
Definition: Orbit.h:546
double _DM[2]
Definition: Orbit.h:796
bool get_mix()
Definition: Orbit.h:625
int reset_DM()
Definition: Orbit.h:601
MTstability * mt_stability
Definition: Orbit.h:559
int set_swallowed(int starID)
Definition: Orbit.h:606
virtual int check_compact_accretor(int donor_type_bse, int accretor_type_bse)
Checks.
Definition: Orbit.h:771
bool _is_colliding
Definition: Orbit.h:801
virtual double thermal_dmdt(_UNUSED Star *s, _UNUSED Binstar *b)
Definition: Orbit.h:734
int speciale_evolve(_UNUSED Binstar *b) override
Mass transfer.
Definition: Orbit.cpp:453
Orbital_change_RL()
Definition: Orbit.h:488
static std::map< std::string, Orbital_change_RL * > & GetStaticMap()
Definition: Orbit.h:788
virtual double get_mt_tshold() const
Definition: Orbit.h:543
virtual double get_mt_value() const
Definition: Orbit.h:540
virtual int outcome_double_RLO(_UNUSED Binstar *b)
Utilities.
Definition: Orbit.h:659
virtual double dMdt_eddington(Star *donor, Star *accretor, Binstar *b)
Definition: Orbit.cpp:416
virtual int outcome_collision(_UNUSED Binstar *b)
Definition: Orbit.h:666
void set_mix()
Definition: Orbit.h:623
double get_DM(int ID)
Definition: Orbit.h:520
virtual double dynamic_dmdt(_UNUSED Star *s, _UNUSED Binstar *b)
Mass transfer.
Definition: Orbit.h:716
virtual double kelvin_helmotz_tscale(Star *s)
time scales
Definition: Orbit.cpp:421
bool mix
Definition: Orbit.h:798
double DM(_UNUSED Binstar *b, _UNUSED int procID, _UNUSED int starID) override
Definition: Orbit.h:528
virtual double estimate_q(Star *donor, Star *accretor)
q stuff
Definition: Orbit.cpp:407
virtual int outcome_collision(_UNUSED Star *donor, _UNUSED Star *accretor, _UNUSED Binstar *b)
Definition: Orbit.h:673
virtual Orbital_change_RL * instance()
Definition: Orbit.h:496
bool is_swallowed(int starID)
Definition: Orbit.h:532
bool _is_RLO_happening
Definition: Orbit.h:800
int reset_swallowed()
Definition: Orbit.h:618
bool comenv
Definition: Orbit.h:799
void unset_is_RLO_happening()
Definition: Orbit.h:630
virtual double Hfrac(Star *s)
Definition: Orbit.cpp:411
virtual double thermal_nuclear_accreted_mass(_UNUSED double DM_donor, _UNUSED Star *donor, _UNUSED Star *accretor, _UNUSED Binstar *b)
Definition: Orbit.h:743
virtual double correct_accreted_mass(double DM_accreted, _UNUSED double DM_donor, _UNUSED Star *donor, _UNUSED Star *accretor, _UNUSED Binstar *b)
Definition: Orbit.h:580
void unset_is_colliding()
Definition: Orbit.h:632
virtual int dynamic_swallowing(_UNUSED Binstar *b)
Mass transfer.
Definition: Orbit.h:640
int set_DM(double DM, int starID)
Definition: Orbit.h:593
virtual ~Orbital_change_RL()
Definition: Orbit.h:490
bool is_process_ongoing() override
Other function that return useful information.
Definition: Orbit.h:536
void Register(Orbital_change_RL *ptr, const std::string &_name)
Definition: Orbit.h:553
void unset_mix()
Definition: Orbit.h:624
std::string name() override
Definition: Orbit.h:510
bool is_giant_like(int star_type_bse)
Definition: Orbit.h:695
virtual void RLO(_UNUSED Star *donor, _UNUSED Star *accretor, _UNUSED Binstar *b)
Definition: Orbit.h:567
void set_comenv()
Definition: Orbit.h:626
void set_is_colliding()
Definition: Orbit.h:631
bool super_eddington
Definition: Orbit.h:547
bool is_colliding()
Definition: Orbit.h:537
int reset_swallowed(int starID)
Definition: Orbit.h:614
static std::vector< int > & GetUsed()
Definition: Orbit.h:792
virtual double fRL_radius(_UNUSED Star *star, _UNUSED Binstar *b)
Definition: Orbit.h:591
bool _is_swallowed[2]
Definition: Orbit.h:797
static Orbital_change_RL * Instance(const std::string &name)
Definition: Orbit.cpp:394
Definition: Orbit.h:1231
void set_cos_nu(double _cos_nu)
Definition: Orbit.h:1259
static Orbital_change_SNKicks * Instance(const std::string &name)
Definition: Orbit.cpp:1419
double get_cos_nu() const
Definition: Orbit.h:1248
double vcom
Definition: Orbit.h:1275
void set_vcom(double _vcom)
Definition: Orbit.h:1260
Orbital_change_SNKicks()
Definition: Orbit.h:1235
double get_vcom() const
Definition: Orbit.h:1249
static std::map< std::string, Orbital_change_SNKicks * > & GetStaticMap()
Definition: Orbit.h:1264
virtual ~Orbital_change_SNKicks()
Definition: Orbit.h:1237
std::string name() override
Definition: Orbit.h:1246
static std::vector< int > & GetUsed()
Definition: Orbit.h:1269
void Register(Orbital_change_SNKicks *ptr, const std::string &_name)
Definition: Orbit.h:1253
double cos_nu
Definition: Orbit.h:1274
virtual Orbital_change_SNKicks * instance()
Definition: Orbit.h:1242
Definition: Orbit.h:95
double dspindt_hut(Star *star_wtides, Star *star_pert, Binstar *binstar, double kt, double spin)
Definition: Orbit.cpp:197
double dadt_hut(Star *star_wtides, Star *star_pert, Binstar *binstar, double kt, double spin)
Definition: Orbit.cpp:154
double compute_kt_zahn_rad(Star *star_wtides, Star *star_pert, Binstar *binstar)
Definition: Orbit.cpp:134
static double f2(double e2)
Definition: Orbit.h:125
virtual double Dcnv(Star *star_wtides) const
Definition: Orbit.cpp:31
double dedt_hut(Star *star_wtides, Star *star_pert, Binstar *binstar, double kt, double spin)
Definition: Orbit.cpp:177
void Register(Orbital_change_Tides *ptr, const std::string &_name)
Definition: Orbit.h:116
double compute_tconv_pwheel18(Star *star_wtides, Binstar *b)
Definition: Orbit.cpp:67
static double f5(double e2)
Definition: Orbit.h:134
virtual ~Orbital_change_Tides()
Definition: Orbit.h:103
static double f3(double e2)
Definition: Orbit.h:128
std::string name() override
Definition: Orbit.h:111
static std::map< std::string, Orbital_change_Tides * > & GetStaticMap()
Definition: Orbit.h:200
static std::vector< int > & GetUsed()
Definition: Orbit.h:205
static double pseudosync_spin(double e2, double omegaorb)
Definition: Orbit.h:137
static Orbital_change_Tides * Instance(const std::string &name)
Definition: Orbit.cpp:17
static double f1(double e2)
Definition: Orbit.h:122
virtual double compute_kt_zahn_conv(Star *star_wtides, Binstar *binstar)
virtual Orbital_change_Tides * instance()
Definition: Orbit.h:107
virtual double get_tconv(_UNUSED Star *star_wtides, _UNUSED Binstar *b)
Override this in derived class.
Definition: Orbit.h:143
virtual double Mcnv(Star *star_wtides) const
Definition: Orbit.cpp:26
Orbital_change_Tides()
Definition: Orbit.h:99
static double f4(double e2)
Definition: Orbit.h:131
double compute_kt_zahn_conv(double Mass, double Menv_cnv, double t_cnv, double tide_freq)
Definition: Orbit.cpp:80
double compute_tconv_rasio96(Star *star_wtides, Binstar *b)
Definition: Orbit.cpp:37
Definition: Orbit.h:39
virtual int speciale_evolve(_UNUSED Binstar *b)
Definition: Orbit.h:85
SevnLogging svlog
Definition: Orbit.h:90
Orbital_change(_UNUSED std::string argv)
Definition: Orbit.h:54
Orbital_change & operator=(const Orbital_change &)=delete
Orbital_change()
Definition: Orbit.h:44
virtual double DM(_UNUSED Binstar *b, _UNUSED int procID, _UNUSED int starID)
Definition: Orbit.h:67
virtual bool is_process_ongoing()
Other function that return useful information.
Definition: Orbit.h:76
virtual std::string name()
Definition: Orbit.h:58
virtual void set_options(_UNUSED IO *_io)
Definition: Orbit.h:87
virtual double DAngMomSpin(_UNUSED Binstar *b, _UNUSED int procID, _UNUSED int starID)
Definition: Orbit.h:68
virtual double DE(_UNUSED Binstar *b, _UNUSED int procID)
Definition: Orbit.h:66
virtual void init(_UNUSED Binstar *b)
Definition: Orbit.h:64
Orbital_change(const Orbital_change &)=delete
virtual double DA(_UNUSED Binstar *b, _UNUSED int procID)
Definition: Orbit.h:65
virtual ~Orbital_change()
Definition: Orbit.h:46
Definition: Orbit.h:368
double Peters_GW_de(double M1, double M2, double a, double e)
Definition: Orbit.h:442
Peters_gw(bool reg=true)
Definition: Orbit.h:370
double function_core(double M1, double M2, double a)
Definition: Orbit.h:425
std::string name() override
Definition: Orbit.h:387
double DA(_UNUSED Binstar *b, _UNUSED int procID) override
Definition: Orbit.cpp:370
const double c4_a
Definition: Orbit.h:414
double DE(_UNUSED Binstar *b, _UNUSED int procID) override
Definition: Orbit.cpp:352
Peters_gw * instance() override
Definition: Orbit.h:383
const double G3_over_c5
Definition: Orbit.h:409
double Peters_GW_da(double M1, double M2, double a, double e)
Definition: Orbit.h:464
static Peters_gw _peters_gw
Definition: Orbit.h:385
const double c2_e
Definition: Orbit.h:416
const double K_e
Definition: Orbit.h:416
const double c2_a
Definition: Orbit.h:414
~Peters_gw()
Definition: Orbit.h:378
const double K_a
Definition: Orbit.h:414
Definition: Processes.h:43
std::string get_str(std::string name)
Definition: params.h:142
Definition: star.h:39
Definition: Orbit.h:271
~Tides_simple_notab()
Definition: Orbit.h:280
Tides_simple_notab * instance() override
Definition: Orbit.h:284
static Tides_simple_notab _Tides_simple_notab
Definition: Orbit.h:286
double Mcnv(Star *star_wtides) const override
Definition: Orbit.cpp:317
double Dcnv(Star *star_wtides) const override
Definition: Orbit.cpp:325
Tides_simple_notab(bool reg=true)
Definition: Orbit.h:274
std::string name() override
Definition: Orbit.h:288
Definition: Orbit.h:229
double get_tconv(Star *star_wtides, Binstar *b) override
Here we use tconv_rasio96.
Definition: Orbit.h:261
double DA(_UNUSED Binstar *binstar, _UNUSED int procID) override
Definition: Orbit.cpp:304
double _DLspin[2]
Definition: Orbit.h:267
double DE(_UNUSED Binstar *binstar, _UNUSED int procID) override
Definition: Orbit.cpp:309
Tides_simple(bool reg=true)
Definition: Orbit.h:233
static Tides_simple _Tides_simple
Definition: Orbit.h:245
double DAngMomSpin(_UNUSED Binstar *b, _UNUSED int procID, _UNUSED int starID) override
Definition: Orbit.cpp:313
double _DA
Definition: Orbit.h:266
double kt[2]
Definition: Orbit.h:263
~Tides_simple()
Definition: Orbit.h:239
std::string name() override
Definition: Orbit.h:249
void init(_UNUSED Binstar *binstar) override
Definition: Orbit.cpp:223
double _DE
Definition: Orbit.h:266
double syncspin
Definition: Orbit.h:264
Tides_simple * instance() override
Definition: Orbit.h:243
Definition: Orbit.h:1417
disabled_CE(bool reg=true)
Definition: Orbit.h:1419
std::string name() override
Definition: Orbit.h:1434
~disabled_CE()
Definition: Orbit.h:1425
disabled_CE * instance() override
Definition: Orbit.h:1430
static disabled_CE _disabled_CE
Definition: Orbit.h:1432
Definition: Orbit.h:1282
bool is_process_ongoing() override
Other function that return useful information.
Definition: Orbit.h:1297
std::string name() override
Definition: Orbit.h:1295
static disabled_SNKicks _disabled_SNKicks
Definition: Orbit.h:1293
disabled_SNKicks(bool reg=true)
Definition: Orbit.h:1285
disabled_SNKicks * instance() override
Definition: Orbit.h:1291
Definition: Orbit.h:348
disabled_gw(bool reg=true)
Definition: Orbit.h:352
disabled_gw * instance() override
Definition: Orbit.h:358
static disabled_gw _disabled_gw
Definition: Orbit.h:360
std::string name() override
Definition: Orbit.h:362
bool is_process_ongoing() override
Other function that return useful information.
Definition: Orbit.h:364
Definition: Orbit.h:1186
bool is_process_ongoing() override
Other function that return useful information.
Definition: Orbit.h:1201
disabled_mix(bool reg=true)
Definition: Orbit.h:1189
std::string name() override
Definition: Orbit.h:1199
static disabled_mix _disabled_mix
Definition: Orbit.h:1197
disabled_mix * instance() override
Definition: Orbit.h:1195
Definition: Orbit.h:808
~disabled_rl()
Definition: Orbit.h:817
bool is_process_ongoing() override
Other function that return useful information.
Definition: Orbit.h:828
std::string name() override
Definition: Orbit.h:826
disabled_rl * instance() override
Definition: Orbit.h:822
disabled_rl(bool reg=true)
Definition: Orbit.h:811
static disabled_rl _disabled_rl
Definition: Orbit.h:824
Definition: Orbit.h:211
bool is_process_ongoing() override
Other function that return useful information.
Definition: Orbit.h:225
disabled_tides * instance() override
Definition: Orbit.h:219
disabled_tides(bool reg=true)
Definition: Orbit.h:215
std::string name() override
Definition: Orbit.h:223
static disabled_tides _disabled_tides
Definition: Orbit.h:221
Definition: Orbit.h:1396
energy_CE(bool reg=true)
Definition: Orbit.h:1398
~energy_CE()
Definition: Orbit.h:1404
energy_CE * instance() override
Definition: Orbit.h:1409
std::string name() override
Definition: Orbit.h:1413
static energy_CE _energy_CE
Definition: Orbit.h:1411
Definition: sevnlog.h:43
void critical(std::string errstate, const char *file_input=nullptr, int line_input=-1) const
Definition: sevnlog.cpp:85
Definition: errhand.h:156
Definition: errhand.h:92
Definition: errhand.h:53
Definition: Orbit.h:1206
static simple_mix _simple_mix
Definition: Orbit.h:1222
~simple_mix()
Definition: Orbit.h:1215
simple_mix(bool reg=true)
Definition: Orbit.h:1209
simple_mix * instance() override
Definition: Orbit.h:1220
std::string name() override
Definition: Orbit.h:1224
@ _CEEnergy
Definition: lookup_and_phases.h:136
const GW_NAME gwmap_name
GW.
Definition: static_main.h:409
const TIDESMAP_NAME tidesmap_name
Tides.
Definition: static_main.h:397
@ _Tdisabled
Definition: lookup_and_phases.h:117
@ _Tsimple_notab
Definition: lookup_and_phases.h:116
@ _Tsimple
Definition: lookup_and_phases.h:115
@ _Mixsimple
Definition: lookup_and_phases.h:126
@ _Mixdisabled
Definition: lookup_and_phases.h:127
@ _SNKickdisabled
Definition: lookup_and_phases.h:132
@ _SNKickHurley
Definition: lookup_and_phases.h:131
const MIX_NAME mixmap_name
Definition: static_main.h:434
const CE_NAME cemap_name
Definition: static_main.h:452
const SNK_NAME snkmap_name
Definition: static_main.h:443
const RL_NAME rlmap_name
Definition: static_main.h:419
@ _GWPeters
Definition: lookup_and_phases.h:121
@ _GWdisabled
Definition: lookup_and_phases.h:122
constexpr double G
Fundamental quantitis.
Definition: utilities.h:59
constexpr int NULL_INT
Definition: utilities.h:90
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 G3_over_c5
Definition: utilities.h:78
constexpr double NULL_DOUBLE
Definition: utilities.h:89