turbo_moc.fluent.barotropic_model module#
Build and validate a barotropic model at the MoC inlet state.
- class turbo_moc.fluent.barotropic_model.BarotropicClosure(expressions, p_min, p_max, samples=4000)[source]#
Bases:
objectThe exported Fluent expressions evaluated in Python, plus the isentropic head H(p) = ∫ dp/ρ.
Post-processing then uses exactly the density and speed of sound the solver used, instead of refitting or calling the equation of state again.
Methods
density
evaluate
from_file
head
pressure_from_head
speed_of_sound
- turbo_moc.fluent.barotropic_model.bounded_viscosity_expression(definition, p_min, p_max, mu_min, mu_max)[source]#
Hold transport properties at endpoints outside the thermodynamic fit.
- turbo_moc.fluent.barotropic_model.fit_wide_isentrope(barotropy, fitter, fluid, entropy, degree, segment_pressure_ratio=2.0)[source]#
Refine barotropy’s phase segments for an extended pressure range.
Fit directly sampled equilibrium EOS states, retaining phase boundaries. Endpoint corrections make neighbouring polynomial values continuous. Independent midpoint samples check accuracy, positivity and compressibility.
- turbo_moc.fluent.barotropic_model.generate_barotropic_model(barotropy, config, nozzle, settings, output_dir)[source]#
Fit the inlet isentrope and export validated, usable Fluent expressions.
The fit extends to inlet pressure / pressure_ratio independently of the CFD back pressure. Return expressions and inlet/outlet properties for Fluent.
- turbo_moc.fluent.barotropic_model.phase_boundaries(barotropy, fluid, entropy, p_low, p_high, samples=400)[source]#
Pressures where the isentrope enters or leaves the two-phase region.
- turbo_moc.fluent.barotropic_model.positive(value, name)[source]#
Reject invalid physical/settings values before starting external tools.
- turbo_moc.fluent.barotropic_model.resolve_inlet_state(barotropy, nozzle_parameters, nozzle)[source]#
Preserve the quality actually used by MoC, including its optional Q0 nudge.
Saturated pressure/temperature alone cannot identify a two-phase inlet. Resolve pressure/quality first, then pass its density to BarotropicModel.