moonbit-energybalance

    A MoonBit library for process energy balance, thermodynamic property estimates, equipment screening, reaction heat, and process analysis.

    energy-balance
    enthalpy
    heat-exchanger
    thermodynamics
    process-engineering
    Download zip
    Version
    0.2.3
    License
    Apache-2.0
    Last updated
    2 months ago
    Downloads
    46

    No dependencies

    #moonbit-energybalance

    moonbit-energybalance is a MoonBit library for process energy calculations: enthalpy flow, heat duty, phase change, heat exchangers, utilities, reaction heat, psychrometrics, steam properties, network propagation, and equipment sizing helpers.

    It is designed for process-model prototypes, teaching examples, equipment screening, and reusable MoonBit numerical workflows. The calculation basis is explicit: temperature is K unless a function name says _c, pressure is kPa unless stated otherwise, molar flow is mol/s, molar enthalpy is J/mol, mass enthalpy is kJ/kg, and duty is W.

    #Core capabilities

    • Thermodynamic primitives: constant, linear, and polynomial Cp(T), explicit reference states, formation enthalpy, latent-heat events, and unit helpers.
    • Streams and balances: pure or mixed streams, enthalpy and heat-capacity flow, steady-state balances, validation reports, snapshots, and CSV exports.
    • Equipment: heaters, coolers, mixers, splitters, flash vaporization, LMTD/UA, effectiveness-NTU, pinch targets, heat recovery, and equipment sizing.
    • Property estimates: moist-air humidity ratio, enthalpy, dew point, wet bulb, steam states and interpolation tables, and common water transport properties.
    • Process analysis: reaction stoichiometry and duty, kinetics, recycle convergence, network propagation, scheduling, sensitivity, uncertainty, dynamic lumped heating, utility cost estimates, and operating-envelope scanning with Pareto selection, ramp planning, and CSV reporting.

    The correlations are deterministic screening models. Their assumptions and validity ranges are documented in docs/engineering-notes.md; they are not a replacement for certified property packages or detailed design codes.

    #Quick start

    Construct a stream and evaluate its sensible duty:

    ///|
    test "README sensible heater example" {
    let water = water_liquid()
    let feed = Stream::pure(
    id="feed",
    substance=water,
    molar_flow=2.0,
    temperature=293.15,
    )
    let hot = feed.with_temperature(333.15)
    inspect(heat_duty(feed, hot).round(), content="6024")
    }

    The runnable demo is in cmd/main. The library has no runtime configuration and no network or file-system dependency.

    #CLI

    Run the demo:

    moon run cmd/main

    Run the deterministic native benchmark:

    moon run --target native benchmarks

    The benchmark prints its workload, iteration count, checksum, average duty, and average balance residual. A captured run and the exact environment are in docs/benchmarks/results.md.

    #Architecture

    The root package is the public facade. Files are organized by domain: types/substance/stream form the thermodynamic core; balance, unit_operations, and heat_exchanger provide process operations; psychrometrics, steam_, and fluid_properties provide property estimates; reaction_, network*, sensitivity, uncertainty, dynamics, and operating_costs provide analysis layers. operating_envelope provides constraint-aware process windows, grid evaluation, multi-objective selection, and operating plans. cmd/main is the usage demo and benchmarks is an independent native executable.

    #Tests

    The test suite covers normal calculations and boundary behavior including empty mixtures, invalid fractions and temperatures, equal-temperature LMTD, latent heat crossings, near-singular utility calculations, missing network inputs, non-convergent recycle factors, capped kinetics, and zero-duration dynamics. Operating-envelope tests also cover invalid constraints, empty selections, duplicate points, feasibility projection, interpolation, Pareto selection, reverse ramps, and deterministic report exports.

    moon fmt --check moon check --target all --deny-warn moon test --target all --deny-warn moon coverage analyze

    #CI

    GitHub Actions checks formatting, all MoonBit targets, warnings, tests, coverage, generated interface drift, and the native benchmark. The workflow installs the current stable MoonBit CLI on each runner.

    #License

    Apache-2.0. See LICENSE.

    AirConditioningReport

    pub struct AirConditioningReport {
    inlet : PsychrometricPoint
    outlet : PsychrometricPoint
    dry_air_mass_flow_kg_per_s : Double
    cooling_duty_w : Double
    sensible_duty_w : Double
    latent_duty_w : Double
    condensate_kg_per_s : Double
    sensible_heat_ratio : Double
    } derive(
    Debug
    )

    AuditFinding

    pub struct AuditFinding {
    code : AuditFindingCode
    message : String
    magnitude : Double
    } derive(
    Debug
    )

    AuditFindingCode

    pub(all) enum AuditFindingCode {
    BalanceResidual
    InvalidStream
    EmptyInlet
    EmptyOutlet
    NegativeDuty
    } derive(Eq,
    Debug
    )

    AuditReport

    pub struct AuditReport {
    accepted : Bool
    finding_count : Int
    residual : Double
    findings : Array[AuditFinding]
    } derive(
    Debug
    )

    BalanceResult

    pub struct BalanceResult {
    inlet_enthalpy_flow : Double
    outlet_enthalpy_flow : Double
    heat : Double
    shaft_work : Double
    residual : Double
    } derive(
    Debug
    )

    BalanceTerms

    pub struct BalanceTerms {
    heat : Double
    shaft_work : Double
    kinetic : Double
    potential : Double
    } derive(
    Debug
    )

    BalanceTerms::BalanceTerms

    fn BalanceTerms::BalanceTerms(heat? : Double, shaft_work? : Double, kinetic? : Double, potential? : Double) -> BalanceTerms

    BenchmarkResult

    pub struct BenchmarkResult {
    workload : String
    iterations : Int
    checksum : Double
    total_duty_w : Double
    total_residual_w : Double
    } derive(
    Debug
    )

    CaseStudyResult

    pub struct CaseStudyResult {
    id : String
    duty_w : Double
    mass_flow_kg_per_s : Double
    equipment_area_m2 : Double
    quality_score : Double
    summary : String
    } derive(
    Debug
    )

    ComponentFlow

    pub struct ComponentFlow {
    substance : Substance
    molar_flow : Double
    } derive(
    Debug
    )

    ComponentFlow::ComponentFlow

    fn ComponentFlow::ComponentFlow(substance~ : Substance, molar_flow~ : Double) -> ComponentFlow

    ConvergenceResult

    pub struct ConvergenceResult {
    value : Double
    iterations : Int
    residual : Double
    converged : Bool
    } derive(
    Debug
    )

    CoolingCase

    pub struct CoolingCase {
    id : String
    feed : Stream
    target_temperature : Double
    } derive(
    Debug
    )

    CoolingCase::CoolingCase

    fn CoolingCase::CoolingCase(id~ : String, feed~ : Stream, target_temperature~ : Double) -> CoolingCase

    CostEstimate

    pub struct CostEstimate {
    name : String
    annual_cost : Double
    annual_energy_kwh : Double
    annual_emissions_kg : Double
    utility_flow_kg_per_s : Double
    } derive(
    Debug
    )

    CpModel

    pub(all) enum CpModel {
    Constant(Double)
    Linear(Double, Double)
    Polynomial(Double, Double, Double, Double)
    } derive(
    Debug
    )

    CpModel::cp_at

    fn CpModel::cp_at(self : CpModel, temperature : Double) -> Double

    CpModel::integral

    fn CpModel::integral(self : CpModel, t0 : Double, t1 : Double) -> Double

    DutyReport

    pub struct DutyReport {
    unit_id : String
    inlet_id : String
    outlet_id : String
    inlet_temperature : Double
    outlet_temperature : Double
    molar_flow : Double
    duty : Double
    service_hint : String
    } derive(
    Debug
    )

    DutyReport::summary

    fn DutyReport::summary(self : DutyReport) -> String

    DynamicThermalState

    pub struct DynamicThermalState {
    time_s : Double
    temperature_k : Double
    energy_j : Double
    duty_w : Double
    } derive(
    Debug
    )

    EnvelopeSelection

    pub struct EnvelopeSelection {
    point : OperatingPoint
    objective_value : Double
    rank : Int
    explanation : String
    } derive(
    Debug
    )

    EnvelopeStatus

    pub(all) enum EnvelopeStatus {
    Feasible
    Infeasible
    InvalidInput
    } derive(Eq,
    Debug
    )

    EnvelopeSummary

    pub struct EnvelopeSummary {
    point_count : Int
    feasible_count : Int
    infeasible_count : Int
    minimum_duty_w : Double
    maximum_duty_w : Double
    minimum_cost_per_h : Double
    maximum_cost_per_h : Double
    average_temperature_k : Double
    average_flow_kg_per_s : Double
    } derive(
    Debug
    )

    ExchangerCase

    pub struct ExchangerCase {
    id : String
    hot_in : Stream
    hot_out_temperature : Double
    cold_in : Stream
    cold_out_temperature : Double
    arrangement : FlowArrangement
    } derive(
    Debug
    )

    ExchangerCase::ExchangerCase

    fn ExchangerCase::ExchangerCase(id~ : String, hot_in~ : Stream, hot_out_temperature~ : Double, cold_in~ : Stream, cold_out_temperature~ : Double, arrangement? : FlowArrangement) -> ExchangerCase

    FlashResult

    pub struct FlashResult {
    vapor : Stream
    liquid : Stream
    duty : Double
    vapor_fraction : Double
    } derive(
    Debug
    )

    FlowArrangement

    pub(all) enum FlowArrangement {
    CounterCurrent
    Parallel
    } derive(Eq,
    Debug
    )

    FluidProperties

    pub struct FluidProperties {
    temperature_c : Double
    density_kg_per_m3 : Double
    viscosity_pa_s : Double
    heat_capacity_j_per_kg_k : Double
    thermal_conductivity_w_per_m_k : Double
    vapor_pressure_kpa : Double
    } derive(
    Debug
    )

    HeatExchangerResult

    pub struct HeatExchangerResult {
    hot_out : Stream
    cold_out : Stream
    duty : Double
    lmtd : Double
    ua : Double
    heat_recovery_fraction : Double
    } derive(
    Debug
    )

    HeatRecoveryMatch

    pub struct HeatRecoveryMatch {
    hot_id : String
    cold_id : String
    duty_kw : Double
    hot_outlet_c : Double
    cold_outlet_c : Double
    feasible : Bool
    } derive(
    Debug
    )

    HeaterResult

    pub struct HeaterResult {
    outlet : Stream
    duty : Double
    } derive(
    Debug
    )

    HeaterSizing

    pub struct HeaterSizing {
    process_duty_w : Double
    design_duty_w : Double
    area_m2 : Double
    overall_u_w_per_m2_k : Double
    approach_k : Double
    } derive(
    Debug
    )

    HeatingCase

    pub struct HeatingCase {
    id : String
    feed : Stream
    target_temperature : Double
    } derive(
    Debug
    )

    HeatingCase::HeatingCase

    fn HeatingCase::HeatingCase(id~ : String, feed~ : Stream, target_temperature~ : Double) -> HeatingCase

    KineticModel

    pub(all) enum KineticModel {
    FirstOrder(rate_constant~ : Double)
    SecondOrder(rate_constant~ : Double)
    Arrhenius(pre_exponential~ : Double, activation_energy_j_per_mol~ : Double)
    } derive(
    Debug
    )

    KineticPoint

    pub struct KineticPoint {
    time_s : Double
    concentration : Double
    conversion : Double
    rate_mol_per_m3_s : Double
    } derive(
    Debug
    )

    LatentHeat

    pub struct LatentHeat {
    transition_temperature : Double
    heat : Double
    direction : PhaseChangeDirection
    } derive(
    Debug
    )

    NetworkConnection

    pub struct NetworkConnection {
    source_id : String
    target_id : String
    fraction : Double
    } derive(
    Debug
    )

    NetworkConnection::NetworkConnection

    fn NetworkConnection::NetworkConnection(source_id~ : String, target_id~ : String, fraction~ : Double) -> NetworkConnection

    NetworkResult

    pub struct NetworkResult {
    streams : Array[Stream]
    terminal_ids : Array[String]
    iterations : Int
    converged : Bool
    unresolved_connections : Int
    } derive(
    Debug
    )

    ObjectiveDirection

    pub(all) enum ObjectiveDirection {
    Minimize
    Maximize
    } derive(Eq,
    Debug
    )

    OperatingConstraints

    pub struct OperatingConstraints {
    minimum_temperature_k : Double
    maximum_temperature_k : Double
    minimum_flow_kg_per_s : Double
    maximum_flow_kg_per_s : Double
    minimum_pressure_kpa : Double
    maximum_pressure_kpa : Double
    minimum_duty_w : Double
    maximum_duty_w : Double
    maximum_cost_per_h : Double
    } derive(
    Debug
    )

    OperatingConstraints::new

    fn OperatingConstraints::new(minimum_temperature_k~ : Double, maximum_temperature_k~ : Double, minimum_flow_kg_per_s~ : Double, maximum_flow_kg_per_s~ : Double, minimum_pressure_kpa~ : Double, maximum_pressure_kpa~ : Double, minimum_duty_w~ : Double, maximum_duty_w~ : Double, maximum_cost_per_h~ : Double) -> OperatingConstraints

    OperatingEnvelope

    pub struct OperatingEnvelope {
    points : Array[OperatingPoint]
    constraints : OperatingConstraints
    summary : EnvelopeSummary
    } derive(
    Debug
    )

    OperatingPoint

    pub struct OperatingPoint {
    temperature_k : Double
    flow_kg_per_s : Double
    pressure_kpa : Double
    duty_w : Double
    cost_per_h : Double
    emissions_kg_per_h : Double
    score : Double
    status : EnvelopeStatus
    } derive(
    Debug
    )

    Phase

    pub(all) enum Phase {
    Solid
    Liquid
    Vapor
    UnknownPhase
    } derive(Eq,
    Debug
    )

    PhaseChangeDirection

    pub(all) enum PhaseChangeDirection {
    Melt
    Freeze
    Vaporize
    Condense
    } derive(Eq,
    Debug
    )

    PinchTargets

    pub struct PinchTargets {
    hot_target_c : Double
    cold_target_c : Double
    minimum_hot_utility_kw : Double
    minimum_cold_utility_kw : Double
    total_hot_duty_kw : Double
    total_cold_duty_kw : Double
    } derive(
    Debug
    )

    ProcessIssue

    pub struct ProcessIssue {
    code : ProcessIssueCode
    stream_id : String
    message : String
    } derive(
    Debug
    )

    ProcessIssueCode

    pub(all) enum ProcessIssueCode {
    EmptyProcess
    DuplicateStreamId
    NegativeFlowValue
    InvalidTemperatureValue
    EmptyComponentList
    InvalidComposition
    } derive(Eq,
    Debug
    )

    ProcessValidationReport

    pub struct ProcessValidationReport {
    valid : Bool
    issue_count : Int
    issues : Array[ProcessIssue]
    } derive(
    Debug
    )

    ProcessValidationReport::has_code

    PsychrometricPoint

    pub struct PsychrometricPoint {
    dry_bulb_c : Double
    relative_humidity : Double
    humidity_ratio : Double
    enthalpy_kj_per_kg_dry : Double
    dew_point_c : Double
    } derive(
    Debug
    )

    PumpSizing

    pub struct PumpSizing {
    hydraulic_power_w : Double
    shaft_power_w : Double
    pressure_rise_pa : Double
    flow_m3_per_s : Double
    } derive(
    Debug
    )

    QualityGrade

    pub(all) enum QualityGrade {
    Excellent
    Acceptable
    Warning
    Rejected
    } derive(Eq,
    Debug
    )

    QualityResult

    pub struct QualityResult {
    inlet : Double
    outlet : Double
    absolute_error : Double
    relative_error : Double
    tolerance : Double
    accepted : Bool
    } derive(
    Debug
    )

    RampPlan

    pub struct RampPlan {
    points : Array[OperatingPoint]
    total_time_s : Double
    total_energy_j : Double
    maximum_step_temperature_k : Double
    maximum_step_flow_kg_per_s : Double
    valid : Bool
    } derive(
    Debug
    )

    RankineCycleResult

    pub struct RankineCycleResult {
    boiler_duty_w : Double
    turbine_work_w : Double
    pump_work_w : Double
    condenser_duty_w : Double
    net_work_w : Double
    thermal_efficiency : Double
    steam_quality_at_turbine_exit : Double
    } derive(
    Debug
    )

    ReactionBalance

    pub struct ReactionBalance {
    inlet : Array[SpeciesRate]
    outlet : Array[SpeciesRate]
    extent_mol_per_s : Double
    duty_w : Double
    mass_residual_kg_per_s : Double
    } derive(
    Debug
    )

    ReactionSpecies

    pub struct ReactionSpecies {
    id : String
    molar_mass : Double
    formation_enthalpy_kj_per_mol : Double
    } derive(
    Debug
    )

    ReactionSpecies::ReactionSpecies

    fn ReactionSpecies::ReactionSpecies(id~ : String, molar_mass~ : Double, formation_enthalpy_kj_per_mol~ : Double) -> ReactionSpecies

    ReactionTerm

    pub struct ReactionTerm {
    species : ReactionSpecies
    coefficient : Double
    } derive(
    Debug
    )

    ReactionTerm::ReactionTerm

    fn ReactionTerm::ReactionTerm(species~ : ReactionSpecies, coefficient~ : Double) -> ReactionTerm

    ScenarioMatrix

    pub struct ScenarioMatrix {
    points : Array[ScenarioPoint]
    minimum_duty : Double
    maximum_duty : Double
    minimum_area : Double
    maximum_area : Double
    } derive(
    Debug
    )

    ScenarioPoint

    pub struct ScenarioPoint {
    flow : Double
    target_temperature : Double
    duty : Double
    area_m2 : Double
    quality_score : Double
    } derive(
    Debug
    )

    ScenarioResult

    pub struct ScenarioResult {
    id : String
    duty : Double
    description : String
    } derive(
    Debug
    )

    ScheduleResult

    pub struct ScheduleResult {
    entries : Array[ScheduledEntry]
    makespan_h : Double
    critical_unit_id : String
    feasible : Bool
    } derive(
    Debug
    )

    ScheduledEntry

    pub struct ScheduledEntry {
    id : String
    start_h : Double
    finish_h : Double
    slack_h : Double
    } derive(
    Debug
    )

    ScheduledUnit

    pub struct ScheduledUnit {
    id : String
    duration_h : Double
    predecessors : Array[String]
    } derive(
    Debug
    )

    ScheduledUnit::ScheduledUnit

    fn ScheduledUnit::ScheduledUnit(id~ : String, duration_h~ : Double, predecessors~ : Array[String]) -> ScheduledUnit

    SensitivityPoint

    pub struct SensitivityPoint {
    target_temperature : Double
    duty : Double
    derivative : Double
    relative_derivative : Double
    } derive(
    Debug
    )

    SensitivitySweep

    pub struct SensitivitySweep {
    points : Array[SensitivityPoint]
    minimum_duty : Double
    maximum_duty : Double
    } derive(
    Debug
    )

    SpeciesRate

    pub struct SpeciesRate {
    species : ReactionSpecies
    molar_flow : Double
    } derive(
    Debug
    )

    SpeciesRate::SpeciesRate

    fn SpeciesRate::SpeciesRate(species~ : ReactionSpecies, molar_flow~ : Double) -> SpeciesRate

    SteamRegion

    pub(all) enum SteamRegion {
    CompressedLiquid
    SaturatedLiquid
    TwoPhase
    SaturatedVapor
    SuperheatedVapor
    UnknownRegion
    } derive(Eq,
    Debug
    )

    SteamState

    pub struct SteamState {
    temperature_c : Double
    pressure_kpa : Double
    enthalpy_kj_per_kg : Double
    entropy_kj_per_kg_k : Double
    specific_volume_m3_per_kg : Double
    quality : Double
    region : SteamRegion
    } derive(
    Debug
    )

    SteamTableResult

    pub struct SteamTableResult {
    value : Double
    lower_bound : Double
    upper_bound : Double
    clamped : Bool
    valid : Bool
    } derive(
    Debug
    )

    Stream

    pub struct Stream {
    id : String
    temperature : Double
    components : Array[ComponentFlow]
    } derive(
    Debug
    )

    Stream::component_count

    fn Stream::component_count(self : Stream) -> Int

    Stream::component_fraction

    fn Stream::component_fraction(self : Stream, substance_id : String) -> Double

    Stream::enthalpy_flow

    fn Stream::enthalpy_flow(self : Stream) -> Double

    Stream::heat_capacity_flow

    fn Stream::heat_capacity_flow(self : Stream) -> Double

    Stream::mixture

    fn Stream::mixture(id~ : String, components~ : Array[ComponentFlow], temperature~ : Double) -> Stream

    Stream::molar_flow

    fn Stream::molar_flow(self : Stream) -> Double

    Stream::pure

    fn Stream::pure(id~ : String, substance~ : Substance, molar_flow~ : Double, temperature~ : Double) -> Stream

    Stream::with_flow_factor

    fn Stream::with_flow_factor(self : Stream, factor : Double) -> Stream

    Stream::with_id

    fn Stream::with_id(self : Stream, id : String) -> Stream

    Stream::with_temperature

    fn Stream::with_temperature(self : Stream, temperature : Double) -> Stream

    Stream::with_temperature_offset

    fn Stream::with_temperature_offset(self : Stream, delta : Double) -> Stream

    StreamAggregate

    pub struct StreamAggregate {
    count : Int
    total_molar_flow : Double
    total_enthalpy_flow : Double
    weighted_temperature : Double
    total_heat_capacity_flow : Double
    } derive(
    Debug
    )

    StreamSnapshot

    pub struct StreamSnapshot {
    id : String
    temperature : Double
    molar_flow : Double
    enthalpy_flow : Double
    heat_capacity_flow : Double
    component_count : Int
    } derive(
    Debug
    )

    Substance

    pub struct Substance {
    id : String
    name : String
    phase : Phase
    cp_model : CpModel
    reference_temperature : Double
    formation_enthalpy : Double
    latent_heats : Array[LatentHeat]
    } derive(
    Debug
    )

    Substance::constant_cp

    fn Substance::constant_cp(id~ : String, name~ : String, phase~ : Phase, cp~ : Double, reference_temperature~ : Double) -> Substance

    Substance::enthalpy_at

    fn Substance::enthalpy_at(self : Substance, temperature : Double) -> Double

    Substance::linear_cp

    fn Substance::linear_cp(id~ : String, name~ : String, phase~ : Phase, a~ : Double, b~ : Double, reference_temperature~ : Double) -> Substance

    Substance::phase_change_enthalpy_change

    fn Substance::phase_change_enthalpy_change(self : Substance, from_temperature : Double, to_temperature : Double) -> Double

    Substance::polynomial_cp

    fn Substance::polynomial_cp(id~ : String, name~ : String, phase~ : Phase, a~ : Double, b~ : Double, c~ : Double, d~ : Double, reference_temperature~ : Double) -> Substance

    Substance::sensible_enthalpy_change

    fn Substance::sensible_enthalpy_change(self : Substance, from_temperature : Double, to_temperature : Double) -> Double

    Substance::with_formation_enthalpy

    fn Substance::with_formation_enthalpy(self : Substance, value : Double) -> Substance

    Substance::with_latent_heat

    fn Substance::with_latent_heat(self : Substance, transition_temperature~ : Double, heat~ : Double, direction~ : PhaseChangeDirection) -> Substance

    TankSizing

    pub struct TankSizing {
    working_volume_m3 : Double
    volume_m3 : Double
    diameter_m : Double
    height_m : Double
    residence_time_s : Double
    } derive(
    Debug
    )

    ThermalStreamTarget

    pub struct ThermalStreamTarget {
    id : String
    supply_c : Double
    target_c : Double
    heat_capacity_flow_kw_per_k : Double
    } derive(
    Debug
    )

    ThermalStreamTarget::ThermalStreamTarget

    fn ThermalStreamTarget::ThermalStreamTarget(id~ : String, supply_c~ : Double, target_c~ : Double, heat_capacity_flow_kw_per_k~ : Double) -> ThermalStreamTarget

    TurbineExpansionResult

    pub struct TurbineExpansionResult {
    inlet_enthalpy_kj_per_kg : Double
    outlet_enthalpy_kj_per_kg : Double
    specific_work_kj_per_kg : Double
    outlet_quality : Double
    outlet_temperature_c : Double
    } derive(
    Debug
    )

    UncertaintyEnvelope

    pub struct UncertaintyEnvelope {
    nominal : Double
    low : Double
    high : Double
    relative_half_width : Double
    } derive(
    Debug
    )

    UtilityDesign

    pub struct UtilityDesign {
    name : String
    duty_w : Double
    required_mass_flow_kg_per_s : Double
    inlet_temperature_c : Double
    outlet_temperature_c : Double
    cost_index : Double
    } derive(
    Debug
    )

    UtilityEstimate

    pub struct UtilityEstimate {
    name : String
    duty : Double
    required_flow : Double
    inlet_temperature : Double
    outlet_temperature : Double
    } derive(
    Debug
    )

    ValidationIssue

    pub enum ValidationIssue {
    NegativeFlow(String)
    EmptyStream(String)
    NonPositiveTemperature(String)
    InvalidFraction(Double)
    } derive(
    Debug
    )

    absolute_error

    fn absolute_error(actual : Double, expected : Double) -> Double

    absolute_or_floor

    fn absolute_or_floor(value : Double, floor : Double) -> Double

    adiabatic_reaction_temperature

    fn adiabatic_reaction_temperature(inlet_temperature : Double, inlet_heat_capacity_flow : Double, terms : Array[ReactionTerm], extent_mol_per_s : Double) -> Double

    aggregate_streams

    fn aggregate_streams(streams : Array[Stream]) -> StreamAggregate

    agitator_power_w

    fn agitator_power_w(density_kg_per_m3 : Double, impeller_diameter_m : Double, rotational_speed_per_s : Double, power_number : Double) -> Double

    air_conditioning_report

    fn air_conditioning_report(inlet : PsychrometricPoint, outlet : PsychrometricPoint, dry_air_mass_flow_kg_per_s : Double) -> AirConditioningReport

    air_heater_duty_w

    fn air_heater_duty_w(inlet : PsychrometricPoint, outlet_temperature_c : Double, dry_air_mass_flow_kg_per_s : Double) -> Double

    air_mixing_enthalpy

    fn air_mixing_enthalpy(points : Array[PsychrometricPoint], flows : Array[Double]) -> Double

    air_pseudo_component

    fn air_pseudo_component() -> Substance

    air_stream

    fn air_stream(id~ : String, molar_flow~ : Double, temperature~ : Double) -> Stream

    all_processes_valid

    fn all_processes_valid(reports : Array[ProcessValidationReport]) -> Bool

    annualized_capital_cost

    fn annualized_capital_cost(capital_cost : Double, interest_rate : Double, lifetime_years : Int, operating_hours_per_year : Double) -> Double

    apply_reaction

    fn apply_reaction(rates : Array[SpeciesRate], terms : Array[ReactionTerm], requested_extent : Double) -> Array[SpeciesRate]

    arrhenius_rate_constant

    fn arrhenius_rate_constant(activation_energy_j_per_mol : Double, reference_temperature_k : Double, temperature_k : Double) -> Double

    audit_has_code

    fn audit_has_code(report : AuditReport, code : AuditFindingCode) -> Bool

    audit_maximum_magnitude

    fn audit_maximum_magnitude(report : AuditReport) -> Double

    audit_process

    fn audit_process(inlets : Array[Stream], outlets : Array[Stream], heat_duty_w : Double) -> AuditReport

    audit_report_count_by_code

    fn audit_report_count_by_code(reports : Array[AuditReport], code : AuditFindingCode) -> Int

    audit_reports_accepted

    fn audit_reports_accepted(reports : Array[AuditReport]) -> Bool

    audit_summary

    fn audit_summary(report : AuditReport) -> String

    average_heat_capacity

    fn average_heat_capacity(substance : Substance, from_temperature : Double, to_temperature : Double) -> Double

    balance_result_csv_header

    fn balance_result_csv_header() -> String

    balance_result_csv_row

    fn balance_result_csv_row(result : BalanceResult) -> String

    balance_summary

    fn balance_summary(result : BalanceResult) -> String

    bar_to_kpa

    fn bar_to_kpa(pressure_bar : Double) -> Double

    benchmark_average_duty

    fn benchmark_average_duty(result : BenchmarkResult) -> Double

    benchmark_average_residual

    fn benchmark_average_residual(result : BenchmarkResult) -> Double

    benchmark_checksum_is_stable

    fn benchmark_checksum_is_stable(first : BenchmarkResult, second : BenchmarkResult, tolerance : Double) -> Bool

    benchmark_summary

    fn benchmark_summary(result : BenchmarkResult) -> String

    benchmark_workload_name

    fn benchmark_workload_name() -> String

    benzene_liquid

    fn benzene_liquid() -> Substance

    boiler_duty_w

    fn boiler_duty_w(mass_flow_kg_per_s : Double, feedwater : SteamState, steam : SteamState) -> Double

    carbon_cost_model

    fn carbon_cost_model(duty_w : Double, emission_factor_kg_per_kwh : Double, carbon_price_per_kg : Double) -> Double

    carbon_dioxide_gas

    fn carbon_dioxide_gas() -> Substance

    case_study_average_quality

    fn case_study_average_quality(results : Array[CaseStudyResult]) -> Double

    case_study_has_positive_duty

    fn case_study_has_positive_duty(results : Array[CaseStudyResult]) -> Bool

    case_study_summary

    fn case_study_summary(results : Array[CaseStudyResult]) -> String

    case_study_total_duty

    fn case_study_total_duty(results : Array[CaseStudyResult]) -> Double

    celsius_delta_to_kelvin_delta

    fn celsius_delta_to_kelvin_delta(delta_c : Double) -> Double

    celsius_to_kelvin

    fn celsius_to_kelvin(temperature_c : Double) -> Double

    chilled_water_utility

    fn chilled_water_utility(duty_w : Double, inlet_temperature_c : Double, outlet_temperature_c : Double) -> UtilityDesign

    clamp_operating_flow

    fn clamp_operating_flow(value : Double, constraints : OperatingConstraints) -> Double

    clamp_operating_pressure

    fn clamp_operating_pressure(value : Double, constraints : OperatingConstraints) -> Double

    clamp_operating_temperature

    fn clamp_operating_temperature(value : Double, constraints : OperatingConstraints) -> Double

    coil_bypass_factor

    fn coil_bypass_factor(inlet_temperature_c : Double, outlet_temperature_c : Double, apparatus_dew_point_c : Double) -> Double

    coil_contact_factor

    fn coil_contact_factor(bypass_factor : Double) -> Double

    cold_stream_duty_kw

    fn cold_stream_duty_kw(stream : ThermalStreamTarget) -> Double

    combine_uncertainties

    fn combine_uncertainties(first_relative : Double, second_relative : Double) -> Double

    combined_duty_model

    fn combined_duty_model(temperature_k : Double, flow_kg_per_s : Double, pressure_kpa : Double, target_temperature_k : Double, heat_capacity_j_per_kg_k : Double, pump_efficiency : Double) -> Double

    compressor_power_w

    fn compressor_power_w(mass_flow_kg_per_s : Double, inlet_pressure_kpa : Double, outlet_pressure_kpa : Double, efficiency : Double, heat_capacity_ratio : Double) -> Double

    condensate_recovery_heat_kj_per_kg

    fn condensate_recovery_heat_kj_per_kg(pressure_kpa : Double, condensate_temperature_c : Double) -> Double

    condenser_duty_w

    fn condenser_duty_w(mass_flow_kg_per_s : Double, turbine_exit : SteamState, saturated_liquid : SteamState) -> Double

    conservation_error

    fn conservation_error(before : Double, after : Double) -> Double

    conservation_is_closed

    fn conservation_is_closed(before : Double, after : Double, tolerance : Double) -> Bool

    contingency_cost

    fn contingency_cost(base_cost : Double, fraction : Double) -> Double

    convection_resistance_m2_k_per_w

    fn convection_resistance_m2_k_per_w(heat_transfer_coefficient_w_per_m2_k : Double) -> Double

    convergence_quality

    fn convergence_quality(residual : Double, tolerance : Double) -> QualityGrade

    cooler

    fn cooler(inlet : Stream, outlet_temperature : Double) -> HeaterResult

    cooling_water_required

    fn cooling_water_required(duty : Double, cp : Double, delta_t : Double) -> Double

    cooling_water_utility

    fn cooling_water_utility(duty_w : Double, inlet_temperature_c : Double, outlet_temperature_c : Double) -> UtilityDesign

    cost_saving_percent

    fn cost_saving_percent(reference_cost : Double, improved_cost : Double) -> Double

    cost_summary

    fn cost_summary(estimate : CostEstimate) -> String

    critical_entries

    fn critical_entries(schedule : ScheduleResult) -> Array[ScheduledEntry]

    cstr_conversion

    fn cstr_conversion(model : KineticModel, residence_time_s : Double, temperature_k : Double) -> Double

    csv_escape

    fn csv_escape(value : String) -> String

    csv_join

    fn csv_join(values : Array[String]) -> String

    cubic_meters_per_second_to_liters_per_minute

    fn cubic_meters_per_second_to_liters_per_minute(value : Double) -> Double

    cycle_capacity_factor

    fn cycle_capacity_factor(cycle : RankineCycleResult, operating_hours : Double, period_hours : Double) -> Double

    cycle_heat_rate_j_per_j

    fn cycle_heat_rate_j_per_j(cycle : RankineCycleResult) -> Double

    default_operating_point

    fn default_operating_point(constraints : OperatingConstraints) -> OperatingPoint

    dehumidification_point

    fn dehumidification_point(inlet : PsychrometricPoint, target_relative_humidity : Double) -> PsychrometricPoint

    dew_point_c

    fn dew_point_c(dry_bulb_c : Double, humidity_ratio : Double, total_pressure_kpa : Double) -> Double

    discount_factor

    fn discount_factor(discount_rate : Double, year : Int) -> Double

    duty_curvature

    fn duty_curvature(inlet : Stream, target_temperature : Double, step : Double) -> Double

    duty_direction_is_consistent

    fn duty_direction_is_consistent(inlet : Stream, outlet : Stream, expected_heating : Bool) -> Bool

    duty_report

    fn duty_report(unit_id~ : String, inlet : Stream, outlet : Stream) -> DutyReport

    duty_report_csv_row

    fn duty_report_csv_row(report : DutyReport) -> String

    duty_sign_is_robust

    fn duty_sign_is_robust(envelope : UncertaintyEnvelope) -> Bool

    duty_uncertainty_envelope

    fn duty_uncertainty_envelope(inlet : Stream, target_temperature : Double, flow_relative_uncertainty : Double, cp_relative_uncertainty : Double) -> UncertaintyEnvelope

    dynamic_average_temperature

    fn dynamic_average_temperature(states : Array[DynamicThermalState]) -> Double

    dynamic_energy

    fn dynamic_energy(first : DynamicThermalState, last : DynamicThermalState) -> Double

    dynamic_is_monotonic

    fn dynamic_is_monotonic(states : Array[DynamicThermalState], increasing : Bool) -> Bool

    dynamic_peak_duty

    fn dynamic_peak_duty(states : Array[DynamicThermalState]) -> Double

    dynamic_step

    fn dynamic_step(state : DynamicThermalState, target_temperature_k : Double, heat_capacity_j_per_k : Double, overall_u_w_per_k : Double, step_s : Double) -> DynamicThermalState

    dynamic_summary

    fn dynamic_summary(states : Array[DynamicThermalState]) -> String

    dynamic_temperature_error

    fn dynamic_temperature_error(state : DynamicThermalState, target_temperature_k : Double) -> Double

    effectiveness_ntu

    fn effectiveness_ntu(counter_current~ : Bool, c_min : Double, c_max : Double, ua : Double) -> Double

    emissions_saving_kg

    fn emissions_saving_kg(reference : CostEstimate, improved : CostEstimate) -> Double

    empty_envelope

    fn empty_envelope(constraints : OperatingConstraints) -> OperatingEnvelope

    energy_balance_quality

    fn energy_balance_quality(inlet : Double, outlet : Double, tolerance : Double) -> QualityResult

    enthalpy_change_with_formation

    fn enthalpy_change_with_formation(substance : Substance, from_temperature : Double, to_temperature : Double) -> Double

    enthalpy_flow_sum

    fn enthalpy_flow_sum(streams : Array[Stream]) -> Double

    envelope_all_feasible

    fn envelope_all_feasible(envelope : OperatingEnvelope) -> Bool

    envelope_all_valid

    fn envelope_all_valid(envelope : OperatingEnvelope) -> Bool

    envelope_append

    fn envelope_append(first : OperatingEnvelope, second : OperatingEnvelope) -> OperatingEnvelope

    envelope_average_margin

    fn envelope_average_margin(envelope : OperatingEnvelope) -> Double

    envelope_average_score

    fn envelope_average_score(envelope : OperatingEnvelope) -> Double

    envelope_best_by

    fn envelope_best_by(envelope : OperatingEnvelope, direction : ObjectiveDirection, objective : (OperatingPoint) -> Double) -> OperatingPoint?

    envelope_best_by_cost

    fn envelope_best_by_cost(envelope : OperatingEnvelope) -> OperatingPoint?

    envelope_best_by_duty

    fn envelope_best_by_duty(envelope : OperatingEnvelope) -> OperatingPoint?

    envelope_best_by_emissions

    fn envelope_best_by_emissions(envelope : OperatingEnvelope) -> OperatingPoint?

    envelope_best_by_margin

    fn envelope_best_by_margin(envelope : OperatingEnvelope) -> OperatingPoint?

    envelope_best_weighted

    fn envelope_best_weighted(envelope : OperatingEnvelope, cost_weight : Double, duty_weight : Double, emissions_weight : Double, cost_scale : Double, duty_scale : Double, emissions_scale : Double) -> OperatingPoint?

    envelope_center

    fn envelope_center(envelope : OperatingEnvelope) -> OperatingPoint

    envelope_center_is_feasible

    fn envelope_center_is_feasible(envelope : OperatingEnvelope) -> Bool

    envelope_contains_flow

    fn envelope_contains_flow(envelope : OperatingEnvelope, flow_kg_per_s : Double) -> Bool

    envelope_contains_pressure

    fn envelope_contains_pressure(envelope : OperatingEnvelope, pressure_kpa : Double) -> Bool

    envelope_contains_temperature

    fn envelope_contains_temperature(envelope : OperatingEnvelope, temperature_k : Double) -> Bool

    envelope_cost_per_feasible_point

    fn envelope_cost_per_feasible_point(envelope : OperatingEnvelope) -> Double

    envelope_cost_span

    fn envelope_cost_span(envelope : OperatingEnvelope) -> Double

    envelope_cost_window

    fn envelope_cost_window(envelope : OperatingEnvelope) -> (Double, Double)

    envelope_count_by_status

    fn envelope_count_by_status(envelope : OperatingEnvelope, status : EnvelopeStatus) -> Int

    envelope_csv

    fn envelope_csv(envelope : OperatingEnvelope) -> String

    envelope_csv_header

    fn envelope_csv_header() -> String

    envelope_csv_line_count

    fn envelope_csv_line_count(csv : String) -> Int

    envelope_csv_row

    fn envelope_csv_row(point : OperatingPoint) -> String

    envelope_distance_from_center

    fn envelope_distance_from_center(envelope : OperatingEnvelope, point : OperatingPoint) -> Double

    envelope_duty_span

    fn envelope_duty_span(envelope : OperatingEnvelope) -> Double

    envelope_duty_window

    fn envelope_duty_window(envelope : OperatingEnvelope) -> (Double, Double)

    envelope_emissions_per_feasible_point

    fn envelope_emissions_per_feasible_point(envelope : OperatingEnvelope) -> Double

    envelope_energy_report

    fn envelope_energy_report(envelope : OperatingEnvelope) -> String

    envelope_feasibility_report

    fn envelope_feasibility_report(envelope : OperatingEnvelope) -> String

    envelope_feasible_count

    fn envelope_feasible_count(envelope : OperatingEnvelope) -> Int

    envelope_feasible_fraction

    fn envelope_feasible_fraction(envelope : OperatingEnvelope) -> Double

    envelope_feasible_points

    fn envelope_feasible_points(envelope : OperatingEnvelope) -> Array[OperatingPoint]

    envelope_filter

    fn envelope_filter(envelope : OperatingEnvelope, predicate : (OperatingPoint) -> Bool) -> OperatingEnvelope

    envelope_filter_cost

    fn envelope_filter_cost(envelope : OperatingEnvelope, maximum_cost_per_h : Double) -> OperatingEnvelope

    envelope_filter_feasible

    fn envelope_filter_feasible(envelope : OperatingEnvelope) -> OperatingEnvelope

    envelope_filter_margin

    fn envelope_filter_margin(envelope : OperatingEnvelope, minimum_margin : Double) -> OperatingEnvelope

    envelope_filter_negative_duty

    fn envelope_filter_negative_duty(envelope : OperatingEnvelope) -> OperatingEnvelope

    envelope_filter_positive_duty

    fn envelope_filter_positive_duty(envelope : OperatingEnvelope) -> OperatingEnvelope

    envelope_flow_span

    fn envelope_flow_span(envelope : OperatingEnvelope) -> Double

    envelope_from_points

    fn envelope_from_points(points : Array[OperatingPoint], constraints : OperatingConstraints) -> OperatingEnvelope

    envelope_has_feasible_point

    fn envelope_has_feasible_point(envelope : OperatingEnvelope) -> Bool

    envelope_has_invalid_input

    fn envelope_has_invalid_input(envelope : OperatingEnvelope) -> Bool

    envelope_infeasible_points

    fn envelope_infeasible_points(envelope : OperatingEnvelope) -> Array[OperatingPoint]

    envelope_interpolate_flow

    fn envelope_interpolate_flow(first : OperatingPoint, second : OperatingPoint, flow_kg_per_s : Double, constraints : OperatingConstraints) -> OperatingPoint

    envelope_interpolate_temperature

    fn envelope_interpolate_temperature(first : OperatingPoint, second : OperatingPoint, temperature_k : Double, constraints : OperatingConstraints) -> OperatingPoint

    envelope_invalid_points

    fn envelope_invalid_points(envelope : OperatingEnvelope) -> Array[OperatingPoint]

    envelope_is_duplicate_free

    fn envelope_is_duplicate_free(envelope : OperatingEnvelope) -> Bool

    envelope_is_empty

    fn envelope_is_empty(envelope : OperatingEnvelope) -> Bool

    envelope_is_single_point

    fn envelope_is_single_point(envelope : OperatingEnvelope) -> Bool

    envelope_merge_points

    fn envelope_merge_points(points : Array[OperatingPoint], constraints : OperatingConstraints) -> OperatingEnvelope

    envelope_operating_cost_report

    fn envelope_operating_cost_report(envelope : OperatingEnvelope) -> String

    envelope_operating_window

    fn envelope_operating_window(envelope : OperatingEnvelope) -> (Double, Double, Double, Double)

    envelope_pareto_frontier

    fn envelope_pareto_frontier(envelope : OperatingEnvelope, minimize_cost : Bool, minimize_duty : Bool, minimize_emissions : Bool) -> Array[OperatingPoint]

    envelope_point_count

    fn envelope_point_count(envelope : OperatingEnvelope) -> Int

    envelope_point_text

    fn envelope_point_text(point : OperatingPoint) -> String

    envelope_points_in_flow_band

    fn envelope_points_in_flow_band(envelope : OperatingEnvelope, lower_kg_per_s : Double, upper_kg_per_s : Double) -> Array[OperatingPoint]

    envelope_points_in_temperature_band

    fn envelope_points_in_temperature_band(envelope : OperatingEnvelope, lower_k : Double, upper_k : Double) -> Array[OperatingPoint]

    envelope_points_with_minimum_margin

    fn envelope_points_with_minimum_margin(envelope : OperatingEnvelope, margin : Double) -> Array[OperatingPoint]

    envelope_pressure_window

    fn envelope_pressure_window(envelope : OperatingEnvelope) -> (Double, Double)

    envelope_project_and_recalculate

    fn envelope_project_and_recalculate(envelope : OperatingEnvelope) -> OperatingEnvelope

    envelope_project_to_constraints

    fn envelope_project_to_constraints(envelope : OperatingEnvelope) -> OperatingEnvelope

    envelope_quality_index

    fn envelope_quality_index(envelope : OperatingEnvelope) -> Double

    envelope_rank_by_cost

    fn envelope_rank_by_cost(envelope : OperatingEnvelope, point : OperatingPoint) -> Int

    envelope_rank_by_duty

    fn envelope_rank_by_duty(envelope : OperatingEnvelope, point : OperatingPoint) -> Int

    envelope_rank_by_margin

    fn envelope_rank_by_margin(envelope : OperatingEnvelope, point : OperatingPoint) -> Int

    envelope_recalculate_scores

    fn envelope_recalculate_scores(envelope : OperatingEnvelope) -> OperatingEnvelope

    envelope_recompute_status

    fn envelope_recompute_status(envelope : OperatingEnvelope) -> OperatingEnvelope

    envelope_remove_duplicates

    fn envelope_remove_duplicates(envelope : OperatingEnvelope) -> OperatingEnvelope

    envelope_report

    fn envelope_report(envelope : OperatingEnvelope) -> String

    envelope_retain_best_cost

    fn envelope_retain_best_cost(envelope : OperatingEnvelope, limit : Int) -> Array[OperatingPoint]

    envelope_retain_best_duty

    fn envelope_retain_best_duty(envelope : OperatingEnvelope, limit : Int) -> Array[OperatingPoint]

    envelope_retain_best_margin

    fn envelope_retain_best_margin(envelope : OperatingEnvelope, limit : Int) -> Array[OperatingPoint]

    envelope_select_by_target

    fn envelope_select_by_target(envelope : OperatingEnvelope, target_temperature_k : Double, target_flow_kg_per_s : Double) -> OperatingPoint?

    envelope_selection_from_point

    fn envelope_selection_from_point(envelope : OperatingEnvelope, point : OperatingPoint, explanation : String) -> EnvelopeSelection

    envelope_selection_is_valid

    fn envelope_selection_is_valid(selection : EnvelopeSelection) -> Bool

    envelope_selection_text

    fn envelope_selection_text(selection : EnvelopeSelection) -> String

    envelope_stability_index

    fn envelope_stability_index(envelope : OperatingEnvelope) -> Double

    envelope_status_is_consistent

    fn envelope_status_is_consistent(envelope : OperatingEnvelope) -> Bool

    envelope_status_text

    fn envelope_status_text(status : EnvelopeStatus) -> String

    envelope_summary_text

    fn envelope_summary_text(summary : EnvelopeSummary) -> String

    envelope_take_feasible

    fn envelope_take_feasible(envelope : OperatingEnvelope, limit : Int) -> Array[OperatingPoint]

    envelope_temperature_span

    fn envelope_temperature_span(envelope : OperatingEnvelope) -> Double

    envelope_to_rows

    fn envelope_to_rows(envelope : OperatingEnvelope) -> Array[String]

    envelope_total_cost

    fn envelope_total_cost(envelope : OperatingEnvelope) -> Double

    envelope_total_emissions

    fn envelope_total_emissions(envelope : OperatingEnvelope) -> Double

    envelope_total_energy_kwh

    fn envelope_total_energy_kwh(envelope : OperatingEnvelope) -> Double

    envelope_trim_infeasible

    fn envelope_trim_infeasible(envelope : OperatingEnvelope) -> OperatingEnvelope

    envelope_trim_invalid

    fn envelope_trim_invalid(envelope : OperatingEnvelope) -> OperatingEnvelope

    envelope_validate

    fn envelope_validate(envelope : OperatingEnvelope) -> Bool

    envelope_validation_message

    fn envelope_validation_message(envelope : OperatingEnvelope) -> String

    envelope_values_are_finite

    fn envelope_values_are_finite(envelope : OperatingEnvelope) -> Bool

    envelope_weighted_average

    fn envelope_weighted_average(points : Array[OperatingPoint], weights : Array[Double], constraints : OperatingConstraints) -> OperatingPoint

    ethanol_liquid

    fn ethanol_liquid() -> Substance

    evaluate_scenario_matrix

    fn evaluate_scenario_matrix(inlet_temperature : Double, flows : Array[Double], targets : Array[Double]) -> ScenarioMatrix

    evaluate_scenario_point

    fn evaluate_scenario_point(inlet_temperature : Double, flow : Double, target_temperature : Double) -> ScenarioPoint

    evaporative_cooling_duty

    fn evaporative_cooling_duty(dry_air_mass_flow_kg_per_s : Double, from_temperature_c : Double, to_temperature_c : Double, from_ratio : Double, to_ratio : Double) -> Double

    exchanger_area_m2

    fn exchanger_area_m2(duty_w : Double, overall_u_w_per_m2_k : Double, lmtd_k : Double, correction_factor : Double) -> Double

    exchanger_csv_row

    fn exchanger_csv_row(result : HeatExchangerResult) -> String

    exchanger_overdesign_area_m2

    fn exchanger_overdesign_area_m2(required_area_m2 : Double, overdesign_fraction : Double) -> Double

    exchanger_summary

    fn exchanger_summary(result : HeatExchangerResult) -> String

    exchanger_ua

    fn exchanger_ua(duty : Double, lmtd_value : Double) -> Double

    export_line_count

    fn export_line_count(csv : String) -> Int

    feedwater_pump_work_w

    fn feedwater_pump_work_w(mass_flow_kg_per_s : Double, pressure_rise_kpa : Double, density_kg_per_m3 : Double, efficiency : Double) -> Double

    finite_difference

    fn finite_difference(value_minus : Double, value_plus : Double, step : Double) -> Double

    first_order_response

    fn first_order_response(initial_value : Double, target_value : Double, time_s : Double, time_constant_s : Double) -> Double

    flash_vaporize

    fn flash_vaporize(feed : Stream, vapor_substance : Substance, liquid_substance : Substance, vapor_fraction : Double, temperature : Double) -> FlashResult

    flow_sensitivity

    fn flow_sensitivity(inlet : Stream, target_temperature : Double) -> Double

    fraction_array_is_valid

    fn fraction_array_is_valid(values : Array[Double], tolerance : Double) -> Bool

    friction_factor

    fn friction_factor(reynolds : Double, roughness_ratio : Double) -> Double

    generic_substance

    fn generic_substance(id~ : String, name~ : String, cp~ : Double) -> Substance

    has_issues

    fn has_issues(issues : Array[ValidationIssue]) -> Bool

    heat_capacity_flow_is_valid

    fn heat_capacity_flow_is_valid(value : Double) -> Bool

    heat_duty

    fn heat_duty(inlet : Stream, outlet : Stream) -> Double

    heat_exchanger

    fn heat_exchanger(hot_in : Stream, hot_out_temperature : Double, cold_in : Stream, cold_out_temperature : Double, arrangement? : FlowArrangement) -> HeatExchangerResult

    heat_exchanger_temperatures_valid

    fn heat_exchanger_temperatures_valid(hot_in_c : Double, hot_out_c : Double, cold_in_c : Double, cold_out_c : Double, minimum_approach_c : Double) -> Bool

    heat_loss_to_ambient

    fn heat_loss_to_ambient(area_m2 : Double, overall_u_w_per_m2_k : Double, process_temperature_c : Double, ambient_temperature_c : Double) -> Double

    heat_recovery_fraction

    fn heat_recovery_fraction(recovered_duty_kw : Double, available_hot_duty_kw : Double) -> Double

    heater

    fn heater(inlet : Stream, outlet_temperature : Double) -> HeaterResult

    heater_duty_sensitivity

    fn heater_duty_sensitivity(inlet : Stream, target_temperature : Double, step : Double) -> SensitivityPoint

    heater_sensitivity_table

    fn heater_sensitivity_table(inlet : Stream, target_temperatures : Array[Double], step : Double) -> Array[SensitivityPoint]

    heating_coil_point

    fn heating_coil_point(inlet : PsychrometricPoint, target_temperature_c : Double) -> PsychrometricPoint

    hot_stream_duty_kw

    fn hot_stream_duty_kw(stream : ThermalStreamTarget) -> Double

    humidification_point

    fn humidification_point(inlet : PsychrometricPoint, target_humidity_ratio : Double) -> PsychrometricPoint

    humidification_water_duty

    fn humidification_water_duty(dry_air_mass_flow_kg_per_s : Double, from_ratio : Double, to_ratio : Double) -> Double

    humidity_ratio_from_relative_humidity

    fn humidity_ratio_from_relative_humidity(dry_bulb_c : Double, relative_humidity : Double, total_pressure_kpa : Double) -> Double

    humidity_ratio_from_vapor_pressure

    fn humidity_ratio_from_vapor_pressure(vapor_pressure_kpa : Double, total_pressure_kpa : Double) -> Double

    ice_solid

    fn ice_solid() -> Substance

    inflation_adjusted_cost

    fn inflation_adjusted_cost(base_cost : Double, inflation_rate : Double, years : Int) -> Double

    integrate_duty_profile

    fn integrate_duty_profile(times_s : Array[Double], duties_w : Array[Double]) -> Double

    integrate_temperature_profile

    fn integrate_temperature_profile(substance : Substance, points : Array[Double]) -> Double

    interpolate_table

    fn interpolate_table(lower_x : Double, lower_y : Double, upper_x : Double, upper_y : Double, x : Double) -> SteamTableResult

    is_balanced

    fn is_balanced(result : BalanceResult, tolerance? : Double) -> Bool

    issue_count_for_streams

    fn issue_count_for_streams(streams : Array[Stream]) -> Int

    joule_per_kg_to_kilojoule_per_kg

    fn joule_per_kg_to_kilojoule_per_kg(value : Double) -> Double

    kelvin_delta_to_celsius_delta

    fn kelvin_delta_to_celsius_delta(delta_k : Double) -> Double

    kelvin_range

    fn kelvin_range(lower_k : Double, upper_k : Double) -> Bool

    kelvin_to_celsius

    fn kelvin_to_celsius(temperature_k : Double) -> Double

    kilojoule_per_kg_to_joule_per_kg

    fn kilojoule_per_kg_to_joule_per_kg(value : Double) -> Double

    kilowatt_to_watt

    fn kilowatt_to_watt(value : Double) -> Double

    kinetic_half_life

    fn kinetic_half_life(model : KineticModel, temperature_k : Double) -> Double

    kinetic_profile

    fn kinetic_profile(model : KineticModel, initial_concentration : Double, temperature_k : Double, step_s : Double, points : Int) -> Array[KineticPoint]

    kinetic_rate_constant

    fn kinetic_rate_constant(model : KineticModel, temperature_k : Double) -> Double

    kpa_to_bar

    fn kpa_to_bar(pressure_kpa : Double) -> Double

    kpa_to_pa

    fn kpa_to_pa(pressure_kpa : Double) -> Double

    least_cost_heating_service

    fn least_cost_heating_service(duty_w : Double, candidates : Array[UtilityDesign], operating_hours_per_year : Double, unit_cost_per_kwh : Double) -> CostEstimate

    levelized_cost

    fn levelized_cost(capital_cost : Double, annual_operating_cost : Double, annual_output_kwh : Double, lifetime_years : Int) -> Double

    limiting_reaction_extent

    fn limiting_reaction_extent(rates : Array[SpeciesRate], terms : Array[ReactionTerm]) -> Double

    linear_cost_model

    fn linear_cost_model(flow_kg_per_s : Double, duty_w : Double, utility_price_per_kwh : Double, demand_charge_per_kw : Double) -> Double

    linear_duty_model

    fn linear_duty_model(inlet_temperature_k : Double, target_temperature_k : Double, flow_kg_per_s : Double, heat_capacity_j_per_kg_k : Double) -> Double

    linear_emissions_model

    fn linear_emissions_model(duty_w : Double, emission_factor_kg_per_kwh : Double) -> Double

    liters_per_minute_to_cubic_meters_per_second

    fn liters_per_minute_to_cubic_meters_per_second(value : Double) -> Double

    lmtd

    fn lmtd(hot_in_temperature : Double, hot_out_temperature : Double, cold_in_temperature : Double, cold_out_temperature : Double, arrangement? : FlowArrangement) -> Double

    maintenance_cost_per_year

    fn maintenance_cost_per_year(capital_cost : Double, maintenance_fraction : Double) -> Double

    make_operating_envelope

    fn make_operating_envelope(points : Array[OperatingPoint], constraints : OperatingConstraints) -> OperatingEnvelope

    mass_flow_to_molar_flow

    fn mass_flow_to_molar_flow(mass_flow_kg_per_s : Double, molar_mass_g_per_mol : Double) -> Double

    mass_transfer_sherwood

    fn mass_transfer_sherwood(reynolds : Double, schmidt : Double) -> Double

    match_heat_streams

    fn match_heat_streams(hot : ThermalStreamTarget, cold : ThermalStreamTarget, minimum_approach_c : Double) -> HeatRecoveryMatch

    maximum_relative_error

    fn maximum_relative_error(actual : Array[Double], expected : Array[Double]) -> Double

    methane_gas

    fn methane_gas() -> Substance

    mix_air_points

    fn mix_air_points(first : PsychrometricPoint, first_mass_flow_kg_per_s : Double, second : PsychrometricPoint, second_mass_flow_kg_per_s : Double) -> PsychrometricPoint

    mixer

    fn mixer(id~ : String, streams : Array[Stream], temperature : Double) -> Stream

    moist_air_cp_kj_per_kg_k

    fn moist_air_cp_kj_per_kg_k(humidity_ratio : Double) -> Double

    moist_air_density

    fn moist_air_density(dry_bulb_c : Double, humidity_ratio : Double, total_pressure_kpa : Double) -> Double

    moist_air_enthalpy_from_rh

    fn moist_air_enthalpy_from_rh(dry_bulb_c : Double, relative_humidity : Double, total_pressure_kpa : Double) -> Double

    moist_air_enthalpy_kj_per_kg_dry

    fn moist_air_enthalpy_kj_per_kg_dry(dry_bulb_c : Double, humidity_ratio : Double) -> Double

    moist_air_specific_volume

    fn moist_air_specific_volume(dry_bulb_c : Double, humidity_ratio : Double, total_pressure_kpa : Double) -> Double

    moisture_mass_flow

    fn moisture_mass_flow(dry_air_mass_flow_kg_per_s : Double, humidity_ratio : Double) -> Double

    moisture_removal_rate

    fn moisture_removal_rate(inlet_ratio : Double, outlet_ratio : Double, dry_air_mass_flow_kg_per_s : Double) -> Double

    molar_flow_to_mass_flow

    fn molar_flow_to_mass_flow(molar_flow_mol_per_s : Double, molar_mass_g_per_mol : Double) -> Double

    natural_gas_stream

    fn natural_gas_stream(id~ : String, molar_flow~ : Double, temperature~ : Double) -> Stream

    nearest_feasible_operating_point

    fn nearest_feasible_operating_point(envelope : OperatingEnvelope, target : OperatingPoint) -> OperatingPoint?

    nearest_operating_point

    fn nearest_operating_point(envelope : OperatingEnvelope, target : OperatingPoint) -> OperatingPoint?

    net_present_value

    fn net_present_value(cash_flows : Array[Double], discount_rate : Double) -> Double

    network_energy_residual

    fn network_energy_residual(inlets : Array[Stream], outlets : Array[Stream]) -> Double

    network_flow_residual

    fn network_flow_residual(result : NetworkResult, source_flow : Double) -> Double

    network_fraction_sum_is_valid

    fn network_fraction_sum_is_valid(fractions : Array[Double], tolerance : Double) -> Bool

    network_stream_count

    fn network_stream_count(result : NetworkResult) -> Int

    network_terminal_flow

    fn network_terminal_flow(result : NetworkResult) -> Double

    network_terminal_ids

    fn network_terminal_ids(connections : Array[NetworkConnection]) -> Array[String]

    nitrogen_gas

    fn nitrogen_gas() -> Substance

    normalized_fraction

    fn normalized_fraction(value : Double) -> Double

    normalized_operating_score

    fn normalized_operating_score(point : OperatingPoint, constraints : OperatingConstraints) -> Double

    numerical_guard

    fn numerical_guard(value : Double, lower : Double, upper : Double) -> Double

    nusselt_dittus_boelter

    fn nusselt_dittus_boelter(reynolds : Double, prandtl : Double, exponent : Double) -> Double

    nusselt_laminar_constant_wall

    fn nusselt_laminar_constant_wall() -> Double

    operating_constraints_are_valid

    fn operating_constraints_are_valid(constraints : OperatingConstraints) -> Bool

    operating_point

    fn operating_point(temperature_k : Double, flow_kg_per_s : Double, pressure_kpa : Double, duty_w : Double, cost_per_h : Double, emissions_kg_per_h : Double, score : Double, constraints : OperatingConstraints) -> OperatingPoint

    operating_point_cost_score

    fn operating_point_cost_score(point : OperatingPoint, cost_scale : Double) -> Double

    operating_point_distance

    fn operating_point_distance(first : OperatingPoint, second : OperatingPoint) -> Double

    operating_point_duty_score

    fn operating_point_duty_score(point : OperatingPoint, duty_scale : Double) -> Double

    operating_point_emissions_score

    fn operating_point_emissions_score(point : OperatingPoint, emissions_scale : Double) -> Double

    operating_point_energy_kwh

    fn operating_point_energy_kwh(point : OperatingPoint) -> Double

    operating_point_is_feasible

    fn operating_point_is_feasible(point : OperatingPoint) -> Bool

    operating_point_is_invalid

    fn operating_point_is_invalid(point : OperatingPoint) -> Bool

    operating_point_margin_cost

    fn operating_point_margin_cost(point : OperatingPoint, constraints : OperatingConstraints) -> Double

    operating_point_margin_duty

    fn operating_point_margin_duty(point : OperatingPoint, constraints : OperatingConstraints) -> Double

    operating_point_margin_flow

    fn operating_point_margin_flow(point : OperatingPoint, constraints : OperatingConstraints) -> Double

    operating_point_margin_pressure

    fn operating_point_margin_pressure(point : OperatingPoint, constraints : OperatingConstraints) -> Double

    operating_point_margin_temperature

    fn operating_point_margin_temperature(point : OperatingPoint, constraints : OperatingConstraints) -> Double

    operating_point_minimum_margin

    fn operating_point_minimum_margin(point : OperatingPoint, constraints : OperatingConstraints) -> Double

    operating_point_specific_cost

    fn operating_point_specific_cost(point : OperatingPoint) -> Double

    operating_point_specific_duty

    fn operating_point_specific_duty(point : OperatingPoint) -> Double

    operating_point_status

    fn operating_point_status(temperature_k : Double, flow_kg_per_s : Double, pressure_kpa : Double, duty_w : Double, cost_per_h : Double, constraints : OperatingConstraints) -> EnvelopeStatus

    operating_point_to_csv

    fn operating_point_to_csv(point : OperatingPoint) -> String

    operating_point_values_are_finite

    fn operating_point_values_are_finite(point : OperatingPoint) -> Bool

    operating_point_weighted_distance

    fn operating_point_weighted_distance(first : OperatingPoint, second : OperatingPoint, temperature_weight : Double, flow_weight : Double, pressure_weight : Double) -> Double

    operating_point_with_cost

    fn operating_point_with_cost(point : OperatingPoint, cost_per_h : Double, emissions_kg_per_h : Double, constraints : OperatingConstraints) -> OperatingPoint

    operating_point_with_duty

    fn operating_point_with_duty(point : OperatingPoint, duty_w : Double, cost_per_h : Double, emissions_kg_per_h : Double, constraints : OperatingConstraints) -> OperatingPoint

    operating_point_with_process_state

    fn operating_point_with_process_state(point : OperatingPoint, temperature_k : Double, flow_kg_per_s : Double, pressure_kpa : Double, constraints : OperatingConstraints) -> OperatingPoint

    overall_heat_transfer_coefficient

    fn overall_heat_transfer_coefficient(inside_h_w_per_m2_k : Double, wall_resistance_m2_k_per_w : Double, outside_h_w_per_m2_k : Double, fouling_resistance_m2_k_per_w : Double) -> Double

    oxygen_gas

    fn oxygen_gas() -> Substance

    pa_to_kpa

    fn pa_to_kpa(pressure_pa : Double) -> Double

    parallel_equipment_count

    fn parallel_equipment_count(required_capacity : Double, unit_capacity : Double) -> Int

    parallel_lmtd

    fn parallel_lmtd(hot_in_temperature : Double, hot_out_temperature : Double, cold_in_temperature : Double, cold_out_temperature : Double) -> Double

    pareto_frontier_count

    fn pareto_frontier_count(envelope : OperatingEnvelope) -> Int

    payback_years

    fn payback_years(initial_investment : Double, annual_saving : Double) -> Double

    pfr_conversion

    fn pfr_conversion(model : KineticModel, residence_time_s : Double, temperature_k : Double) -> Double

    phase_change_heat

    fn phase_change_heat(substance : Substance, molar_flow : Double, from_temperature : Double, to_temperature : Double) -> Double

    pinch_targets

    fn pinch_targets(hot_streams : Array[ThermalStreamTarget], cold_streams : Array[ThermalStreamTarget], minimum_approach_c : Double) -> PinchTargets

    pipe_cross_section_m2

    fn pipe_cross_section_m2(diameter_m : Double) -> Double

    pipe_heat_transfer_coefficient

    fn pipe_heat_transfer_coefficient(diameter_m : Double, velocity_m_per_s : Double, fluid : FluidProperties) -> Double

    pipe_velocity_m_per_s

    fn pipe_velocity_m_per_s(volumetric_flow_m3_per_s : Double, diameter_m : Double) -> Double

    point_dominates

    fn point_dominates(first : OperatingPoint, second : OperatingPoint, minimize_cost : Bool, minimize_duty : Bool, minimize_emissions : Bool) -> Bool

    point_from_humidity_ratio

    fn point_from_humidity_ratio(dry_bulb_c : Double, humidity_ratio : Double, pressure_kpa : Double) -> PsychrometricPoint

    positive_or_zero

    fn positive_or_zero(value : Double) -> Double

    prandtl_number

    fn prandtl_number(fluid : FluidProperties) -> Double

    pressure_drop_pa

    fn pressure_drop_pa(density_kg_per_m3 : Double, diameter_m : Double, length_m : Double, roughness_m : Double, viscosity_pa_s : Double) -> Double

    pressure_from_saturation_temperature_c

    fn pressure_from_saturation_temperature_c(temperature_c : Double) -> Double

    pressure_loss_duty

    fn pressure_loss_duty(flow_kg_per_s : Double, pressure_kpa : Double, efficiency : Double) -> Double

    process_isothermal

    fn process_isothermal(streams : Array[Stream], tolerance : Double) -> Bool

    process_temperature_range

    fn process_temperature_range(streams : Array[Stream]) -> (Double, Double)

    process_total_heat_capacity

    fn process_total_heat_capacity(streams : Array[Stream]) -> Double

    process_total_mass_flow

    fn process_total_mass_flow(streams : Array[Stream], molar_mass_g_per_mol : Double) -> Double

    process_water_stream

    fn process_water_stream(id~ : String, molar_flow~ : Double, temperature~ : Double) -> Stream

    propagate_network

    fn propagate_network(source : Stream, connections : Array[NetworkConnection], max_iterations : Int) -> NetworkResult

    propagated_product_uncertainty

    fn propagated_product_uncertainty(first_value : Double, first_relative_uncertainty : Double, second_value : Double, second_relative_uncertainty : Double) -> UncertaintyEnvelope

    propagated_sum_uncertainty

    fn propagated_sum_uncertainty(first_value : Double, first_absolute_uncertainty : Double, second_value : Double, second_absolute_uncertainty : Double) -> UncertaintyEnvelope

    psychrometric_point

    fn psychrometric_point(dry_bulb_c : Double, relative_humidity : Double, pressure_kpa : Double) -> PsychrometricPoint

    pump_head_m

    fn pump_head_m(pressure_rise_pa : Double, density_kg_per_m3 : Double) -> Double

    pump_power_w

    fn pump_power_w(mass_flow_kg_per_s : Double, pressure_rise_pa : Double, efficiency : Double) -> Double

    quality_grade

    fn quality_grade(result : QualityResult) -> QualityGrade

    quality_score

    fn quality_score(result : QualityResult) -> Double

    quality_summary

    fn quality_summary(result : QualityResult) -> String

    ramp_plan

    fn ramp_plan(points : Array[OperatingPoint], maximum_temperature_rate_k_per_s : Double, maximum_flow_rate_kg_per_s2 : Double) -> RampPlan

    ramp_plan_is_monotonic_flow

    fn ramp_plan_is_monotonic_flow(plan : RampPlan, increasing : Bool) -> Bool

    ramp_plan_is_monotonic_temperature

    fn ramp_plan_is_monotonic_temperature(plan : RampPlan, increasing : Bool) -> Bool

    ramp_plan_summary

    fn ramp_plan_summary(plan : RampPlan) -> String

    ramp_step_time_s

    fn ramp_step_time_s(first : OperatingPoint, second : OperatingPoint, maximum_temperature_rate_k_per_s : Double, maximum_flow_rate_kg_per_s2 : Double) -> Double

    rankine_cycle

    fn rankine_cycle(boiler_temperature_c : Double, condenser_pressure_kpa : Double, mass_flow_kg_per_s : Double, turbine_efficiency : Double, pump_efficiency : Double) -> RankineCycleResult

    reaction_balance

    fn reaction_balance(inlet : Array[SpeciesRate], terms : Array[ReactionTerm], requested_extent : Double) -> ReactionBalance

    reaction_conversion

    fn reaction_conversion(initial_molar_flow : Double, coefficient : Double, extent_mol_per_s : Double) -> Double

    reaction_conversion_for_species

    fn reaction_conversion_for_species(inlet : Array[SpeciesRate], outlet : Array[SpeciesRate], species_id : String) -> Double

    reaction_duty

    fn reaction_duty(terms : Array[ReactionTerm], extent_mol_per_s : Double) -> Double

    reaction_enthalpy

    fn reaction_enthalpy(terms : Array[ReactionTerm]) -> Double

    reaction_extent_for_conversion

    fn reaction_extent_for_conversion(initial_molar_flow : Double, coefficient : Double, conversion : Double) -> Double

    reaction_heat_per_mass

    fn reaction_heat_per_mass(terms : Array[ReactionTerm], extent_mol_per_s : Double, total_mass_flow_kg_per_s : Double) -> Double

    reaction_is_mass_balanced

    fn reaction_is_mass_balanced(terms : Array[ReactionTerm], tolerance : Double) -> Bool

    reaction_mass_flow

    fn reaction_mass_flow(rates : Array[SpeciesRate]) -> Double

    reaction_outlet_temperature

    fn reaction_outlet_temperature(inlet_temperature : Double, heat_capacity_flow_w_per_k : Double, duty_w : Double) -> Double

    reaction_rate

    fn reaction_rate(model : KineticModel, concentration : Double, temperature_k : Double) -> Double

    reaction_selectivity

    fn reaction_selectivity(outlet : Array[SpeciesRate], desired_id : String, byproduct_id : String) -> Double

    reaction_yield

    fn reaction_yield(inlet : Array[SpeciesRate], outlet : Array[SpeciesRate], reactant_id : String, product_id : String, product_coefficient : Double, reactant_coefficient : Double) -> Double

    relative_error

    fn relative_error(actual : Double, expected : Double) -> Double

    relative_humidity_from_ratio

    fn relative_humidity_from_ratio(dry_bulb_c : Double, humidity_ratio : Double, total_pressure_kpa : Double) -> Double

    relative_uncertainty_envelope

    fn relative_uncertainty_envelope(nominal : Double, relative_uncertainty : Double) -> UncertaintyEnvelope

    report_json_like

    fn report_json_like(report : DutyReport) -> String

    required_heat

    fn required_heat(inlets : Array[Stream], outlets : Array[Stream], shaft_work? : Double, kinetic? : Double, potential? : Double) -> Double

    residence_time_for_conversion

    fn residence_time_for_conversion(model : KineticModel, conversion : Double, temperature_k : Double) -> Double

    response_time_to_fraction

    fn response_time_to_fraction(time_constant_s : Double, fraction : Double) -> Double

    reynolds_number

    fn reynolds_number(density_kg_per_m3 : Double, velocity_m_per_s : Double, diameter_m : Double, viscosity_pa_s : Double) -> Double

    reynolds_number_for_fluid

    fn reynolds_number_for_fluid(fluid : FluidProperties, velocity_m_per_s : Double, diameter_m : Double) -> Double

    run_air_drying_case

    fn run_air_drying_case(dry_air_mass_flow_kg_per_s : Double, inlet_temperature_c : Double, inlet_relative_humidity : Double, outlet_temperature_c : Double, outlet_relative_humidity : Double) -> CaseStudyResult

    run_benchmark_workload

    fn run_benchmark_workload(iterations : Int) -> BenchmarkResult

    run_cooling_case

    fn run_cooling_case(case : CoolingCase) -> ScenarioResult

    run_exchanger_case

    fn run_exchanger_case(case : ExchangerCase) -> ScenarioResult

    run_heating_case

    fn run_heating_case(case : HeatingCase) -> ScenarioResult

    run_natural_gas_case

    fn run_natural_gas_case(molar_flow_mol_per_s : Double, inlet_temperature_k : Double, outlet_temperature_k : Double) -> CaseStudyResult

    run_water_preheat_case

    fn run_water_preheat_case(mass_flow_kg_per_s : Double, inlet_temperature_k : Double, outlet_temperature_k : Double) -> CaseStudyResult

    safe_required_heat

    fn safe_required_heat(inlets : Array[Stream], outlets : Array[Stream], shaft_work_w : Double, kinetic_w : Double, potential_w : Double) -> Double?

    safety_factor_load

    fn safety_factor_load(load_w : Double, factor : Double) -> Double

    saturated_liquid_enthalpy_kj_per_kg

    fn saturated_liquid_enthalpy_kj_per_kg(temperature_c : Double) -> Double

    saturated_liquid_entropy_kj_per_kg_k

    fn saturated_liquid_entropy_kj_per_kg_k(temperature_c : Double) -> Double

    saturated_liquid_specific_volume_m3_per_kg

    fn saturated_liquid_specific_volume_m3_per_kg(temperature_c : Double) -> Double

    saturated_vapor_enthalpy_kj_per_kg

    fn saturated_vapor_enthalpy_kj_per_kg(temperature_c : Double) -> Double

    saturated_vapor_specific_volume_m3_per_kg

    fn saturated_vapor_specific_volume_m3_per_kg(temperature_c : Double, pressure_kpa : Double) -> Double

    saturated_water_density_kg_per_m3

    fn saturated_water_density_kg_per_m3(temperature_c : Double) -> Double

    saturation_pressure_kpa

    fn saturation_pressure_kpa(temperature_c : Double) -> Double

    saturation_pressure_pa

    fn saturation_pressure_pa(temperature_c : Double) -> Double

    scan_operating_envelope

    fn scan_operating_envelope(temperatures_k : Array[Double], flows_kg_per_s : Array[Double], pressures_kpa : Array[Double], duty_model : (Double, Double, Double) -> Double, cost_model : (Double, Double, Double, Double) -> Double, emissions_model : (Double, Double, Double, Double) -> Double, constraints : OperatingConstraints) -> OperatingEnvelope

    scenario_matrix_average_quality

    fn scenario_matrix_average_quality(matrix : ScenarioMatrix) -> Double

    scenario_matrix_csv

    fn scenario_matrix_csv(matrix : ScenarioMatrix) -> String

    scenario_matrix_csv_header

    fn scenario_matrix_csv_header() -> String

    scenario_matrix_csv_row

    fn scenario_matrix_csv_row(point : ScenarioPoint) -> String

    scenario_matrix_find_max_duty

    fn scenario_matrix_find_max_duty(matrix : ScenarioMatrix) -> ScenarioPoint?

    scenario_matrix_find_min_area

    fn scenario_matrix_find_min_area(matrix : ScenarioMatrix) -> ScenarioPoint?

    scenario_matrix_is_monotonic_in_temperature

    fn scenario_matrix_is_monotonic_in_temperature(matrix : ScenarioMatrix) -> Bool

    scenario_matrix_point_count

    fn scenario_matrix_point_count(matrix : ScenarioMatrix) -> Int

    scenario_result_csv_header

    fn scenario_result_csv_header() -> String

    scenario_result_csv_row

    fn scenario_result_csv_row(result : ScenarioResult) -> String

    scenario_results_csv

    fn scenario_results_csv(results : Array[ScenarioResult]) -> String

    schedule_contains_cycle

    fn schedule_contains_cycle(units : Array[ScheduledUnit]) -> Bool

    schedule_duration

    fn schedule_duration(schedule : ScheduleResult, id : String) -> Double

    schedule_entry_count

    fn schedule_entry_count(schedule : ScheduleResult) -> Int

    schedule_is_valid

    fn schedule_is_valid(schedule : ScheduleResult) -> Bool

    schedule_network

    fn schedule_network(units : Array[ScheduledUnit]) -> ScheduleResult

    schedule_resource_hours

    fn schedule_resource_hours(schedule : ScheduleResult, resource_count : Int) -> Double

    schmidt_number

    fn schmidt_number(viscosity_pa_s : Double, density_kg_per_m3 : Double, diffusivity_m2_per_s : Double) -> Double

    select_lowest_cost

    fn select_lowest_cost(envelope : OperatingEnvelope) -> EnvelopeSelection?

    select_lowest_duty

    fn select_lowest_duty(envelope : OperatingEnvelope) -> EnvelopeSelection?

    select_operating_point

    fn select_operating_point(envelope : OperatingEnvelope, direction : ObjectiveDirection, objective : (OperatingPoint) -> Double, explanation : String) -> EnvelopeSelection?

    select_safest_margin

    fn select_safest_margin(envelope : OperatingEnvelope) -> EnvelopeSelection?

    select_utility

    fn select_utility(duty_w : Double, candidates : Array[UtilityDesign]) -> UtilityDesign

    sensible_heat

    fn sensible_heat(substance : Substance, molar_flow : Double, from_temperature : Double, to_temperature : Double) -> Double

    sensible_heat_ratio

    fn sensible_heat_ratio(sensible_duty_w : Double, total_duty_w : Double) -> Double

    sensitivity_at_temperature

    fn sensitivity_at_temperature(substance : Substance, temperature : Double, step : Double) -> Double

    service_cost_estimate

    fn service_cost_estimate(utility : UtilityDesign, operating_hours_per_year : Double, unit_cost_per_kwh : Double, emission_factor_kg_per_kwh : Double) -> CostEstimate

    service_hint

    fn service_hint(duty : Double) -> String

    simulate_lumped_heating

    fn simulate_lumped_heating(initial_temperature_k : Double, target_temperature_k : Double, heat_capacity_j_per_k : Double, overall_u_w_per_k : Double, step_s : Double, points : Int) -> Array[DynamicThermalState]

    size_heater

    fn size_heater(process_duty_w : Double, approach_k : Double, overall_u_w_per_m2_k : Double, design_efficiency : Double) -> HeaterSizing

    size_pump

    fn size_pump(flow_m3_per_s : Double, pressure_rise_pa : Double, density_kg_per_m3 : Double, efficiency : Double) -> PumpSizing

    size_tank

    fn size_tank(volumetric_flow_m3_per_s : Double, residence_time_s : Double, working_fraction : Double) -> TankSizing

    snapshot_csv_header

    fn snapshot_csv_header() -> String

    snapshot_csv_row

    fn snapshot_csv_row(snapshot : StreamSnapshot) -> String

    snapshot_delta

    fn snapshot_delta(first : StreamSnapshot, second : StreamSnapshot) -> StreamSnapshot

    snapshot_relative_change

    fn snapshot_relative_change(first : Double, second : Double) -> Double

    snapshot_stream

    fn snapshot_stream(stream : Stream) -> StreamSnapshot

    snapshot_streams

    fn snapshot_streams(streams : Array[Stream]) -> Array[StreamSnapshot]

    snapshots_csv

    fn snapshots_csv(snapshots : Array[StreamSnapshot]) -> String

    solve_recycle_temperature

    fn solve_recycle_temperature(feed_temperature : Double, recycle_gain : Double, max_iterations : Int, tolerance : Double) -> ConvergenceResult

    species_rate

    fn species_rate(rates : Array[SpeciesRate], id : String) -> Double

    species_rate_array_total

    fn species_rate_array_total(rates : Array[SpeciesRate]) -> Double

    split

    fn split(stream : Stream, first_fraction : Double) -> (Stream, Stream)

    stable_time_step

    fn stable_time_step(overall_u_w_per_k : Double, heat_capacity_j_per_k : Double, requested_step_s : Double) -> Double

    standard_operating_constraints

    fn standard_operating_constraints() -> OperatingConstraints

    steady_state_balance

    fn steady_state_balance(inlets : Array[Stream], outlets : Array[Stream], terms? : BalanceTerms) -> BalanceResult

    steam_density_kg_per_m3

    fn steam_density_kg_per_m3(temperature_c : Double, pressure_kpa : Double) -> Double

    steam_latent_heat_kj_per_kg

    fn steam_latent_heat_kj_per_kg(temperature_c : Double) -> Double

    steam_mass_flow_for_duty

    fn steam_mass_flow_for_duty(duty_w : Double, pressure_kpa : Double, quality_in : Double, quality_out : Double) -> Double

    steam_required

    fn steam_required(duty : Double, latent_heat : Double) -> Double

    steam_saturation_temperature_c

    fn steam_saturation_temperature_c(pressure_kpa : Double) -> Double

    steam_state

    fn steam_state(temperature_c : Double, pressure_kpa : Double) -> SteamState

    steam_state_from_quality

    fn steam_state_from_quality(pressure_kpa : Double, quality : Double) -> SteamState

    steam_utility

    fn steam_utility(mass_flow_kg_per_s : Double, inlet_temperature_c : Double, outlet_temperature_c : Double) -> UtilityDesign

    steam_volume_flow_m3_per_s

    fn steam_volume_flow_m3_per_s(mass_flow_kg_per_s : Double, temperature_c : Double, pressure_kpa : Double) -> Double

    stream_csv_header

    fn stream_csv_header() -> String

    stream_csv_row

    fn stream_csv_row(stream : Stream) -> String

    stream_is_physically_valid

    fn stream_is_physically_valid(stream : Stream) -> Bool

    stream_rate

    fn stream_rate(streams : Array[Stream], id : String) -> Double

    streams_csv

    fn streams_csv(streams : Array[Stream]) -> String

    substance_is_physically_valid

    fn substance_is_physically_valid(substance : Substance, temperature : Double) -> Bool

    sweep_heater_targets

    fn sweep_heater_targets(inlet : Stream, start_temperature : Double, end_temperature : Double, step : Double) -> SensitivitySweep

    table_quality_from_enthalpy

    fn table_quality_from_enthalpy(pressure_kpa : Double, enthalpy_kj_per_kg : Double) -> SteamTableResult

    table_state_from_pressure_quality

    fn table_state_from_pressure_quality(pressure_kpa : Double, quality : Double) -> SteamState

    tabulated_saturated_liquid_enthalpy

    fn tabulated_saturated_liquid_enthalpy(pressure_kpa : Double) -> SteamTableResult

    tabulated_saturated_vapor_enthalpy

    fn tabulated_saturated_vapor_enthalpy(pressure_kpa : Double) -> SteamTableResult

    tabulated_saturation_temperature_c

    fn tabulated_saturation_temperature_c(pressure_kpa : Double) -> SteamTableResult

    target_temperature_for_duty

    fn target_temperature_for_duty(inlet : Stream, target_duty : Double, lower_temperature : Double, upper_temperature : Double) -> Double

    temperature_from_sensible_heat

    fn temperature_from_sensible_heat(substance : Substance, from_temperature : Double, heat_per_mole : Double, upper_temperature : Double) -> Double

    thermal_diffusivity_m2_per_s

    fn thermal_diffusivity_m2_per_s(fluid : FluidProperties) -> Double

    thermal_oil_utility

    fn thermal_oil_utility(duty_w : Double, inlet_temperature_c : Double, outlet_temperature_c : Double, cp_j_per_kg_k : Double) -> UtilityDesign

    thermal_time_constant_s

    fn thermal_time_constant_s(overall_u_w_per_k : Double, heat_capacity_j_per_k : Double) -> Double

    tolerance_for_scale

    fn tolerance_for_scale(scale : Double, relative_tolerance : Double, absolute_floor : Double) -> Double

    toluene_liquid

    fn toluene_liquid() -> Substance

    total_annual_cost

    fn total_annual_cost(annualized_capital : Double, utility_cost_per_hour : Double, operating_hours_per_year : Double) -> Double

    total_molar_heat

    fn total_molar_heat(substance : Substance, from_temperature : Double, to_temperature : Double) -> Double

    total_scenario_duty

    fn total_scenario_duty(results : Array[ScenarioResult]) -> Double

    turbine_expand

    fn turbine_expand(inlet : SteamState, outlet_pressure_kpa : Double, isentropic_efficiency : Double) -> TurbineExpansionResult

    uncertainty_contains

    fn uncertainty_contains(value : Double, envelope : UncertaintyEnvelope) -> Bool

    uncertainty_margin

    fn uncertainty_margin(nominal : Double, low : Double, high : Double) -> Double

    utility_cost_index

    fn utility_cost_index(design : UtilityDesign) -> Double

    utility_csv_row

    fn utility_csv_row(result : UtilityEstimate) -> String

    utility_emissions_kg_per_h

    fn utility_emissions_kg_per_h(utility : UtilityDesign, emission_factor_kg_per_kwh : Double) -> Double

    utility_energy_kwh_per_year

    fn utility_energy_kwh_per_year(utility : UtilityDesign, operating_hours_per_year : Double) -> Double

    utility_estimate

    fn utility_estimate(name~ : String, duty~ : Double, cp~ : Double, inlet_temperature~ : Double, outlet_temperature~ : Double) -> UtilityEstimate

    utility_operating_cost

    fn utility_operating_cost(utility : UtilityDesign, operating_hours_per_year : Double, unit_cost_per_kwh : Double) -> Double

    utility_summary

    fn utility_summary(result : UtilityEstimate) -> String

    utility_target_after_recovery

    fn utility_target_after_recovery(process_duty_kw : Double, recovered_duty_kw : Double) -> Double

    valid_absolute_temperature

    fn valid_absolute_temperature(temperature_k : Double) -> Bool

    valid_flow_pair

    fn valid_flow_pair(first : Double, second : Double) -> Bool

    valid_pressure_pair

    fn valid_pressure_pair(first_kpa : Double, second_kpa : Double) -> Bool

    valid_temperature_pair

    fn valid_temperature_pair(first : Double, second : Double) -> Bool

    validate_fraction

    fn validate_fraction(value : Double) -> Array[ValidationIssue]

    validate_monotonic

    fn validate_monotonic(values : Array[Double], increasing : Bool) -> Bool

    validate_positive_values

    fn validate_positive_values(values : Array[Double]) -> Int

    validate_process

    fn validate_process(streams : Array[Stream]) -> ProcessValidationReport

    validate_stream

    fn validate_stream(stream : Stream) -> Array[ValidationIssue]

    validate_temperature_range

    fn validate_temperature_range(temperatures : Array[Double], lower_k : Double, upper_k : Double) -> Int

    validation_issue_count

    fn validation_issue_count(reports : Array[ProcessValidationReport]) -> Int

    validation_summary

    fn validation_summary(report : ProcessValidationReport) -> String

    vapor_pressure_from_humidity_ratio

    fn vapor_pressure_from_humidity_ratio(humidity_ratio : Double, total_pressure_kpa : Double) -> Double

    vessel_volume_m3

    fn vessel_volume_m3(diameter_m : Double, height_m : Double) -> Double

    vessel_wall_area_m2

    fn vessel_wall_area_m2(diameter_m : Double, height_m : Double) -> Double

    water_density_kg_per_m3

    fn water_density_kg_per_m3(temperature_c : Double) -> Double

    water_heat_capacity_j_per_kg_k

    fn water_heat_capacity_j_per_kg_k(temperature_c : Double) -> Double

    water_liquid

    fn water_liquid() -> Substance

    water_properties

    fn water_properties(temperature_c : Double) -> FluidProperties

    water_thermal_conductivity_w_per_m_k

    fn water_thermal_conductivity_w_per_m_k(temperature_c : Double) -> Double

    water_vapor

    fn water_vapor() -> Substance

    water_viscosity_pa_s

    fn water_viscosity_pa_s(temperature_c : Double) -> Double

    watt_to_kilowatt

    fn watt_to_kilowatt(value : Double) -> Double

    weighted_enthalpy

    fn weighted_enthalpy(substances : Array[Substance], weights : Array[Double], temperature : Double) -> Double

    weighted_error

    fn weighted_error(errors : Array[Double], weights : Array[Double]) -> Double

    weighted_heat_capacity

    fn weighted_heat_capacity(substances : Array[Substance], weights : Array[Double], temperature : Double) -> Double

    weighted_operating_score

    fn weighted_operating_score(point : OperatingPoint, cost_weight : Double, duty_weight : Double, emissions_weight : Double, cost_scale : Double, duty_scale : Double, emissions_scale : Double) -> Double

    wet_bulb_c

    fn wet_bulb_c(dry_bulb_c : Double, humidity_ratio : Double, total_pressure_kpa : Double) -> Double

    within_tolerance

    fn within_tolerance(actual : Double, expected : Double, tolerance : Double) -> Bool

    worst_case_interval

    fn worst_case_interval(values : Array[Double], relative_uncertainty : Double) -> UncertaintyEnvelope