References

Contents

Index

ThermoCycleGlides.HeatPumpType
HeatPump{T<:Real} <: ThermoCycleProblem

A 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].
source
ThermoCycleGlides.HeatPumpRecuperatorType
HeatPumpRecuperator{T<:Real} <: ThermoCycleProblem

A 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).
source
ThermoCycleGlides.ORCType

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].
source
ThermoCycleGlides.ORCEconomizerType
    ORCEconomizer{T<:Real} <: ThermoCycleProblem

Defines 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) [-].
source
ThermoCycleGlides.SolutionStateType

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.
source
ThermoCycleGlides.ThermoCycleParametersType

ThermoCycleParameters - A struct to hold the solver parameters of the nonlinear solver.

  • N::Int: Heat Exchanger discretization.
  • max_iters::Int: Maximum number of iterations
  • autodiff::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 on x.
  • ftol::Real: convergece criteria on f.
  • restart_TOL::Real: Restrat strategy with tolerace.
  • internal_pinch::Bool : Check for interal pinch for mixtures
source
ThermoCycleGlides.COPMethod
COP(prob::ThermoCycleGlides.ThermoCycleProblem, sol::SolutionState) -> Float64

Computes 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.
source
ThermoCycleGlides.optimizeMethod

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

source
ThermoCycleGlides.solveMethod

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.

source
ThermoCycleGlides.solveMethod

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.

source
ThermoCycleGlides.ηMethod
η(prob::ThermoCycleGlides.ThermoCycleProblem, sol::SolutionState) -> Float64

Computes 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.

source