Coverage for backend/django/flowsheetInternals/unitops/config/objects/d_tsat_willans_config.py: 100%
9 statements
« prev ^ index » next coverage.py v7.10.7, created at 2026-05-13 02:47 +0000
« prev ^ index » next coverage.py v7.10.7, created at 2026-05-13 02:47 +0000
1from common.config_types import *
2from common.config_utils import *
3from ..spec_helpers import *
4from .turbine_config import properties_default
5from ..reusable_config.turbine_ports_config import turbine_ports
6from .willans_turbine_config import properties_willans
7from .pl_willans_config import pl_willans_properties
9# Define properties for Willans turbine:
11properties = properties_default | properties_willans | pl_willans_properties
13d_tsat_willans_config: ObjectType = ObjectType(
14 displayType="Delta Tsat Willans Turbine",
15 displayName="Delta Tsat Willans Turbine",
16 ports=turbine_ports,
17 propertyPackagePorts=default_property_package_ports(),
18 graphicObject=unitop_graphic(),
19 properties=properties,
20 propertySetGroups={
21 "default": PropertySetType(
22 type="stateVars",
23 displayName="Properties",
24 stateVars=("willans_max_mol", "deltaP_inverted", "efficiency_motor"),
25 )
26 },
27 keyProperties=[
28 "work_mechanical",
29 "willans_intercept",
30 "willans_slope",
31 "willans_a",
32 "willans_b",
33 "willans_efficiency",
34 ],
35 # Practically identical to a compressor.
36 # An expander is called a turbine in IDAES.
37 idaes_adapter=UnitModelAdapter(
38 args=ArgAdapter({
39 "property_package": PropertyPackageAdapter(),
40 "power_property_package": ConstantSchemaAdapter(PowerPPArgSchema()),
41 "dynamic": ConstantArg(False),
42 "calculation_method": ConstantArg("Tsat_willans"),
43 }),
44 properties=SerialisePropertiesAdapter(),
45 ports=SerialisePortAdapter()
46 ),
47)