Model/Simulation

Core types for setting up and running AURORA simulations.

AuroraModel

AURORA.AuroraModelType
AuroraModel{AG, EG, PAG, SD, IO, SP, FT, V}

Container for the grids, atmosphere, and collision data used by an AURORA simulation.

source

AuroraSimulation

AURORA.AuroraSimulationType
AuroraSimulation{M<:AuroraModel, F<:InputFlux, S<:AbstractMode}

A complete simulation configuration, bundling the physical model, input flux, mode strategy, output configuration, resolved time configuration, and lazy simulation cache.

Use initialize! to allocate the workspace explicitly, or call run! directly to auto-initialize and execute the simulation.

Examples

# Single-step steady-state
sim = AuroraSimulation(model, flux, "my_run"; mode=SteadyStateMode())

# Multi-step steady-state
sim = AuroraSimulation(model, flux, "my_run"; mode=SteadyStateMode(duration=0.5, dt=0.01))

# Time-dependent
sim = AuroraSimulation(model, flux, "my_run";
                       mode=TimeDependentMode(duration=0.5, dt=0.001, CFL_number=128))

# Full output control via AuroraOutputManager
out = AuroraOutputManager("my_run"; overwrite=true, compress=false)
sim = AuroraSimulation(model, flux, out; mode=SteadyStateMode())
source

Mode/Solver types

AURORA.AbstractModeType
AbstractMode

Abstract supertype for simulation modes.

Concrete subtypes:

The mode controls both the numerical scheme used at each energy step and how time parameters (if any) are resolved into an internal time configuration.

source
AURORA.SteadyStateModeType
SteadyStateMode()
SteadyStateMode(; duration, dt)

Solve each time step independently as a steady-state (time-independent) transport problem.

When called without arguments, a single steady-state solve is performed.

When called with duration and dt, a UniformTimeGrid is built and each point is solved independently. This enables, e.g., a flickering input where each time step is solved in steady-state.

Examples

# Single-step steady-state
sim = AuroraSimulation(model, flux, savedir; mode=SteadyStateMode())

# Multi-step steady-state (each time point solved independently)
sim = AuroraSimulation(model, flux, savedir; mode=SteadyStateMode(duration=0.5, dt=0.01))
source
AURORA.TimeDependentModeType
TimeDependentMode(; duration, dt, CFL_number=64, max_memory_gb=8.0, n_loop=nothing)

Solve the transport equation in a time-dependent manner with a Crank-Nicolson scheme.

Keyword Arguments

  • duration: total simulation time (s)
  • dt: time step for saving data (s). The internal time step may be finer to satisfy the CFL condition.
  • CFL_number = 64: CFL stability factor. Crank-Nicolson is unconditionally stable, so large values are acceptable (it will affect the accuracy though).
  • max_memory_gb = 8.0: memory budget (GB) used to auto-split the simulation into loops.
  • n_loop = nothing: manually specify the number of loops. Overrides max_memory_gb.

Examples

sim = AuroraSimulation(model, flux, savedir;
                       mode=TimeDependentMode(duration=0.5, dt=0.001, CFL_number=128))
source

Simulation execution

AURORA.initialize!Function
initialize!(model::AuroraModel; verbose=true, policy=CachePolicy())

Perform all heavy setup for model:

  1. Compute s_field and ionosphere from the current altitude grid.
  2. Compute (or load from cache) the scattering matrices.
  3. For each species: sample the density profile, load cross sections and excitation levels (skipped if already pre-populated), build phase functions, and load/compute cascading transfer matrices.

Called internally by initialize!(sim) and/or run!(sim).

source
initialize!(sim::AuroraSimulation;
            force_recompute=false,
            save_cache=true,
            cache_root=default_cache_root())

Allocate or re-allocate the working cache for sim.

Keywords

  • force_recompute: ignore compatible on-disk cascading caches and rebuild them
  • save_cache: if false, skip writing newly computed cascading caches to disk
  • cache_root: parent directory that contains the cascading and scattering cache folders
source
AURORA.run!Function
run!(sim::AuroraSimulation)

Execute the simulation described by sim.

Automatically calls initialize! when needed, then dispatches to the appropriate execution path based on the selected mode.

Examples

sim = AuroraSimulation(model, flux, savedir;
                       mode=TimeDependentMode(duration=0.5, dt=0.001, CFL_number=128))
run!(sim)
source