Model¤
Main module for Kepler problem.
Kepler2D
¤
Kepler problem in two dimensional space.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
system |
Mapping[str, float]
|
the Kepler problem system specification |
required |
first_integrals |
Mapping[str, float]
|
the first integrals for the system. |
required |
Source code in hamilflow/models/kepler_problem/model.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
|
alpha: float
property
¤
Alpha \(\alpha\) from the system specification.
angular_mom: float
property
¤
Angular momentum \(l\) of the Kepler problem.
ecc: float
cached
property
¤
Conic section eccentricity of the Kepler problem.
ene: float
property
¤
Energy \(E\) of the Kepler problem.
mass: float
property
¤
Mass \(m\) from the system specification.
parameter: float
cached
property
¤
Conic section semi-latus rectum of the Kepler problem.
period: float
cached
property
¤
Period \(T\) of the Kepler problem.
For \(E < 0\), $$ T = \pi \alpha \sqrt{-\frac{m}{2E^3}}\,. $$
period_in_tau: float
cached
property
¤
Period in the scaled time tau.
phi0: float
property
¤
phi0 \(\phi_0\) of the Kepler problem.
t0: float
property
¤
t0 \(t_0\) of the Kepler problem.
t_to_tau_factor: float
property
¤
Scale factor from t to tau.
__call__(t)
¤
Give a DataFrame of tau, u, r and phi from t.
Source code in hamilflow/models/kepler_problem/model.py
288 289 290 291 292 293 294 295 |
|
from_geometry(system, geometries)
classmethod
¤
Alternative initialiser from system and geometry specifications.
Given the eccentricity \(e\) and the conic section semi-latus rectum \(p\), \(\(l = \pm \sqrt{mp}\,,\quad E = (e^2-1) \left|E_\text{min}\right|\,.\)\)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
system |
Mapping[str, float]
|
the Kepler problem system specification |
required |
geometries |
Mapping[str, bool | float]
|
geometric specifications |
required |
Source code in hamilflow/models/kepler_problem/model.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
|
minimal_ene(angular_mom, system)
staticmethod
¤
Minimal possible energy from the system specification and an angular momentum.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
angular_mom |
float
|
angular momentum |
required |
system |
Mapping[str, float]
|
system specification |
required |
Returns:
Type | Description |
---|---|
float
|
minimal possible energy |
Source code in hamilflow/models/kepler_problem/model.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|
phi_of_u_tau(u, tau)
¤
Give the angular phi from u and tau.
For \(e = 0\), $$ \phi - \phi_0 = 2\pi \frac{\tau}{T_\tau}\,; $$ For \(e > 0\), $$ \cos(\phi - \phi_0) = \frac{u}{e}\,. $$
Source code in hamilflow/models/kepler_problem/model.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
|
r_of_u(u)
¤
Give the radial r from u.
Source code in hamilflow/models/kepler_problem/model.py
258 259 260 261 262 263 |
|
tau(t)
¤
Give the scaled time tau from t.
Source code in hamilflow/models/kepler_problem/model.py
237 238 239 240 241 242 |
|
u_of_tau(tau)
¤
Give the convenient radial inverse u from tau.
Source code in hamilflow/models/kepler_problem/model.py
244 245 246 247 248 249 250 251 252 253 254 255 256 |
|
Kepler2DFI
¤
Bases: BaseModel
The first integrals for a Kepler problem.
Attributes:
Name | Type | Description |
---|---|---|
ene |
float
|
the energy \(E\) |
angular_mom |
float
|
the angular momentum \(l\) |
t0 |
float
|
the time \(t_0\) at which the radial position is closest to 0, defaults to 0 |
phi0 |
float
|
the angle \(\phi_0\) at which the radial position is closest to 0, defaults to 0 |
Source code in hamilflow/models/kepler_problem/model.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|
Kepler2DSystem
¤
Bases: BaseModel
Definition of the Kepler problem.
Potential:
For reference, if an object is orbiting our Sun, the constant \(\alpha = G M_{\odot} ~ 1.327 \times 10^{20} \mathrm{m}^3/\mathrm{s}^2\) in SI, which is also called 1 TCB, or 1 solar mass parameter. For computational stability, we recommend using TCB as the unit instead of the large SI values.
Units
When specifying the parameters of the system, be ware of the consistency of the units.
Attributes:
Name | Type | Description |
---|---|---|
alpha |
float
|
the proportional constant of the potential energy. |
mass |
float
|
the mass of the orbiting object |
Source code in hamilflow/models/kepler_problem/model.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|