Trajectories

This commit is contained in:
2026-03-04 20:29:19 +00:00
parent 6af56f478f
commit 1b15384c10
20 changed files with 4825 additions and 71 deletions

509
docs/ROCKET_DESIGN.md Normal file
View File

@@ -0,0 +1,509 @@
# Rocket Design Guide
## Overview
The **Rocket Design** tool calculates vehicle mass budget, tank geometry, structural requirements, and generates 3D models. It integrates engine data from the engine designer and computes the complete rocket's performance characteristics.
## Main Sections
### Vehicle Geometry
Define tank configuration, dimensions, and structural layout.
### Tank Structure
Calculate wall thicknesses, masses, and pressurant requirements.
### Nose Cone Design
Select and visualize nose cone shapes (conical, ogive, Von Kármán).
### Mass Budget
Integrate all components (engines, tanks, payload, structure) to compute total mass and performance metrics.
### 3D Visualization
Interactive three.js model showing tanks, nose cone, and flight orientation.
---
## Vehicle Geometry
### Tank Configuration Options
**Tandem (Sequential):**
- Two cylindrical tanks stacked vertically
- Fuel (lower), Oxidizer (upper)
- Domes: hemispherical on both ends
- **Advantage**: Compact, simpler plumbing
- **Disadvantage**: Longer vehicle
**Coaxial (Concentric):**
- Outer tank (fuel) surrounds inner tank (oxidizer)
- Reduces diameter
- Inner tank: flat bulkheads (simpler)
- **Advantage**: Compact, low diameter
- **Disadvantage**: More complex, thermal management
**Single Tank:**
- One tank with both propellants mixed
- Rarely used for high-performance (lower Isp)
### Tank Dimensions
**Inputs:**
- `outerRadius` (mm) — outer tank radius
- `propellantVolume` (L) — total propellant quantity
- `tankConfiguration` — tandem, coaxial, single
- `ullagePercent` (%) — pressurant volume as % of propellant
**Key Relationship:**
```
Ullage volume = propellant volume × (ullage% / 100)
Effective volume = propellant volume × (1 + ullage%)
```
Ullage accommodates:
- Thermal expansion of propellant
- Gas bubble for pump inlet
- Margin for fill level uncertainty
### Tank Geometry (Tandem Case)
**Dome Volume (hemispherical):**
```
V_dome = (2/3) × π × R³ (one hemisphere)
V_domes = (4/3) × π × R³ (both domes)
```
**Cylindrical Section:**
```
L_cyl = (V_eff - V_domes) / (π × R²)
```
**Total Tank Length:**
```
L_total = L_cyl + 2R (two dome heights)
```
**Example:**
- R = 1.5 m, V_prop = 5000 L, ullage = 10%
- V_eff = 5000 × 1.1 = 5500 L
- V_domes = 4/3 × π × 1.5³ ≈ 14.1 m³ = 14100 L (larger than prop!)
- Need smaller R or accept small L_cyl
**Note**: For smaller rockets, domes dominate volume. Design must account for this.
---
## Tank Structure
### Pressure Sources
**Pressure-Fed System:**
```
P_tank = 1.2 × P0_chamber (pressure margin)
```
Typical: P0 = 200 bar → P_tank = 240 bar
**Pump-Fed System:**
```
P_tank = 2 MPa (minimum for turbopump inlet)
```
Much lower pressure (pump provides most acceleration)
**Selection affects:**
- Wall thicknesses (direct proportionality)
- Mass (linear with pressure and wall thickness)
- Propellant pump requirements
### Structural Material Properties
Available materials from knowledgebase:
- **Aluminum 6061-T6**: density 2700 kg/m³, σ_y = 275 MPa
- **Stainless Steel 304**: density 8000 kg/m³, σ_y = 215 MPa
- **Inconel 718**: density 8190 kg/m³, σ_y = 1240 MPa
- **Titanium 6-4**: density 4430 kg/m³, σ_y = 880 MPa
- **CFRP (Carbon Fiber)**: density 1600 kg/m³, σ_y = 600 MPa
**Selection factors:**
- Cost (Al < SS < Ti < CFRP)
- Weight (CFRP < Ti < Al < SS)
- Corrosion (SS, Ti, CFRP better; Al needs coating)
- Temperature (Inconel for hot engines; others at T < 150°C)
### Wall Thickness (Hoop Stress)
**Hoop stress formula:**
```
σ_hoop = (P × R) / t
```
**With safety factor:**
```
t = (P × R) / (σ_yield / SF)
```
**Cylindrical section mass:**
```
m_cyl = 2π × R × t × L_cyl × ρ_material
```
**Dome mass (two hemispheres):**
```
m_domes = 4π ×× t × ρ_material
```
**Total tank mass:**
```
m_tank = m_cyl + m_domes
```
### Example Calculation
**Tandem LOX/RP1 Tank:**
- Radius: 1.0 m
- Pressure: 240 bar = 24 MPa
- Material: Aluminum 6061-T6
- σ_y = 275 MPa
- ρ = 2700 kg/m³
- Safety Factor: 2.5
**Wall Thickness:**
```
t = (24 MPa × 1.0 m) / (275 MPa / 2.5)
= 24 / 110
≈ 0.218 m = 2.18 mm
```
**Cylindrical Section (assume L_cyl = 3 m):**
```
m_cyl = 2π × 1.0 × 0.00218 × 3.0 × 2700
≈ 110 kg
```
**Domes:**
```
m_domes = 4π × 1.0² × 0.00218 × 2700
≈ 74 kg
```
**Total tank mass:** ~184 kg
---
## Pressurant System (Pressure-Fed Only)
### Helium Requirements
For pressure-fed engines, pressurant gas maintains tank pressure throughout burn.
**Ideal gas law:**
```
P × V = n × R × T
```
**Helium mass:**
```
m_He = (P_tank × V_prop) / (R_He × T)
```
Where:
- `P_tank` — tank pressure (Pa)
- `V_prop` — propellant volume (m³)
- `R_He` — helium specific gas constant = 2077 J/kg/K
- `T` — temperature (K), typically 293 K (20°C)
**Example:**
- P_tank = 24 MPa = 24×10⁶ Pa
- V_prop = 5 m³
- T = 293 K
```
m_He = (24×10⁶ × 5) / (2077 × 293)
≈ 20 kg
```
### Helium Bottle Mass
Helium stored in high-pressure bottle. Typical storage pressure: 250 bar.
**Bottle mass (conservative):**
```
m_bottle = 4 × m_He
```
Rule of thumb: bottle is 4 times the helium mass. (More sophisticated: use MEOP analysis.)
**Total pressurant system:**
```
m_pressurant = m_He + m_bottle
```
Example: 20 kg He → 80 kg bottle → 100 kg pressurant system
**Note**: This is a major mass penalty for pressure-fed systems. Pump-fed systems avoid this.
---
## Nose Cone Design
### Available Profiles
Three aerodynamic nose cone shapes, all with L = 2 × R (length = 2 × base radius).
**Conical:**
- Simple linear profile
- `r(x) = R × (x / L)`
- Sharpest tip, moderate drag
**Tangent Ogive:**
- Smooth circular arc meeting base tangentially
- `ρ = (R² + L²) / (2R)` (radius of curvature)
- `r(x) = √(ρ² - (L - x)²) - (ρ - R)`
- Smooth, less drag than conical
- Common in rocketry
**Von Kármán:**
- Power law profile minimizing drag
- `θ = acos(1 - 2x/L)`
- `r(x) = (R / √π) × √(θ - sin(2θ)/2)`
- Theoretically optimal for transonic flight
- Used on high-performance rockets
**Selection Criteria:**
- **Conical**: Simplest to manufacture, sharp tip
- **Tangent Ogive**: Better aerodynamics, smoother base transition
- **Von Kármán**: Best drag coefficient (Cd ≈ 0.15 vs 0.25 conical)
### 3D Visualization
Nose cone is rendered using THREE.js `LatheGeometry`:
- Profile points sampled from mathematical formula
- Rotated around vertical axis to create 3D shape
- Interactive rotation/zoom in 3D viewer
---
## Mass Budget
### Components
**Structure:**
- Tank walls and domes: `m_tanks`
- Other structure (nosecone, bay, interstage): `m_other`
- Engine dry mass (from engine designer): `m_engine`
**Propellant:**
- Fuel + oxidizer: `m_propellant`
**Pressurant (pressure-fed only):**
- Helium + bottle: `m_pressurant`
**Payload:**
- Avionics, recovery system, instruments: `m_payload`
### Calculation
**Dry mass (no propellant):**
```
m_dry = m_tanks + m_other + m_engine + m_pressurant + m_payload
```
**Wet mass (with propellant):**
```
m_wet = m_dry + m_propellant
```
**Payload fraction:**
```
fraction_payload = m_payload / m_wet
```
**Structure fraction:**
```
fraction_structure = m_tanks / m_wet
```
**Thrust-to-weight ratio:**
```
TWR = F_thrust / (m_wet × g)
```
### Example Mass Budget
Small LOX/RP1 rocket:
| Component | Mass (kg) | % |
|-----------|-----------|-----|
| Tanks (structure) | 200 | 14% |
| Engine | 50 | 3.5% |
| Pressurant (He + bottle) | 100 | 7% |
| Avionics + recovery | 30 | 2% |
| **Dry mass** | **380** | **26.5%** |
| Propellant (LOX + RP1) | 1050 | 73.5% |
| **Wet mass** | **1430** | **100%** |
**Performance:**
- TWR = 150 kN / (1430 kg × 9.81 m/s²) = 10.7
- Delta-v (no gravity loss): 310 s × ln(1430/380) ≈ 1300 m/s
---
## 3D Model Components
### Tank Rendering
**Cylindrical body:**
```javascript
<TankSection
radius={1.0}
length={3.0}
position={[0, 0, 0]}
/>
```
Renders:
- Cylinder: `CylinderGeometry`
- Top dome: `SphereGeometry` (hemisphere)
- Bottom dome: `SphereGeometry` (hemisphere)
**Material:** MeshStandardMaterial with color (red = fuel, blue = oxidizer)
### Nose Cone Rendering
**LatheGeometry:**
- Takes profile curve (array of points)
- Rotates around Y-axis to create 3D surface
- Smooth, aerodynamic appearance
**Example:**
```javascript
const profile = noseConeProfile('tangent-ogive', 0.5, 1.0, 24)
const geometry = new THREE.LatheGeometry(profile, 24)
```
### Scene Setup
**Lighting:**
- Ambient light (0.6 intensity)
- Directional light from top-right
- Shadows enabled for depth
**Camera:**
- Orbit controls (rotate, zoom, pan)
- Auto-fit to model bounds
- Perspective view (60° FOV)
---
## Workflow: Design Complete Vehicle
### Step 1: Import Engine
1. Go to **Design > Engine**
2. Configure combustion (LOX/RP1, 200 bar, etc.)
3. Size structure (Inconel, 3.0 SF)
4. Export as JSON
5. Return to **Design > Rocket**
6. Upload engine JSON
**Result**: Engine dry mass auto-populated
### Step 2: Configure Tanks
1. Set tank configuration: **Tandem**
2. Set outer radius: **1.0 m**
3. Set propellant volume: **5000 L**
4. Set ullage: **10%**
**Result**: Calculated tank length, dome geometry
### Step 3: Design Tank Structure
1. Select material: **Aluminum 6061-T6**
2. Set safety factor: **2.5**
3. Select feed system: **Pressure-Fed**
**Result**: Wall thickness, tank mass, pressurant requirements
### Step 4: Set Payload
1. Enter payload mass: **50 kg** (avionics, recovery)
**Result**: Dry mass updated
### Step 5: View Mass Budget
**Result**:
- Wet mass: 1550 kg
- Dry mass: 450 kg
- TWR: 10.2
- Delta-v (vacuum): 1320 m/s
### Step 6: Adjust Nose Cone
1. Select shape: **Von Kármán**
**Result**: 3D model updates with optimal nose cone
### Step 7: Export & Simulate
1. Export vehicle JSON
2. Go to **Design > Trajectory**
3. Import vehicle & engine data
4. Run flight simulation
**Result**: Altitude, downrange, apogee, landing site
---
## Advanced Topics
### Multi-Stage Rockets
Not yet implemented, but conceptually:
- Stage 1: Large engines, heavy structure
- Stage 2: Smaller engines, lighter structure
- Interstage adapter: mass penalty
- Staging sequence: defined by velocity requirements
Implementation would require:
- Multiple vehicle definitions (or list of stages)
- Trajectory system that handles stage separation
- Cumulative mass and thrust calculations
### Composite Materials
CFRP offers best strength-to-weight but requires special analysis:
- **Fiber direction** — properties vary with orientation
- **Matrix** — epoxy, vinyl ester
- **Layup schedule** — [0°/90°/45°] typical
- **Microbuckling** — axial compression limit
- **Matrix cracking** — transverse tensile limit
Advanced model would include:
- Classical laminate theory (CLT)
- Ply-by-ply failure criteria (Tsai-Wu, Hashin)
- Buckling analysis (Timoshenko, finite element)
---
## Troubleshooting
### Tank too long?
- Reduce ullage percentage (lower to 5%)
- Increase radius (larger tank, shorter cylinder)
- Split into multiple smaller tanks
- Switch to coaxial configuration
### Vehicle too heavy?
- Switch to lighter material (CFRP)
- Reduce safety factor (if acceptable)
- Decrease payload mass
- Use pump-fed system (avoids pressurant)
### Nose cone looks wrong?
- Verify radius and length (L = 2R)
- Try different shape (Von Kármán usually best)
- Check 3D viewer isn't zoomed in too far
### 3D model not rendering?
- WebGL must be enabled
- Check browser console for Three.js errors
- Ensure geometry dimensions are reasonable (not NaN)
---
## References
- NASA SP-8007: Structural Design and Test Factors of Safety for Spaceflight Hardware
- Huzel, D. K., & Huang, D. H. (1992). Modern engineering for design of liquid-propellant rocket engines.
- Rocket Propulsion Elements (8th ed.). by Sutton & Biblarz.
---
**Last Updated**: 2025-02 | **Status**: Current (v3 — Domed Tanks)