bloc.design_reactors#

Design-oriented custom reactor classes and STONE YAML builders for Bloc.

This module connects Bloc’s domain-specific reactor formulations to the YAML with STONE standard used by Boulder. It registers custom reactor builders so that STONE component types like DesignTorch, DesignPSR and DesignReactor declared in configuration files are instantiated as concrete Cantera reactors inside a ReactorNet.

Registration is handled by bloc.boulder_plugins.register.register_plugins() function called via entry point.

Key responsibilities#

  • Register custom STONE builders via register_reactor_builder() and install a post-build hook via register_post_build_hook(). Builders are invoked by CanteraConverter when converting a normalized STONE config to a running Cantera network.

  • Provide design-oriented reactor subclasses that expose convenient solver and utility methods (mixing, energy accounting, heat transfer estimates) used by higher-level workflows.

  • Interoperate with Bloc utilities and models (bloc.reactors, bloc.utils, bloc.models) while remaining fully compatible with Reactor and ReactorNet.

Classes#

DesignTorch

Design-oriented torch reactor with convenience solvers.

PSRDesign

PFRDesign

DesignIdealGasConstPressureMoleReactor

Design-oriented constant-pressure mole reactor with helper APIs.

Module Contents#

class bloc.design_reactors.DesignTorch#

Bases: cantera.IdealGasConstPressureMoleReactor

Design-oriented torch reactor with convenience solvers.

This class is instantiated automatically when a STONE component of type DesignTorch is present. It inherits from ExtensibleIdealGasConstPressureReactor via Cantera’s Python API and remains fully compatible with ReactorNet.

See also

solve_adiabatic_reactor(), boulder.cantera_converter

solve_adiabatic(mdot, power_kW, t_res_s, X_in, T_in_C, P_bar, mechanism, name, verbose)#
class bloc.design_reactors.PSRDesign#
t_res_s: float#
class bloc.design_reactors.PFRDesign#
length: float#
diameter: float#
eps_wall: float#
T_wall_hyp_C: float | None#
T_amb_C: float | None#
insulation: object#
class bloc.design_reactors.DesignIdealGasConstPressureMoleReactor#

Bases: cantera.IdealGasConstPressureMoleReactor

Design-oriented constant-pressure mole reactor with helper APIs.

Provides thin wrappers around utilities in bloc.reactors to keep notebooks and pipelines succinct while still allowing direct usage inside a ReactorNet built by CanteraConverter.

Methods like solve_adiabatic() are intentionally high-verbosity and return structured results objects used by downstream design calculations.

solve_adiabatic(mdot, power_kW, t_res_s, X_in, T_in_C, P_bar, mechanism, name, verbose, **kwargs)#

Solve an adiabatic constant-pressure reactor segment.

Delegates to solve_adiabatic_reactor().

switch_mechanism(gas, mechanism_path, htol, Xtol)#

Switch the active mechanism while conserving chemical enthalpy.

See switch_mechanism() for details.

external_coeffs(D_ext, L_reac, eps_wall, T_wall_hyp_C, T_amb_C)#

Return convective and radiative heat transfer coefficients at the wall.

heat_losses_linear(T_mean_C, T_amb_C, R_list)#

Compute linearized heat losses across a thermal resistance stack.

thermal_resistance(d_reac, L_reac, e_insul_list, cond_list, h_tot, S_ext)#

Build a radial-conduction plus external heat transfer resistance list.

mass_and_power(qm_torch, T_torch_input_C, X_torch, qm_2nd_inj, T_2nd_inj_C, X_2nd_inj, P_bar, T_amb_C, gas)#

Compute preheat recovery and residual heat based on reactor states.

mass_reactor(L_reac, d_reac, e_insul_list, density_list, verbose=False)#

Estimate reactor mass and volume from geometry and insulation layers.