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