References
Contents
Index
ThermoCycleGlides.ORCThermoCycleGlides.ORCEconomizerThermoCycleGlides.SolutionStateThermoCycleGlides.ThermoCycleParametersThermoCycleGlides.COPThermoCycleGlides.generate_box_solve_boundsThermoCycleGlides.optimizeThermoCycleGlides.plot_cycleThermoCycleGlides.power_ratingsThermoCycleGlides.power_ratingsThermoCycleGlides.power_ratingsThermoCycleGlides.show_parametersThermoCycleGlides.solveThermoCycleGlides.ηThermoCycleGlides.η
ThermoCycleGlides.ORC — TypeORC{T<:Real} <: ThermoCycleProblem
Defines an Organic Rankine Cycle (ORC) problem with thermodynamic and design parameters specified in Kelvin and dimensionless efficiencies.
Fields
fluid::EoSModel: Equation of State (EoS) model representing the working fluid.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 — TypeSolutionState - 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 — TypeStruct for solver and system paramters N - hex discrtization (incase of mixtures) internal_pinch - to check if pinch point was met in two-phase
ThermoCycleGlides.COP — MethodCOP(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.generate_box_solve_bounds — Methodgenerate_box_solve_bounds(prob::HeatPump) -> lb, ub Generates lower and upper bounds for the heat pump problem based on its parameters.
ThermoCycleGlides.optimize — Methodoptimize(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.plot_cycle — MethodPlots TS diagram
ThermoCycleGlides.power_ratings — MethodFunction that gives specific power ratings for HP by fixing outlet power of compressor to equal 1.
ThermoCycleGlides.power_ratings — MethodFunction that gives specific power ratings for HP by fixing outlet power of compressor to equal 1.
ThermoCycleGlides.power_ratings — MethodFunction that gives specific power ratings for ORC by fixing outlet power of expander to equal 1.
ThermoCycleGlides.show_parameters — Methodshow_parameters(prob::ORC) prints parameters in REPL
ThermoCycleGlides.solve — MethodSolves 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.η — Methodp[1] -> condensor pressure p[2] -> evaporator pressure