mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
planets.hpp
Go to the documentation of this file.
1 /** \file planets.hpp
2  * \author Jared R. Males (jaredmales@gmail.com)
3  * \brief Various utilities related to planets.
4  * \ingroup astrofiles
5  *
6  */
7 
8 
9 #ifndef __mx_astro_planets_hpp__
10 #define __mx_astro_planets_hpp__
11 
12 #include "../math/constants.hpp"
13 
14 #include "units.hpp"
15 
16 
17 namespace mx
18 {
19 namespace astro
20 {
21 
22 
23 /** \ingroup planets
24  * @{
25  */
26 
27 ///An ad-hoc planetary mass-to-radius relationship (old version)
28 /** The goal of this function is to provide a radius given an exoplanet mass, for lightly-irradiated exoplanets. By lightly-irradiated we mean (roughly) planet's at
29  * Mercury's separation or further, scaled for stellar luminosity.
30  * Here we make use of the transition from rocky to gas-dominated composition at \f$ 1.6 R_e \f$ identified by Rogers \cite rogers_2015
31  * (see also Marcy et al. (2014) \cite marcy_2014). Below this radius we assume Earth composition and so
32  * \f$ R \propto M^{1/3}\f$. Above this we scale with a power law matched to the mean radius and mass of Uranus and Neptune, which defines the radius between
33  * \f$ 1.6^3 M_\oplus \f$ and this Uranus-Neptune mean point. Above this point we use
34  * a polynomial fit (in log(M)) to points including the Uranus/Neptune mean, Saturn, Jupiter, and above Jupiter's mass the average points from the 4.5 Gyr 1 AU models from
35  * Fortney et al. (2007) \cite fortney_2007. Above 3591.1 \f$ M_\oplus \f$ (\f$\sim 11 M_{jup}\f$) we scale as \f$ M^{-1/8} \f$ based on the curve shown in Fortney et al. (2011) \cite fortney_2010.
36  *
37  * \f$
38  \frac{R}{R_\oplus} =
39  \begin{cases}
40  \left(\frac{M}{M_\oplus}\right)^{1/3}, & M < 4.1 M_\oplus \\
41  0.62\left(\frac{M}{M_\oplus}\right)^{0.67}, & 4.1 M_\oplus \le M < 15.84 M_\oplus \\
42  14.0211 - 44.8414 \log_{10}\left(\frac{M}{M_\oplus}\right) + 53.6554 \log_{10}^2\left(\frac{M}{M_\oplus}\right)
43  -25.3289\log_{10}^3\left(\frac{M}{M_\oplus}\right) + 5.4920\log_{10}^4\left(\frac{M}{M_\oplus}\right) - 0.4586 \log_{10}^5\left(\frac{M}{M_\oplus}\right), & 15.84 \le M < 3591.1 M_\oplus \\
44  32.03 \left(\frac{M}{M_\oplus}\right)^{-1/8}, & 3591.1 M_\oplus \le M
45  \end{cases}
46  \f$
47  *
48  * \image html planet_mrdiag_2017.06.19.png "The ad-hoc mass-to-radius relationship compared to known planets. Blue circles are the Solar system. Black circles indicate expoplanets with Teq below that of a blackbody at Mercury's separation (413 K)."
49  *
50  * This function makes use of the units type system (\ref astrounits) so it can be used with Earth masses, Jupiter masses, kg (SI units), etc.
51  *
52  * \returns the estimated radius of the planet.
53  *
54  * \tparam units is the units-type specifying the units of mass. See \ref astrounits.
55  */
56 template<typename units>
57 typename units::realT planetMass2Radius( typename units::realT mass /**< The mass of the planet. */)
58 {
59  typedef typename units::realT realT;
60 
61  using namespace mx::astro::constants;
62 
63  if( mass < 4.1*massEarth<units>())
64  {
65  return pow( mass/massEarth<units>(), math::third<realT>())*radEarth<units>();
66  }
67  else if( mass < static_cast<realT>(15.84)*massEarth<units>() )
68  {
69  return 0.62*pow( mass/massEarth<units>(), static_cast<realT>(0.67))*radEarth<units>();
70  }
71  else if( mass < 3591.1*massEarth<units>())
72  {
73  realT logM = log10(mass/massEarth<units>());
74 
75  return (static_cast<realT>(14.0211)-static_cast<realT>(44.8414)*logM+static_cast<realT>(53.6554)*pow(logM,2) -
76  static_cast<realT>(25.3289)*pow(logM,3) + static_cast<realT>(5.4920)*pow(logM,4)
77  - 0.4586*pow(logM,5))*radEarth<units>();
78  }
79  else
80  {
81  return static_cast<realT>(32.03)*pow(mass/massEarth<units>(), static_cast<realT>(-0.125))* radEarth<units>();
82  }
83 
84 
85 }
86 
87 ///An ad-hoc planetary mass-to-radius relationship.
88 /** The goal of this function is to provide a radius given an exoplanet mass, for cool, lightly-irradiated exoplanets. Here cool means \f$T_{eq} < 1000 \f$ K.
89  *
90  * We make use of the transition from rocky to gas-dominated composition at \f$ 1.6 R_\oplus \f$ identified by Rogers \cite rogers_2015
91  * (see also Marcy et al. (2014) \cite marcy_2014). Below this radius we assume Earth composition and so
92  * \f$ R \propto M^{1/3}\f$.
93  *
94  * Above \f$ 15 M_\oplus\f$ we use the empirical relationship of Thorngren et al (2019) \cite{Thorngren_2019}.
95  *
96  * Between these two cases we scale with a power law matched to the endpoints.
97  *
98  * Above \f$ 12 M_{Jup} we scale as \f$ M^{-1/8} \f$ based on the curve shown in Fortney et al. (2011) \cite fortney_2010.
99  *
100  * \image html planet_mrdiag_2017.06.19.png "The ad-hoc mass-to-radius relationship compared to known planets. Blue circles are the Solar system. Points
101  * with error bars are from the NASA exoplanet catalog, selected for \f$T_{eq} < 1000\f$ K
102  *
103  * This function makes use of the units type system (\ref astrounits) so it can be used with Earth masses, Jupiter masses, kg (SI units), etc.
104  *
105  * \returns the estimated radius of the planet.
106  *
107  * \tparam units is the units-type specifying the units of mass. See \ref astrounits.
108  */
109 template<typename units>
110 typename units::realT planetMass2RadiusWThorngren( typename units::realT mass /**< The mass of the planet. */)
111 {
112  typedef typename units::realT realT;
113 
114  using namespace mx::astro::constants;
115 
116  if( mass < 4.1*massEarth<units>())
117  {
118  return pow( mass/massEarth<units>(), math::third<realT>())*radEarth<units>();
119  }
120  else if( mass < static_cast<realT>(15.00)*massEarth<units>() )
121  {
122  return 0.6413*pow( mass/massEarth<units>(), static_cast<realT>(0.6477))*radEarth<units>();
123  }
124  else if( mass < 12*massJupiter<units>())
125  {
126  realT lM = log10(mass/massJupiter<units>());
127 
128  return (static_cast<realT>(0.96)+static_cast<realT>(0.21)*lM - static_cast<realT>(0.20)*pow(lM,2))*radJupiter<units>();
129  }
130  else
131  {
132  return static_cast<realT>(29.97)*pow(mass/massEarth<units>(), static_cast<realT>(-0.125))* radEarth<units>();
133  }
134 
135 
136 }
137 
138 /// Empirical mass-to-radius relationship for cool EGPs from Thorngren et al. (2019)
139 /** A polynomial in log(M) fit to cool (T < 1000 K) exoplanets by Thorngren et al. (2019) \cite Thorngren_2019.
140  * Only valid for \f$ 15 M_\oplus < M < 12 M_{Jup} \f$
141  *
142  * \returns the estimated radius of the planet.
143  *
144  * \tparam units is the units-type specifying the units of mass. See \ref astrounits.
145  */
146 template<typename units>
147 typename units::realT planetMass2RadiusThorngren( typename units::realT mass /**< The mass of the planet. */)
148 {
149  typedef typename units::realT realT;
150 
151  using namespace mx::astro::constants;
152 
153  realT lM = log10(mass/massJupiter<units>());
154 
155  return (0.96+0.21*lM - 0.2*pow(lM,2))*radJupiter<units>();
156 }
157 
158 ///The planetary mass-to-radius of Fabrycky et al. (2014)..
159 /** A broken power law for low mass planets from Fabrycky et al. (2014)\cite fabrycky_2014 (see also \cite lissauer_2011}.
160  *
161  * \f$
162  \frac{R}{R_e} =
163  \begin{cases}
164  \left(\frac{M}{M_e}\right)^{1/3}, & M < 1 M_e \\
165  \left(\frac{M}{M_e}\right)^{1/2.06}, & 1 M_e \le M
166  \end{cases}
167  \f$
168  *
169  * This makes use of the units type system (\ref astrounits) so it can be used with Earth masses, Jupiter masses, kg (SI units), etc.
170  *
171  * \returns the estimated radius of the planet.
172  *
173  * \tparam units is the units-type specifying the units of mass. See \ref astrounits.
174  */
175 template<typename units>
176 typename units::realT planetMass2RadiusFab2014( typename units::realT mass /**< The mass of the planet. */)
177 {
178  typedef typename units::realT realT;
179 
180  using namespace mx::astro::constants;
181 
182  if( mass < massEarth<units>())
183  {
184  return pow( mass/massEarth<units>(), math::third<realT>())*radEarth<units>();
185  }
186  else
187  {
188  return pow( mass/massEarth<units>(), static_cast<realT>(1)/static_cast<realT>(2.06))*radEarth<units>();
189  }
190 
191 }
192 
193 
194 ///@}
195 } //namespace astro
196 } //namespace mx
197 #endif
units::realT planetMass2Radius(typename units::realT mass)
An ad-hoc planetary mass-to-radius relationship (old version)
Definition: planets.hpp:57
The mxlib c++ namespace.
Definition: mxError.hpp:107
Unit specifications and conversions.