From 35ae53ae183bb617699c9538fe27ec6b7584d1b9 Mon Sep 17 00:00:00 2001 From: Christoph Lehmann <christoph.lehmann@ufz.de> Date: Sat, 30 Apr 2016 11:51:55 +0200 Subject: [PATCH] [Ads] removed constexpr --- MaterialsLib/Adsorption/Adsorption.h | 6 ++-- MaterialsLib/Adsorption/ReactionCaOH2.cpp | 14 ++++++-- MaterialsLib/Adsorption/ReactionCaOH2.h | 42 +++++++++++------------ 3 files changed, 36 insertions(+), 26 deletions(-) diff --git a/MaterialsLib/Adsorption/Adsorption.h b/MaterialsLib/Adsorption/Adsorption.h index 66493c5d7f0..c2030cd4db1 100644 --- a/MaterialsLib/Adsorption/Adsorption.h +++ b/MaterialsLib/Adsorption/Adsorption.h @@ -9,10 +9,10 @@ namespace Adsorption { -constexpr double GAS_CONST = 8.3144621; +const double GAS_CONST = 8.3144621; -constexpr double M_N2 = 0.028; -constexpr double M_H2O = 0.018; +const double M_N2 = 0.028; +const double M_H2O = 0.018; class Adsorption : public Reaction { diff --git a/MaterialsLib/Adsorption/ReactionCaOH2.cpp b/MaterialsLib/Adsorption/ReactionCaOH2.cpp index 1051d129b66..d1dc61e917c 100644 --- a/MaterialsLib/Adsorption/ReactionCaOH2.cpp +++ b/MaterialsLib/Adsorption/ReactionCaOH2.cpp @@ -15,8 +15,18 @@ namespace Adsorption { -constexpr double ReactionCaOH2::tol_l; -constexpr double ReactionCaOH2::tol_u; +const double ReactionCaOH2::R = GAS_CONST; +const double ReactionCaOH2::reaction_enthalpy = -1.12e+05; +const double ReactionCaOH2::reaction_entropy = -143.5; +const double ReactionCaOH2::M_carrier = M_N2; +const double ReactionCaOH2::M_react = M_H2O; + +const double ReactionCaOH2::tol_l = 1e-4; +const double ReactionCaOH2::tol_u = 1.0 - 1e-4; +const double ReactionCaOH2::tol_rho = 0.1; + +const double ReactionCaOH2::rho_low = 1656.0; +const double ReactionCaOH2::rho_up = 2200.0; double diff --git a/MaterialsLib/Adsorption/ReactionCaOH2.h b/MaterialsLib/Adsorption/ReactionCaOH2.h index 28e11817a1b..cc07f02ba38 100644 --- a/MaterialsLib/Adsorption/ReactionCaOH2.h +++ b/MaterialsLib/Adsorption/ReactionCaOH2.h @@ -57,25 +57,25 @@ private: void set_chemical_equilibrium(); double Ca_hydration(); - static constexpr double R = GAS_CONST; // [J/mol/K] - double rho_s; // solid phase density - double p_gas; // gas phase pressure in unit bar - double p_r_g; // pressure of H2O on gas phase; - double p_eq = 1.0; // equilibrium pressure; // unit in bar - double T_eq; // equilibrium temperature; - double T_s; // solid phase temperature; - double qR; // rate of solid density change; - double x_react; // mass fraction of water in gas phase; - double X_D; // mass fraction of dehydration (CaO) in the solid phase; - double X_H; // mass fraction of hydration in the solid phase; - static constexpr double reaction_enthalpy = -1.12e+05; // in J/mol; negative for exothermic composition reaction - static constexpr double reaction_entropy = -143.5; // in J/mol/K - static constexpr double M_carrier = M_N2; // inert component molar mass - static constexpr double M_react = M_H2O; // reactive component molar mass - - static constexpr double tol_l = 1e-4; - static constexpr double tol_u = 1.0 - 1e-4; - static constexpr double tol_rho = 0.1; + static const double R; // [J/mol/K] + double rho_s; // solid phase density + double p_gas; // gas phase pressure in unit bar + double p_r_g; // pressure of H2O on gas phase; + double p_eq = 1.0; // equilibrium pressure; // unit in bar + double T_eq; // equilibrium temperature; + double T_s; // solid phase temperature; + double qR; // rate of solid density change; + double x_react; // mass fraction of water in gas phase; + double X_D; // mass fraction of dehydration (CaO) in the solid phase; + double X_H; // mass fraction of hydration in the solid phase; + static const double reaction_enthalpy; // in J/mol; negative for exothermic composition reaction + static const double reaction_entropy; // in J/mol/K + static const double M_carrier; // inert component molar mass + static const double M_react; // reactive component molar mass + + static const double tol_l; + static const double tol_u; + static const double tol_rho; const BaseLib::ConfigTree ode_solver_config; @@ -83,8 +83,8 @@ private: friend class ProcessLib::TESFEMReactionAdaptorCaOH2; public: - static constexpr double rho_low = 1656.0; // lower density limit - static constexpr double rho_up = 2200.0; // upper density limit + static const double rho_low; // lower density limit + static const double rho_up; // upper density limit }; } -- GitLab