turbo_moc.fluent.common module#
Shared physics, numerics and session lifecycle for Fluent stator workflows.
Importing this module does not load PyFluent or start a solver session. Dimension-specific geometry, periodicity and graphics stay with each workflow.
- class turbo_moc.fluent.common.SolverStage(name: str, first_order: bool, iterations: int, time_scale_factor: float, stop_on_convergence: bool)[source]#
Bases:
objectOne solver block, including whether Fluent may stop it early.
- first_order: bool#
- iterations: int#
- name: str#
- stop_on_convergence: bool#
- time_scale_factor: float#
- turbo_moc.fluent.common.boundary_types(boundary_conditions)[source]#
Return the imported face-zone names and their Fluent boundary types.
- turbo_moc.fluent.common.configure_flow_boundaries(settings, zones, state, options, wall_roles=('blade',))[source]#
Assign pressure inlet/outlet conditions and stationary no-slip walls.
- turbo_moc.fluent.common.configure_material(settings, expressions, options, *, dimension)[source]#
Configure steady barotropic SST physics and return the fluid zone name.
- turbo_moc.fluent.common.configure_numerics(settings, options)[source]#
Set coupled pseudo time stepping and normalized residual monitoring.
- turbo_moc.fluent.common.configure_stage(settings, stage, options)[source]#
Apply spatial order, pseudo timescale and convergence stopping together.
- turbo_moc.fluent.common.contour_definitions(options)[source]#
Map YAML image settings to Fluent fields and readable plot names.
- turbo_moc.fluent.common.initialize_solution(settings)[source]#
Hybrid-initialize once, before the first solver stage.
- turbo_moc.fluent.common.load_dependencies(prepare_only)[source]#
Keep the example importable without the optional Fluent installation.
- turbo_moc.fluent.common.record_stage_iterations(transcript, stage_end_offsets, stage_results)[source]#
Recover stage iteration counts after solving, without intermediate checks.
During solving we only record the transcript’s byte position. Afterwards, the iteration column at each position identifies how far that stage ran. Barotropy still reads and plots the actual residual history.
- turbo_moc.fluent.common.residual_history(transcript_file, output_dir, options, save_plot=False)[source]#
Read the overall transcript and optionally plot it with barotropy.
Barotropy detects the residual-table header, so equation names and their column order come from Fluent rather than a fixed five-column parser.
- turbo_moc.fluent.common.resolve_zone(expected, names)[source]#
Find a named CGNS boundary, allowing a unique importer-added prefix.
- turbo_moc.fluent.common.run_stages(solver, options, output_dir, state, *, diagnostics=None, residual_reader=None)[source]#
Run the YAML strategy and save the final case and solution data together.
Every block stops when Fluent meets all configured normalized residual criteria or exhausts its iteration budget, then advances to the next block. Field, mass-balance and transcript checks run once, after the final block. Exceptions from Fluent abort immediately without saving failed solution data.
- turbo_moc.fluent.common.save_fluent_case(pyfluent, workflow, mesh_file, state, expressions, geometry, *, dimension, configure, run, export, metadata=None)[source]#
Save the setup, optionally solve and save final case/data, then close.
- turbo_moc.fluent.common.set_order(settings, first_order)[source]#
Switch all transported fields together to the requested spatial order.
- turbo_moc.fluent.common.solution_diagnostics(solver, options)[source]#
Record actual property extrema and boundary mass imbalance.
- turbo_moc.fluent.common.solution_stages(options)[source]#
Read the YAML strategy; every block may stop once its residuals converge.
- turbo_moc.fluent.common.validate_reporting(reporting)[source]#
Keep the execution log inside the output directory with a known level.