Canoe
Comprehensive Atmosphere N' Ocean Engine
celestrial_body.hpp
Go to the documentation of this file.
1 #ifndef SRC_ASTRO_CELESTRIAL_BODY_HPP_
2 #define SRC_ASTRO_CELESTRIAL_BODY_HPP_
3 
4 // C/C++
5 #include <memory>
6 #include <string>
7 
8 // athena
9 #include <athena/athena.hpp>
10 
11 class ParameterInput;
12 struct float_triplet;
13 struct Direction;
14 
16  public:
17  // data
19  std::string name;
20  Real re; // equatorial radius [km -> m]
21  Real rp; // polar radius [km -> m]
22  Real obliq; // obliquity [deg -> rad]
23  Real spinp; // spin period [day -> s]
24  Real orbit_a; // orbital semi-major axis [au -> m]
25  Real orbit_e; // orbital eccentricity [1]
26  Real orbit_i; // orbital inclination to ecliptic [deg -> rad]
27  Real orbit_p; // orbital period [day -> s]
28  Real equinox; // vernal equinox
29  Real grav_eq; // equatorial gravity at surface [m/s^2]
30 
31  // functions
32  explicit CelestrialBody(ParameterInput *pin);
33  CelestrialBody(ParameterInput *pin, std::string myname);
35 
36  void ReadSpectraFile(std::string sfile);
37  Direction ParentZenithAngle(Real time, Real colat, Real lon);
38  Real ParentInsolationFlux(Real wav, Real dist_au);
39  Real ParentInsolationFlux(Real wlo, Real whi, Real dist_au);
40  Real ParentDistanceInAu(Real time);
41 
42  protected:
43  void readCelestrialData(ParameterInput *pin, std::string myname);
44 
45  // emission spectra data
47  int nspec_;
48  int il_; // search pointer
49 };
50 
51 using CelestrialBodyPtr = std::shared_ptr<CelestrialBody>;
52 
53 Real GetGravity(char const *name, Real pclat);
54 
55 #endif // SRC_ASTRO_CELESTRIAL_BODY_HPP_
std::shared_ptr< CelestrialBody > CelestrialBodyPtr
Real GetGravity(char const *name, Real pclat)
float_triplet * spec_
Real ParentInsolationFlux(Real wav, Real dist_au)
Real ParentDistanceInAu(Real time)
void ReadSpectraFile(std::string sfile)
CelestrialBody * parent
void readCelestrialData(ParameterInput *pin, std::string myname)
Direction ParentZenithAngle(Real time, Real colat, Real lon)
std::string name
CelestrialBody(ParameterInput *pin)