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

planet.h

00001 /*
00002  * planet.h: derived class for evolution of planet
00003  *     is non helium burning extreme low mass star.
00004  *
00005  *.....................................................................
00006  *     version 1:  Jan 1994   Simon F. Portegies Zwart
00007  *     version 2:
00008  *...................................................................
00009  *     This file includes:
00010  *  1) definition of class planet
00011  *
00012  *....................................................................
00013  */
00014 
00015 #ifndef    _PLANET
00016 #   define _PLANET
00017 
00018 //#include <stdlib.h>
00019 #include "stdinc.h"
00020 #include "constants.h"
00021 #include "star.h"
00022 //#include "ioserror.h"
00023 
00024                 // Known class declarations.
00025 class base_element;
00026 
00027 /*-----------------------------------------------------------------------------
00028  *  planet  --  a derived class for element evolution.
00029  *-----------------------------------------------------------------------------
00030  */
00031 class planet : public star {
00032       protected :
00033 //         static ioserror error;
00034       public :
00035                 // Constructors.
00036          planet() : star() {}
00037          planet(super_giant &);
00038          planet(main_sequence &);
00039          planet(base_element * b) : star(b) {}
00040                 // Destructors.
00041          ~planet() {}
00042 //              Member acces functions.
00043         stellar_type get_element_type() {return Planet;}
00044         bool remnant() {return FALSE;}
00045 
00046                 // Member function definition.
00047         void adjust_initial_star() {
00048              relative_age = max(current_time, 0);}
00049         void  initialize_element();
00050         void instantaneous_element(const real);
00051         void evolve_element(const real);
00052         void update();
00053         real helium_core_mass();
00054         void thermo_nucleair_flash();
00055         void dwarf_nova();
00056         void common_envelope();
00057 //              Mass transfer utilities.
00058         real mass_transfer_timescale();
00059         void reduce_donor_mass(const real);
00060         real subtrac_mass_from_donor(const real);
00061         real accretion_limit(const real, const real); 
00062         real add_mass_to_accretor(const real);
00063         real add_mass_to_accretor(real, const real);
00064         void adjust_accretor_age(const real);
00065         void adjust_next_update_age() {/* do nothing */}
00066         void accrete_from_envelope(const real);
00067 //              Merge routines.
00068         void merge_elements(base_element*);
00069 //              Mass transfer stability
00070         real zeta_thermal();
00071         void err_dump();
00072 
00073 
00074                 // Debugging utilities.
00075                 // Friend functions.
00076 //      In a future implementation AIC could occur.
00077 //      Then the white dwarf makes friends.
00078         friend neutron_star::neutron_star(white_dwarf&);
00079       };
00080 //base_element *wd = (base_element*)new white_dwarf(exemplar());
00081 #endif          // _PLANET

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