@interstellar-tools/equations 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/categories/entry/ballistic-coefficient.d.ts +44 -0
- package/dist/categories/entry/ballistic-coefficient.d.ts.map +1 -0
- package/dist/categories/entry/ballistic-coefficient.js +54 -0
- package/dist/categories/entry/ballistic-coefficient.js.map +1 -0
- package/dist/categories/entry/ballistic-entry-speed.d.ts +52 -0
- package/dist/categories/entry/ballistic-entry-speed.d.ts.map +1 -0
- package/dist/categories/entry/ballistic-entry-speed.js +71 -0
- package/dist/categories/entry/ballistic-entry-speed.js.map +1 -0
- package/dist/categories/entry/ballistic-peak-deceleration-altitude.d.ts +47 -0
- package/dist/categories/entry/ballistic-peak-deceleration-altitude.d.ts.map +1 -0
- package/dist/categories/entry/ballistic-peak-deceleration-altitude.js +62 -0
- package/dist/categories/entry/ballistic-peak-deceleration-altitude.js.map +1 -0
- package/dist/categories/entry/ballistic-peak-deceleration.d.ts +63 -0
- package/dist/categories/entry/ballistic-peak-deceleration.d.ts.map +1 -0
- package/dist/categories/entry/ballistic-peak-deceleration.js +76 -0
- package/dist/categories/entry/ballistic-peak-deceleration.js.map +1 -0
- package/dist/categories/entry/stagnation-heat-flux.d.ts +46 -0
- package/dist/categories/entry/stagnation-heat-flux.d.ts.map +1 -0
- package/dist/categories/entry/stagnation-heat-flux.js +57 -0
- package/dist/categories/entry/stagnation-heat-flux.js.map +1 -0
- package/dist/categories/entry/terminal-velocity.d.ts +48 -0
- package/dist/categories/entry/terminal-velocity.d.ts.map +1 -0
- package/dist/categories/entry/terminal-velocity.js +60 -0
- package/dist/categories/entry/terminal-velocity.js.map +1 -0
- package/dist/categories/entry/validate.d.ts +7 -0
- package/dist/categories/entry/validate.d.ts.map +1 -0
- package/dist/categories/entry/validate.js +20 -0
- package/dist/categories/entry/validate.js.map +1 -0
- package/dist/categories/manoeuvres/cw-two-impulse-transfer.d.ts +58 -0
- package/dist/categories/manoeuvres/cw-two-impulse-transfer.d.ts.map +1 -0
- package/dist/categories/manoeuvres/cw-two-impulse-transfer.js +104 -0
- package/dist/categories/manoeuvres/cw-two-impulse-transfer.js.map +1 -0
- package/dist/categories/manoeuvres/phasing-wait-time.d.ts +55 -0
- package/dist/categories/manoeuvres/phasing-wait-time.d.ts.map +1 -0
- package/dist/categories/manoeuvres/phasing-wait-time.js +77 -0
- package/dist/categories/manoeuvres/phasing-wait-time.js.map +1 -0
- package/dist/categories/orbits/cw-propagate.d.ts +48 -0
- package/dist/categories/orbits/cw-propagate.d.ts.map +1 -0
- package/dist/categories/orbits/cw-propagate.js +68 -0
- package/dist/categories/orbits/cw-propagate.js.map +1 -0
- package/dist/categories/orbits/cw-state-transition.d.ts +65 -0
- package/dist/categories/orbits/cw-state-transition.d.ts.map +1 -0
- package/dist/categories/orbits/cw-state-transition.js +83 -0
- package/dist/categories/orbits/cw-state-transition.js.map +1 -0
- package/dist/categories/orbits/synodic-period.d.ts +59 -0
- package/dist/categories/orbits/synodic-period.d.ts.map +1 -0
- package/dist/categories/orbits/synodic-period.js +72 -0
- package/dist/categories/orbits/synodic-period.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute the **ballistic coefficient** of an entry vehicle: how much mass it has per unit of drag.
|
|
3
|
+
*
|
|
4
|
+
* $$
|
|
5
|
+
* \beta = \frac{m}{C_D A}
|
|
6
|
+
* $$
|
|
7
|
+
*
|
|
8
|
+
* Where:
|
|
9
|
+
* - $ m $ is the vehicle's mass (kg)
|
|
10
|
+
* - $ C_D $ is its drag coefficient (dimensionless)
|
|
11
|
+
* - $ A $ is its reference area, usually the frontal area (m²)
|
|
12
|
+
*
|
|
13
|
+
* **Units**
|
|
14
|
+
* - Inputs: `m` in **kg**, `Cd` dimensionless, `A` in **m²**.
|
|
15
|
+
* - Output: $ \beta $ in **kg/m²**.
|
|
16
|
+
*
|
|
17
|
+
* ::: info Notes
|
|
18
|
+
*
|
|
19
|
+
* - A low $ \beta $ slows down high in the thin upper atmosphere; a high $ \beta $ plunges deeper before it slows.
|
|
20
|
+
* - The drag deceleration is $ a = \rho V^2 / (2\beta) $.
|
|
21
|
+
* - Some texts define it the other way up, as $ C_D A / m $. This library uses $ m / (C_D A) $ throughout.
|
|
22
|
+
*
|
|
23
|
+
* :::
|
|
24
|
+
*
|
|
25
|
+
* @param m - Mass $ m $ in **kg** (finite, > 0).
|
|
26
|
+
* @param Cd - Drag coefficient $ C_D $ (finite, > 0).
|
|
27
|
+
* @param A - Reference area $ A $ in **m²** (finite, > 0).
|
|
28
|
+
* @returns Ballistic coefficient $ \beta $ in **kg/m²**.
|
|
29
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
30
|
+
* @throws {RangeError} If any input is `<= 0`.
|
|
31
|
+
* @group Entry
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* // A 5000 kg capsule, 3.9 m across, with Cd = 1.3
|
|
36
|
+
* const beta = ballisticCoefficient(5000, 1.3, Math.PI * 1.95 ** 2);
|
|
37
|
+
* // beta ≈ 322 kg/m²
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @see {@link ballisticEntrySpeed}
|
|
41
|
+
* @see https://en.wikipedia.org/wiki/Ballistic_coefficient Ballistic coefficient
|
|
42
|
+
*/
|
|
43
|
+
export declare const ballisticCoefficient: (m: number, Cd: number, A: number) => number;
|
|
44
|
+
//# sourceMappingURL=ballistic-coefficient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ballistic-coefficient.d.ts","sourceRoot":"","sources":["../../../src/categories/entry/ballistic-coefficient.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,oBAAoB,GAC/B,GAAG,MAAM,EACT,IAAI,MAAM,EACV,GAAG,MAAM,KACR,MAWF,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { assertFinite, assertPositive } from './validate.js';
|
|
2
|
+
/**
|
|
3
|
+
* Compute the **ballistic coefficient** of an entry vehicle: how much mass it has per unit of drag.
|
|
4
|
+
*
|
|
5
|
+
* $$
|
|
6
|
+
* \beta = \frac{m}{C_D A}
|
|
7
|
+
* $$
|
|
8
|
+
*
|
|
9
|
+
* Where:
|
|
10
|
+
* - $ m $ is the vehicle's mass (kg)
|
|
11
|
+
* - $ C_D $ is its drag coefficient (dimensionless)
|
|
12
|
+
* - $ A $ is its reference area, usually the frontal area (m²)
|
|
13
|
+
*
|
|
14
|
+
* **Units**
|
|
15
|
+
* - Inputs: `m` in **kg**, `Cd` dimensionless, `A` in **m²**.
|
|
16
|
+
* - Output: $ \beta $ in **kg/m²**.
|
|
17
|
+
*
|
|
18
|
+
* ::: info Notes
|
|
19
|
+
*
|
|
20
|
+
* - A low $ \beta $ slows down high in the thin upper atmosphere; a high $ \beta $ plunges deeper before it slows.
|
|
21
|
+
* - The drag deceleration is $ a = \rho V^2 / (2\beta) $.
|
|
22
|
+
* - Some texts define it the other way up, as $ C_D A / m $. This library uses $ m / (C_D A) $ throughout.
|
|
23
|
+
*
|
|
24
|
+
* :::
|
|
25
|
+
*
|
|
26
|
+
* @param m - Mass $ m $ in **kg** (finite, > 0).
|
|
27
|
+
* @param Cd - Drag coefficient $ C_D $ (finite, > 0).
|
|
28
|
+
* @param A - Reference area $ A $ in **m²** (finite, > 0).
|
|
29
|
+
* @returns Ballistic coefficient $ \beta $ in **kg/m²**.
|
|
30
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
31
|
+
* @throws {RangeError} If any input is `<= 0`.
|
|
32
|
+
* @group Entry
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* // A 5000 kg capsule, 3.9 m across, with Cd = 1.3
|
|
37
|
+
* const beta = ballisticCoefficient(5000, 1.3, Math.PI * 1.95 ** 2);
|
|
38
|
+
* // beta ≈ 322 kg/m²
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @see {@link ballisticEntrySpeed}
|
|
42
|
+
* @see https://en.wikipedia.org/wiki/Ballistic_coefficient Ballistic coefficient
|
|
43
|
+
*/
|
|
44
|
+
export const ballisticCoefficient = (m, Cd, A) => {
|
|
45
|
+
const inputs = [
|
|
46
|
+
['m', m],
|
|
47
|
+
['Cd', Cd],
|
|
48
|
+
['A', A]
|
|
49
|
+
];
|
|
50
|
+
assertFinite(inputs);
|
|
51
|
+
assertPositive(inputs);
|
|
52
|
+
return m / (Cd * A);
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=ballistic-coefficient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ballistic-coefficient.js","sourceRoot":"","sources":["../../../src/categories/entry/ballistic-coefficient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,CAAS,EACT,EAAU,EACV,CAAS,EACD,EAAE;IACV,MAAM,MAAM,GAAG;QACb,CAAC,GAAG,EAAE,CAAC,CAAC;QACR,CAAC,IAAI,EAAE,EAAE,CAAC;QACV,CAAC,GAAG,EAAE,CAAC,CAAC;KACA,CAAC;IAEX,YAAY,CAAC,MAAM,CAAC,CAAC;IACrB,cAAc,CAAC,MAAM,CAAC,CAAC;IAEvB,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AACtB,CAAC,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute the **speed of a ballistic entry** at an altitude, with the Allen–Eggers solution.
|
|
3
|
+
*
|
|
4
|
+
* $$
|
|
5
|
+
* V(h) = V_E \exp\left(-\frac{\rho_0 H}{2\beta\sin\lvert\gamma\rvert}\, e^{-h/H}\right)
|
|
6
|
+
* $$
|
|
7
|
+
*
|
|
8
|
+
* Where:
|
|
9
|
+
* - $ V_E $ is the speed at entry (m/s)
|
|
10
|
+
* - $ \gamma $ is the flight-path angle, constant along the straight path (rad)
|
|
11
|
+
* - $ \beta $ is the ballistic coefficient (kg/m²)
|
|
12
|
+
* - $ \rho_0 $ and $ H $ describe an exponential atmosphere, $ \rho = \rho_0 e^{-h/H} $
|
|
13
|
+
*
|
|
14
|
+
* **Units**
|
|
15
|
+
* - Inputs: `h` and `H` in **m**, `VE` in **m/s**, `gamma` in **radians**, `beta` in **kg/m²**, `rho0` in **kg/m³**.
|
|
16
|
+
* - Output: $ V $ in **m/s**.
|
|
17
|
+
*
|
|
18
|
+
* ::: info Notes
|
|
19
|
+
*
|
|
20
|
+
* - Assumes drag dominates: no lift, no gravity, and a straight path at a constant angle. That holds well for steep, fast entries of non-lifting bodies.
|
|
21
|
+
* - The deceleration at any altitude is $ \rho V^2 / (2\beta) $; its peak is {@link ballisticPeakDeceleration}, at {@link ballisticPeakDecelerationAltitude}.
|
|
22
|
+
* - `gamma` can be given as negative (descending, the usual convention) or positive: only its size is used.
|
|
23
|
+
* - Earth's lower atmosphere is roughly $ \rho_0 = 1.225 $ kg/m³ with $ H \approx 7.2 $ km. A single exponential is a rough fit; see the density models in [#226](https://github.com/phun-ky/interstellar-tools/issues/226).
|
|
24
|
+
*
|
|
25
|
+
* :::
|
|
26
|
+
*
|
|
27
|
+
* @param h - Altitude $ h $ in **m** (finite).
|
|
28
|
+
* @param VE - Entry speed $ V_E $ in **m/s** (finite, > 0).
|
|
29
|
+
* @param gamma - Flight-path angle $ \gamma $ in **radians** (finite, non-zero, within [-π/2, π/2]).
|
|
30
|
+
* @param beta - Ballistic coefficient $ \beta $ in **kg/m²** (finite, > 0).
|
|
31
|
+
* @param rho0 - Reference density $ \rho_0 $ in **kg/m³** (finite, > 0).
|
|
32
|
+
* @param H - Scale height $ H $ in **m** (finite, > 0).
|
|
33
|
+
* @returns Speed $ V $ in **m/s**.
|
|
34
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
35
|
+
* @throws {RangeError} If `VE`, `beta`, `rho0` or `H` is `<= 0`, or `gamma` is zero or past vertical.
|
|
36
|
+
* @group Entry
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* import type { Radians } from '@interstellar-tools/types';
|
|
41
|
+
*
|
|
42
|
+
* // A 322 kg/m² capsule entering at 11 km/s, 6.5° below horizontal
|
|
43
|
+
* const v = ballisticEntrySpeed(40_000, 11_000, (-6.5 * Math.PI / 180) as Radians, 322, 1.225, 7200);
|
|
44
|
+
* // v ≈ 6.9 km/s at 40 km
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @see {@link ballisticCoefficient}
|
|
48
|
+
* @see {@link ballisticPeakDeceleration}
|
|
49
|
+
* @see https://en.wikipedia.org/wiki/Atmospheric_entry Atmospheric entry
|
|
50
|
+
*/
|
|
51
|
+
export declare const ballisticEntrySpeed: (h: number, VE: number, gamma: number, beta: number, rho0: number, H: number) => number;
|
|
52
|
+
//# sourceMappingURL=ballistic-entry-speed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ballistic-entry-speed.d.ts","sourceRoot":"","sources":["../../../src/categories/entry/ballistic-entry-speed.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,mBAAmB,GAC9B,GAAG,MAAM,EACT,IAAI,MAAM,EACV,OAAO,MAAM,EACb,MAAM,MAAM,EACZ,MAAM,MAAM,EACZ,GAAG,MAAM,KACR,MAoBF,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { assertFinite, assertFlightPathAngle, assertPositive } from './validate.js';
|
|
2
|
+
/**
|
|
3
|
+
* Compute the **speed of a ballistic entry** at an altitude, with the Allen–Eggers solution.
|
|
4
|
+
*
|
|
5
|
+
* $$
|
|
6
|
+
* V(h) = V_E \exp\left(-\frac{\rho_0 H}{2\beta\sin\lvert\gamma\rvert}\, e^{-h/H}\right)
|
|
7
|
+
* $$
|
|
8
|
+
*
|
|
9
|
+
* Where:
|
|
10
|
+
* - $ V_E $ is the speed at entry (m/s)
|
|
11
|
+
* - $ \gamma $ is the flight-path angle, constant along the straight path (rad)
|
|
12
|
+
* - $ \beta $ is the ballistic coefficient (kg/m²)
|
|
13
|
+
* - $ \rho_0 $ and $ H $ describe an exponential atmosphere, $ \rho = \rho_0 e^{-h/H} $
|
|
14
|
+
*
|
|
15
|
+
* **Units**
|
|
16
|
+
* - Inputs: `h` and `H` in **m**, `VE` in **m/s**, `gamma` in **radians**, `beta` in **kg/m²**, `rho0` in **kg/m³**.
|
|
17
|
+
* - Output: $ V $ in **m/s**.
|
|
18
|
+
*
|
|
19
|
+
* ::: info Notes
|
|
20
|
+
*
|
|
21
|
+
* - Assumes drag dominates: no lift, no gravity, and a straight path at a constant angle. That holds well for steep, fast entries of non-lifting bodies.
|
|
22
|
+
* - The deceleration at any altitude is $ \rho V^2 / (2\beta) $; its peak is {@link ballisticPeakDeceleration}, at {@link ballisticPeakDecelerationAltitude}.
|
|
23
|
+
* - `gamma` can be given as negative (descending, the usual convention) or positive: only its size is used.
|
|
24
|
+
* - Earth's lower atmosphere is roughly $ \rho_0 = 1.225 $ kg/m³ with $ H \approx 7.2 $ km. A single exponential is a rough fit; see the density models in [#226](https://github.com/phun-ky/interstellar-tools/issues/226).
|
|
25
|
+
*
|
|
26
|
+
* :::
|
|
27
|
+
*
|
|
28
|
+
* @param h - Altitude $ h $ in **m** (finite).
|
|
29
|
+
* @param VE - Entry speed $ V_E $ in **m/s** (finite, > 0).
|
|
30
|
+
* @param gamma - Flight-path angle $ \gamma $ in **radians** (finite, non-zero, within [-π/2, π/2]).
|
|
31
|
+
* @param beta - Ballistic coefficient $ \beta $ in **kg/m²** (finite, > 0).
|
|
32
|
+
* @param rho0 - Reference density $ \rho_0 $ in **kg/m³** (finite, > 0).
|
|
33
|
+
* @param H - Scale height $ H $ in **m** (finite, > 0).
|
|
34
|
+
* @returns Speed $ V $ in **m/s**.
|
|
35
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
36
|
+
* @throws {RangeError} If `VE`, `beta`, `rho0` or `H` is `<= 0`, or `gamma` is zero or past vertical.
|
|
37
|
+
* @group Entry
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* import type { Radians } from '@interstellar-tools/types';
|
|
42
|
+
*
|
|
43
|
+
* // A 322 kg/m² capsule entering at 11 km/s, 6.5° below horizontal
|
|
44
|
+
* const v = ballisticEntrySpeed(40_000, 11_000, (-6.5 * Math.PI / 180) as Radians, 322, 1.225, 7200);
|
|
45
|
+
* // v ≈ 6.9 km/s at 40 km
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @see {@link ballisticCoefficient}
|
|
49
|
+
* @see {@link ballisticPeakDeceleration}
|
|
50
|
+
* @see https://en.wikipedia.org/wiki/Atmospheric_entry Atmospheric entry
|
|
51
|
+
*/
|
|
52
|
+
export const ballisticEntrySpeed = (h, VE, gamma, beta, rho0, H) => {
|
|
53
|
+
assertFinite([
|
|
54
|
+
['h', h],
|
|
55
|
+
['VE', VE],
|
|
56
|
+
['gamma', gamma],
|
|
57
|
+
['beta', beta],
|
|
58
|
+
['rho0', rho0],
|
|
59
|
+
['H', H]
|
|
60
|
+
]);
|
|
61
|
+
assertPositive([
|
|
62
|
+
['VE', VE],
|
|
63
|
+
['beta', beta],
|
|
64
|
+
['rho0', rho0],
|
|
65
|
+
['H', H]
|
|
66
|
+
]);
|
|
67
|
+
assertFlightPathAngle(gamma);
|
|
68
|
+
const k = (rho0 * H) / (2 * beta * Math.sin(Math.abs(gamma)));
|
|
69
|
+
return VE * Math.exp(-k * Math.exp(-h / H));
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=ballistic-entry-speed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ballistic-entry-speed.js","sourceRoot":"","sources":["../../../src/categories/entry/ballistic-entry-speed.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACf,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,CAAS,EACT,EAAU,EACV,KAAa,EACb,IAAY,EACZ,IAAY,EACZ,CAAS,EACD,EAAE;IACV,YAAY,CAAC;QACX,CAAC,GAAG,EAAE,CAAC,CAAC;QACR,CAAC,IAAI,EAAE,EAAE,CAAC;QACV,CAAC,OAAO,EAAE,KAAK,CAAC;QAChB,CAAC,MAAM,EAAE,IAAI,CAAC;QACd,CAAC,MAAM,EAAE,IAAI,CAAC;QACd,CAAC,GAAG,EAAE,CAAC,CAAC;KACT,CAAC,CAAC;IACH,cAAc,CAAC;QACb,CAAC,IAAI,EAAE,EAAE,CAAC;QACV,CAAC,MAAM,EAAE,IAAI,CAAC;QACd,CAAC,MAAM,EAAE,IAAI,CAAC;QACd,CAAC,GAAG,EAAE,CAAC,CAAC;KACT,CAAC,CAAC;IACH,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAE7B,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE9D,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC9C,CAAC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute the **altitude of peak deceleration** in a ballistic entry, with the Allen–Eggers solution.
|
|
3
|
+
*
|
|
4
|
+
* $$
|
|
5
|
+
* h^\ast = H \ln\frac{\rho_0 H}{\beta \sin\lvert\gamma\rvert}
|
|
6
|
+
* $$
|
|
7
|
+
*
|
|
8
|
+
* Where:
|
|
9
|
+
* - $ \beta $ is the ballistic coefficient (kg/m²)
|
|
10
|
+
* - $ \gamma $ is the flight-path angle (rad)
|
|
11
|
+
* - $ \rho_0 $ and $ H $ describe an exponential atmosphere, $ \rho = \rho_0 e^{-h/H} $
|
|
12
|
+
*
|
|
13
|
+
* **Units**
|
|
14
|
+
* - Inputs: `gamma` in **radians**, `beta` in **kg/m²**, `rho0` in **kg/m³**, `H` in **m**.
|
|
15
|
+
* - Output: $ h^\ast $ in **m**.
|
|
16
|
+
*
|
|
17
|
+
* ::: info Notes
|
|
18
|
+
*
|
|
19
|
+
* - Unlike the size of the peak ({@link ballisticPeakDeceleration}), its altitude does depend on the vehicle: a higher $ \beta $ peaks lower down.
|
|
20
|
+
* - A negative result means the vehicle would reach the surface before its deceleration peaks: it hits the ground still fast.
|
|
21
|
+
* - Same assumptions as {@link ballisticEntrySpeed}.
|
|
22
|
+
*
|
|
23
|
+
* :::
|
|
24
|
+
*
|
|
25
|
+
* @param gamma - Flight-path angle $ \gamma $ in **radians** (finite, non-zero, within [-π/2, π/2]).
|
|
26
|
+
* @param beta - Ballistic coefficient $ \beta $ in **kg/m²** (finite, > 0).
|
|
27
|
+
* @param rho0 - Reference density $ \rho_0 $ in **kg/m³** (finite, > 0).
|
|
28
|
+
* @param H - Scale height $ H $ in **m** (finite, > 0).
|
|
29
|
+
* @returns Altitude of peak deceleration $ h^\ast $ in **m** (negative if below the surface).
|
|
30
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
31
|
+
* @throws {RangeError} If `beta`, `rho0` or `H` is `<= 0`, or `gamma` is zero or past vertical.
|
|
32
|
+
* @group Entry
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* import type { Radians } from '@interstellar-tools/types';
|
|
37
|
+
*
|
|
38
|
+
* // A 322 kg/m² capsule, 6.5° below horizontal, in Earth's atmosphere
|
|
39
|
+
* const h = ballisticPeakDecelerationAltitude((-6.5 * Math.PI / 180) as Radians, 322, 1.225, 7200);
|
|
40
|
+
* // h ≈ 39.5 km
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @see {@link ballisticPeakDeceleration}
|
|
44
|
+
* @see {@link ballisticEntrySpeed}
|
|
45
|
+
*/
|
|
46
|
+
export declare const ballisticPeakDecelerationAltitude: (gamma: number, beta: number, rho0: number, H: number) => number;
|
|
47
|
+
//# sourceMappingURL=ballistic-peak-deceleration-altitude.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ballistic-peak-deceleration-altitude.d.ts","sourceRoot":"","sources":["../../../src/categories/entry/ballistic-peak-deceleration-altitude.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,iCAAiC,GAC5C,OAAO,MAAM,EACb,MAAM,MAAM,EACZ,MAAM,MAAM,EACZ,GAAG,MAAM,KACR,MAeF,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { assertFinite, assertFlightPathAngle, assertPositive } from './validate.js';
|
|
2
|
+
/**
|
|
3
|
+
* Compute the **altitude of peak deceleration** in a ballistic entry, with the Allen–Eggers solution.
|
|
4
|
+
*
|
|
5
|
+
* $$
|
|
6
|
+
* h^\ast = H \ln\frac{\rho_0 H}{\beta \sin\lvert\gamma\rvert}
|
|
7
|
+
* $$
|
|
8
|
+
*
|
|
9
|
+
* Where:
|
|
10
|
+
* - $ \beta $ is the ballistic coefficient (kg/m²)
|
|
11
|
+
* - $ \gamma $ is the flight-path angle (rad)
|
|
12
|
+
* - $ \rho_0 $ and $ H $ describe an exponential atmosphere, $ \rho = \rho_0 e^{-h/H} $
|
|
13
|
+
*
|
|
14
|
+
* **Units**
|
|
15
|
+
* - Inputs: `gamma` in **radians**, `beta` in **kg/m²**, `rho0` in **kg/m³**, `H` in **m**.
|
|
16
|
+
* - Output: $ h^\ast $ in **m**.
|
|
17
|
+
*
|
|
18
|
+
* ::: info Notes
|
|
19
|
+
*
|
|
20
|
+
* - Unlike the size of the peak ({@link ballisticPeakDeceleration}), its altitude does depend on the vehicle: a higher $ \beta $ peaks lower down.
|
|
21
|
+
* - A negative result means the vehicle would reach the surface before its deceleration peaks: it hits the ground still fast.
|
|
22
|
+
* - Same assumptions as {@link ballisticEntrySpeed}.
|
|
23
|
+
*
|
|
24
|
+
* :::
|
|
25
|
+
*
|
|
26
|
+
* @param gamma - Flight-path angle $ \gamma $ in **radians** (finite, non-zero, within [-π/2, π/2]).
|
|
27
|
+
* @param beta - Ballistic coefficient $ \beta $ in **kg/m²** (finite, > 0).
|
|
28
|
+
* @param rho0 - Reference density $ \rho_0 $ in **kg/m³** (finite, > 0).
|
|
29
|
+
* @param H - Scale height $ H $ in **m** (finite, > 0).
|
|
30
|
+
* @returns Altitude of peak deceleration $ h^\ast $ in **m** (negative if below the surface).
|
|
31
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
32
|
+
* @throws {RangeError} If `beta`, `rho0` or `H` is `<= 0`, or `gamma` is zero or past vertical.
|
|
33
|
+
* @group Entry
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* import type { Radians } from '@interstellar-tools/types';
|
|
38
|
+
*
|
|
39
|
+
* // A 322 kg/m² capsule, 6.5° below horizontal, in Earth's atmosphere
|
|
40
|
+
* const h = ballisticPeakDecelerationAltitude((-6.5 * Math.PI / 180) as Radians, 322, 1.225, 7200);
|
|
41
|
+
* // h ≈ 39.5 km
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @see {@link ballisticPeakDeceleration}
|
|
45
|
+
* @see {@link ballisticEntrySpeed}
|
|
46
|
+
*/
|
|
47
|
+
export const ballisticPeakDecelerationAltitude = (gamma, beta, rho0, H) => {
|
|
48
|
+
assertFinite([
|
|
49
|
+
['gamma', gamma],
|
|
50
|
+
['beta', beta],
|
|
51
|
+
['rho0', rho0],
|
|
52
|
+
['H', H]
|
|
53
|
+
]);
|
|
54
|
+
assertPositive([
|
|
55
|
+
['beta', beta],
|
|
56
|
+
['rho0', rho0],
|
|
57
|
+
['H', H]
|
|
58
|
+
]);
|
|
59
|
+
assertFlightPathAngle(gamma);
|
|
60
|
+
return H * Math.log((rho0 * H) / (beta * Math.sin(Math.abs(gamma))));
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=ballistic-peak-deceleration-altitude.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ballistic-peak-deceleration-altitude.js","sourceRoot":"","sources":["../../../src/categories/entry/ballistic-peak-deceleration-altitude.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACf,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,KAAa,EACb,IAAY,EACZ,IAAY,EACZ,CAAS,EACD,EAAE;IACV,YAAY,CAAC;QACX,CAAC,OAAO,EAAE,KAAK,CAAC;QAChB,CAAC,MAAM,EAAE,IAAI,CAAC;QACd,CAAC,MAAM,EAAE,IAAI,CAAC;QACd,CAAC,GAAG,EAAE,CAAC,CAAC;KACT,CAAC,CAAC;IACH,cAAc,CAAC;QACb,CAAC,MAAM,EAAE,IAAI,CAAC;QACd,CAAC,MAAM,EAAE,IAAI,CAAC;QACd,CAAC,GAAG,EAAE,CAAC,CAAC;KACT,CAAC,CAAC;IACH,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAE7B,OAAO,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,CAAC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute the **peak deceleration of a ballistic entry**, with the Allen–Eggers solution.
|
|
3
|
+
*
|
|
4
|
+
* $$
|
|
5
|
+
* a_\text{max} = \frac{V_E^2 \sin\lvert\gamma\rvert}{2\,e\,H}
|
|
6
|
+
* $$
|
|
7
|
+
*
|
|
8
|
+
* reached when the speed has fallen to $ V_E / \sqrt{e} \approx 0.61\,V_E $.
|
|
9
|
+
*
|
|
10
|
+
* Where:
|
|
11
|
+
* - $ V_E $ is the speed at entry (m/s)
|
|
12
|
+
* - $ \gamma $ is the flight-path angle (rad)
|
|
13
|
+
* - $ H $ is the atmosphere's scale height (m)
|
|
14
|
+
* - $ e $ is Euler's number
|
|
15
|
+
*
|
|
16
|
+
* **Units**
|
|
17
|
+
* - Inputs: `VE` in **m/s**, `gamma` in **radians**, `H` in **m**.
|
|
18
|
+
* - Output: $ a_\text{max} $ in **m/s²**. Divide by 9.80665 for g.
|
|
19
|
+
*
|
|
20
|
+
* ::: info Notes
|
|
21
|
+
*
|
|
22
|
+
* - The peak doesn't depend on the vehicle's mass, size or drag: a heavier one just reaches it lower down. Only the entry speed and angle matter.
|
|
23
|
+
* - It grows with $ \sin\lvert\gamma\rvert $: a steeper entry is a harder one.
|
|
24
|
+
* - Same assumptions as {@link ballisticEntrySpeed}: no lift, no gravity, a straight path. A lifting entry spreads the deceleration out and peaks much lower.
|
|
25
|
+
*
|
|
26
|
+
* :::
|
|
27
|
+
*
|
|
28
|
+
* ::: practice Apollo 11, coming home
|
|
29
|
+
*
|
|
30
|
+
* **35.8 g**
|
|
31
|
+
*
|
|
32
|
+
* _A ballistic entry at 11.03 km/s and −6.48°, with H = 7.2 km_
|
|
33
|
+
*
|
|
34
|
+
* The crew felt 6.56 g at the peak. The command module flew with lift, banking to control it, so it slowed down more gradually than a ballistic body would.
|
|
35
|
+
*
|
|
36
|
+
* ```ts
|
|
37
|
+
* ballisticPeakDeceleration(11_032, toRad(-6.48), 7200) / 9.80665; // ≈ 35.8 g
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* :::
|
|
41
|
+
*
|
|
42
|
+
* @param VE - Entry speed $ V_E $ in **m/s** (finite, > 0).
|
|
43
|
+
* @param gamma - Flight-path angle $ \gamma $ in **radians** (finite, non-zero, within [-π/2, π/2]).
|
|
44
|
+
* @param H - Scale height $ H $ in **m** (finite, > 0).
|
|
45
|
+
* @returns Peak deceleration $ a_\text{max} $ in **m/s²**.
|
|
46
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
47
|
+
* @throws {RangeError} If `VE <= 0`, `H <= 0`, or `gamma` is zero or past vertical.
|
|
48
|
+
* @group Entry
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* import type { Radians } from '@interstellar-tools/types';
|
|
53
|
+
*
|
|
54
|
+
* // Entering at 7.8 km/s, 2° below horizontal
|
|
55
|
+
* const a = ballisticPeakDeceleration(7800, (-2 * Math.PI / 180) as Radians, 7200);
|
|
56
|
+
* // a ≈ 54 m/s², about 5.5 g
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @see {@link ballisticPeakDecelerationAltitude}
|
|
60
|
+
* @see {@link ballisticEntrySpeed}
|
|
61
|
+
*/
|
|
62
|
+
export declare const ballisticPeakDeceleration: (VE: number, gamma: number, H: number) => number;
|
|
63
|
+
//# sourceMappingURL=ballistic-peak-deceleration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ballistic-peak-deceleration.d.ts","sourceRoot":"","sources":["../../../src/categories/entry/ballistic-peak-deceleration.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,eAAO,MAAM,yBAAyB,GACpC,IAAI,MAAM,EACV,OAAO,MAAM,EACb,GAAG,MAAM,KACR,MAaF,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { assertFinite, assertFlightPathAngle, assertPositive } from './validate.js';
|
|
2
|
+
/**
|
|
3
|
+
* Compute the **peak deceleration of a ballistic entry**, with the Allen–Eggers solution.
|
|
4
|
+
*
|
|
5
|
+
* $$
|
|
6
|
+
* a_\text{max} = \frac{V_E^2 \sin\lvert\gamma\rvert}{2\,e\,H}
|
|
7
|
+
* $$
|
|
8
|
+
*
|
|
9
|
+
* reached when the speed has fallen to $ V_E / \sqrt{e} \approx 0.61\,V_E $.
|
|
10
|
+
*
|
|
11
|
+
* Where:
|
|
12
|
+
* - $ V_E $ is the speed at entry (m/s)
|
|
13
|
+
* - $ \gamma $ is the flight-path angle (rad)
|
|
14
|
+
* - $ H $ is the atmosphere's scale height (m)
|
|
15
|
+
* - $ e $ is Euler's number
|
|
16
|
+
*
|
|
17
|
+
* **Units**
|
|
18
|
+
* - Inputs: `VE` in **m/s**, `gamma` in **radians**, `H` in **m**.
|
|
19
|
+
* - Output: $ a_\text{max} $ in **m/s²**. Divide by 9.80665 for g.
|
|
20
|
+
*
|
|
21
|
+
* ::: info Notes
|
|
22
|
+
*
|
|
23
|
+
* - The peak doesn't depend on the vehicle's mass, size or drag: a heavier one just reaches it lower down. Only the entry speed and angle matter.
|
|
24
|
+
* - It grows with $ \sin\lvert\gamma\rvert $: a steeper entry is a harder one.
|
|
25
|
+
* - Same assumptions as {@link ballisticEntrySpeed}: no lift, no gravity, a straight path. A lifting entry spreads the deceleration out and peaks much lower.
|
|
26
|
+
*
|
|
27
|
+
* :::
|
|
28
|
+
*
|
|
29
|
+
* ::: practice Apollo 11, coming home
|
|
30
|
+
*
|
|
31
|
+
* **35.8 g**
|
|
32
|
+
*
|
|
33
|
+
* _A ballistic entry at 11.03 km/s and −6.48°, with H = 7.2 km_
|
|
34
|
+
*
|
|
35
|
+
* The crew felt 6.56 g at the peak. The command module flew with lift, banking to control it, so it slowed down more gradually than a ballistic body would.
|
|
36
|
+
*
|
|
37
|
+
* ```ts
|
|
38
|
+
* ballisticPeakDeceleration(11_032, toRad(-6.48), 7200) / 9.80665; // ≈ 35.8 g
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* :::
|
|
42
|
+
*
|
|
43
|
+
* @param VE - Entry speed $ V_E $ in **m/s** (finite, > 0).
|
|
44
|
+
* @param gamma - Flight-path angle $ \gamma $ in **radians** (finite, non-zero, within [-π/2, π/2]).
|
|
45
|
+
* @param H - Scale height $ H $ in **m** (finite, > 0).
|
|
46
|
+
* @returns Peak deceleration $ a_\text{max} $ in **m/s²**.
|
|
47
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
48
|
+
* @throws {RangeError} If `VE <= 0`, `H <= 0`, or `gamma` is zero or past vertical.
|
|
49
|
+
* @group Entry
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* import type { Radians } from '@interstellar-tools/types';
|
|
54
|
+
*
|
|
55
|
+
* // Entering at 7.8 km/s, 2° below horizontal
|
|
56
|
+
* const a = ballisticPeakDeceleration(7800, (-2 * Math.PI / 180) as Radians, 7200);
|
|
57
|
+
* // a ≈ 54 m/s², about 5.5 g
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @see {@link ballisticPeakDecelerationAltitude}
|
|
61
|
+
* @see {@link ballisticEntrySpeed}
|
|
62
|
+
*/
|
|
63
|
+
export const ballisticPeakDeceleration = (VE, gamma, H) => {
|
|
64
|
+
assertFinite([
|
|
65
|
+
['VE', VE],
|
|
66
|
+
['gamma', gamma],
|
|
67
|
+
['H', H]
|
|
68
|
+
]);
|
|
69
|
+
assertPositive([
|
|
70
|
+
['VE', VE],
|
|
71
|
+
['H', H]
|
|
72
|
+
]);
|
|
73
|
+
assertFlightPathAngle(gamma);
|
|
74
|
+
return (VE * VE * Math.sin(Math.abs(gamma))) / (2 * Math.E * H);
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=ballistic-peak-deceleration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ballistic-peak-deceleration.js","sourceRoot":"","sources":["../../../src/categories/entry/ballistic-peak-deceleration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACf,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,EAAU,EACV,KAAa,EACb,CAAS,EACD,EAAE;IACV,YAAY,CAAC;QACX,CAAC,IAAI,EAAE,EAAE,CAAC;QACV,CAAC,OAAO,EAAE,KAAK,CAAC;QAChB,CAAC,GAAG,EAAE,CAAC,CAAC;KACT,CAAC,CAAC;IACH,cAAc,CAAC;QACb,CAAC,IAAI,EAAE,EAAE,CAAC;QACV,CAAC,GAAG,EAAE,CAAC,CAAC;KACT,CAAC,CAAC;IACH,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAE7B,OAAO,CAAC,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAClE,CAAC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute the **convective heat flux at the stagnation point** of an entry vehicle, with the Sutton–Graves relation.
|
|
3
|
+
*
|
|
4
|
+
* $$
|
|
5
|
+
* \dot q = k\,\sqrt{\frac{\rho}{R_n}}\;V^3
|
|
6
|
+
* $$
|
|
7
|
+
*
|
|
8
|
+
* Where:
|
|
9
|
+
* - $ \rho $ is the free-stream density (kg/m³)
|
|
10
|
+
* - $ R_n $ is the nose radius: the radius of curvature at the stagnation point (m)
|
|
11
|
+
* - $ V $ is the speed (m/s)
|
|
12
|
+
* - $ k $ depends on the atmosphere's composition: about $ 1.7415 \times 10^{-4} $ kg$^{1/2}$/m for Earth's air and $ 1.9027 \times 10^{-4} $ for Mars
|
|
13
|
+
*
|
|
14
|
+
* **Units**
|
|
15
|
+
* - Inputs: `rho` in **kg/m³**, `V` in **m/s**, `Rn` in **m**, `k` in **kg^½/m**.
|
|
16
|
+
* - Output: $ \dot q $ in **W/m²**.
|
|
17
|
+
*
|
|
18
|
+
* ::: info Notes
|
|
19
|
+
*
|
|
20
|
+
* - The $ V^3 $ is why returning from the Moon is so much harder on a heat shield than returning from Earth orbit: 11 km/s against 7.8 km/s is almost three times the heating.
|
|
21
|
+
* - A blunter nose (larger $ R_n $) heats less, which is why capsules have broad, rounded heat shields rather than sharp points.
|
|
22
|
+
* - Convective heating only. At lunar return speeds the hot shock layer also radiates, which this doesn't include.
|
|
23
|
+
*
|
|
24
|
+
* :::
|
|
25
|
+
*
|
|
26
|
+
* @param rho - Free-stream density $ \rho $ in **kg/m³** (finite, > 0).
|
|
27
|
+
* @param V - Speed $ V $ in **m/s** (finite, > 0).
|
|
28
|
+
* @param Rn - Nose radius $ R_n $ in **m** (finite, > 0).
|
|
29
|
+
* @param k - Sutton–Graves constant $ k $ (finite, > 0). Defaults to `1.7415e-4`, for Earth.
|
|
30
|
+
* @returns Stagnation-point heat flux $ \dot q $ in **W/m²**.
|
|
31
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
32
|
+
* @throws {RangeError} If any input is `<= 0`.
|
|
33
|
+
* @group Entry
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* // 11 km/s at about 60 km (ρ ≈ 3 × 10⁻⁴ kg/m³), with a 4.7 m nose radius
|
|
38
|
+
* const q = stagnationHeatFlux(3e-4, 11_000, 4.69);
|
|
39
|
+
* // q ≈ 1.85 MW/m²
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @see {@link ballisticEntrySpeed}
|
|
43
|
+
* @see https://en.wikipedia.org/wiki/Atmospheric_entry Atmospheric entry
|
|
44
|
+
*/
|
|
45
|
+
export declare const stagnationHeatFlux: (rho: number, V: number, Rn: number, k?: number) => number;
|
|
46
|
+
//# sourceMappingURL=stagnation-heat-flux.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stagnation-heat-flux.d.ts","sourceRoot":"","sources":["../../../src/categories/entry/stagnation-heat-flux.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,eAAO,MAAM,kBAAkB,GAC7B,KAAK,MAAM,EACX,GAAG,MAAM,EACT,IAAI,MAAM,EACV,UAAa,KACZ,MAYF,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { assertFinite, assertPositive } from './validate.js';
|
|
2
|
+
/**
|
|
3
|
+
* Compute the **convective heat flux at the stagnation point** of an entry vehicle, with the Sutton–Graves relation.
|
|
4
|
+
*
|
|
5
|
+
* $$
|
|
6
|
+
* \dot q = k\,\sqrt{\frac{\rho}{R_n}}\;V^3
|
|
7
|
+
* $$
|
|
8
|
+
*
|
|
9
|
+
* Where:
|
|
10
|
+
* - $ \rho $ is the free-stream density (kg/m³)
|
|
11
|
+
* - $ R_n $ is the nose radius: the radius of curvature at the stagnation point (m)
|
|
12
|
+
* - $ V $ is the speed (m/s)
|
|
13
|
+
* - $ k $ depends on the atmosphere's composition: about $ 1.7415 \times 10^{-4} $ kg$^{1/2}$/m for Earth's air and $ 1.9027 \times 10^{-4} $ for Mars
|
|
14
|
+
*
|
|
15
|
+
* **Units**
|
|
16
|
+
* - Inputs: `rho` in **kg/m³**, `V` in **m/s**, `Rn` in **m**, `k` in **kg^½/m**.
|
|
17
|
+
* - Output: $ \dot q $ in **W/m²**.
|
|
18
|
+
*
|
|
19
|
+
* ::: info Notes
|
|
20
|
+
*
|
|
21
|
+
* - The $ V^3 $ is why returning from the Moon is so much harder on a heat shield than returning from Earth orbit: 11 km/s against 7.8 km/s is almost three times the heating.
|
|
22
|
+
* - A blunter nose (larger $ R_n $) heats less, which is why capsules have broad, rounded heat shields rather than sharp points.
|
|
23
|
+
* - Convective heating only. At lunar return speeds the hot shock layer also radiates, which this doesn't include.
|
|
24
|
+
*
|
|
25
|
+
* :::
|
|
26
|
+
*
|
|
27
|
+
* @param rho - Free-stream density $ \rho $ in **kg/m³** (finite, > 0).
|
|
28
|
+
* @param V - Speed $ V $ in **m/s** (finite, > 0).
|
|
29
|
+
* @param Rn - Nose radius $ R_n $ in **m** (finite, > 0).
|
|
30
|
+
* @param k - Sutton–Graves constant $ k $ (finite, > 0). Defaults to `1.7415e-4`, for Earth.
|
|
31
|
+
* @returns Stagnation-point heat flux $ \dot q $ in **W/m²**.
|
|
32
|
+
* @throws {TypeError} If any input is not a finite number.
|
|
33
|
+
* @throws {RangeError} If any input is `<= 0`.
|
|
34
|
+
* @group Entry
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* // 11 km/s at about 60 km (ρ ≈ 3 × 10⁻⁴ kg/m³), with a 4.7 m nose radius
|
|
39
|
+
* const q = stagnationHeatFlux(3e-4, 11_000, 4.69);
|
|
40
|
+
* // q ≈ 1.85 MW/m²
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @see {@link ballisticEntrySpeed}
|
|
44
|
+
* @see https://en.wikipedia.org/wiki/Atmospheric_entry Atmospheric entry
|
|
45
|
+
*/
|
|
46
|
+
export const stagnationHeatFlux = (rho, V, Rn, k = 1.7415e-4) => {
|
|
47
|
+
const inputs = [
|
|
48
|
+
['rho', rho],
|
|
49
|
+
['V', V],
|
|
50
|
+
['Rn', Rn],
|
|
51
|
+
['k', k]
|
|
52
|
+
];
|
|
53
|
+
assertFinite(inputs);
|
|
54
|
+
assertPositive(inputs);
|
|
55
|
+
return k * Math.sqrt(rho / Rn) * V ** 3;
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=stagnation-heat-flux.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stagnation-heat-flux.js","sourceRoot":"","sources":["../../../src/categories/entry/stagnation-heat-flux.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,GAAW,EACX,CAAS,EACT,EAAU,EACV,CAAC,GAAG,SAAS,EACL,EAAE;IACV,MAAM,MAAM,GAAG;QACb,CAAC,KAAK,EAAE,GAAG,CAAC;QACZ,CAAC,GAAG,EAAE,CAAC,CAAC;QACR,CAAC,IAAI,EAAE,EAAE,CAAC;QACV,CAAC,GAAG,EAAE,CAAC,CAAC;KACA,CAAC;IAEX,YAAY,CAAC,MAAM,CAAC,CAAC;IACrB,cAAc,CAAC,MAAM,CAAC,CAAC;IAEvB,OAAO,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC1C,CAAC,CAAC"}
|