References

Contents

Index

CarnotCycles.Compute_cycle_errorMethod

Compute_cycle_error(p_source,h_source,p_sink,h_sink;reltol = 1e-8) * Computes cycle end point mismatch in states - between sink and source.

returns `nothing`

Shows error incase of mismatch
source
CarnotCycles.CoolantPortMethod

Makes node for port connections. This node is Pressure,Enthalpy, Mass flow rate and mass fraction of first fluid (incase of Clapyeron Mixture).

source
CarnotCycles.IsentropicCompressionMethod

IsentropicCompression(πc, h_in, p_in,fluid,η)

  • Arguments:

    1. πc : Pressure Ratio
    2. h_in : Inlet Enthalpy
    3. p_in : Inlet Pressure
    4. fluid: Fluid
    5. η : Isentropic Efficiency
  • returns : Outlet enthalpy after isentropic compression

source
CarnotCycles.IsentropicCompressionClapeyronMethod

IsentropicCompressionClapeyron(πc, h_in, p_in,z,fluid,η)

  • Arguments:

    1. πc : Pressure Ratio
    2. h_in : Inlet Enthalpy
    3. p_in : Inlet Pressure
    4. fluid: Fluid
    5. z : Moles
    6. η : Isentropic Efficiency
  • returns : Outlet enthalpy after isentropic compression

source
CarnotCycles.IsentropicExpansionMethod

IsentropicExpansion(πc, h_in, p_in,fluid,η)

  • Arguments:

    1. πc : Pressure Ratio
    2. h_in : Inlet Enthalpy
    3. p_in : Inlet Pressure
    4. fluid: Fluid
    5. η : Isentropic Efficiency
  • returns : Outlet enthalpy after isentropic expansion

source
CarnotCycles.IsentropicExpansionClapeyronMethod

IsentropicExpansionClapeyron(πc, h_in, p_in,z,fluid,η)

  • Arguments:

    1. πc : Pressure Ratio
    2. h_in : Inlet Enthalpy
    3. p_in : Inlet Pressure
    4. fluid: Fluid
    5. z : Moles
    6. η : Isentropic Efficiency
  • returns : Outlet enthalpy after isentropic expansion

source
CarnotCycles.IsobaricHeatSinkMethod

IsobaricHeatSink(;name,fluid = set_fluid)

A heat sink independent of temperature and no pressure drop

  • Parameters:

    1. Q_dot : Total heat supplied
  • Local Variables:

    1. P : Power
    2. s_in : Inlet Entropy
    3. p_in : Inlet Pressure
    4. T_in : Inlet Temperature
    5. h_in : Inlet Enthalpy
    6. ρ_in : Inlet Density
    7. s_out : Outlet Entropy
    8. p_out : Outlet Pressure
    9. T_out : Outlet Temperature
    10. h_out : Outlet Enthalpy
    11. ρ_out : Outlet Density
  • Port Variables:

    1. inport : p and h
    2. outport : p and h
source
CarnotCycles.IsobaricHeatSourceMethod

IsobaricHeatSource(;name,fluid = set_fluid)

A heat source independent of temperature and no pressure drop

  • Parameters:

    1. Q_dot : Total heat supplied
  • Local Variables:

    1. P : Power
    2. s_in : Inlet Entropy
    3. p_in : Inlet Pressure
    4. T_in : Inlet Temperature
    5. h_in : Inlet Enthalpy
    6. ρ_in : Inlet Density
    7. s_out : Outlet Entropy
    8. p_out : Outlet Pressure
    9. T_out : Outlet Temperature
    10. h_out : Outlet Enthalpy
    11. ρ_out : Outlet Density
  • Port Variables:

    1. inport : p and h
    2. outport : p and h
source
CarnotCycles.IsochoricCompressionMethod

IsochoricCompression(πc, h_in, p_in,fluid)

  • Arguments:

    1. πc : Pressure Ratio
    2. h_in : Inlet Enthalpy
    3. p_in : Inlet Pressure
    4. fluid: Fluid
  • Output -> Outlet enthalpy after isochoric compression

source
CarnotCycles.IsochoricCompressionClapeyronMethod

IsochoricCompressionClapeyron(πc, h_in, p_in,z::Array,fluid::EoSModel)

  • Arguments:

    1. πc : Pressure Ratio
    2. h_in : Inlet Enthalpy
    3. p_in : Inlet Pressure
    4. z : Moles
    5. fluid: Fluid
  • Output -> Outlet enthalpy after isochoric compression

source
CarnotCycles.IsochoricExpansionMethod

IsochoricExpansion(πc, h_in, p_in,fluid)

  • Arguments:

    1. πc : Pressure Ratio
    2. h_in : Inlet Enthalpy
    3. p_in : Inlet Pressure
    4. fluid: Fluid
  • Output -> Outlet enthalpy after isochoric expansion

source
CarnotCycles.IsochoricExpansionClapeyronMethod

IsochoricExpansionClapeyron(πc, h_in, p_in,z::Array,fluid::EoSModel)

  • Arguments:

    1. πc : Pressure Ratio
    2. h_in : Inlet Enthalpy
    3. p_in : Inlet Pressure
    4. z : Moles
    5. fluid: Fluid
  • Output -> Outlet enthalpy after isochoric expansion

source
CarnotCycles.IsothermalCompressionMethod

IsothermalCompression(πc, h_in, p_in,fluid)

  • Arguments:

    1. πc : Pressure Ratio
    2. h_in : Inlet Enthalpy
    3. p_in : Inlet Pressure
    4. fluid: Fluid
  • Output -> Outlet enthalpy after Isothermal Compression

source
CarnotCycles.IsothermalCompressionClapeyronMethod

IsothermalCompressionClapeyron(πc, h_in, p_in,z,fluid::EoSModel)

  • Arguments:

    1. πc : Pressure Ratio
    2. h_in : Inlet Enthalpy
    3. p_in : Inlet Pressure
    4. z : Moles
    5. fluid: Fluid
  • Output -> Outlet enthalpy after Isothermal compression

source
CarnotCycles.IsothermalExpansionMethod

IsothermalExpansion(πc, h_in, p_in,fluid)

  • Arguments:

    1. πc : Pressure Ratio
    2. h_in : Inlet Enthalpy
    3. p_in : Inlet Pressure
    4. fluid: Fluid
  • Output -> Outlet enthalpy after Isothermal Expansion

source
CarnotCycles.IsothermalExpansionClapeyronMethod

IsothermalExpansionClapeyron(πc, h_in, p_in,z,fluid::EoSModel)

  • Arguments:

    1. πc : Pressure Ratio
    2. h_in : Inlet Enthalpy
    3. p_in : Inlet Pressure
    4. z : Moles
    5. fluid: Fluid
  • Output -> Outlet enthalpy after Isothermal expansion

source
CarnotCycles.MassSourceMethod

MassSource - Initilizes cycle start point. Requires initial enthalpy,pressure and Mass flow rate if CoolProp fluid is used else uses enthalpy,pressure, Mass flow rate, and mass fraction of first fluid if Clapeyron Fluid is used.

source
CarnotCycles.PT_IsentropicExpansionClapeyronMethod

PT_IsentropicExpansionClapeyron(model::EoSModel,T_in,p_in,z,πc,η)

  • Arguments:

    1. πc : Pressure Ratio
    2. T_in : Inlet Temperature
    3. p_in : Inlet Pressure
    4. fluid: Fluid
    5. z : Moles
    6. η : Isentropic Efficiency
  • returns : Outlet Temperature after isentropic expansion

source
CarnotCycles.PipeMethod

Pipe(fluid::AbstractString = set_fluid;name)

pressure drop across pipe using Darcy-Weisbach equation

source
CarnotCycles.PumpMethod

Pump(;name,fluid = set_fluid)

A pump with isentropic Efficiency and pressure ratio as parameter is chosen. Ensure that inlet to the pump is liquid by checking the internal variable LiquidPhase.

source
CarnotCycles.RefPortMethod

Makes node for port connections. This node is Pressure,Temperature, Mass flow rate and mass fraction of first fluid (incase of Clapyeron Mixture). Use this when the two-phase details of the fluid are not necessary.

source
CarnotCycles.SimpleCondensorMethod

SimpleCondensor(;name,fluid=set_fluid)

Condenses the fluid to ΔT_sc below the saturation point. If the fluid is above the critical point then cools it to ΔT_sc below the critical temperature. No pressure drop is considered.

source
CarnotCycles.SimpleCondensorGlideMethod

A simple condensor where the HTF inlet and outlet temperature is passed as a parameter. Has a variable is_feas which checks if the fluid passed through violates temperature profile condition or not.

source
CarnotCycles.SimpleEvaporatorMethod

SimpleCondensor(;name,fluid=set_fluid)

Evaporates the fluid to ΔT_sh above the saturation point. If the fluid is above the critical point then cools it to ΔT_sh above the critical temperature. No pressure drop is considered.

source
CarnotCycles.SimpleEvaporatorGlideMethod

A simple evaporator where the HTF inlet and outlet temperature is passed as a parameter. Has a variable is_feas which checks if the fluid passed through violates temperature profile condition or not.

source
CarnotCycles.StoragePortMethod

Storage port that connect the storage HTF to the thermal storage. Contains Temperature and mass flow rate of the HTF.

source
CarnotCycles.eNTUFunction

flow can be either :counterflow, :parallelflow, or :crossflow

returns ϵ for the given NTU and C_r and flow type

Cr is the heat capacity ratio, defined as Cr = Cmin / Cmax, where Cmin and Cmax are the minimum and maximum heat capacities of the two fluids in the heat exchanger multiplied with their mass flow rate.

source
CarnotCycles.is_feasible_condensorMethod

This checks if the temperature profile inside the condensor violates physics or not.

i.e. It will see for a condensor that if the temperature of the working fluid was always more than the temperature of the heat transfer fluid.
if it is feasible then it will return `true` else `false`
source
CarnotCycles.is_feasible_evaporatorMethod

This checks if the temperature profile inside the evaporator violates physics or not.

i.e. It will see for a evaporator that if the temperature of the working fluid was always less than the temperature of the heat transfer fluid.
if it is feasible then it will return `true` else `false`
source
CarnotCycles.load_fluidMethod

load_fluid(x::Clapeyron.EoSModel) - fixes fluid for simulation through components using Clapeyron as backend

source
CarnotCycles.mass_to_molesMethod

mass_to_moles(model::EoSModel,x,mass) : convert mass of fluid to number of moles based on the composition of 1st fluid by mass x

source
CarnotCycles.plotMethod

plot(sol::SteadyStateSolution,system::Vector{System},names::Vector{String};phase = true,fluid = CarnotCycles.set_fluid,type = :TS) * Plots the phase diagram of the system using the given solution and system. * sol: The solution object containing the results of the simulation. Do not include source and sink in the system. * system: The vector of System objects representing the system. * names: The vector of names for each component in the system. * phase: A boolean indicating whether to plot the phase boundaries or not. Default is true. * fluid: The fluid model to be used for plotting. Default is CarnotCycles.set_fluid. * type: The type of plot to be generated. Can be either :TS or :PH. Default is :TS.

Returns a `Plots.plot` object.
source
CarnotCycles.show_all_statesMethod

show_all_states(sol::SteadyStateSolution,system::Vector{System},names::Vector{String})

  • Arguments:

    1. sol : The solution from the SteadtStateSystem.
    2. system : The vector of components chosen. The first should be MassSource and the last has to be MassSink.
    3. names : The names of the components in the system. Pass it as a vector of strings.
  • Returns: Prints the state points of the system in a readable format in the terminal.

source