Domain Classes ============== The class layer is the in-memory model behind the OpenPinch workflow. Most of these objects are created for you by :func:`~OpenPinch.services.input_data_processing.data_preparation.prepare_problem`, but they are also useful directly when building tests, custom workflows, or post-processing studies. How These Objects Fit Together ------------------------------ - :class:`~OpenPinch.classes.stream.Stream` and :class:`~OpenPinch.classes.stream_collection.StreamCollection` represent the thermal streams and ordered stream sets used to build problem tables. - :class:`~OpenPinch.classes.zone.Zone` groups streams, utilities, targets, and subzones into a hierarchical model of the process, site, or wider system. - :class:`~OpenPinch.classes.problem_table.ProblemTable` stores the numerical temperature-interval cascade that drives pinch and utility calculations. - :class:`~OpenPinch.lib.schemas.targets.BaseTargetModel` stores one solved set of metrics for a zone and is later serialised into the public output schema. - :class:`~OpenPinch.classes.value.Value` wraps scalar and discrete-period quantities with units for report-friendly serialisation. .. automodule:: OpenPinch.classes :no-members: Streams and Collections ----------------------- These are the most commonly manipulated domain objects outside the top-level service layer. .. automodule:: OpenPinch.classes.stream :members: .. automodule:: OpenPinch.classes.stream_collection :members: Zones, Targets, and Tables -------------------------- These classes represent the solved hierarchy and its numerical results. .. automodule:: OpenPinch.classes.zone :members: .. automodule:: OpenPinch.classes.problem_table :members: Heat Exchanger Network Design Records ------------------------------------- These classes are the OpenPinch-native public result model for heat exchanger network design outcomes. They expose exchanger links by source and sink stream identity; raw solver axis positions remain internal implementation details. .. automodule:: OpenPinch.classes.heat_exchanger :members: .. automodule:: OpenPinch.classes.heat_exchanger_network :members: Heat Exchanger Network Unit Models ---------------------------------- The HEN synthesis unit-model modules sit below the public design accessors. They are useful when inspecting how the pinch-design and stagewise equations are assembled, but users normally call the methods through ``problem.design``. .. automodule:: OpenPinch.services.heat_exchanger_network_synthesis.unit_models :no-members: .. automodule:: OpenPinch.services.heat_exchanger_network_synthesis.unit_models.base :members: .. automodule:: OpenPinch.services.heat_exchanger_network_synthesis.unit_models.pinch_design :members: .. automodule:: OpenPinch.services.heat_exchanger_network_synthesis.unit_models.stagewise :members: .. automodule:: OpenPinch.services.heat_exchanger_network_synthesis.unit_models.packed_pinch_design :members: .. automodule:: OpenPinch.services.heat_exchanger_network_synthesis.unit_models.packed_stagewise :members: .. automodule:: OpenPinch.services.heat_exchanger_network_synthesis.unit_models.stage_packing :members: .. automodule:: OpenPinch.services.heat_exchanger_network_synthesis.unit_models.problem :members: Units and Scalar Helpers ------------------------ :class:`~OpenPinch.classes.value.Value` supports both ordinary scalar quantities and discrete-period values with ``period_ids`` and normalised ``weights``. This makes it suitable for both deterministic reports and period-weighted scenario data. .. automodule:: OpenPinch.classes.value :members: Process Component Models ------------------------ Process components are live model mutations attached after preparation and before rerunning targets. The direct process MVR component owns the original stream records, replacement streams, per-period stage results, and activation/deactivation state used by workspace comparison studies. .. automodule:: OpenPinch.services.components.process_components :members: .. automodule:: OpenPinch.services.components.process_mvr :members: .. automodule:: OpenPinch.services.components.direct_mvr.direct_gas_mvr :members: Thermal Cycle and Cogeneration Unit Models ------------------------------------------ These classes support the advanced Heat Pump, refrigeration, and utility system workflows documented in :mod:`OpenPinch.services.heat_pump_integration.heat_pump_and_refrigeration_entry`. They are primarily useful for advanced users who want to inspect or construct detailed cycle configurations directly. .. automodule:: OpenPinch.services.heat_pump_integration.unit_models :no-members: .. automodule:: OpenPinch.services.heat_pump_integration.unit_models.vapour_compression_cycle :members: .. automodule:: OpenPinch.services.heat_pump_integration.unit_models.parallel_vapour_compression_cycles :members: .. automodule:: OpenPinch.services.heat_pump_integration.unit_models.cascade_vapour_compression_cycle :members: .. automodule:: OpenPinch.services.heat_pump_integration.unit_models.carnot_cycles :members: .. automodule:: OpenPinch.services.heat_pump_integration.unit_models.mechanical_vapour_recompression_cycle :members: .. automodule:: OpenPinch.services.heat_pump_integration.unit_models.vapour_compression_mvr_cascade :members: .. automodule:: OpenPinch.services.heat_pump_integration.unit_models.brayton_heat_pump :members: .. automodule:: OpenPinch.services.power_cogeneration.unit_models.multi_stage_steam_turbine :members: