bloc.download_script_emitter#

Bloc-aware Cantera-native download script emitter.

Subclasses CanteraScriptEmitter and overrides the three extension seams to inject Bloc-specific reactor kinds, imports, and post-build hooks into the generated standalone script.

Usage#

BlocScriptEmitter is selected automatically when BlocConverter is used, because BlocConverter sets SCRIPT_EMITTER_CLASS = BlocScriptEmitter. It is not normally instantiated directly.

Classes#

BlocScriptEmitter

Emitter that handles Bloc reactor Model kinds.

Module Contents#

class bloc.download_script_emitter.BlocScriptEmitter(converter=None)#

Bases: boulder.download_script_emitter.CanteraScriptEmitter

Emitter that handles Bloc reactor Model kinds.

Overrides: - _emit_reactor: constructs Model reactors with full _meta dicts. - _emit_download_imports: imports from bloc.reactor_models,

bloc.utils, and conditionally bloc.reactors.

  • _emit_stage_extra_post_build: emits _post_build_tube_furnace when TubeFurnace nodes are present in the stage.

  • _network_ctor: returns the correct specialised *Net class for single-reactor stages.

converter = None#
nodes_by_id: Dict[str, Any]#
inlet_target_ids: set#
plan: Any = None#
stream_inlet_by_stage: Dict[str, List[Dict[str, Any]]]#
has_mech_switch: bool = False#
mechanism: str = 'gri30.yaml'#
all_node_types: set#
emit(config)#

Return Python source lines for a Cantera-native staged-solve script.