Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

star_support.h

00001 
00002        //=======================================================//    _\|/_
00003       //  __  _____           ___                    ___       //      /|\ ~
00004      //  /      |      ^     |   \  |         ^     |   \     //          _\|/_
00005     //   \__    |     / \    |___/  |        / \    |___/    //            /|\ ~
00006    //       \   |    /___\   |  \   |       /___\   |   \   // _\|/_
00007   //     ___/   |   /     \  |   \  |____  /     \  |___/  //   /|\ ~
00008  //                                                       //            _\|/_
00009 //=======================================================//              /|\ ~
00010 
00011 /*
00012  *  star_support.h: derived class for element evolution systems.
00013  *          functions as derived class for the real elements.
00014  *.............................................................................
00015  *    version 1:  Jan 1994   Simon F. Portegies Zwart
00016  *    version 2:
00017  *.............................................................................
00018  *     This file includes:
00019  *  1) definition of stellar types and spectral classes
00020  *
00021  *.............................................................................
00022  */
00023 #ifndef  _STAR_SUPPORT
00024 #  define  _STAR_SUPPORT
00025 
00026 #include "stdinc.h"
00027 
00028 enum stellar_type {Static_Star = -3, SPZDCH_Star = -2, NAS = -1, 
00029                    Proto_Star = 0, Planet, Brown_Dwarf,
00030                    Main_Sequence, Hyper_Giant, Hertzsprung_Gap,
00031                    Sub_Giant, Horizontal_Branch, Super_Giant=8,
00032                    Carbon_Star, Helium_Star, Helium_Giant, 
00033                    Carbon_Dwarf, Helium_Dwarf, Oxygen_Dwarf,
00034                    Thorn_Zytkow=15,
00035                    Xray_Pulsar, Radio_Pulsar, Neutron_Star, Black_Hole,
00036                    Disintegrated, Double, no_of_stellar_type};
00037 
00038 enum stellar_type_summary {ZAMS=0, Early_Giant, Late_Giant,
00039                            Helium_Remnant, White_Dwarf, 
00040                            Neutron_Remnant, Inert_Remnant,
00041                            Unspecified, Undefined, no_of_star_type_summ};
00042 
00043 enum spectral_class {O5=0, O6, O7, O8, O9, O95, 
00044                      B0=6, B05, B1, B2, B3, B5, B6, B7, B8, B9, B95,
00045                      A0=17, A1, A2, A3, A4, A5, A7,
00046                      F0=24, F2, F3, F5, F6, F7, F8,
00047                      G0=31, G1, G2, G5, K0, K5, M0, M5, M8,
00048                      he=40, wd, ns, bh, bd, di,
00049                      binary_star, no_spectral_class};
00050 
00051 enum star_type_spec {NAC=0, Emission, Blue_Straggler, Barium, 
00052                      Rl_filling, Runaway, 
00053                      Merger, Accreting, Dsntgr, no_of_spec_type};
00054 
00055 enum luminosity_class {I=0, II, III, IV, V,
00056                        no_luminosity_class};
00057                                  
00058 enum mass_transfer_type {Unknown=0, Nuclear, AML_driven, Thermal, Dynamic};
00059 
00060 enum supernova_type {NAT=0, SN_Ia, SN_Ib, SN_Ic, 
00061                      SN_II, SN_IIL, SN_IIP, SN_IV,
00062                      no_of_supernova_type};
00063 
00064 //              polytropic indices.
00065 //enum polytrope {convective=1, composite, radiative};
00066 // index          3             2          1.5
00067                                  
00068 char * type_string(stellar_type);
00069 char * type_string(stellar_type_summary);
00070 char * type_string(spectral_class);
00071 char * type_string(luminosity_class);
00072 char * type_string(star_type_spec);
00073 char * type_string(mass_transfer_type);
00074 char * type_string(supernova_type sn_type);
00075 char * type_short_string(star_type_spec);
00076 char * type_short_string(stellar_type);
00077 char * type_short_string(stellar_type_summary);
00078 char * type_short_string(mass_transfer_type);
00079 char * type_short_string(spectral_class);
00080 
00081 stellar_type extract_stellar_type_string(char*);
00082 star_type_spec extract_stellar_spec_summary_string(char*);
00083 
00084 stellar_type_summary extract_stellar_type_summary_string(char*);
00085 stellar_type_summary summarize_stellar_type(stellar_type);
00086 
00087 // Conversion routines for SeBa to BSE
00088 int convert_SeBa_stellar_type_to_BSE(stellar_type tpe);
00089 stellar_type convert_BSE_to_SeBa_stellar_type(int tpe);
00090 
00091 bool remmant(stellar_type);
00092 bool post_supernova_star(stellar_type);
00093 supernova_type type_of_supernova(stellar_type progenitor);
00094 
00095 void combine_ubvri(real Up, real Bp, real Vp, real Rp, real Ip,
00096                    real Us, real Bs, real Vs, real Rs, real Is,
00097                    real &U, real &B, real &V, real &R, real &I);
00098 
00099 //Because of the dyn*, the following functions are in starbase.h 
00100 //void get_ubvri_star(dyn *bi, stellar_type& stype,
00101 //                  real& U, real& B, real& V, real& R, real& I);
00102 //  
00103 //void get_Lubvri_star(dyn *bi, stellar_type& stype,
00104 //                   real& Lu, real& Lb, real& Lv, real& Lr, real& Li);
00105 
00106 void ltm_to_ubvri(const real logl,
00107                   const real logt,
00108                   const real mass,
00109                   real& U,
00110                   real& B,
00111                   real& V,
00112                   real& R,
00113                   real& I);
00114 
00115 void ltm_to_ubvri(const real,
00116                   const real,
00117                   const real,
00118                   const real,
00119                   const real,
00120                   const real,
00121                   real& U,
00122                   real& B,
00123                   real& V,
00124                   real& R,
00125                   real& I);
00126 
00127 spectral_class get_spectral_class(const real temperature);
00128 luminosity_class get_luminosity_class(const real temperature, const real lum);
00129 real lum_class_limit(const real, luminosity_class);
00130 
00131 #endif          // _STAR_SUPPORT
00132 
00133 
00134 
00135 

Generated on Wed Jul 20 12:43:37 2005 for Starlab by  doxygen 1.4.3