Jump to content

Mneme World Generator/Ships and Star Systems

From Game in the Brain Wiki

Mneme Ships & Star Systems – Master Equation Sheet

Introduction for the Mathematics Freelancer

This document is both a reference and a tasking brief for a Mathematics Freelancer interested in contributing to the Mneme World Generator (MWG) and Mneme Ship Designer (MSD) projects. These tools need strong applied math support. Physics is involved, but AI tools are available to assist. The role covers:

Help ensure orbital mechanics and distance calculations in MWG produce stable or intentionally unstable outcomes (e.g., rings, chaotic orbits, Kozai cycles).

Develop formula libraries that let us generate both stable long-term systems and short-lived/transient ones.

Build scaling laws for the Mneme Ship Designer that connect abstractions (mass, thrust, surface area, volume) to playable TTRPG tiers, and add Rocket-Equation calculators across engine classes (chemical, nuclear-thermal, gas-core, LANTR/hybrid, electric: ion/Hall/MPD/VASIMR, beamed-sail, fusion/fission-fragment, antimatter-catalyzed, etc.), with low-thrust efficiency thresholds (Δv–time–power tradeoffs, break-even vs impulsive engines) so we can decide when ion/electric drives outperform chemical/NTR for a given mission profile.

Document and test formulas so they remain robust and implementable in code.

This sheet outlines all the key equations, sanity checks, and rule-of-thumb heuristics to use and extend. It is intended as a working toolkit and reference for collaborating on these TTRPG tools.

Quick Task Cards

T1 – Gravity "minimum stable distance" per orbit

Purpose: compute safe spacings so child orbits don't destabilize.

Inputs: M_* , m_p , a_p , e_p (for planets); m_moon , a_moon (for moons).

Core math: Hill radius r_H = a_p * (m_p/(3 M_*))^(1/3), mutual Hill R_H,m, spacing Δ = (a2-a1)/R_H,m (stable if Δ ≳ 3.5), SOI, Roche limit for rings.

Outputs: minimum allowed a for child; flags = Stable / Metastable / Short-lived.

T2 – Orbits & orbital velocities for stability

Purpose: given body mass/radius & chosen altitude, return circular/elliptic velocity & period.

Inputs: μ, R, h (or r), a, e.

Core math: vis-viva v^2 = μ(2/r − 1/a), v_c = √(μ/r), P = 2π√(a^3/μ).

Outputs: {v, P, n, h (angular momentum), energy ε} plus synchronous altitude if requested.

T3 – Δv to intercept from an initial orbit

Purpose: size burns and fuel to meet a target.

Inputs: initial r1/state, target orbit r2/state, mission Δt window, engine Isp or v_e.

Core math: Hohmann (if circular coplanar), plane-change Δv_pc = 2 v sin(Δi/2), Lambert solution for general moving targets, phasing for co-orbitals.

Outputs: {Δv1, Δv2, Δv_pc, TOF} and propellant fraction ζ = 1 − exp(−Δv_total/v_e).

T4 – Intercept methods (calculator bundle)

Modules: a) Coelliptic rendezvous (phasing orbits) with phasing time t_phase = 2π |1/n2 − 1/n1|. b) Lambert rendezvous (general r1→r2 over Δt). c) Bi-elliptic option when r2/r1 ≳ 12. d) Plane-change combo (vector addition with burns). e) (Optional) Linearized CW/HCW for close-proximity ops.

Outputs: per-method Δv, burn epochs, TOF; highlight minimum.

T5 – Hohmann transfer calculator

Purpose: minimal-Δv circular→circular transfer inside one SOI.

Inputs: μ, r1, r2.

Core math: a_t = (r1+r2)/2, Δv1 = √(μ(2/r1 − 1/a_t)) − √(μ/r1), Δv2 = √(μ/r2) − √(μ(2/r2 − 1/a_t)), TOF = π√(a_t^3/μ).

Outputs: {Δv1, Δv2, TOF}, plus optional Δv_pc if Δi ≠ 0.

Acceptance checks (for all): SI units; limit tests; compare against Solar-System benchmarks; unit tests embedded in code.

A compact, implementation-ready list of equations and algorithms you'll need to: (1) navigate moving bodies in a star system, (2) compute "low/high" orbits & derived parameters for worlds, and (3) sanity-check luminosity vs gravity and other MWG/MCSS math. Symbols are defined once then reused. All scalars are SI unless noted.

0) Symbols & Constants

G – Universal gravitational constant = 6.67430×10⁻¹¹ m³·kg⁻¹·s⁻²

μ = G·M – Standard gravitational parameter of primary body (e.g., star, planet)

M, m – Mass of primary and spacecraft

R – Mean radius of body

r – Radial distance from body center

a, e, i, Ω, ω, ν – Semimajor axis, eccentricity, inclination, RAAN, argument of periapsis, true anomaly

h – Specific angular momentum

ε – Specific orbital energy

n – Mean motion

P – Orbital period

Δv – Velocity change (maneuver)

Isp – Specific impulse (s)

g₀ – Standard gravity = 9.80665 m·s⁻²

vₑ = Isp·g₀ – Effective exhaust velocity

L – Stellar luminosity

σ – Stefan–Boltzmann constant = 5.670374419×10⁻⁸ W·m⁻²·K⁻⁴

c – Speed of light = 299 792 458 m·s⁻¹

1) Two-Body Orbit Basics (planets, moons, ships about one primary)

Vis-viva: ( v^2 = μ,(2/r − 1/a) ) Specific energy: ( ε = −μ/(2a) ) Angular momentum: ( h = \sqrt{ μ a (1 − e^2) } ) Orbital period: ( P = 2π\sqrt{ a^3/μ } ) Mean motion: ( n = 2π/P = \sqrt{ μ/a^3 } ) Circular orbit speed at radius r: ( v_c = \sqrt{ μ/r } ) Escape speed at radius r: ( v_{esc} = \sqrt{ 2μ/r } )

Kepler's Equation (position vs time): Given (t) since periapsis and (M = n t): solve iteratively for E in ( M = E − e\sin E ) (ellipses), then true anomaly ( \tan(ν/2) = \sqrt{\frac{1+e}{1−e}}\tan(E/2) ). Position/velocity from ( (a,e,i,Ω,ω,ν) ).

Sphere of Influence (patched conics): ( r_{SOI} = a_p \left( \frac{m_p}{M_*} \right)^{2/5} ) where planet (p) orbits star with semimajor axis (a_p).

Hill radius (stability): ( r_H = a_p \left( \frac{m_p}{3 M_*} \right)^{1/3} ).

Roche limit (fluid satellite): ( r_{Roche} \approx 2.44 R_p (\rho_p/\rho_s)^{1/3} ).

2) Hohmann Transfer (1.1)

For coplanar circular orbits (r_1\to r_2) (about same primary (μ)):

Semimajor axis of transfer: ( a_t = (r_1 + r_2)/2 )

Speeds: ( v_1 = \sqrt{μ/r_1} ), ( v_2 = \sqrt{μ/r_2} ) ( v_{p,t} = \sqrt{ μ\left(2/r_1 − 1/a_t\right) } ) at periapsis ( v_{a,t} = \sqrt{ μ\left(2/r_2 − 1/a_t\right) } ) at apoapsis

Burns: ( Δv_1 = v_{p,t} − v_1 ) ( Δv_2 = v_2 − v_{a,t} )

Time of flight: ( TOF = π\sqrt{ a_t^3/μ } ) (half an ellipse)

Coplanar plane-change (optional at node): ( Δv_{pc} = 2 v \sin(Δi/2) ). Often cheapest where (v) is smallest (apoapsis or high orbit). Combine vectorially if done during Hohmann burn.

Bi-elliptic transfer (useful if (r_2/r_1\gtrsim 12)): Compute via two half-ellipses with apogee (r_b); pick (r_b) to minimize total (Δv).

3) Lambert Problem (fastest rendezvous to moving targets)

Given two position vectors (\mathbf{r}_1, \mathbf{r}_2) and a time of flight (Δt) about (μ), solve for transfer velocities (\mathbf{v}_1,\mathbf{v}_2). Use a universal-variables or Battin algorithm. This is the core when bodies move: pick the rendezvous epoch from ephemerides (Kepler's eq.) and solve Lambert for that (Δt). (Code routine recommended.)

4) Rocket Equation & Propulsion (1.2)

Tsiolkovsky: ( Δv = v_e \ln!\left( \frac{m_0}{m_f} \right) = I_{sp} g_0 \ln!\left( \frac{m_0}{m_f} \right) )

Mass fractions:

Propellant fraction ( ζ = 1 − m_f/m_0 = 1 − e^{−Δv/v_e} )

Finite-burn kinematics:

Thrust (T = \dot m, v_e)

Acceleration ( a(t) = T / m(t) ) with ( m(t) = m_0 − \dot m, t )

Gravity loss (rule-of-thumb): add ~ (g_0) projected over burn time while near planet. Use vertical-plane integration or include in guidance.

Oberth effect: Perform burns at periapsis where orbital speed is highest to maximize energy gain per (Δv).

Staging: For stage k, ( Δv_k = v_{e,k} \ln( m_{0,k}/m_{f,k} ) ). Sum over stages.

Hyperbolic excess / injection: To depart a planet:

Required ( v_\infty ) from interplanetary solution (Lambert or patched conics)

Periapsis speed on hyperbola: ( v_p = \sqrt{ v_\infty^2 + v_{esc}^2 } ) at periapsis radius r_p

Planetary departure burn: ( Δv_{dep} = v_p − v_c(r_p) )

5) World Orbits: "Low/High" & Derived Parameters (2)

Define for each body (planet/moon):

Low Orbit Altitude (h_{low}): choose e.g., max(terrain, atmosphere top + margin).

Low Orbit Radius: ( r_{low} = R + h_{low} )

Low Orbit Speed: ( v_{low} = \sqrt{ μ / r_{low} } )

Low Orbit Period: ( P_{low} = 2π \sqrt{ r_{low}^3/μ } )

High Orbit Altitude (h_{high}): campaign-defined (e.g., 3–5× (R) or just below Hill stability).

( r_{high} = R + h_{high} )

( v_{high} = \sqrt{ μ / r_{high} } )

( P_{high} = 2π \sqrt{ r_{high}^3/μ } )

Synchronous orbit (equatorial): ( r_{syn} = \left( μ (P_{rot}/2π)^2 \right)^{1/3} ), ( h_{syn} = r_{syn} − R )

Atmospheric interface: pick (h_{atm}) for drag/entry computations. Ballistic coefficient: ( β = m / (C_D A) ) for entry range estimates.

Escape energy from low orbit: From (r_{low}): ( Δv_{esc,from,LO} \approx \sqrt{v_{esc}^2(r_{low}) − v_{low}^2} )

Plane change at Low/High: ( Δv_{pc} = 2 v \sin(Δi/2) ) with (v=v_{low}) or (v_{high}).

Rendezvous in orbit (coelliptic): Phasing time ( t_{phase} = 2π \left| 1/n_2 − 1/n_1 \right| ).

6) System-Scale Transfers (planet↔planet)

Phasing / launch window (ideal Hohmann about star): For nearly circular coplanar orbits with radii (a_1, a_2): phase angle at departure ( φ \approx π\left(1 − \sqrt{ \frac{2 a_2}{a_1 + a_2} }\right) ) (inner→outer), with appropriate sign for direction. Use ephemerides + Lambert for general cases.

Total Δv (patched conics): ( Δv_{tot} = Δv_{dep,planet,A} + Δv_{arr,planet,B} ) with gravity assists inserted as vector additions of (v_\infty) via turning angle ( δ = 2\arcsin!\left( \frac{1}{1 + r_p v_\infty^2/μ_p} \right) ).

7) Stellar Radiation vs Gravity (3)

Radiation pressure on a surface (perfect absorber): ( P_{rad}(r) = \frac{L}{4π r^2 c} ) (perfect mirror ≈ double). Force ( F_{rad} = P_{rad} A ).

Gravitational acceleration: ( g(r) = μ / r^2 ). Force on mass (m): ( F_g = m μ / r^2 ).

β parameter (dust grain or sail): ( β = \frac{F_{rad}}{F_g} = \frac{L A}{4π c r^2} \cdot \frac{1}{m μ / r^2} = \frac{L A}{4π c μ m} ) (≈ independent of r). If (β>1), radiation exceeds gravity (sail/grain blown outward).

Equilibrium temperature of airless body: ( T_{eq} = \left( \frac{(1−A) L}{16π σ r^2} \right)^{1/4} ) (A = Bond albedo). Can be used to place habitable zone radii: ( r \propto \sqrt{L} ).

Mass–luminosity (main sequence, rough): ( L/L_\odot \approx (M/M_\odot)^α ) with (α\approx 3.5) (piecewise in precise models).

Eddington luminosity (upper stability bound for very massive stars): ( L_E = \frac{4π G M m_p c}{σ_T} ) (electron scattering; for MWG sanity checks only).

8) Planetary System Geometry & Tides (useful in MWG)

Tidal locking timescale (order-of-magnitude): ( t_{lock} \sim \frac{ω a^6 I Q}{3 G m_p^2 k_2 R^5} )

Tidal acceleration across body: ( a_{tidal} \approx 2 μ_p R / a^3 )

Mutual Hill stability for moons: ensure orbits well within (r_H).

9) Implementation Recipes

A) Time-forward ephemerides for moving planets/moons

For each body: store ( (a,e,i,Ω,ω,M_0) ) at epoch (t_0) and (μ) of its primary.

For any (t): ( M(t) = M_0 + n (t − t_0) ), solve Kepler → (ν) → state vector.

For transfers: choose (t_{dep}, t_{arr}), feed (\mathbf{r}{dep}, \mathbf{r}{arr}, Δt) to Lambert → get (\mathbf{v}{dep}) and (v\infty) at each end.

Add planetary injection/capture (Δv) using local circular/escape speeds.

B) Minimal-energy transfers within a sphere of influence Use Hohmann (Section 2) for circular coplanar cases → get (Δv_1, Δv_2, TOF). Add plane change if needed at high altitude.

C) Fuel & mass planning for ships Sum all maneuver (Δv) (plus margins for losses) → Tsiolkovsky for stage sizing. For low-thrust, integrate (\dot v = T/m) over guidance profile.

10) Quick-Compute Set (copy straight into code)

( v_c(r) = \sqrt{ μ/r } )

( v_{esc}(r) = \sqrt{ 2 μ / r } )

( P(r) = 2π\sqrt{ r^3/μ } )

( a_t = (r_1+r_2)/2 ), ( TOF = π\sqrt{ a_t^3/μ } )

( Δv_1 = \sqrt{ μ(2/r_1 − 1/a_t) } − \sqrt{ μ/r_1 } )

( Δv_2 = \sqrt{ μ/r_2 } − \sqrt{ μ(2/r_2 − 1/a_t) } )

( Δv_{pc} = 2 v \sin(Δi/2) )

( Δv = I_{sp} g_0 \ln(m_0/m_f) )

( r_{syn} = [ μ (P_{rot}/2π)^2 ]^{1/3} )

( r_{SOI} = a_p ( m_p/M_* )^{2/5} )

( T_{eq} = [ (1−A) L / (16π σ r^2) ]^{1/4} )

( β = L A /(4π c μ m) )

11) Data You'll Need Per Body (Star/Planet/Moon)

Mass (M), radius (R) → (μ)

Rotation period (P_{rot}) (for synchronous)

Atmosphere top/scale height (for (h_{low}) and entry)

Ephemeris elements ((a,e,i,Ω,ω,M_0,t_0))

Albedo (A), luminosity (L) of star

12) Sanity-Check Suite for MWG/MCSS

Units pass: every formula returns correct SI units.

Limit checks: (e→0) gives circular results; (r\to\infty) → speeds → 0; (β) independent of (r).

Cross-check orbits: Vis-viva vs period and energy consistency.

Energy accounting: Hohmann (Δv) equals change in specific energy across burns (plus plane change if any).

Thermal vs orbital: (T_{eq}(1,AU,L_\odot)≈279,K) (no greenhouse).

Sail/grain: set plausible (A/m) to verify (β\ll 1) for ships unless using sails.

Notes

For general interplanetary plotting on a moving map, Lambert + Kepler is the workhorse. Hohmann is the analytic minimum-Δv special case.

For non-coplanar, non-circular, or time-constrained cases, include plane changes, bi-elliptic options, or use numerical optimal control if you later add low-thrust engines.

13) Orbital Stability & Instability Toolkit (for MWG star/planet/moon maps)

A) Mutual Hill spacing (planet–planet stability, coplanar)

Mutual Hill radius: R_H,m = ((m1+m2)/(3*M*))^(1/3) * (a1+a2)/2

Separation in mutual Hills: Delta = (a2 - a1)/R_H,m

Rule of thumb: long-term Hill stability if Delta >= ~3.5 (no close approaches). Use Delta < 3.5 to flag potential long-term instability.

B) Resonance overlap (chaotic zone near a planet)

For a test body near a planet of mass ratio mu_p = m_p/M*: chaotic zone half-width Delta a / a_p ~ 1.5 * mu_p^(2/7); mark "no-go/unstable" bands bracketing a_p.

C) Kozai–Lidov cycles (inclined perturber)

Timescale (order): t_KL ~ (P_out^2 / P_in) * (M_tot / m_pert) * (1 - e_out^2)^(3/2); flag high-inclination triples that can pump inner eccentricity → close encounters.

D) Linear secular precession (Laplace–Lagrange)

Use for multi-planet apsidal/nodal precession rates to estimate drift of nodes/apsides and potential resonance crossings (matrix solve; implement numerically).

E) Rings & short-lived debris

Roche limit (see §1): rings typically form inside Roche → no large moons.

Viscous spreading: lifetime t_nu ~ r^2 / nu with collisional/gravitational viscosity nu. Use an alpha * c_s * H style or a campaign constant to get 10^3–10^7 yr lifetimes.

Poynting–Robertson drag (dust): radial decay timescale (order) t_PR ~ (4*pi*rho*s*c^2*r^2) / (3*L_*) (rho = grain density, s = grain radius). Expect 10^4–10^7 yr for micron–mm grains depending on r and L_*.

Radiation blowout: grains with beta > 0.5 are ejected → set a minimum bound grain size per star.

Atmospheric/exobase drag (low orbits): exponential decay with da/dt ∝ -rho(h) * v * a / (m/(C_D*A)); add a drag toggle for low-altitude unstable satellites.

F) Binary/multi-star stability (hierarchical)

S-type (planet around one star of a binary): require a_pl <= ~0.2 * a_** * (1 - e_**).

P-type (circumbinary): require a_pl >= ~2–3 * a_**. Use as heuristics to auto-prune unstable generated orbits; promote marginal cases to "metastable/short-lived".

G) Lifetime labels in the generator

Stable (> Gyr)

Metastable (Myr–Gyr; watch resonances)

Short-lived (kyr–Myr; rings, debris, low orbit)

Transient (< kyr; immediate clearance)

14) Distance/Hierarchy Rules for Tree-Table Systems

To avoid impossible placements when auto-generating:

Obey primary→child Hill constraints: child semimajor axis a_c < f_H * r_H with f_H ~ 0.3 for long-term moon stability.

Sibling spacing: enforce Delta >= ~3.5 in mutual Hill radii for neighboring planets or major moons.

Resonance filters: allow low-order MMRs (e.g., 2:1, 3:2) with a stability flag; reject placements inside chaotic widths.

Eccentricity & inclination caps: set max e and i per region (inner vs outer system) unless explicitly rolling an "unstable" outcome.

Multi-star: gate S-type/P-type orbits using §13F thresholds; put unstable ones into "Short-lived" bin with decay timescale tags (PR-drag, scattering, etc.).

15) Mneme Ship Designer – Scaling Tiers / Cohort Rules

Goal: keep abstractions realistic across orders of magnitude by switching rule-sets at tier boundaries.

A) Core scalings

Square–cube: mass ~ L^3, area ~ L^2.

Structural fraction: f_struct = f0 + k_sigma * (M/M0)^(1/3) (stress & buckling margins rise with size).

Tankage fraction (surface-limited): f_tank ∝ V^(2/3)/V ~ M^(-1/3) (smaller craft pay higher tank mass per propellant kg).

Power/radiator: waste heat ∝ P; radiator area A_rad ∝ P / (epsilon * sigma * T^4); small craft struggle at low radiator temps.

B) Atmospheric lifting bodies (if applicable)

Lift: L = 0.5 * rho * v^2 * S * C_L.

Wing loading: W/S sets stall speed v_stall = sqrt( 2W / (rho * S * C_L,max) ).

Tier correction: cap W/S per world to keep v_stall under mission limits → bounds required planform area S and thus available internal volume.

C) Engine/Thrust abstraction

Thrust–power: chemical approx P ~ T * v_e / 2; electric/nuclear T = (2 * eta * P) / v_e.

T/W requirement: set T/W_req for liftoff/hover; for orbital maneuvers use Delta v with burn-time caps for gravity-loss control.

D) Proposed tiers (example; tune to setting)

Micro (< 10 t): high tankage %, avionics %, radiator %, limited hab volume.

Small (10–100 t): baseline rules.

Medium (100–1,000 t): +10–20% structural fraction; wing/body area limited by W/S.

Large (1,000–10,000 t): structural + radiator penalties; docking-only (no runway).

Capital (> 10^4 t): modular truss architecture; local-g limits on hull spans.

E) Cohort adjustment knobs

f_struct(tier), f_tank(tier), min radiator area, min hab volume/crew, max W/S, min T/W.

Engine cohort caps (max chamber pressure/heat flux) → ceiling on v_e or T/P per tier.

F) BOM hooks

Each component class stores a mass fraction and scaling law (∝ M^p, or ∝ area, ∝ P, etc.). BOM auto-recomputes when crossing tier boundaries.

16) Tasking Outline for the Mathematics Freelancer

Stability library: implement §§13–14 as callable checks + labels (Stable/Meta/Short/Transient) with timescale estimates.

Distance/placement generator: enforce constraints while filling the tree; return reasons when rejecting placements.

Ring & debris lifetimes: parameterize nu, PR-drag, radiation blowout; expose sliders for campaign flavour.

Ship scaling cohorts: encode §15 tiers and scaling laws; write unit tests across 1–10^5 t.

Worked examples: Earth–Moon, Solar-System sanity suite; a multi-star demo.

Docs: inline derivations + references, with SI unit tests.

Glue to AI tools: small notebooks that validate outputs vs open datasets for regression tests.