ThermodynamicCycleAPI

Index

ThermodynamicCycle Components

Ai4EComponentLib.ThermodynamicCycle.ArbitraryProcessMethod
ArbitraryProcess(; name, inter_state, process, fluid)

Component: ArbitraryProcess

Once the two states in a node are determined, the remaining 3 states can be obtained from these two known states. In ArbitraryProcess, 2 states need to be determined.

Connectors:

  • in: Inlet of process
  • out: Outlet of process

Arguments:

  • inter_state: One state to be determined. There are 7 options:
    • "P": Giving state pressure
    • "H": Giving state enthalpy
    • "T": Giving state temperature
    • "D": Giving state density
    • "S": Giving state entropy
    • "Q_0": Giving saturated liquid(0 is value of the state, automatically passed into ODESystem)
    • "Q_1": Giving saturated vapor(1 is value of the state, automatically passed into ODESystem)
  • process: Another state to be determined. There are 5 options:
    • "P": Giving state pressure
    • "H": Giving state enthalpy
    • "T": Giving state temperature
    • "D": Giving state density
    • "S": Giving state entropy
  • fluid: The fluid passing throught the component, default: "Water"
source
Ai4EComponentLib.ThermodynamicCycle.DThermalStatesMethod
DThermalStates(; name, state, value, u0)

Component: DThermalStates

The DThermalStates make the value of state changes over time.

\[\frac{\partial State}{\partial t} = ConstantValue\]

Connectors:

  • node: A node passing value

Arguments:

  • state: State that determined in process. There are 5 options:
    • "P": Giving state pressure
    • "H": Giving state enthalpy
    • "T": Giving state temperature
    • "D": Giving state density
    • "S": Giving state entropy
  • value: The value of ConstantValue in above formula:
  • u0: The initial value of the state
source
Ai4EComponentLib.ThermodynamicCycle.IsentropicProcessMethod
IsentropicProcess(; name, inter_state, fluid)

Component: IsentropicProcess

The Entropy is constant during the process.

Once the two states in a node are determined, the remaining 3 states can be obtained from these two known states. In IsentropicProcess, entropy are the same from inlet to outlet. So another state still needed.

Connectors:

  • in: Inlet of process
  • out: Outlet of process

Arguments:

  • inter_state: Another state need to be determined. There are 7 options:
    • "P": Giving state pressure
    • "H": Giving state enthalpy
    • "T": Giving state temperature
    • "D": Giving state density
    • "S": Giving state entropy
    • "Q_0": Giving saturated liquid(0 is value of the state, automatically passed into ODESystem)
    • "Q_1": Giving saturated vapor(1 is value of the state, automatically passed into ODESystem)
  • fluid: The fluid passing throught the component, default: "Water"
source
Ai4EComponentLib.ThermodynamicCycle.IsobaricProcessMethod
IsobaricProcess(; name, inter_state, fluid)

Component: IsobaricProcess

The Pressure is constant during the process.

Once the two states in a node are determined, the remaining 3 states can be obtained from these two known states. In IsobaricProcess, pressure are the same from inlet to outlet. So another state still needed.

Connectors:

  • in: Inlet of process
  • out: Outlet of process

Arguments:

  • inter_state: Another state need to be determined. There are 7 options:
    • "P": Giving state pressure
    • "H": Giving state enthalpy
    • "T": Giving state temperature
    • "D": Giving state density
    • "S": Giving state entropy
    • "Q_0": Giving saturated liquid(0 is value of the state, automatically passed into ODESystem)
    • "Q_1": Giving saturated vapor(1 is value of the state, automatically passed into ODESystem)
  • fluid: The fluid passing throught the component, default: "Water"
source
Ai4EComponentLib.ThermodynamicCycle.IsochoricProcessMethod
IsochoricProcess(; name, inter_state, fluid)

Component: IsochoricProcess

The Density is constant during the process.

Once the two states in a node are determined, the remaining 3 states can be obtained from these two known states. In IsochoricProcess, density are the same from inlet to outlet. So another state still needed.

Connectors:

  • in: Inlet of process
  • out: Outlet of process

Arguments:

  • inter_state: Another state need to be determined. There are 7 options:
    • "P": Giving state pressure
    • "H": Giving state enthalpy
    • "T": Giving state temperature
    • "D": Giving state density
    • "S": Giving state entropy
    • "Q_0": Giving saturated liquid(0 is value of the state, automatically passed into ODESystem)
    • "Q_1": Giving saturated vapor(1 is value of the state, automatically passed into ODESystem)
  • fluid: The fluid passing throught the component, default: "Water"
source
Ai4EComponentLib.ThermodynamicCycle.IsoenthalpyProcessMethod
IsoenthalpyProcess(; name, inter_state, fluid)

Component: IsoenthalpyProcess

The Enthalpy is constant during the process.

Once the two states in a node are determined, the remaining 3 states can be obtained from these two known states. In IsoenthalpyProcess, enthalpy are the same from inlet to outlet. So another state still needed.

Connectors:

  • in: Inlet of process
  • out: Outlet of process

Arguments:

  • inter_state: Another state need to be determined. There are 7 options:
    • "P": Giving state pressure
    • "H": Giving state enthalpy
    • "T": Giving state temperature
    • "D": Giving state density
    • "S": Giving state entropy
    • "Q_0": Giving saturated liquid(0 is value of the state, automatically passed into ODESystem)
    • "Q_1": Giving saturated vapor(1 is value of the state, automatically passed into ODESystem)
  • fluid: The fluid passing throught the component, default: "Water"
source
Ai4EComponentLib.ThermodynamicCycle.IsothermalProcessMethod
IsothermalProcess(; name, inter_state, fluid)

Component: IsothermalProcess

The Temperature is constant during the process.

Once the two states in a node are determined, the remaining 3 states can be obtained from these two known states. In IsothermalProcess, temperature are the same from inlet to outlet. So another state still needed.

Connectors:

  • in: Inlet of process
  • out: Outlet of process

Arguments:

  • inter_state: Another state need to be determined. There are 7 options:
    • "P": Giving state pressure
    • "H": Giving state enthalpy
    • "T": Giving state temperature
    • "D": Giving state density
    • "S": Giving state entropy
    • "Q_0": Giving saturated liquid(0 is value of the state, automatically passed into ODESystem)
    • "Q_1": Giving saturated vapor(1 is value of the state, automatically passed into ODESystem)
  • fluid: The fluid passing throught the component, default: "Water"
source
Ai4EComponentLib.ThermodynamicCycle.StreamNodeMethod
StreamNode(; name)

A stream node(inlet or outlet) in a thermodynamic cycle system. There are five states in a node: pressure, enthalpy, temperature, density, entropy.

States:

  • p(t): [Pa] The pressure at this node
  • h(t): [J/kg] The enthalpy at this node
  • T(t): [K] The temperature at this node
  • ρ(t): [kg/m³] The density at this node
  • s(t): [J/(kg·K)] The entropy at this node
source
Ai4EComponentLib.ThermodynamicCycle.StreamPortMethod
StreamPort(; name)

Component with two stream nodes in and out and some variables between in and out.

States:

  • Δp(t): [Pa] The pressure at this node
  • Δh(t): [J/kg] The enthalpy at this node
  • ΔT(t): [K] The temperature at this node
  • Δρ(t): [kg/m³] The density at this node
  • Δs(t): [J/(kg·K)] The entropy at this node

Connectors:

  • in inlet of components
  • out outlet of components
source
Ai4EComponentLib.ThermodynamicCycle.ThermalStatesMethod
ThermalStates(; name, state, value)

Component: ThermalStates

The ThermalStates passed a fixed value of the state that determined in process.

Connectors:

  • node: A node passing value

Arguments:

  • state: State that determined in process. There are 5 options:
    • "P": Giving state pressure
    • "H": Giving state enthalpy
    • "T": Giving state temperature
    • "D": Giving state density
    • "S": Giving state entropy
  • value: The value of the state
source