Documents

Guide

Free-molecular flow

For a plate model of a spacecraft, ARLAMX computes the free-molecular force and torque on every plate and adds solar and Earth radiation pressure. You can sample that force at one attitude, or let it decay an orbit.

What is summed

  • Sentman is the default gas-surface model (aero.gsi: sentman in config/plant/physics.yaml). Energy accommodation alpha_E defaults to 0.93. It is one number for the whole vehicle.
  • Walker–CLL is the other model. Turn it on with --gsi cll. It uses normal and tangential accommodation and a species mixture from MSIS.
  • Each plate carries an outward normal, an area, and a centroid. Force and torque from aero and from radiation pressure enter the equations of motion on every substep.
  • The atmosphere along a decay comes from NRLMSIS 2.1 (pymsis), at the geodetic point, with the F10.7 and Ap you set. atmosphere.model can also be nrlmsise00 or a constant density.
  • The flow includes a co-rotating atmosphere. Gravity on a decay uses the physics preset (degree 4 by default).
Plates do not hide each other Every plate that faces the flow contributes. Faces that are inside a solid, or behind another plate, are still summed if they remain in the plate list. Simplify to the exterior shell before a force run. The CatSat study in python/arlamx_v2/catsat_fmf_decay.py does that on a 2.6 million-triangle STL by keeping a 1 mm exterior voxel shell.

Shipped spacecraft

config/orbit.yaml → simulation: holds the orbit. geom is hex or stl1pct.

# both drag extremes, 500 km → 250 km, hex sail, standard physics
python main.py decay

# SolarCat 1% plates, minimum drag, stop at 300 km
python main.py decay --kind min --set orbit.simulation.geom=stl1pct --set orbit.simulation.alt_stop_km=300

# lift and drag against angle of attack. --out is required.
python main.py sim lift_drag_study --geom stl1pct --out outputs/results/lift_drag

# one angle of attack, held, from 500 km toward 300 km
python main.py sim aoa_decay --alpha 45 --geoms stl1pct

On a decay the plant mode is prescribed: the attitude is set to the target each substep and the body rate is zero. That isolates the aerodynamic orbit change from the control law. Closed-loop tracking is the control page.

Useful knobs on simulation: and as flags: alt0_km, alt_stop_km, inc_deg, ecc, f107, ap, mass_kg, dt_s, max_days. --physics fast|standard|high and --gsi sentman|cll select the force model.

Your own spacecraft

The stock decay command only knows hex and stl1pct. For another vehicle, simplify the mesh, then drive the same plant the decay tool drives. STL and OBJ are read as millimetres unless you pass --units. STEP is read in the file’s own unit and returned in metres (that path needs cascadio).

python main.py sim geometry --in craft.stl --quality 1pct
# writes outputs/results/geometry/craft_1pct.geom

A .geom line is nx ny nz area_m2 cx cy cz. The C++ plant never sees the original triangles. Loading those plates and taking one step looks like the body of python/arlamx_v2/decay_run.py:

import numpy as np
from arlamx_v2 import cpp
from arlamx_v2 import physics as physics_mod
from arlamx_v2.geometry import load_geom
from arlamx_v2.paths import resolve_ggm

n, A, c = load_geom("outputs/results/geometry/craft_1pct.geom")
params = cpp.SimParams()
params.mass = 2.0
params.dt_s = 2.0
params.advisor_step_s = 2.0
params.mode = "prescribed"
physics_mod.apply_to_params(
    params, physics_mod.load("standard"), ggm_path=resolve_ggm())
sim = cpp.Simulator(params)
sim.set_mode("prescribed")
sim.set_panels(n, A, c)
sim.set_inertia_diag(np.array([0.02, 0.02, 0.01]))
sim.set_atmosphere(3.0e-12, 900.0, 2.656e-26)   # or query_msis, as decay_run.py does
# sim.reset(r_m, v_m_s, sigma, omega)
# out = sim.step(quaternion)   # keys include altitude_km, Cd, Cl, drag_N

decay_run.py is the full orbit: classical elements to position and velocity, MSIS on a timer, a min-drag or max-drag quaternion, and a CSV. Copy that loop and replace load_panels with load_geom of your file. Set mass and inertia to the vehicle. The constant-density set_atmosphere call above is only a single-step illustration. A decay should call query_msis.

For training on your plates, construct ArlamxV2Env(geom_path="craft_1pct.geom"). python main.py train itself uses the hex sail, or the vehicle card when the variant is v10r6. See the control page.

Related tools

  • python main.py sim srp_assess asks whether solar pressure can raise or hold the orbit for the shipped geometries.
  • python main.py sim optics_run swaps sail optical presets and reports force and one-orbit energy.
  • python main.py sim advisor_run flies the closed-loop heuristic and MPC advisors, with aerodynamics still on.

Equations, accommodation, and the difference between Sentman and the Walker fit are in the aerodynamics reference.