Numerics¤
Numerics for the Kepler problem.
nsolve_u_from_tau_bisect(ecc, tau)
¤
Calculate the convenient radial inverse u from tau in the elliptic or parabolic case, using the bisect method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ecc |
float
|
eccentricity, ecc > 0, ecc != 1 |
required |
tau |
ArrayLike
|
scaled time |
required |
Returns:
Type | Description |
---|---|
list[OptimizeResult]
|
numeric OptimizeResult from scipy |
Source code in hamilflow/models/kepler_problem/numerics.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
nsolve_u_from_tau_newton(ecc, tau)
¤
Calculate the convenient radial inverse u from tau in the elliptic or parabolic case, using the Newton method.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ecc |
float
|
eccentricity, ecc > 0, ecc != 1 |
required |
tau |
ArrayLike
|
scaled time |
required |
Returns:
Type | Description |
---|---|
OptimizeResult
|
numeric OptimizeResult from scipy |
Raises:
Type | Description |
---|---|
ValueError
|
when |
Source code in hamilflow/models/kepler_problem/numerics.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
u_of_tau(ecc, tau, method='bisect')
¤
Calculate the convenient radial inverse u from tau, using numeric methods.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ecc |
float
|
eccentricity, ecc >= 0 |
required |
tau |
ArrayLike
|
scaled time |
required |
method |
Literal['bisect', 'newton']
|
"newton" or "bisect" numeric methods, defaults to "bisect" |
'bisect'
|
Returns:
Type | Description |
---|---|
NDArray[float64]
|
convenient radial inverse u |
Raises:
Type | Description |
---|---|
ValueError
|
when |
ValueError
|
when |
Source code in hamilflow/models/kepler_problem/numerics.py
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 |
|