diff --git a/CMakeLists.txt b/CMakeLists.txt index 26c769b..b72f014 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") include(CCache) # Set the name of the project -project(ThermoFun VERSION 0.4.0 LANGUAGES CXX) +project(ThermoFun VERSION 0.4.1 LANGUAGES CXX) # Define variables with the GNU standard installation directories include(GNUInstallDirs) diff --git a/ThermoFun/Substances/Gases/GasCORK.cpp b/ThermoFun/Substances/Gases/GasCORK.cpp index d12075b..58d50bb 100644 --- a/ThermoFun/Substances/Gases/GasCORK.cpp +++ b/ThermoFun/Substances/Gases/GasCORK.cpp @@ -1,3 +1,4 @@ +#include #include "Substances/Gases/GasCORK.h" #include "Substances/Gases/s_solmod_.h" #include "Substance.h" @@ -18,13 +19,13 @@ auto thermoPropertiesGasCORK(Reaktoro_::Temperature TK, Reaktoro_::Pressure Pbar solmod::TCORKcalc myCORK( 1, Pbar.val, (TK.val), Eos_Code ); // modified 05.11.2010 (TW) double TClow = subst.thermoParameters().temperature_intervals[0][0]; - double * CPg = new double[7]; + std::array CPg; for (unsigned int i = 0; i < 7; i++) { CPg[i] = subst.thermoParameters().critical_parameters[i]; } - myCORK.CORKCalcFugPure( (TClow/*+273.15*/), (CPg), FugProps ); + myCORK.CORKCalcFugPure( (TClow/*+273.15*/), CPg.data(), FugProps ); // increment thermodynamic properties tps.gibbs_energy += R_CONSTANT * (TK) * log( FugProps[0] ); // from ideal gas at 1 bar and givent T to pure real gas/fluid at T and P