Schema and Configuration
The OpenPinch.lib package defines the typed contract between external
callers and the analysis engine. If you are building an application around
OpenPinch, this is the package that tells you what inputs are accepted, what
outputs are returned, and which enumerated labels and configuration flags are
expected throughout the workflow.
Configuration and Numeric Conventions
OpenPinch.lib.config provides the runtime configuration object and the
global constants used across multiple modules. Many option names intentionally
mirror the long-standing Excel workbook so workbook and Python workflows can
share the same mental model.
Typed configuration primitives and schemas for OpenPinch.
The OpenPinch.lib package exposes enumerations, configuration helpers,
and the Pydantic schema models that define the wire format used by the public
API. They are re-exported here for consumers that need to construct or inspect
inputs programmatically.
Configuration defaults and global numerical constants for OpenPinch.
The Configuration object centralizes option flags and numerical
settings used across direct integration, utility targeting, and optional
advanced routines such as heat pump and cost targeting.
- class OpenPinch.lib.config.Configuration(options=None, top_zone_name='Site', top_zone_identifier='Site')[source]
Bases:
objectRuntime configuration defaults used throughout OpenPinch.
The attributes on this class combine global numerical settings, workbook- compatible feature flags, and advanced-analysis parameters such as heat pump or costing options. A
Configurationinstance is attached to eachZoneso workflows can vary behaviour by hierarchy level if needed.Initialise defaults and optionally apply user-provided options.
Enumerations and Labels
The enums module centralises the canonical names used for zones, targets, streams, graph series, and workbook-compatible option keys. Refer to these when you need stable identifiers instead of free-form strings.
Enumerations and lightweight typed contracts used across OpenPinch.
These enums standardize zone types, stream classifications, Problem Table column names, graph labels, and options keys used by configuration and schemas.
- class OpenPinch.lib.enums.BB_Minimiser(*values)[source]
-
Supported optimisation backends for multistart black-box search.
- class OpenPinch.lib.enums.CogenerationTarget(*args, **kwargs)[source]
Bases:
ProtocolCompatible target surface required by cogeneration analysis helpers.
- class OpenPinch.lib.enums.GraphType(*values)[source]
Bases:
EnumGraph groups available in the OpenPinch reporting payload.
- class OpenPinch.lib.enums.HeatExchangerTypes(*values)[source]
Bases:
EnumHeat exchanger flow arrangements
- class OpenPinch.lib.enums.HeatPumpAndRefrigerationCycle(*values)[source]
-
Supported heat pump targeting model families.
- OpenPinch.lib.enums.HPRcycle
alias of
HeatPumpAndRefrigerationCycle
- class OpenPinch.lib.enums.LegendSeries(*values)[source]
Bases:
EnumLegend labels for multi-series graphs.
- class OpenPinch.lib.enums.ProblemTableLabel(*values)[source]
Bases:
EnumProblem table column header labels
- OpenPinch.lib.enums.PT
alias of
ProblemTableLabel
- OpenPinch.lib.enums.SD
alias of
StreamDataLabel
- OpenPinch.lib.enums.ST
alias of
StreamType
- class OpenPinch.lib.enums.StreamDataLabel(*values)[source]
Bases:
EnumStream data column header labels
- class OpenPinch.lib.enums.SummaryRowType(*values)[source]
Bases:
EnumRow semantics for tabular summary output.
- class OpenPinch.lib.enums.TargetType(*values)[source]
Bases:
EnumDifferent target calculation categories.
- OpenPinch.lib.enums.TT
alias of
TargetType
- class OpenPinch.lib.enums.TurbineModel(*values)[source]
Bases:
EnumAlternative turbine performance correlations used in power targeting.
Pydantic Schemas
The schema layer is the primary programmatic interface to OpenPinch. It is now
split by concern under OpenPinch.lib.schemas rather than concentrated in
one large module.
The main schema modules are:
OpenPinch.lib.schemas.commonfor shared primitives such asValueWithUnitOpenPinch.lib.schemas.graphsfor graph payload contractsOpenPinch.lib.schemas.iofor public request and response modelsOpenPinch.lib.schemas.reportingfor summary and report-facing modelsOpenPinch.lib.schemas.hprfor lower-level heat pump solver data modelsOpenPinch.lib.schemas.targetsfor runtime target models stored on solved zonesOpenPinch.lib.schemas.turbinefor turbine solve result models
Common request models include:
Common response and reporting models include:
Heat pump integration helper models include:
Specialised helper models also capture lower-level Heat Pump optimisation inputs/outputs, integrated Heat Pump screening comparisons, piecewise stream linearisation requests, and legacy visualisation data structures.
Concern-based schema package for OpenPinch.
Common schema primitives and shared type aliases.
- class OpenPinch.lib.schemas.common.StatefulValueWithUnit(*, values, unit=None)[source]
Bases:
BaseModelContainer storing multi-state magnitudes, weights, and a shared unit.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {'extra': 'forbid', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.common.StatefulValueWithUnitAndWeights(*, values, unit=None, weights=None)[source]
Bases:
BaseModelContainer storing multi-state magnitudes, weights, and a shared unit.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {'extra': 'forbid', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.common.ValueWithUnit(*, value=None, unit=None)[source]
Bases:
BaseModelContainer storing a magnitude and its associated unit string.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {'extra': 'forbid', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Graph payload schemas.
- class OpenPinch.lib.schemas.graphs.DataPoint(*, x, y)[source]
Bases:
BaseModelCoordinate used to construct composite curves and other plots.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.graphs.Graph(*, type, segments=<factory>)[source]
Bases:
BaseModelCollection of segments representing a single graph (e.g., GCC).
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {'use_enum_values': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.graphs.GraphSet(*, name='GraphSet', target_type=None, state_id=None, zone_name=None, zone_address=None, graphs=<factory>)[source]
Bases:
BaseModelNamed group of graphs emitted for a particular zone or context.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.graphs.Segment(*, title=None, colour=None, arrow=None, data_points=<factory>)[source]
Bases:
BaseModelContinuous plot segment optionally annotated with colour/arrows.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Schemas used by heat pump and refrigeration solvers.
- class OpenPinch.lib.schemas.hpr.HeatPumpTargetInputs(*, hpr_type, Q_hpr_target, Q_heat_max, Q_cool_max, z_amb_hot, z_amb_cold, dt_range_max, T_hot, H_hot, T_cold, H_cold, n_cond, n_evap, eta_comp, eta_exp, dtcont_hp, dt_hp_ihx, dt_cascade_hx, dt_phase_change, heat_to_power_ratio, cold_to_power_ratio, is_heat_pumping, max_multi_start, T_env, dt_env_cont, eta_ii_hpr_carnot, eta_ii_he_carnot, refrigerant_ls, do_refrigerant_sort, initialise_simulated_cycle, allow_integrated_expander, dT_subcool=None, dT_superheat=None, bckgrd_hot_streams=None, bckgrd_cold_streams=None, bb_minimiser=None, eta_penalty=0.01, rho_penalty=10, idx=0, debug)[source]
Bases:
BaseModelParameter bundle for heat pump and refrigeration targeting routines.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
hpr_type (str)
Q_hpr_target (float)
Q_heat_max (float)
Q_cool_max (float)
z_amb_hot (ndarray)
z_amb_cold (ndarray)
dt_range_max (float)
n_cond (int)
n_evap (int)
eta_comp (float)
eta_exp (float)
dtcont_hp (float)
dt_hp_ihx (float)
dt_cascade_hx (float)
dt_phase_change (float)
heat_to_power_ratio (float)
cold_to_power_ratio (float)
is_heat_pumping (bool)
max_multi_start (int)
T_env (float)
dt_env_cont (float)
eta_ii_hpr_carnot (float)
eta_ii_he_carnot (float)
do_refrigerant_sort (bool)
initialise_simulated_cycle (bool)
allow_integrated_expander (bool)
dT_subcool (ndarray | None)
dT_superheat (ndarray | None)
bckgrd_hot_streams (StreamCollection | None)
bckgrd_cold_streams (StreamCollection | None)
bb_minimiser (str | None)
eta_penalty (float | None)
rho_penalty (float | None)
idx (int)
debug (bool)
- model_config = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.hpr.HeatPumpTargetOutputs(*, utility_tot, w_net, w_hpr=None, w_he=None, heat_recovery=None, Q_ext, Q_amb_hot, Q_amb_cold, cop_h=None, eta_he=None, obj, success, hpr_hot_streams, hpr_cold_streams, amb_streams, T_cond=None, T_evap=None, Q_cond=None, Q_evap=None, Q_cond_he=None, Q_evap_he=None, dT_subcool=None, dT_superheat=None, T_comp_out=None, dT_gc=None, dT_comp=None, Q_heat=None, Q_cool=None, model=None)[source]
Bases:
BaseModelNormalized output contract for HPR targeting routines.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
utility_tot (float)
Q_ext (float)
Q_amb_hot (float)
Q_amb_cold (float)
obj (float)
success (bool)
hpr_hot_streams (StreamCollection)
hpr_cold_streams (StreamCollection)
amb_streams (StreamCollection)
T_cond (ndarray | None)
T_evap (ndarray | None)
Q_cond (ndarray | None)
Q_evap (ndarray | None)
Q_cond_he (ndarray | None)
Q_evap_he (ndarray | None)
dT_subcool (ndarray | None)
dT_superheat (ndarray | None)
T_comp_out (ndarray | None)
dT_gc (ndarray | None)
dT_comp (ndarray | None)
Q_heat (ndarray | None)
Q_cool (ndarray | None)
model (Any | None)
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.hpr.HPRParsedState(*, Q_amb_hot=0.0, Q_amb_cold=0.0, T_cond=None, T_evap=None, dT_subcool=None, dT_superheat=None, dT_ihx_gas_side=None, T_comp_out=None, dT_gc=None, dT_comp=None, Q_heat=None, Q_cool=None)[source]
Bases:
BaseModelInternal parsed optimisation-state payload across HPR backends.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
- model_config = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.hpr.HPRThermoArtifacts(*, hpr_streams=None, model=None, debug_figure=None)[source]
Bases:
BaseModelOptional solved thermodynamic artefacts attached to a backend result.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
hpr_streams (StreamCollection | None)
model (Any)
debug_figure (Any)
- model_config = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.hpr.HPRBackendResult(*, obj, utility_tot, w_net, Q_ext_heat, Q_ext_cold, Q_amb_hot, Q_amb_cold, success=True, w_hpr=None, w_he=None, heat_recovery=None, cop_h=None, eta_he=None, amb_streams=None, T_cond=None, T_evap=None, Q_cond=None, Q_evap=None, Q_cond_he=None, Q_evap_he=None, dT_subcool=None, dT_superheat=None, T_comp_out=None, dT_gc=None, dT_comp=None, Q_heat=None, Q_cool=None, failure_reason=None, artifacts=None)[source]
Bases:
BaseModelInternal backend result before public schema validation.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
obj (float)
utility_tot (float)
Q_ext_heat (float)
Q_ext_cold (float)
Q_amb_hot (float)
Q_amb_cold (float)
success (bool)
amb_streams (StreamCollection | None)
T_cond (ndarray | None)
T_evap (ndarray | None)
Q_cond (ndarray | None)
Q_evap (ndarray | None)
Q_cond_he (ndarray | None)
Q_evap_he (ndarray | None)
dT_subcool (ndarray | None)
dT_superheat (ndarray | None)
T_comp_out (ndarray | None)
dT_gc (ndarray | None)
dT_comp (ndarray | None)
Q_heat (ndarray | None)
Q_cool (ndarray | None)
failure_reason (str | None)
artifacts (HPRThermoArtifacts | None)
- model_config = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Schemas for external inputs, outputs, and user-facing I/O data.
- class OpenPinch.lib.schemas.io.GetInputOutputData(*, plant_profile_data, streams, utilities=<factory>, options=<factory>)[source]
Bases:
BaseModelAggregate structure used by legacy I/O helpers and tests.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
plant_profile_data (List[ProblemTableDataSchema])
streams (List[StreamSchema])
utilities (List[UtilitySchema])
options (dict | None)
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.io.LineariseInput(*, t_h_data, num_intervals=100, t_min=1, streams, ppKey='', mole_flow=1.0)[source]
Bases:
BaseModelInput bundle for stream linearisation workflows.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.io.LineariseOutput(*, streams)[source]
Bases:
BaseModelOutput data containing generated linearised stream segments.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.io.NonLinearStream(*, t_supply, t_target, p_supply, p_target, h_supply, h_target, composition)[source]
Bases:
BaseModelNonlinear stream definition used by piecewise linearisation utilities.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.io.ProblemTableDataSchema(*, name, data)[source]
Bases:
BaseModelNamed container for a single temperature-enthalpy profile.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.io.StreamSchema(*, zone, name, t_supply, t_target, heat_flow, dt_cont=0.0, htc=1.0, active=True)[source]
Bases:
BaseModelProcess stream definition supplied to the targeting service.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
zone (str)
name (str)
t_supply (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights)
t_target (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights)
heat_flow (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights)
dt_cont (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
htc (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
active (bool)
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.io.THSchema(*, T, H_hot=None, H_cold=None, H_net=None, H_hot_net=None, H_cold_net=None)[source]
Bases:
BaseModelTemperature-enthalpy series data used for Problem Table exchange.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.io.TargetInput(*, streams, utilities=<factory>, options=None, zone_tree=None)[source]
Bases:
BaseModelValidated top-level input data for
pinch_analysis_service.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
streams (List[StreamSchema])
utilities (List[UtilitySchema])
options (dict | None)
zone_tree (ZoneTreeSchema | None)
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.io.TargetOutput(*, name='Site', state_id=None, targets, graphs=None)[source]
Bases:
BaseModelTop-level response data returned by
OpenPinch.pinch_analysis_service().Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.io.UtilitySchema(*, name, type, t_supply, t_target=None, heat_flow=None, dt_cont=0.0, htc=1.0, price=1.0, active=True)[source]
Bases:
BaseModelUtility definition including thermal and optional economic attributes.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
name (str)
type (StreamType)
t_supply (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights)
t_target (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
heat_flow (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
dt_cont (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
htc (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
price (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
active (bool)
- model_config = {'use_enum_values': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.io.VisualiseInput(*, zones)[source]
Bases:
BaseModelInput data for graph visualisation conversion routines.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
zones (list)
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.io.VisualiseOutput(*, graphs)[source]
Bases:
BaseModelGraph payload returned by visualisation conversion routines.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.io.ZoneTreeSchema(*, name, type, dt_cont_multiplier=None, children=None)[source]
Bases:
BaseModelRecursive description of the zone hierarchy for the analysis.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
name (str)
type (str)
dt_cont_multiplier (float | None)
children (List[ZoneTreeSchema] | None)
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Schemas for serialized summaries and report-facing data.
- class OpenPinch.lib.schemas.reporting.HeatUtility(*, name, heat_flow)[source]
Bases:
BaseModelReport-friendly representation of a utility contribution.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
name (str)
heat_flow (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights)
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.reporting.TargetResults(*, name, state_id=None, degree_of_integration=None, Qh, Qc, Qr, utility_cost=None, row_type=None, hot_utilities=<factory>, cold_utilities=<factory>, temp_pinch, work_target=None, turbine_efficiency_target=None, area=None, num_units=None, capital_cost=None, total_cost=None, exergy_sources=None, exergy_sinks=None, ETE=None, exergy_req_min=None, exergy_des_min=None, hpr_cycle=None, hpr_utility_total=None, hpr_work=None, hpr_external_utility=None, hpr_ambient_hot=None, hpr_ambient_cold=None, hpr_cop=None, hpr_eta_he=None, hpr_success=None, hpr_hot_streams=None, hpr_cold_streams=None)[source]
Bases:
BaseModelSummary metrics for a single zone/target returned by the analysis.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
name (str)
state_id (str | None)
degree_of_integration (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
Qh (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights)
Qc (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights)
Qr (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights)
utility_cost (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
row_type (str | None)
hot_utilities (List[HeatUtility])
cold_utilities (List[HeatUtility])
temp_pinch (TempPinch)
work_target (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
turbine_efficiency_target (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
area (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
num_units (float | None)
capital_cost (float | None)
total_cost (float | None)
exergy_sources (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
exergy_sinks (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
ETE (float | None)
exergy_req_min (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
exergy_des_min (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
hpr_cycle (str | None)
hpr_success (bool | None)
hpr_hot_streams (StreamCollection | None)
hpr_cold_streams (StreamCollection | None)
- model_config = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.reporting.TempPinch(*, cold_temp=None, hot_temp=None)[source]
Bases:
BaseModelHot and cold pinch temperatures attached to a targeting record.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
cold_temp (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
hot_temp (float | ValueWithUnit | StatefulValueWithUnit | StatefulValueWithUnitAndWeights | None)
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Runtime target schemas used by OpenPinch analysis services.
- class OpenPinch.lib.schemas.targets.BaseTargetModel(*, zone_name=None, state_id=None, state_idx=None, name, type, parent_zone=None, config=<factory>, active=True)[source]
Bases:
BaseModelShared metadata for all solved target objects.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.targets.DirectHeatPumpTarget(*, zone_name=None, state_id=None, state_idx=None, name, type, parent_zone=None, config=<factory>, active=True, hot_utilities=<factory>, cold_utilities=<factory>, hot_utility_target=0.0, cold_utility_target=0.0, heat_recovery_target=0.0, heat_recovery_limit=None, degree_of_int=None, utility_cost=0.0, hot_pinch=None, cold_pinch=None, graphs=<factory>, pt, work_target=None, turbine_efficiency_target=None, hpr_cycle, hpr_utility_total, hpr_work, hpr_external_utility, hpr_ambient_hot, hpr_ambient_cold, hpr_cop, hpr_eta_he, hpr_success, hpr_hot_streams, hpr_cold_streams, hpr_details)[source]
Bases:
HeatPumpTargetBaseDirect heat pump targeting result.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
zone_name (str | None)
state_id (str | None)
state_idx (int | None)
name (str)
type (str)
parent_zone (Any)
config (Configuration)
active (bool)
hot_utilities (StreamCollection)
cold_utilities (StreamCollection)
hot_utility_target (float)
cold_utility_target (float)
heat_recovery_target (float)
heat_recovery_limit (float | None)
degree_of_int (float | None)
utility_cost (float)
hot_pinch (float | None)
cold_pinch (float | None)
pt (ProblemTable)
work_target (float | None)
turbine_efficiency_target (float | None)
hpr_cycle (str)
hpr_utility_total (Any)
hpr_work (Any)
hpr_external_utility (Any)
hpr_ambient_hot (Any)
hpr_ambient_cold (Any)
hpr_cop (Any)
hpr_eta_he (Any)
hpr_success (bool)
hpr_hot_streams (StreamCollection)
hpr_cold_streams (StreamCollection)
hpr_details (Any)
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.targets.DirectIntegrationTarget(*, zone_name=None, state_id=None, state_idx=None, name, type, parent_zone=None, config=<factory>, active=True, hot_utilities=<factory>, cold_utilities=<factory>, hot_utility_target, cold_utility_target, heat_recovery_target, heat_recovery_limit=None, degree_of_int=None, utility_cost=0.0, hot_pinch=None, cold_pinch=None, graphs=<factory>, pt, pt_real, utility_heat_recovery_target=None, area=None, num_units=None, capital_cost=None, total_cost=None, exergy_sinks=None, exergy_sources=None, exergy_des_min=None, exergy_req_min=None, ETE=None, work_target=None, turbine_efficiency_target=None)[source]
Bases:
GraphBackedTarget,UtilitySummaryTargetDetailed direct-integration runtime target.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
zone_name (str | None)
state_id (str | None)
state_idx (int | None)
name (str)
type (str)
parent_zone (Any)
config (Configuration)
active (bool)
hot_utilities (StreamCollection)
cold_utilities (StreamCollection)
hot_utility_target (float)
cold_utility_target (float)
heat_recovery_target (float)
heat_recovery_limit (float | None)
degree_of_int (float | None)
utility_cost (float)
hot_pinch (float | None)
cold_pinch (float | None)
pt (ProblemTable)
pt_real (ProblemTable)
utility_heat_recovery_target (float | None)
area (float | None)
num_units (float | None)
capital_cost (float | None)
total_cost (float | None)
exergy_sinks (float | None)
exergy_sources (float | None)
exergy_des_min (float | None)
exergy_req_min (float | None)
ETE (float | None)
work_target (float | None)
turbine_efficiency_target (float | None)
- to_target_results(isTotal=False)[source]
Return the reporting payload including DI-only cost and work fields.
- Parameters:
isTotal (bool)
- Return type:
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.targets.DirectRefrigerationTarget(*, zone_name=None, state_id=None, state_idx=None, name, type, parent_zone=None, config=<factory>, active=True, hot_utilities=<factory>, cold_utilities=<factory>, hot_utility_target=0.0, cold_utility_target=0.0, heat_recovery_target=0.0, heat_recovery_limit=None, degree_of_int=None, utility_cost=0.0, hot_pinch=None, cold_pinch=None, graphs=<factory>, pt, work_target=None, turbine_efficiency_target=None, hpr_cycle, hpr_utility_total, hpr_work, hpr_external_utility, hpr_ambient_hot, hpr_ambient_cold, hpr_cop, hpr_eta_he, hpr_success, hpr_hot_streams, hpr_cold_streams, hpr_details)[source]
Bases:
HeatPumpTargetBaseDirect refrigeration targeting result.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
zone_name (str | None)
state_id (str | None)
state_idx (int | None)
name (str)
type (str)
parent_zone (Any)
config (Configuration)
active (bool)
hot_utilities (StreamCollection)
cold_utilities (StreamCollection)
hot_utility_target (float)
cold_utility_target (float)
heat_recovery_target (float)
heat_recovery_limit (float | None)
degree_of_int (float | None)
utility_cost (float)
hot_pinch (float | None)
cold_pinch (float | None)
pt (ProblemTable)
work_target (float | None)
turbine_efficiency_target (float | None)
hpr_cycle (str)
hpr_utility_total (Any)
hpr_work (Any)
hpr_external_utility (Any)
hpr_ambient_hot (Any)
hpr_ambient_cold (Any)
hpr_cop (Any)
hpr_eta_he (Any)
hpr_success (bool)
hpr_hot_streams (StreamCollection)
hpr_cold_streams (StreamCollection)
hpr_details (Any)
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.targets.HeatPumpTargetBase(*, zone_name=None, state_id=None, state_idx=None, name, type, parent_zone=None, config=<factory>, active=True, hot_utilities=<factory>, cold_utilities=<factory>, hot_utility_target=0.0, cold_utility_target=0.0, heat_recovery_target=0.0, heat_recovery_limit=None, degree_of_int=None, utility_cost=0.0, hot_pinch=None, cold_pinch=None, graphs=<factory>, pt, work_target=None, turbine_efficiency_target=None, hpr_cycle, hpr_utility_total, hpr_work, hpr_external_utility, hpr_ambient_hot, hpr_ambient_cold, hpr_cop, hpr_eta_he, hpr_success, hpr_hot_streams, hpr_cold_streams, hpr_details)[source]
Bases:
GraphBackedTarget,UtilitySummaryTargetBase contract for advanced HPR targets from explicit
target_*methods.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
zone_name (str | None)
state_id (str | None)
state_idx (int | None)
name (str)
type (str)
parent_zone (Any)
config (Configuration)
active (bool)
hot_utilities (StreamCollection)
cold_utilities (StreamCollection)
hot_utility_target (float)
cold_utility_target (float)
heat_recovery_target (float)
heat_recovery_limit (float | None)
degree_of_int (float | None)
utility_cost (float)
hot_pinch (float | None)
cold_pinch (float | None)
pt (ProblemTable)
work_target (float | None)
turbine_efficiency_target (float | None)
hpr_cycle (str)
hpr_utility_total (Any)
hpr_work (Any)
hpr_external_utility (Any)
hpr_ambient_hot (Any)
hpr_ambient_cold (Any)
hpr_cop (Any)
hpr_eta_he (Any)
hpr_success (bool)
hpr_hot_streams (StreamCollection)
hpr_cold_streams (StreamCollection)
hpr_details (Any)
- to_target_results(isTotal=False)[source]
Return the reporting payload for explicit HPR target results.
- Parameters:
isTotal (bool)
- Return type:
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.targets.IndirectHeatPumpTarget(*, zone_name=None, state_id=None, state_idx=None, name, type, parent_zone=None, config=<factory>, active=True, hot_utilities=<factory>, cold_utilities=<factory>, hot_utility_target=0.0, cold_utility_target=0.0, heat_recovery_target=0.0, heat_recovery_limit=None, degree_of_int=None, utility_cost=0.0, hot_pinch=None, cold_pinch=None, graphs=<factory>, pt, work_target=None, turbine_efficiency_target=None, hpr_cycle, hpr_utility_total, hpr_work, hpr_external_utility, hpr_ambient_hot, hpr_ambient_cold, hpr_cop, hpr_eta_he, hpr_success, hpr_hot_streams, hpr_cold_streams, hpr_details)[source]
Bases:
HeatPumpTargetBaseIndirect heat pump targeting result.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
zone_name (str | None)
state_id (str | None)
state_idx (int | None)
name (str)
type (str)
parent_zone (Any)
config (Configuration)
active (bool)
hot_utilities (StreamCollection)
cold_utilities (StreamCollection)
hot_utility_target (float)
cold_utility_target (float)
heat_recovery_target (float)
heat_recovery_limit (float | None)
degree_of_int (float | None)
utility_cost (float)
hot_pinch (float | None)
cold_pinch (float | None)
pt (ProblemTable)
work_target (float | None)
turbine_efficiency_target (float | None)
hpr_cycle (str)
hpr_utility_total (Any)
hpr_work (Any)
hpr_external_utility (Any)
hpr_ambient_hot (Any)
hpr_ambient_cold (Any)
hpr_cop (Any)
hpr_eta_he (Any)
hpr_success (bool)
hpr_hot_streams (StreamCollection)
hpr_cold_streams (StreamCollection)
hpr_details (Any)
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.targets.IndirectRefrigerationTarget(*, zone_name=None, state_id=None, state_idx=None, name, type, parent_zone=None, config=<factory>, active=True, hot_utilities=<factory>, cold_utilities=<factory>, hot_utility_target=0.0, cold_utility_target=0.0, heat_recovery_target=0.0, heat_recovery_limit=None, degree_of_int=None, utility_cost=0.0, hot_pinch=None, cold_pinch=None, graphs=<factory>, pt, work_target=None, turbine_efficiency_target=None, hpr_cycle, hpr_utility_total, hpr_work, hpr_external_utility, hpr_ambient_hot, hpr_ambient_cold, hpr_cop, hpr_eta_he, hpr_success, hpr_hot_streams, hpr_cold_streams, hpr_details)[source]
Bases:
HeatPumpTargetBaseIndirect refrigeration targeting result.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
zone_name (str | None)
state_id (str | None)
state_idx (int | None)
name (str)
type (str)
parent_zone (Any)
config (Configuration)
active (bool)
hot_utilities (StreamCollection)
cold_utilities (StreamCollection)
hot_utility_target (float)
cold_utility_target (float)
heat_recovery_target (float)
heat_recovery_limit (float | None)
degree_of_int (float | None)
utility_cost (float)
hot_pinch (float | None)
cold_pinch (float | None)
pt (ProblemTable)
work_target (float | None)
turbine_efficiency_target (float | None)
hpr_cycle (str)
hpr_utility_total (Any)
hpr_work (Any)
hpr_external_utility (Any)
hpr_ambient_hot (Any)
hpr_ambient_cold (Any)
hpr_cop (Any)
hpr_eta_he (Any)
hpr_success (bool)
hpr_hot_streams (StreamCollection)
hpr_cold_streams (StreamCollection)
hpr_details (Any)
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.targets.TotalProcessTarget(*, zone_name=None, state_id=None, state_idx=None, name, type, parent_zone=None, config=<factory>, active=True, hot_utilities=<factory>, cold_utilities=<factory>, hot_utility_target, cold_utility_target, heat_recovery_target, heat_recovery_limit=None, degree_of_int=None, utility_cost=0.0, hot_pinch=None, cold_pinch=None)[source]
Bases:
UtilitySummaryTargetAggregated process-level utility summary built from solved subzones.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
zone_name (str | None)
state_id (str | None)
state_idx (int | None)
name (str)
type (str)
parent_zone (Any)
config (Configuration)
active (bool)
hot_utilities (StreamCollection)
cold_utilities (StreamCollection)
hot_utility_target (float)
cold_utility_target (float)
heat_recovery_target (float)
heat_recovery_limit (float | None)
degree_of_int (float | None)
utility_cost (float)
hot_pinch (float | None)
cold_pinch (float | None)
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.targets.TotalSiteTarget(*, zone_name=None, state_id=None, state_idx=None, name, type, parent_zone=None, config=<factory>, active=True, hot_utilities=<factory>, cold_utilities=<factory>, hot_utility_target, cold_utility_target, heat_recovery_target, heat_recovery_limit=None, degree_of_int=None, utility_cost=0.0, hot_pinch=None, cold_pinch=None, graphs=<factory>, pt, work_target=None, turbine_efficiency_target=None)[source]
Bases:
GraphBackedTarget,UtilitySummaryTargetTotal Site / indirect integration target with site Problem Tables and graphs.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
zone_name (str | None)
state_id (str | None)
state_idx (int | None)
name (str)
type (str)
parent_zone (Any)
config (Configuration)
active (bool)
hot_utilities (StreamCollection)
cold_utilities (StreamCollection)
hot_utility_target (float)
cold_utility_target (float)
heat_recovery_target (float)
heat_recovery_limit (float | None)
degree_of_int (float | None)
utility_cost (float)
hot_pinch (float | None)
cold_pinch (float | None)
pt (ProblemTable)
work_target (float | None)
turbine_efficiency_target (float | None)
- to_target_results(isTotal=False)[source]
Return the reporting payload including Total Site work fields.
- Parameters:
isTotal (bool)
- Return type:
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.targets.UtilitySummaryTarget(*, zone_name=None, state_id=None, state_idx=None, name, type, parent_zone=None, config=<factory>, active=True, hot_utilities=<factory>, cold_utilities=<factory>, hot_utility_target, cold_utility_target, heat_recovery_target, heat_recovery_limit=None, degree_of_int=None, utility_cost=0.0, hot_pinch=None, cold_pinch=None)[source]
Bases:
BaseTargetModelTarget that returns utility duties and recovered-heat summaries.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
zone_name (str | None)
state_id (str | None)
state_idx (int | None)
name (str)
type (str)
parent_zone (Any)
config (Configuration)
active (bool)
hot_utilities (StreamCollection)
cold_utilities (StreamCollection)
hot_utility_target (float)
cold_utility_target (float)
heat_recovery_target (float)
heat_recovery_limit (float | None)
degree_of_int (float | None)
utility_cost (float)
hot_pinch (float | None)
cold_pinch (float | None)
- property utility_streams: StreamCollection
Return hot and cold utilities as one combined collection.
- calc_utility_cost()[source]
Calculate and cache the total utility cost across attached utilities.
- Return type:
- to_target_results(isTotal=False)[source]
Return the common reporting payload for utility-summary targets.
- Parameters:
isTotal (bool)
- Return type:
- model_config = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Schemas for turbine solve outputs.
- class OpenPinch.lib.schemas.turbine.TurbineSolveResult(*, mode, turbine_model, load_frac, mech_eff, min_eff, is_high_p_cond_flash, total_work, total_isentropic_work, overall_efficiency, total_process_duty, steam_mass_flow_in=None, inlet_pressure=None, inlet_temperature=None, sink_pressure=None, sink_temperature=None, stage_temperatures=<factory>, stage_heat_flows=<factory>, stages=<factory>)[source]
Bases:
BaseModelValidated output for a multi-stage turbine targeting solve.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
mode (str)
turbine_model (str)
load_frac (float)
mech_eff (float)
min_eff (float)
is_high_p_cond_flash (bool)
total_work (float)
total_isentropic_work (float)
overall_efficiency (float)
total_process_duty (float)
steam_mass_flow_in (float | None)
inlet_pressure (float | None)
inlet_temperature (float | None)
sink_pressure (float | None)
sink_temperature (float | None)
stages (List[TurbineStageResult])
- model_config = {'extra': 'forbid'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class OpenPinch.lib.schemas.turbine.TurbineStageResult(*, stage, source_index, stage_type, temperature, process_duty, pressure_in, pressure_out, mass_flow_in, mass_flow_extracted, mass_flow_out, enthalpy_in, enthalpy_out, condensate_enthalpy, saturation_enthalpy, dh_isentropic, work_actual, work_isentropic, isentropic_efficiency, turbine_model)[source]
Bases:
BaseModelDetailed result for one solved turbine stage.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
stage (int)
source_index (int)
stage_type (str)
temperature (float)
process_duty (float)
pressure_in (float)
pressure_out (float)
mass_flow_in (float)
mass_flow_extracted (float)
mass_flow_out (float)
enthalpy_in (float)
enthalpy_out (float)
condensate_enthalpy (float)
saturation_enthalpy (float)
dh_isentropic (float)
work_actual (float)
work_isentropic (float)
isentropic_efficiency (float)
turbine_model (str)
- model_config = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].