References
Contents
Index
CarnotCycles.AmbientNode
CarnotCycles.Compute_cycle_error
CarnotCycles.Compute_cycle_error
CarnotCycles.CoolPropGasPhaseCheck
CarnotCycles.CoolPropLiquidPhaseCheck
CarnotCycles.CoolantPort
CarnotCycles.HeatExchangerCoolProp
CarnotCycles.HeatPort
CarnotCycles.IsentropicCompression
CarnotCycles.IsentropicCompressionClapeyron
CarnotCycles.IsentropicCompressor
CarnotCycles.IsentropicExpander
CarnotCycles.IsentropicExpansion
CarnotCycles.IsentropicExpansionClapeyron
CarnotCycles.IsobaricHeatSink
CarnotCycles.IsobaricHeatSource
CarnotCycles.IsochoricCompression
CarnotCycles.IsochoricCompressionClapeyron
CarnotCycles.IsochoricCompressor
CarnotCycles.IsochoricExpander
CarnotCycles.IsochoricExpansion
CarnotCycles.IsochoricExpansionClapeyron
CarnotCycles.IsothermalCompression
CarnotCycles.IsothermalCompressionClapeyron
CarnotCycles.IsothermalCompressor
CarnotCycles.IsothermalExpansion
CarnotCycles.IsothermalExpansionClapeyron
CarnotCycles.MassSink
CarnotCycles.MassSource
CarnotCycles.PT_IsentropicExpansionClapeyron
CarnotCycles.PackedBed
CarnotCycles.PhaseIdentificationNumeric
CarnotCycles.Pipe
CarnotCycles.PipeCoolProp
CarnotCycles.PowerPort
CarnotCycles.Pump
CarnotCycles.RefPort
CarnotCycles.SimpleCondensor
CarnotCycles.SimpleCondensorGlide
CarnotCycles.SimpleEvaporator
CarnotCycles.SimpleEvaporatorGlide
CarnotCycles.StoragePort
CarnotCycles.Valve
CarnotCycles.eNTU
CarnotCycles.is_feasible_condensor
CarnotCycles.is_feasible_evaporator
CarnotCycles.load_fluid
CarnotCycles.load_fluid
CarnotCycles.mass_to_moles
CarnotCycles.moles_to_mass
CarnotCycles.plot
CarnotCycles.show_all_states
CarnotCycles.specific_isobaric_heat_capacity
CarnotCycles.AmbientNode
— MethodAmbient temperature node.
CarnotCycles.Compute_cycle_error
— MethodCompute_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
CarnotCycles.Compute_cycle_error
— MethodCompute_cycle_error(sol::ODESolution,system::Vector{System};reltol = 1e-8)
CarnotCycles.CoolPropGasPhaseCheck
— MethodCoolPropGasPhaseCheck
Checks if state point is Gas. Passes through an assert statement.
CarnotCycles.CoolPropLiquidPhaseCheck
— MethodCoolPropLiquidPhaseCheck
Checks if state point is Liquid. Passes through an assert statement.
CarnotCycles.CoolantPort
— MethodMakes node for port connections. This node is Pressure,Enthalpy, Mass flow rate and mass fraction of first fluid (incase of Clapyeron Mixture).
CarnotCycles.HeatExchangerCoolProp
— MethodNot for phase change
CarnotCycles.HeatPort
— MethodHeatPort
: Variables are Q, tin, Tout
CarnotCycles.IsentropicCompression
— MethodIsentropicCompression(πc, h_in, p_in,fluid,η)
Arguments:
πc
: Pressure Ratioh_in
: Inlet Enthalpyp_in
: Inlet Pressurefluid
: Fluidη
: Isentropic Efficiency
returns : Outlet enthalpy after isentropic compression
CarnotCycles.IsentropicCompressionClapeyron
— MethodIsentropicCompressionClapeyron(πc, h_in, p_in,z,fluid,η)
Arguments:
πc
: Pressure Ratioh_in
: Inlet Enthalpyp_in
: Inlet Pressurefluid
: Fluidz
: Molesη
: Isentropic Efficiency
returns : Outlet enthalpy after isentropic compression
CarnotCycles.IsentropicCompressor
— MethodIsentropicCompressor(;name,fluid=set_fluid)
A compressor with isentropic Effeciency and pressure ratio as a parameter is chosen.
CarnotCycles.IsentropicExpander
— MethodIsentropicExpander(;name,fluid=set_fluid)
A expander with isentropic Effeciency and pressure ratio as a parameter is chosen.
CarnotCycles.IsentropicExpansion
— MethodIsentropicExpansion(πc, h_in, p_in,fluid,η)
Arguments:
πc
: Pressure Ratioh_in
: Inlet Enthalpyp_in
: Inlet Pressurefluid
: Fluidη
: Isentropic Efficiency
returns : Outlet enthalpy after isentropic expansion
CarnotCycles.IsentropicExpansionClapeyron
— MethodIsentropicExpansionClapeyron(πc, h_in, p_in,z,fluid,η)
Arguments:
πc
: Pressure Ratioh_in
: Inlet Enthalpyp_in
: Inlet Pressurefluid
: Fluidz
: Molesη
: Isentropic Efficiency
returns : Outlet enthalpy after isentropic expansion
CarnotCycles.IsobaricHeatSink
— MethodIsobaricHeatSink(;name,fluid = set_fluid)
A heat sink independent of temperature and no pressure drop
Parameters:
Q_dot
: Total heat supplied
Local Variables:
P
: Powers_in
: Inlet Entropyp_in
: Inlet PressureT_in
: Inlet Temperatureh_in
: Inlet Enthalpyρ_in
: Inlet Densitys_out
: Outlet Entropyp_out
: Outlet PressureT_out
: Outlet Temperatureh_out
: Outlet Enthalpyρ_out
: Outlet Density
Port Variables:
inport
:p
andh
outport
:p
andh
CarnotCycles.IsobaricHeatSource
— MethodIsobaricHeatSource(;name,fluid = set_fluid)
A heat source independent of temperature and no pressure drop
Parameters:
Q_dot
: Total heat supplied
Local Variables:
P
: Powers_in
: Inlet Entropyp_in
: Inlet PressureT_in
: Inlet Temperatureh_in
: Inlet Enthalpyρ_in
: Inlet Densitys_out
: Outlet Entropyp_out
: Outlet PressureT_out
: Outlet Temperatureh_out
: Outlet Enthalpyρ_out
: Outlet Density
Port Variables:
inport
:p
andh
outport
:p
andh
CarnotCycles.IsochoricCompression
— MethodIsochoricCompression(πc, h_in, p_in,fluid)
Arguments:
πc
: Pressure Ratioh_in
: Inlet Enthalpyp_in
: Inlet Pressurefluid
: Fluid
Output -> Outlet enthalpy after isochoric compression
CarnotCycles.IsochoricCompressionClapeyron
— MethodIsochoricCompressionClapeyron(πc, h_in, p_in,z::Array,fluid::EoSModel)
Arguments:
πc
: Pressure Ratioh_in
: Inlet Enthalpyp_in
: Inlet Pressurez
: Molesfluid
: Fluid
Output -> Outlet enthalpy after isochoric compression
CarnotCycles.IsochoricCompressor
— MethodIsochoricCompressor(;name,fluid = set_fluid)
A compressor with pressure ratio as a parameter is chosen.
CarnotCycles.IsochoricExpander
— MethodIsochoricCompressor(;name,fluid = set_fluid)
A compressor with pressure ratio as a parameter is chosen.
CarnotCycles.IsochoricExpansion
— MethodIsochoricExpansion(πc, h_in, p_in,fluid)
Arguments:
πc
: Pressure Ratioh_in
: Inlet Enthalpyp_in
: Inlet Pressurefluid
: Fluid
Output -> Outlet enthalpy after isochoric expansion
CarnotCycles.IsochoricExpansionClapeyron
— MethodIsochoricExpansionClapeyron(πc, h_in, p_in,z::Array,fluid::EoSModel)
Arguments:
πc
: Pressure Ratioh_in
: Inlet Enthalpyp_in
: Inlet Pressurez
: Molesfluid
: Fluid
Output -> Outlet enthalpy after isochoric expansion
CarnotCycles.IsothermalCompression
— MethodIsothermalCompression(πc, h_in, p_in,fluid)
Arguments:
πc
: Pressure Ratioh_in
: Inlet Enthalpyp_in
: Inlet Pressurefluid
: Fluid
Output -> Outlet enthalpy after Isothermal Compression
CarnotCycles.IsothermalCompressionClapeyron
— MethodIsothermalCompressionClapeyron(πc, h_in, p_in,z,fluid::EoSModel)
Arguments:
πc
: Pressure Ratioh_in
: Inlet Enthalpyp_in
: Inlet Pressurez
: Molesfluid
: Fluid
Output -> Outlet enthalpy after Isothermal compression
CarnotCycles.IsothermalCompressor
— MethodIsothermalCompressor(;name,fluid = set_fluid)
A compressor with pressure ratio as a parameter is chosen.
CarnotCycles.IsothermalExpansion
— MethodIsothermalExpansion(πc, h_in, p_in,fluid)
Arguments:
πc
: Pressure Ratioh_in
: Inlet Enthalpyp_in
: Inlet Pressurefluid
: Fluid
Output -> Outlet enthalpy after Isothermal Expansion
CarnotCycles.IsothermalExpansionClapeyron
— MethodIsothermalExpansionClapeyron(πc, h_in, p_in,z,fluid::EoSModel)
Arguments:
πc
: Pressure Ratioh_in
: Inlet Enthalpyp_in
: Inlet Pressurez
: Molesfluid
: Fluid
Output -> Outlet enthalpy after Isothermal expansion
CarnotCycles.MassSink
— MethodMassSink
` - Sets the final port input values to the variables. Use as a sink for the simulation.
CarnotCycles.MassSource
— MethodMassSource
- 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.
CarnotCycles.PT_IsentropicExpansionClapeyron
— MethodPT_IsentropicExpansionClapeyron(model::EoSModel,T_in,p_in,z,πc,η)
Arguments:
πc
: Pressure RatioT_in
: Inlet Temperaturep_in
: Inlet Pressurefluid
: Fluidz
: Molesη
: Isentropic Efficiency
returns : Outlet Temperature after isentropic expansion
CarnotCycles.PackedBed
— MethodA simple Schuman Packed Bed model.
CarnotCycles.PhaseIdentificationNumeric
— MethodPhaseIdentificationNumeric(model::EoSModel,p,h,z)
For identification of phase of the fluid when using Clapeyron.
returns 0 for liquid, 1 for vapour, 2 for Two phase
CarnotCycles.Pipe
— MethodPipe(fluid::AbstractString = set_fluid;name)
pressure drop across pipe using Darcy-Weisbach equation
CarnotCycles.PipeCoolProp
— FunctionPipeCoolProp(fluid::AbstractString = set_fluid;name)
pressure drop across pipe using Darcy-Weisbach equation
CarnotCycles.PowerPort
— MethodCarnotCycles.Pump
— MethodPump(;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
.
CarnotCycles.RefPort
— MethodMakes 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.
CarnotCycles.SimpleCondensor
— MethodSimpleCondensor(;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.
CarnotCycles.SimpleCondensorGlide
— MethodA 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.
CarnotCycles.SimpleEvaporator
— MethodSimpleCondensor(;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.
CarnotCycles.SimpleEvaporatorGlide
— MethodA 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.
CarnotCycles.StoragePort
— MethodStorage port that connect the storage HTF to the thermal storage. Contains Temperature and mass flow rate of the HTF.
CarnotCycles.Valve
— MethodValve(;name,fluid)
Isenthalpic Valve with pressure ratio as a parameter.
CarnotCycles.eNTU
— Functionflow
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.
CarnotCycles.is_feasible_condensor
— MethodThis 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`
CarnotCycles.is_feasible_evaporator
— MethodThis 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`
CarnotCycles.load_fluid
— Methodload_fluid(x::AbstractString)
- fixes fluid for simulation through components using CoolProp as backend.
CarnotCycles.load_fluid
— Methodload_fluid(x::Clapeyron.EoSModel)
- fixes fluid for simulation through components using Clapeyron as backend
CarnotCycles.mass_to_moles
— Methodmass_to_moles(model::EoSModel,x,mass)
: convert mass of fluid to number of moles based on the composition of 1st fluid by mass x
CarnotCycles.moles_to_mass
— Methodmoles_to_mass(model::EoSModel,z)
: convert number of moles to mass of fluid.`
CarnotCycles.plot
— Methodplot(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.
CarnotCycles.show_all_states
— Methodshow_all_states(sol::SteadyStateSolution,system::Vector{System},names::Vector{String})
Arguments:
sol
: The solution from the SteadtStateSystem.system
: The vector of components chosen. The first should beMassSource
and the last has to beMassSink
.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.
CarnotCycles.specific_isobaric_heat_capacity
— MethodComputes the specific isobaric heat capacity of the fluid at the given pressure, temperature and composition J/kg-K.