turbo_moc.solvers.conventional module#
- class turbo_moc.solvers.conventional.MOCSolver(config: dict, show_plot=False, fluid_manager: FluidManager = None)[source]#
Bases:
objectEncapsulates the configuration, state, and sequential logic for a Method of Characteristics (MOC) simulation.
Methods
build_result_data([extra_meta])Returns the full result dict (wall/axis/mesh data, all JSON-safe plain floats/lists) without touching the filesystem -- the part of export_full_result_data that's actually reusable in-memory (e.g. by turbo_moc.api), split out so that function can just json.dump this instead of duplicating the dict-building logic.
run_stage_1_sauer([use_true_sauer_line, ...])use_true_sauer_line=False (default): flat throat front (x=0 for every y), uniform post-jump velocity -- see the long comment below for why this exists (avoids the Q=u^2-a^2=0 stall at the M~1 singularity).
run_stage_2_ivp([progress_callback])run_stage_4_reflex([progress_callback])export_full_result_data
run_stage_3_kernel
- build_result_data(extra_meta=None)[source]#
Returns the full result dict (wall/axis/mesh data, all JSON-safe plain floats/lists) without touching the filesystem – the part of export_full_result_data that’s actually reusable in-memory (e.g. by turbo_moc.api), split out so that function can just json.dump this instead of duplicating the dict-building logic.
- run_stage_1_sauer(use_true_sauer_line=False, progress_callback=None)[source]#
use_true_sauer_line=False (default): flat throat front (x=0 for every y), uniform post-jump velocity – see the long comment below for why this exists (avoids the Q=u^2-a^2=0 stall at the M~1 singularity).
use_true_sauer_line=True: the actual classical Sauer (1947) transonic small-perturbation solution (InternalPoint.SauerMain – a parabolic sonic line x(y), built from an expansion around a*), only physically applicable when the isentrope crosses M=1 smoothly (
jax_solve_critical_state’sSMOOTH_SONICmode) – i.e. no discontinuous flashing jump to violate the small-perturbation assumption. Kept as an explicit opt-in alongside the flat-front default (not a replacement) so both can be generated and compared for the same case.progress_callback: optional callable(fraction: float, stage_label: str) – see turbo_moc.reporting.StageProgress and turbo_moc.progress. Threaded through every run_stage_* method the same way, so a UI can drive one overall progress bar across the whole solve.