Coverage for backend/ahuora-compounds/ahuora_property_packages/modular/template_builder.py: 67%
12 statements
« prev ^ index » next coverage.py v7.10.7, created at 2026-07-22 05:22 +0000
« prev ^ index » next coverage.py v7.10.7, created at 2026-07-22 05:22 +0000
2from ahuora_property_packages.modular.templates.pengrobinson import build_pr_configuration, build_coolprop_configuration
3from .modular_extended import GenericExtendedParameterBlock
4from ahuora_compounds.CompoundDB import get_compounds
5from ahuora_property_packages.types import States
6from typing import List
8"""
9Creates an idaes property package, to follow the template found at:
10https://idaes-pse.readthedocs.io/en/stable/explanations/components/property_package/general/index.html
12"""
14def build_peng_robinson( compound_names: List[str], valid_states: List[States]) -> dict[str,any]:
15 compounds = get_compounds(compound_names)
16 # Building configuration and returning
17 return GenericExtendedParameterBlock(**build_pr_configuration(compounds, valid_states))
19def build_coolprop( compound_names: List[str], valid_states: List[States]) -> dict[str,any]:
20 compounds = get_compounds(compound_names)
21 # Building configuration and returning
22 return GenericExtendedParameterBlock(**build_coolprop_configuration(compounds, valid_states))