All Functions
- FixedHeatFlowPin(; name, Qin = 1e3)
- FlowControlIncompressibleHeatTransfer(; name, ΔP = 0.0, Tout = 1000.0)
- HeatTransferPin(; name)
- IdealCooler(; name)
- IncompressibleFixedFlowSource(; name, Ṁ = 1.0)
- IncompressibleFlowValve(; name)
- IncompressibleHeatTransfer(; name)
- IncompressibleOnePort(; name)
- IncompressiblePin(; name, Pdef = 50, Tdef = 555, ṁdef = 0.0)
- PassiveIncompressiblePump(; name, η = 0.9)
- PassiveIncompressiblePump2(; name, η = 1.0)
- ReliefElement(; name)
- SetPressure(; name, P = 0.1)
- SetPressure2(; name, P = 0.1)
- SetTemperature(; name, T = 300)
- SinglePortReservoir(; name, P = 0.1, T = 300)
- TwoPortReservoir(; name, P = 0.1, T = 300)
- WorkPin(; name)
- incompressible_connect(pins...)
- throttle(; name)
COMPONENTS
IncompressibleFlowValve(; name)
-
DESCRIPTION:
A flow valve object with a mass flow variable. Can be controlled with an external controller element.
@named p = IncompressiblePin()
@named n = IncompressiblePin()
sts = @variables ṁ(t) = 1.0 -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
-
EQUATIONS:
\[ 0 = p.Φ + n.Φ \] \[ 0 = p.ṁ + n.ṁ\] \[ p.ṁ = ṁ\] \[ p.T = n.T\] \[ n.P = p.P\] \[ \]
IncompressibleFixedFlowSource(; name, Ṁ = 1.0)
-
DESCRIPTION:
A fixed flow rate source
@named p = IncompressiblePin()
@named n = IncompressiblePin()
ps = @parameters Ṁ = Ṁ -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
- - `Ṁ = 1.0`: mass flow rate of the fixed flow source
-
EQUATIONS:
\[ 0 = p.Φ + n.Φ \] \[ 0 = p.ṁ + n.ṁ\] \[ p.ṁ = Ṁ\] \[ p.T = n.T\] \[ n.P = p.P\] \[ \]
PassiveIncompressiblePump(; name, η = 0.9)
-
DESCRIPTION:
-
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
- - `η = 0.9`: DESCRIPTION
-
EQUATIONS:
\[ \] \[ \]
PassiveIncompressiblePump2(; name, η = 1.0)
-
DESCRIPTION:
A passive pump component for incompressible liquids. Calculates work required based off of pressures at the p and n port
@named p = IncompressiblePin()
@named n = IncompressiblePin()
@named w = WorkPin()
ps = @parameters η = η -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
- - `η = 1.0`: Isentropic effeciency of the pump
-
EQUATIONS:
\[ 0 = p.ṁ + n.ṁ \] \[ w.Ẇ = p.ṁ * p.v * (n.P - p.P) * 1e5 / η\] \[ w.Ẇ = p.Φ + n.Φ\] \[ n.T = p.T + (p.v * (n.P - p.P) * 1e5 / η - p.v * (n.P - p.P) * 1e5) / p.cp\] \[ \]
IncompressibleHeatTransfer(; name)
-
DESCRIPTION:
Basic heat transfer port. Includes p,n ports for flow, and q which is a heat transfer port
@named p = IncompressiblePin()
@named n = IncompressiblePin()
@named q = HeatTransferPin()
st = @variables Q̇(t) = 0.0 C(t) = 187 , Heat rate and duty of the flow -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
-
EQUATIONS:
\[ 0 = p.ṁ + n.ṁ \] \[ q.Q̇ = p.Φ + n.Φ \] \[ C = p.ṁ * p.cp \] \[ 0 = q.Q̇ - Q̇\] \[ n.T = p.T + q.Q̇ / C\] \[ n.P = p.P\] \[ \]
FlowControlIncompressibleHeatTransfer(; name, ΔP = 0.0, Tout = 1000.0)
-
DESCRIPTION:
A heat transfer element with the ability to change the flow rate to achieve a desired outlet temperature, specified by the inputs.
@named p = IncompressiblePin()
@named n = IncompressiblePin()
@named q = HeatTransferPin()
st = @variables Q̇(t) = 0.0 C(t) = 187 ṁ(t) = 1.0
ps = @parameters ΔP = ΔP Tout = Tout -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
- - `ΔP = 0.0`: Pressure drop across the heat transfer element (bar)
- - `Tout = 1000.0`: outlet temperature (K)
-
EQUATIONS:
\[ n.T = Tout\] \[ ṁ = q.Q̇ / ((n.T - p.T) * p.cp) \] \[ p.ṁ = ṁ\] \[ 0 = p.ṁ + n.ṁ \] \[ q.Q̇ = p.Φ + n.Φ \] \[ C = ṁ * p.cp \] \[ 0 = q.Q̇ - Q̇\] \[ n.P = p.P - ΔP\] \[ \]
SinglePortReservoir(; name, P = 0.1, T = 300)
-
DESCRIPTION:
A sinlge port flow energy ground to connect with circiuts, only has n pin
@named n = IncompressiblePin(Pdef = P, Tdef = T)
ps = @parameters P = P T = T -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
- - `P = 0.1`: Pressure, (bar)
- - `T = 300`: Temperature (K)
-
EQUATIONS:
\[ n.P = P\] \[ n.T = T\] \[ n.Φ = 0\] \[ \]
TwoPortReservoir(; name, P = 0.1, T = 300)
-
DESCRIPTION:
A flow conserving ground element with 2 ports.
@named oneport = IncompressibleOnePort()
@unpack ΔT, ΔP, LHS, n, p = oneport
ps = @parameters T = T P = P -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
- - `P = 0.1`: Pressure
- - `T = 300`: Bar
-
EQUATIONS:
\[ LHS = 0\] \[ n.Φ = 0\] \[ p.T = T\] \[ p.P = P\] \[ ΔP = 0\] \[ ΔT = 0\] \[ \]
throttle(; name)
-
DESCRIPTION:
An enthalpy conserving throttle valve. Does not control the outlet pressure, but mimics a throttle valve when placed between 2 sources wtih a pressure differential.
-
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
-
EQUATIONS:
\[ \] \[ \]
IdealCooler(; name)
-
DESCRIPTION:
-
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
-
EQUATIONS:
\[ \] \[ \]
ReliefElement(; name)
-
DESCRIPTION:
-
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
-
EQUATIONS:
\[ n.ṁ + p.ṁ = 0 \] \[ q.Q̇ = p.Φ + n.Φ \] \[ \]
PINS
IncompressiblePin(; name, Pdef = 50, Tdef = 555, ṁdef = 0.0)
-
DESCRIPTION:
Incompresible Fluid pin,
across_var = @variables P(t) = Pdef T(t) = Tdef s(t) = 1.0 cp(t) = 187 v(t) = 0.001
thru_var = @variables ṁ(t) = ṁdef Φ(t) = 1.0 # mass flow and energy flow
sts = [T, P, ṁ, cp, s, v, Φ] -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
- - `Pdef = 50`: Initial Pressure (bar)
- - `Tdef = 555`: Initial Temperature (K)
- - `ṁdef = 0.0`: Initial Flow Rate (kg/s)
-
EQUATIONS:
\[ cp = c_p(T)\] \[ v = v(T)\] \[ s = s(T)\] \[ \] \[ \]
WorkPin(; name)
-
DESCRIPTION:
Basic work pin
sts = @variables Ẇ(t) = 0.0 -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
-
EQUATIONS:
\[ \] \[ \]
HeatTransferPin(; name)
-
DESCRIPTION:
sts = @variables Q̇(t) = 0.0
-
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
-
EQUATIONS:
\[ \] \[ \]
FixedHeatFlowPin(; name, Qin = 1000.0)
-
DESCRIPTION:
Component with fixed heat flow rate
sts = @variables Q̇(t) = Qin
ps = @parameters Qin = Qin -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
- - `Qin = 1000.0`: Heating rate, (W)
-
EQUATIONS:
\[ eqs = [Q̇ = Qin]\] \[ \]
PORTS
IncompressibleOnePort(; name)
-
DESCRIPTION:
Oneport element for connecting single port components
p = IncompressiblePin()
n = IncompressiblePin()
sts = @variables LHS(t) ΔP(t) = 0.0 ΔT(t) = 0.0 -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
-
EQUATIONS:
\[ LHS = p.Φ + n.Φ \] \[ 0 = p.ṁ + n.ṁ \] \[ ΔP = n.P - p.P \] \[ ΔT = n.T - p.T \] \[ \]
SOURCES
SetPressure(; name, P = 0.1)
-
DESCRIPTION:
Fixed pressure element
-
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
- - `P = 0.1`: Pressure (bar)
-
EQUATIONS:
\[ \] \[ \]
SetPressure2(; name, P = 0.1)
-
DESCRIPTION:
Fixed pressure element that does not use the onport function
@named p = IncompressiblePin(Pdef = P)
@named n = IncompressiblePin(Pdef = P)
ps = @parameters P = P -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
- - `P = 0.1`: Pressure (bar)
-
EQUATIONS:
\[ p.P = P\] \[ n.P = p.P\] \[ n.T = p.T\] \[ 0 = p.Φ + n.Φ \] \[ 0 = p.ṁ + n.ṁ\] \[ \]
SetTemperature(; name, T = 300)
-
DESCRIPTION:
Fixed temperature element
@named oneport = IncompressibleOnePort()
@unpack ΔT, ΔP, LHS, p = oneport
ps = @parameters T = T -
INPUTS:
- - `name`: Name of the system, symbol. Or use the @named macro when initializing.
- - `T = 300`: Temperature (K)
-
EQUATIONS:
\[ p.T = T\] \[ ΔT = 0\] \[ ΔP = 0\] \[ LHS = 0\] \[ \]