From cdc21e38e8fb89c80a7b49ec7eea2e443b87b861 Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Sat, 6 Sep 2014 21:41:14 +0200 Subject: [PATCH] PhaseEnvelopeData can be extracted using the get_phase_envelope_data function from the AbstractState Signed-off-by: Ian Bell --- include/AbstractState.h | 4 ++++ src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/include/AbstractState.h b/include/AbstractState.h index 522ba989..0faa72fa 100644 --- a/include/AbstractState.h +++ b/include/AbstractState.h @@ -11,6 +11,7 @@ #include "CachedElement.h" #include "Exceptions.h" #include "DataStructures.h" +#include "PhaseEnvelope.h" #include @@ -252,6 +253,8 @@ protected: /// Using this backend, calculate a phase given by the state string /// @param state A string that describes the state desired, one of "hs_anchor", "critical"/"crit", "reducing" virtual const CoolProp::SimpleState & calc_state(const std::string &state){throw NotImplementedError("calc_state is not implemented for this backend");}; + + virtual const CoolProp::PhaseEnvelopeData & calc_phase_envelope_data(void){throw NotImplementedError("calc_phase_envelope_data is not implemented for this backend");}; public: @@ -302,6 +305,7 @@ public: const CoolProp::SimpleState & get_reducing_state(){return _reducing;}; const CoolProp::SimpleState & get_state(const std::string &state){return calc_state(state);}; + const CoolProp::PhaseEnvelopeData &get_phase_envelope_data(){return calc_phase_envelope_data();}; double keyed_output(int key); double trivial_keyed_output(int key); diff --git a/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h b/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h index 64b0a5f4..7b13c73f 100644 --- a/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h +++ b/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h @@ -63,6 +63,8 @@ public: const std::vector &get_components(){return components;}; std::vector &get_K(){return K;}; std::vector &get_lnK(){return lnK;}; + + const CoolProp::PhaseEnvelopeData &calc_phase_envelope_data(){return PhaseEnvelope;}; void resize(unsigned int N); shared_ptr SatL, SatV; ///<