GASEOUS

All Functions

  • ActiveThermoCompressor(; name, η = 1.0, rp = 3.5)
  • ActiveThermoTurbine(; name, η = 1.0, rp = 3.5)
  • FixedHeatFlowPin(; name, Qin = 1e6)
  • FixedThermoHeatTransfer(; name, Qin = 1e6)
  • FlowControlThermoHeatTransfer(; name, ΔP = 0.0, Tout = 773.0)
  • GasFlowSource(; name, Ṁ = 1.0)
  • GasFlowValve(; name)
  • GasReference(; name, Pref = 10, T_ref = 500)
  • HeatTransferPin(; name)
  • IdealCooler(; name)
  • Intercooler(; name, Tout = 300)
  • PassiveElement(; name)
  • PassiveThermoCompressor(; name, η = 1.0)
  • PassiveThermoTurbine(; name, η = 1.0)
  • Regenerator(; name, ϵ = 0.95)
  • ReliefElement(; name)
  • SetPressure(; name, P = 0.1)
  • SetTemperature(; name, T = 300)
  • SinglePortReservoir(; name, P = 0.1, T = 300)
  • ThermoHeatSource(; name, Qin = 1e6)
  • ThermoHeatTransfer(; name, ΔP = 0.0)
  • ThermoPin(; name, Pdef = 10.0, Tdef = 300, ṁdef = 0.0)
  • TwoPortReservoir(; name, P = 0.1, T = 300)
  • WorkPin(; name)
  • gas_CopyConnect(pins...)
  • gas_connect(pins...)
  • hx_connect(hx, compAin, compAout, compBin, compBout)
  • series_connect(pins)
  • showsol(c, sol)
  • simpleBrayton()
  • simpleBraytonRegen()
  • testHeater(Tin = 300, Pin = 100, Qin = 15e6)
  • testIntercool()
  • testRegen()
  • testTurbine(; Tin = 1000, Pin = 50, rp = 3.0, returnmode = :sys)
  • throttle(; name)

COMPONENTS

GasFlowValve(; name)

  • DESCRIPTION:

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
  • EQUATIONS:

    \[ \] \[ \]

ThermoHeatTransfer(; name, ΔP = 0.0)

  • DESCRIPTION:

    Thermodynamic heat transfer element
    pins
    @named p = ThermoPin()
    @named n = ThermoPin()
    @named q = HeatTransferPin()
    states
    st = @variables Q̇(t) = 0.0 C(t) = 5192
    parameters
    ps = @parameters ΔP = ΔP

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `ΔP = 0.0`: DESCRIPTION
  • EQUATIONS:

    \[ \] \[ \]

FlowControlThermoHeatTransfer(; name, ΔP = 0.0, Tout = 773.0)

  • DESCRIPTION:

    FlowControlThermoHeatTransfer(; name, ΔP = 0.0, Tout)
    Ability to change mass flow rate to achieve desired outlet temperature
    Heat transfer element with the ability to control flow rate to achieve a desired outlet temperature
    @named p = ThermoPin()
    @named n = ThermoPin()
    @named q = HeatTransferPin()
    st = @variables Q̇(t) = 0.0 C(t) = 5192 ṁ(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`: DESCRIPTION
    • - `Tout = 773.0`: DESCRIPTION
  • EQUATIONS:

    \[ n.T = Tout\] \[ p.ṁ = q.Q̇ / ((n.T - p.T) * p.cp) \] \[ 0 = p.ṁ + n.ṁ \] \[ q.Q̇ = p.Φ + n.Φ \] \[ C = p.ṁ * p.cp \] \[ 0 = q.Q̇ - Q̇\] \[ n.P = p.P - ΔP\] \[ \]

FixedThermoHeatTransfer(; name, Qin = 1.0e6)

  • DESCRIPTION:

    Heat element with constant heat rate.
    st = @variables C(t) = 5192
    ps = @parameters Q̇ = Qin

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `Qin = 1.0e6`: DESCRIPTION
  • EQUATIONS:

    \[ 0 = p.ṁ + n.ṁ \] \[ q.Q̇ = p.Φ + n.Φ \] \[ C = p.ṁ * p.cp \] \[ 0 = q.Q̇ - Q̇\] \[ n.T = p.T + Q̇ / C\] \[ n.P = p.P\] \[ \]

ActiveThermoCompressor(; name, η = 1.0, rp = 3.5)

  • DESCRIPTION:

    Compressor element that controls the outlet port
    @named p = ThermoPin()
    @named n = ThermoPin()
    @named w = WorkPin()
    ps = @parameters rp = rp η = η

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `η = 1.0`: Isentropic Effecience
    • `rp = 3.5`: Compression Ratio
  • EQUATIONS:

    \[ 0 = p.ṁ + n.ṁ \] \[ n.P = p.P * rp\] \[ n.T = p.T * ((1.0 - η - (rp^((p.k - 1) / p.k))) / (-η))\] \[ w.Ẇ = p.ṁ * p.cp * (n.T - p.T)\] \[ w.Ẇ = p.Φ + n.Φ\] \[ \]

PassiveThermoCompressor(; name, η = 1.0)

  • DESCRIPTION:

    Compressor element that operates between externally controlled pressure nodes.
    @named p = ThermoPin()
    @named n = ThermoPin()
    @named w = WorkPin()
    ps = @parameters η = η

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `η = 1.0`: Isentropic Effecience
  • EQUATIONS:

    \[ 0 = p.ṁ + n.ṁ \] \[ n.T = p.T * ((1.0 - η - ((n.P / p.P)^((p.k - 1) / p.k))) / (-η))\] \[ w.Ẇ = p.ṁ * p.cp * (n.T - p.T)\] \[ w.Ẇ = p.Φ + n.Φ\] \[ \] \[ \]

ActiveThermoTurbine(; name, η = 1.0, rp = 3.5)

  • DESCRIPTION:

    @named p = ThermoPin(Pdef = 80, Tdef = 800)
    @named n = ThermoPin(Pdef = 80 / 3.5, Tdef = 500)
    @named w = WorkPin()
    ps = @parameters rp = rp η = η

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `η = 1.0`: Isentropic Effecience
    • `rp = 3.5`: Compression Ratio
  • EQUATIONS:

    \[ 0 = p.ṁ + n.ṁ \] \[ p.P = n.P * rp\] \[ n.T =\] \[ p.T * (η + rp^((p.k - 1) / p.k) - η * (rp^((p.k - 1) / p.k))) /\] \[ (rp^((p.k - 1) / p.k))\] \[ w.Ẇ = p.ṁ * p.cp * (n.T - p.T)\] \[ w.Ẇ = p.Φ + n.Φ\] \[ \]

PassiveThermoTurbine(; name, η = 1.0)

  • DESCRIPTION:

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `η = 1.0`: Isentropic Effecience
  • EQUATIONS:

    \[ 0 = p.ṁ + n.ṁ \] \[ p.P = n.P * rp\] \[ n.T = p.T * (η + rp^((p.k - 1) / p.k) - η * (rp^((p.k - 1) / p.k))) /(rp^((p.k - 1) / p.k))\] \[ w.Ẇ = p.ṁ * p.cp * (n.T - p.T)\] \[ w.Ẇ = p.Φ + n.Φ\] \[ \]

IdealCooler(; name)

  • DESCRIPTION:

    @named p = ThermoPin()
    @named n = ThermoPin()
    @named q = HeatTransferPin()
    sts = @variables Q̇(t) = 0.0

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
  • EQUATIONS:

    \[ q.Q̇ = p.Φ + n.Φ \] \[ 0 = p.ṁ + n.ṁ\] \[ n.P = p.P \] \[ q.Q̇ = p.ṁ * p.cp * (n.T - p.T)\] \[ Q̇ = q.Q̇\] \[ \]

PassiveElement(; name)

  • DESCRIPTION:

    @named p = ThermoPin()
    @named n = ThermoPin()
    sts = @variables Q̇(t) = 0.0 ΔP(t) = 0.0 ΔT(t) = 0.0 Δṁ(t) = 0.0

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
  • EQUATIONS:

    \[ n.ṁ + p.ṁ = Δṁ \] \[ ΔT = p.T - n.T\] \[ Q̇ = -(p.ṁ * p.cp * ΔT)\] \[ ΔP = p.P - n.P\] \[ Q̇ = p.Φ + n.Φ \] \[ \]

ReliefElement(; name)

  • DESCRIPTION:

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
  • EQUATIONS:

    \[ \] \[ \]

throttle(; name)

  • DESCRIPTION:

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
  • EQUATIONS:

    \[ \] \[ \]

Regenerator(; name, ϵ = 0.95)

  • DESCRIPTION:

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `ϵ = 0.95`: DESCRIPTION
  • EQUATIONS:

    \[ \] \[ \]

Intercooler(; name, Tout = 300)

  • DESCRIPTION:

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `Tout = 300`: DESCRIPTION
  • EQUATIONS:

    \[ \] \[ \]

PINS

ThermoPin(; name, Pdef = 10.0, Tdef = 300, ṁdef = 0.0)

  • DESCRIPTION:

    @variables P(t) = Pdef [unit = u"bar"]
    @variables ṁ(t) = ṁdef [unit = u"kg/s"]
    @variables T(t) = Tdef [unit = u"K"]
    @variables Φ(t) = 1.0
    @variables cp(t) = 5192
    @variables k(t) = 1.667
    sts = [T, P, ṁ, cp, k, Φ]

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `Pdef = 10.0`: DESCRIPTION
    • - `Tdef = 300`: DESCRIPTION
    • - `ṁdef = 0.0`: DESCRIPTION
  • EQUATIONS:

    \[ cp = c_p(T)\] \[ k = \gamma(T)\] \[ \]

SOURCES

GasFlowSource(; name, Ṁ = 1.0)

  • DESCRIPTION:

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `Ṁ = 1.0`: DESCRIPTION
  • EQUATIONS:

    \[ \] \[ \]

ThermoHeatSource(; name, Qin = 1.0e6)

  • DESCRIPTION:

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `Qin = 1.0e6`: DESCRIPTION
  • EQUATIONS:

    \[ \] \[ \]

UTILITYS

SetPressure(; name, P = 0.1)

  • DESCRIPTION:

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `P = 0.1`: DESCRIPTION
  • EQUATIONS:

    \[ \] \[ \]

SetTemperature(; name, T = 300)

  • DESCRIPTION:

    Constant Pressure Source

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `T = 300`: Temperature (K)
  • EQUATIONS:

    \[ \] \[ \]

SinglePortReservoir(; name, P = 0.1, T = 300)

  • DESCRIPTION:

    Single port flow energy ground element
    @named n = ThermoPin(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`: DESCRIPTION
    • - `T = 300`: Temperature (K)
  • EQUATIONS:

    \[ n.P = P\] \[ n.T = T\] \[ n.Φ = 0\] \[ \] \[ \]

TwoPortReservoir(; name, P = 0.1, T = 300)

  • DESCRIPTION:

  • INPUTS:
    • - `name`: Name of the system, symbol. Or use the @named macro when initializing.
    • - `P = 0.1`: DESCRIPTION
    • - `T = 300`: Temperature (K)
  • EQUATIONS:

    \[ \] \[ \]