References
Contents
Index
ThermoCycleGlides.HeatPumpThermoCycleGlides.HeatPumpRecuperatorThermoCycleGlides.ORCThermoCycleGlides.ORCEconomizerThermoCycleGlides.SolutionStateThermoCycleGlides.ThermoCycleParametersThermoCycleGlides.COPThermoCycleGlides.FThermoCycleGlides.FThermoCycleGlides.generate_box_solve_boundsThermoCycleGlides.generate_box_solve_boundsThermoCycleGlides.generate_box_solve_boundsThermoCycleGlides.generate_box_solve_boundsThermoCycleGlides.generate_initial_pointThermoCycleGlides.generate_initial_pointThermoCycleGlides.generate_initial_pointThermoCycleGlides.generate_initial_pointThermoCycleGlides.optimizeThermoCycleGlides.power_ratingsThermoCycleGlides.power_ratingsThermoCycleGlides.power_ratingsThermoCycleGlides.show_parametersThermoCycleGlides.solveThermoCycleGlides.solveThermoCycleGlides.ηThermoCycleGlides.η
ThermoCycleGlides.HeatPump — Type
HeatPump{T<:Real} <: ThermoCycleProblemA mutable structure representing a vapour-compression heat pump thermodynamic problem.
Fields
fluid::EoSModel: The equation of state (EoS) model defining the working fluid thermodynamic properties. For now it has to be Cubic EoS.z::AbstractVector{T}: The composition vector of the working fluid (for mixtures; typically[1.0]for pure fluids).T_evap_in::T: Inlet temperature to the evaporator [K].T_evap_out::T: Outlet temperature from the evaporator [K].ΔT_sh::T: Degree of superheating at the evaporator outlet [K].T_cond_in::T: Inlet temperature to the condenser [K].T_cond_out::T: Outlet temperature from the condenser [K].ΔT_sc::T: Degree of subcooling at the condenser outlet [K].η_comp::T: Isentropic efficiency of the compressor [-].pp_evap::T: Pinch point temperature difference for evaporator [K].pp_cond::T: Pinch point temperature difference for condensor [K].
ThermoCycleGlides.HeatPumpRecuperator — Type
HeatPumpRecuperator{T<:Real} <: ThermoCycleProblemA mutable structure representing a heat pump cycle with an internal recuperator (economiser or heat exchanger) between the discharge and suction sides.
Fields
hp::HeatPump{T}: The base heat pump configuration, containing fluid properties and cycle parameters.ϵ::T: Effectiveness of the recuperator (dimensionless, typically between 0 and 1).
ThermoCycleGlides.ORC — Type
ORC{T<:Real} <: ThermoCycleProblem
Defines an Organic Rankine Cycle (ORC) problem with thermodynamic and design parameters specified in Kelvin and dimensionless efficiencies.
Fields
fluid::CubicModel: Equation of State (EoS) model representing the working fluid. For now it has to be Cubic EoS.z::AbstractVector{T}: Mole fraction composition vector of the working fluid.T_evap_in::T: Inlet temperature of the evaporator [K].T_evap_out::T: Outlet temperature of the evaporator [K].ΔT_sh::T: Degree of superheating at the expander inlet [K].T_cond_in::T: Inlet temperature of the condenser [K].T_cond_out::T: Outlet temperature of the condenser [K].ΔT_sc::T: Degree of subcooling at the pump inlet [K].η_pump::T: Isentropic efficiency of the pump [-].η_expander::T: Isentropic efficiency of the expander [-].pp_evap::T: Minimum temperature difference (pinch point) at the evaporator [K].pp_cond::T: Minimum temperature difference (pinch point) at the condenser [K].
ThermoCycleGlides.ORCEconomizer — Type
ORCEconomizer{T<:Real} <: ThermoCycleProblemDefines an Organic Rankine Cycle (ORC) configuration with an economiser (regenerative heat exchanger), extending the base ORC problem with a specified effectiveness.
Fields
orc::ORC{T}: Base ORC system definition containing the thermodynamic parameters.ϵ::T: Effectiveness of the economiser (regenerator) [-].
ThermoCycleGlides.SolutionState — Type
SolutionState - A struct to hold the solution state of the nonlinear solver.
x::Vector{T}: The solution vector.f_calls::I: The number of function calls made during the solving process.iterations::I: The number of iterations taken to converge.residuals::Vector{T}: The residuals at the solution.lb::Vector{T}: The lower bounds used in the solver.ub::Vector{T}: The upper bounds used in the solver.autodiff::Bool: A flag indicating whether automatic differentiation was used.fd_order::I: The order of finite difference used if autodiff is false.lenx::T: The final change in the solution vector.lenf::T: The final change in the residuals.soltype::Symbol: A symbol indicating the type of cycle (:unknown,:subcritical,:transcritical). This will be updated with the cycle type after solving.
ThermoCycleGlides.ThermoCycleParameters — Type
ThermoCycleParameters - A struct to hold the solver parameters of the nonlinear solver.
N::Int: Heat Exchanger discretization.max_iters::Int: Maximum number of iterationsautodiff::Bool: A flag indicating whether automatic differentiation was used.fd_order::Int: The order of finite difference used if autodiff is false.xtol::Real: convergece criteria onx.ftol::Real: convergece criteria onf.restart_TOL::Real: Restrat strategy with tolerace.internal_pinch::Bool: Check for interal pinch for mixtures
ThermoCycleGlides.COP — Method
COP(prob::ThermoCycleGlides.ThermoCycleProblem, sol::SolutionState) -> Float64Computes the coefficient of performance (COP) of a thermodynamic cycle given the problem definition and its corresponding solution state.
Arguments
prob::ThermoCycleGlides.ThermoCycleProblem: The thermodynamic cycle problem containing fluid models, boundary conditions, and component parameters.sol::SolutionState: The solution state object containing the converged state variables (x), residuals, and convergence information.
ThermoCycleGlides.F — Method
F(prob::HeatPump, x::AbstractVector{T}; N::Int) function call to HeatPump
ThermoCycleGlides.F — Method
F(prob::HeatPumpRecuperator, x::AbstractVector{T}; N::Int) function call to HeatPump
ThermoCycleGlides.generate_box_solve_bounds — Method
generate_box_solve_bounds(prob::HeatPumpRecuperator) -> lb, ub Generates lower and upper bounds for the heat pump problem based on its parameters.
ThermoCycleGlides.generate_box_solve_bounds — Method
generate_box_solve_bounds(prob::HeatPump) -> lb, ub Generates lower and upper bounds for the heat pump problem based on its parameters.
ThermoCycleGlides.generate_box_solve_bounds — Method
generate_box_solve_bounds(prob::ORCEconomizer) -> lb, ub Generates lower and upper bounds for the heat pump problem based on its parameters.
ThermoCycleGlides.generate_box_solve_bounds — Method
generate_box_solve_bounds(prob::ORC) -> lb, ub Generates lower and upper bounds for the heat pump problem based on its parameters.
ThermoCycleGlides.generate_initial_point — Method
generate_initial_point(prob::HeatPump,lb::AbstractVector{T},ub::AbstractVector{T}) Generates initial point for solving the system.
ThermoCycleGlides.generate_initial_point — Method
generate_initial_point(prob::HeatPumpRecuperator,lb::AbstractVector{T},ub::AbstractVector{T}) Generates initial point for solving the system.
ThermoCycleGlides.generate_initial_point — Method
generate_initial_point(prob::ORC,lb::AbstractVector{T},ub::AbstractVector{T}) Generates initial point for solving the system.
ThermoCycleGlides.generate_initial_point — Method
generate_initial_point(prob::ORCEconomizer,lb::AbstractVector{T},ub::AbstractVector{T}) Generates initial point for solving the system.
ThermoCycleGlides.optimize — Method
optimize(prob::ThermoCycleProblem; kwargs...)
Its goal is to find the optimal subcooling and superheating values that maximize the cycle performance (COP or ORC -efficiency).
This should return the optimized cycle struct and the result from Metaheuristics
ThermoCycleGlides.power_ratings — Method
Function that gives specific power ratings for HP by fixing outlet power of compressor to equal 1.
ThermoCycleGlides.power_ratings — Method
Function that gives specific power ratings for HP by fixing outlet power of compressor to equal 1.
ThermoCycleGlides.power_ratings — Method
Function that gives specific power ratings for ORC by fixing outlet power of expander to equal 1.
ThermoCycleGlides.show_parameters — Method
show_parameters(prob::ORC) prints parameters in REPL
ThermoCycleGlides.solve — Method
Solves for pressure values in HP and ORC cycles for the given glide and problem parameters. Define those problems in the respective structs. For now the default box-nonlinear solver is newton-raphson, but this can be changed to other solvers in the future.
ThermoCycleGlides.solve — Method
Solves for pressure values in HP and ORC cycles for the given glide and problem parameters. Define those problems in the respective structs. For now the default box-nonlinear solver is newton-raphson, but this can be changed to other solvers in the future.
ThermoCycleGlides.η — Method
η(prob::ThermoCycleGlides.ThermoCycleProblem, sol::SolutionState) -> Float64Computes the thermal efficiency of a thermodynamic cycle given a problem definition and its corresponding solution state.
Arguments
prob::ThermoCycleGlides.ThermoCycleProblem: The thermodynamic cycle problem containing fluid properties, boundary conditions, and component parameters.sol::SolutionState: The solution state object containing the converged state variables (x), residuals, and convergence information.
Returns
Float64: The computed cycle efficiency, defined as the ratio of net work output to heat input.
Notes
This method acts as a wrapper that extracts the solution vector x from sol and calls the lower-level η(prob, x) implementation.
ThermoCycleGlides.η — Method
p[1] -> condensor pressure p[2] -> evaporator pressure