jf1uids.option_classes.simulation_config module#
- class jf1uids.option_classes.simulation_config.BoundarySettings(x, y, z)[source]#
Bases:
NamedTuple
- x: BoundarySettings1D#
Alias for field number 0
- y: BoundarySettings1D#
Alias for field number 1
- z: BoundarySettings1D#
Alias for field number 2
- class jf1uids.option_classes.simulation_config.BoundarySettings1D(left_boundary, right_boundary)[source]#
Bases:
NamedTuple
- left_boundary: int#
Alias for field number 0
- right_boundary: int#
Alias for field number 1
- class jf1uids.option_classes.simulation_config.SimulationConfig(runtime_debugging: bool = False, progress_bar: bool = False, dimensionality: int = 1, geometry: int = 0, mhd: bool = False, self_gravity: bool = False, box_size: float = 1.0, num_cells: int = 400, reconstruction_order: int = 1, limiter: int = 0, riemann_solver: int = 1, num_ghost_cells: int = 2, grid_spacing: float = 0.002506265664160401, boundary_settings: None | BoundarySettings1D | BoundarySettings = None, fixed_timestep: bool = False, exact_end_time: bool = False, source_term_aware_timestep: bool = False, num_timesteps: int = 1000, differentiation_mode: int = 0, num_checkpoints: int = 100, return_snapshots: bool = False, activate_snapshot_callback: bool = False, num_snapshots: int = 10, first_order_fallback: bool = False, wind_config: WindConfig = (False, 10, 1, False), simplified_cosmic_rays: bool = False)[source]#
Bases:
NamedTuple
Configuration object for the simulation. The simulation configuration are parameters defining the simulation where changes necessitate recompilation.
- activate_snapshot_callback: bool#
Call a user given function on the snapshot data, e.g. for saving or plotting. Must have signature callback(time, state, registered_variables).
- boundary_settings: None | BoundarySettings1D | BoundarySettings#
Boundary settings for the simulation.
- box_size: float#
The size of the simulation box.
- differentiation_mode: int#
The differentiation mode one whats to use the solver in (forwards or backwards).
- dimensionality: int#
The number of dimensions of the simulation.
- exact_end_time: bool#
Exactly reach the end time. In adaptive timestepping, one might otherwise overshoot.
- first_order_fallback: bool#
Fallback to the first order Godunov scheme.
- fixed_timestep: bool#
Enables a fixed timestep for the simulation based on the specified number of timesteps.
- geometry: int#
The geometry of the simulation.
- grid_spacing: float#
Grid spacing.
- limiter: int#
The limiter for the reconstruction.
- mhd: bool#
Magnetohydrodynamics switch.
- num_cells: int#
The number of cells in the simulation (including ghost cells).
- num_checkpoints: int#
The number of checkpoints used in the setup with backwards differetiability and adaptive time stepping.
- num_ghost_cells: int#
The number of ghost cells.
- num_snapshots: int#
The number of snapshots to return.
- num_timesteps: int#
The number of timesteps for the fixed timestep mode.
- progress_bar: bool#
Activate progress bar
- reconstruction_order: int#
The reconstruction order is the number of cells on each side of the cell of interest used to calculate the gradients for the reconstruction at the interfaces.
- return_snapshots: bool#
Return intermediate snapshots of the time evolution instead of only the final fluid state.
- riemann_solver: int#
The Riemann solver used
- runtime_debugging: bool#
Debug runtime errors, throws exceptions on e.g. negative pressure or density. Significantly reduces performance.
- self_gravity: bool#
Self gravity switch, currently only for periodic boundaries.
- simplified_cosmic_rays: bool#
Cosmic rays
- source_term_aware_timestep: bool#
Adds the sources with the current timestep to a hypothetical state to estimate the actual timestep. Useful for time-dependent sources, but additional computational overhead.
- wind_config: WindConfig#
The configuration for the stellar wind module.
- jf1uids.option_classes.simulation_config.finalize_config(config: SimulationConfig, state_shape) SimulationConfig [source]#
Finalizes the simulation configuration.