diff --git a/MaterialLib/MPL/CheckMaterialSpatialDistributionMap.h b/MaterialLib/MPL/CheckMaterialSpatialDistributionMap.h index 7d4ec3b2a94f442a45b5f29b7fa8b7a33a31b0b6..28ad06b6ad636392677255157b8bcf57dc9a0520 100644 --- a/MaterialLib/MPL/CheckMaterialSpatialDistributionMap.h +++ b/MaterialLib/MPL/CheckMaterialSpatialDistributionMap.h @@ -10,8 +10,8 @@ #include "MaterialSpatialDistributionMap.h" #include "Medium.h" -#include "MeshLib/Mesh.h" #include "MeshLib/Elements/Element.h" +#include "MeshLib/Mesh.h" #include "Phase.h" namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/CreateComponent.h b/MaterialLib/MPL/CreateComponent.h index b93a7d9d54c00f7b180a7cf90b509b0316298230..adb52ca2dbe97de2a97f75013f78703b6436782e 100644 --- a/MaterialLib/MPL/CreateComponent.h +++ b/MaterialLib/MPL/CreateComponent.h @@ -26,7 +26,7 @@ namespace ParameterLib { struct ParameterBase; struct CoordinateSystem; -} +} // namespace ParameterLib namespace MathLib { diff --git a/MaterialLib/MPL/CreateMedium.h b/MaterialLib/MPL/CreateMedium.h index b92d3241dd8a1cd2ecc1901f86f2060391bf5a92..ef168d6f595996cfa30733ffb7c43cfefbcebb3b 100644 --- a/MaterialLib/MPL/CreateMedium.h +++ b/MaterialLib/MPL/CreateMedium.h @@ -29,7 +29,7 @@ namespace ParameterLib { struct ParameterBase; struct CoordinateSystem; -} +} // namespace ParameterLib namespace MathLib { class PiecewiseLinearInterpolation; diff --git a/MaterialLib/MPL/CreatePhase.h b/MaterialLib/MPL/CreatePhase.h index b68fc9736c1c03d3139b5d393f7e2d282f3df431..c373a4bf045f58d249ffeb6f984040df5307ba37 100644 --- a/MaterialLib/MPL/CreatePhase.h +++ b/MaterialLib/MPL/CreatePhase.h @@ -26,7 +26,7 @@ namespace ParameterLib { struct ParameterBase; struct CoordinateSystem; -} +} // namespace ParameterLib namespace MaterialPropertyLib { class Phase; diff --git a/MaterialLib/MPL/CreateProperty.cpp b/MaterialLib/MPL/CreateProperty.cpp index 1107bc4bd34db87f6fb15c458924823f51cb312f..2c4f5035361ee78d4a774e585f984391f54aea40 100644 --- a/MaterialLib/MPL/CreateProperty.cpp +++ b/MaterialLib/MPL/CreateProperty.cpp @@ -261,8 +261,8 @@ std::unique_ptr<MaterialPropertyLib::Property> createProperty( if (boost::iequals(property_type, "SaturationWeightedThermalConductivity")) { - return createSaturationWeightedThermalConductivity( - geometry_dimension, config, parameters); + return createSaturationWeightedThermalConductivity(geometry_dimension, + config, parameters); } if (boost::iequals(property_type, "WaterDensityIAPWSIF97Region1")) diff --git a/MaterialLib/MPL/Properties/CapillaryPressureSaturation/SaturationBrooksCorey.h b/MaterialLib/MPL/Properties/CapillaryPressureSaturation/SaturationBrooksCorey.h index e74cb983b519edf614822d8821e1fa25165ad072..1c60eaec34e114d919ffce9e4a005e7c60886f1a 100644 --- a/MaterialLib/MPL/Properties/CapillaryPressureSaturation/SaturationBrooksCorey.h +++ b/MaterialLib/MPL/Properties/CapillaryPressureSaturation/SaturationBrooksCorey.h @@ -13,6 +13,7 @@ #pragma once #include <limits> + #include "MaterialLib/MPL/Property.h" namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/CreateLinear.h b/MaterialLib/MPL/Properties/CreateLinear.h index c7709eaf059cfb3f0e3a52aecf763e341fad45e5..5ce23e4cac5f00765f59c36636f504ca796ae57e 100644 --- a/MaterialLib/MPL/Properties/CreateLinear.h +++ b/MaterialLib/MPL/Properties/CreateLinear.h @@ -26,6 +26,5 @@ class Linear; namespace MaterialPropertyLib { -std::unique_ptr<Linear> createLinear( - BaseLib::ConfigTree const& config); +std::unique_ptr<Linear> createLinear(BaseLib::ConfigTree const& config); } // namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/CreateVolumeFractionAverage.h b/MaterialLib/MPL/Properties/CreateVolumeFractionAverage.h index 01a7aa9d5fddb8de950f94ba81f7acaf2fbb157a..f53487ec66b65bc6c4b4debe3dda8483d8cbb61b 100644 --- a/MaterialLib/MPL/Properties/CreateVolumeFractionAverage.h +++ b/MaterialLib/MPL/Properties/CreateVolumeFractionAverage.h @@ -23,6 +23,6 @@ class VolumeFractionAverage; namespace MaterialPropertyLib { -std::unique_ptr<VolumeFractionAverage> -createVolumeFractionAverage(BaseLib::ConfigTree const& config); +std::unique_ptr<VolumeFractionAverage> createVolumeFractionAverage( + BaseLib::ConfigTree const& config); } // namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/Curve.h b/MaterialLib/MPL/Properties/Curve.h index f7dd1091ab446347e095993d454e00d150ff3915..af76f3770450b60aeea1f7ad195b6f56c3b6d9f1 100644 --- a/MaterialLib/MPL/Properties/Curve.h +++ b/MaterialLib/MPL/Properties/Curve.h @@ -11,7 +11,6 @@ #include "MaterialLib/MPL/Property.h" #include "MaterialLib/MPL/VariableType.h" - #include "MathLib/InterpolationAlgorithms/PiecewiseLinearInterpolation.h" namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/Density/CreateWaterDensityIAPWSIF97Region1.cpp b/MaterialLib/MPL/Properties/Density/CreateWaterDensityIAPWSIF97Region1.cpp index 0c6876e090fb92edbe9d77bc7f462c71330736b5..2d71de3542d509464880a7822dc1d7d0a7f06478 100644 --- a/MaterialLib/MPL/Properties/Density/CreateWaterDensityIAPWSIF97Region1.cpp +++ b/MaterialLib/MPL/Properties/Density/CreateWaterDensityIAPWSIF97Region1.cpp @@ -29,6 +29,7 @@ std::unique_ptr<Property> createWaterDensityIAPWSIF97Region1( auto property_name = config.peekConfigParameter<std::string>("name"); //! \ogs_file_param_special{properties__property__WaterDensityIAPWSIF97Region1} - return std::make_unique<WaterDensityIAPWSIF97Region1>(std::move(property_name)); + return std::make_unique<WaterDensityIAPWSIF97Region1>( + std::move(property_name)); } } // namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/Density/WaterDensityIAPWSIF97Region1.cpp b/MaterialLib/MPL/Properties/Density/WaterDensityIAPWSIF97Region1.cpp index c2782eae1fe29d42f19e75c626c3f2737ac0e6b4..92cad65990176627bf84bf000c4b2e9320b6a5c3 100644 --- a/MaterialLib/MPL/Properties/Density/WaterDensityIAPWSIF97Region1.cpp +++ b/MaterialLib/MPL/Properties/Density/WaterDensityIAPWSIF97Region1.cpp @@ -31,7 +31,7 @@ PropertyDataType WaterDensityIAPWSIF97Region1::value( const double pi = p / ref_p_; return ref_p_ / - (MaterialLib::PhysicalConstant::SpecificGasConstant::WaterVapour * + (MaterialLib::PhysicalConstant::SpecificGasConstant::WaterVapour * T * gibbs_free_energy_.get_dgamma_dpi(tau, pi)); } @@ -54,19 +54,21 @@ PropertyDataType WaterDensityIAPWSIF97Region1::dValue( return -(ref_p_ - tau * ref_p_ * gibbs_free_energy_.get_dgamma_dtau_dpi(tau, pi) / - dgamma_dpi) / - (MaterialLib::PhysicalConstant::SpecificGasConstant::WaterVapour * - T * T * dgamma_dpi); + dgamma_dpi) / + (MaterialLib::PhysicalConstant::SpecificGasConstant:: + WaterVapour * + T * T * dgamma_dpi); case Variable::phase_pressure: return -gibbs_free_energy_.get_dgamma_dpi_dpi(tau, pi) / - (MaterialLib::PhysicalConstant::SpecificGasConstant::WaterVapour - * T * dgamma_dpi * dgamma_dpi); + (MaterialLib::PhysicalConstant::SpecificGasConstant:: + WaterVapour * + T * dgamma_dpi * dgamma_dpi); default: OGS_FATAL( - "WaterDensityIAPWSIF97Region1::dValue is implemented for derivatives with " - "respect to temperature or phase_pressure only."); + "WaterDensityIAPWSIF97Region1::dValue is implemented for " + "derivatives with " + "respect to temperature or phase_pressure only."); } - } } // namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/Density/WaterDensityIAPWSIF97Region1.h b/MaterialLib/MPL/Properties/Density/WaterDensityIAPWSIF97Region1.h index 3176a5e549a8a203a67a87e512bab2825182896a..3ec805e0e1a9a83d37317234f6ea929f409a019c 100644 --- a/MaterialLib/MPL/Properties/Density/WaterDensityIAPWSIF97Region1.h +++ b/MaterialLib/MPL/Properties/Density/WaterDensityIAPWSIF97Region1.h @@ -11,8 +11,8 @@ #pragma once -#include "MaterialLib/MPL/Property.h" #include "MaterialLib/Fluid/GibbsFreeEnergy/DimensionLessGibbsFreeEnergyRegion1.h" +#include "MaterialLib/MPL/Property.h" namespace MaterialPropertyLib { @@ -26,7 +26,11 @@ class WaterDensityIAPWSIF97Region1 final : public Property { public: explicit WaterDensityIAPWSIF97Region1(std::string name) - : gibbs_free_energy_(MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1()) { name_ = std::move(name); } + : gibbs_free_energy_( + MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1()) + { + name_ = std::move(name); + } void checkScale() const override { if (!std::holds_alternative<Phase*>(scale_)) @@ -47,8 +51,10 @@ public: Variable const variable, ParameterLib::SpatialPosition const& pos, double const t, double const dt) const override; + private: - const MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1 gibbs_free_energy_; + const MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1 + gibbs_free_energy_; static constexpr double ref_T_ = 1386; ///< reference temperature in K. static constexpr double ref_p_ = 1.653e7; ///< reference pressure in Pa. diff --git a/MaterialLib/MPL/Properties/DupuitPermeability.h b/MaterialLib/MPL/Properties/DupuitPermeability.h index 81074a3a28e13aa0918c24d66357daabb973de48..dc1c723831387b2de132feb5123a8829fc7cce82 100644 --- a/MaterialLib/MPL/Properties/DupuitPermeability.h +++ b/MaterialLib/MPL/Properties/DupuitPermeability.h @@ -11,7 +11,6 @@ #include "MaterialLib/MPL/Property.h" #include "MaterialLib/MPL/VariableType.h" - #include "ParameterLib/Parameter.h" namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/EffectiveThermalConductivityPorosityMixing.h b/MaterialLib/MPL/Properties/EffectiveThermalConductivityPorosityMixing.h index 10e3d4a0555aa8dea9c1bdeda8f0b241fc511908..df6aa875a2ec7056ccfd096f0b7483f7ec661341 100644 --- a/MaterialLib/MPL/Properties/EffectiveThermalConductivityPorosityMixing.h +++ b/MaterialLib/MPL/Properties/EffectiveThermalConductivityPorosityMixing.h @@ -27,8 +27,9 @@ template <int GlobalDim> class EffectiveThermalConductivityPorosityMixing final : public Property { public: - EffectiveThermalConductivityPorosityMixing(std::string name, - ParameterLib::CoordinateSystem const* const local_coordinate_system); + EffectiveThermalConductivityPorosityMixing( + std::string name, + ParameterLib::CoordinateSystem const* const local_coordinate_system); void checkScale() const override; diff --git a/MaterialLib/MPL/Properties/Parameter.h b/MaterialLib/MPL/Properties/Parameter.h index cc09a2e0ffb664b85a9528a460e45a19ce9e753d..5e2cd8971a7c0541a043b12efd74e695bc1ff6dd 100644 --- a/MaterialLib/MPL/Properties/Parameter.h +++ b/MaterialLib/MPL/Properties/Parameter.h @@ -11,7 +11,6 @@ #include "MaterialLib/MPL/Property.h" #include "MaterialLib/MPL/VariableType.h" - #include "ParameterLib/Parameter.h" namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/PermeabilityOrthotropicPowerLaw.h b/MaterialLib/MPL/Properties/PermeabilityOrthotropicPowerLaw.h index 0840ac54cd479cbc24b89160dc16908b4c98c68c..7c539930dde06ba0c5246307800a9207368c952b 100644 --- a/MaterialLib/MPL/Properties/PermeabilityOrthotropicPowerLaw.h +++ b/MaterialLib/MPL/Properties/PermeabilityOrthotropicPowerLaw.h @@ -14,7 +14,6 @@ #include "MaterialLib/MPL/Property.h" - namespace ParameterLib { struct CoordinateSystem; diff --git a/MaterialLib/MPL/Properties/PorosityFromMassBalance.h b/MaterialLib/MPL/Properties/PorosityFromMassBalance.h index 649f86a69cdc36d3f440ce5da4ebc0b70be8e972..edfb1164ef1ae28fdf0da012d5f3f3ff0de65472 100644 --- a/MaterialLib/MPL/Properties/PorosityFromMassBalance.h +++ b/MaterialLib/MPL/Properties/PorosityFromMassBalance.h @@ -10,7 +10,6 @@ #pragma once #include "MaterialLib/MPL/Property.h" - #include "ParameterLib/Parameter.h" namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/Properties.h b/MaterialLib/MPL/Properties/Properties.h index fee73573c155a1a6463ade3fd4f67932ce1046cb..7324d4255d3eca480c3f1c0ae64a2d0a586a5bc3 100644 --- a/MaterialLib/MPL/Properties/Properties.h +++ b/MaterialLib/MPL/Properties/Properties.h @@ -52,6 +52,6 @@ #include "TransportPorosityFromMassBalance.h" #include "VapourDiffusion/VapourDiffusionFEBEX.h" #include "VapourDiffusion/VapourDiffusionPMQ.h" -#include "VolumeFractionAverage.h" -#include "Viscosity/WaterViscosityIAPWS.h" #include "Viscosity/LiquidViscosityVogels.h" +#include "Viscosity/WaterViscosityIAPWS.h" +#include "VolumeFractionAverage.h" diff --git a/MaterialLib/MPL/Properties/SaturationDependentSwelling.h b/MaterialLib/MPL/Properties/SaturationDependentSwelling.h index 0e1dc29f12becab3968261cc3427fecb37edaa89..2324a3115a3421e106f76bc7bba5ac9e48d12a3a 100644 --- a/MaterialLib/MPL/Properties/SaturationDependentSwelling.h +++ b/MaterialLib/MPL/Properties/SaturationDependentSwelling.h @@ -14,7 +14,6 @@ #include "MaterialLib/MPL/Property.h" - namespace ParameterLib { struct CoordinateSystem; diff --git a/MaterialLib/MPL/Properties/ThermalConductivity/CreateWaterThermalConductivityIAPWS.cpp b/MaterialLib/MPL/Properties/ThermalConductivity/CreateWaterThermalConductivityIAPWS.cpp index 467f22153feca2b55abf2b439aa83fbcf3e41874..4ca4b654d69c351aa560b3029040e6f972e73cb9 100644 --- a/MaterialLib/MPL/Properties/ThermalConductivity/CreateWaterThermalConductivityIAPWS.cpp +++ b/MaterialLib/MPL/Properties/ThermalConductivity/CreateWaterThermalConductivityIAPWS.cpp @@ -29,6 +29,7 @@ std::unique_ptr<Property> createWaterThermalConductivityIAPWS( auto property_name = config.peekConfigParameter<std::string>("name"); //! \ogs_file_param_special{properties__property__WaterThermalConductivityIAPWS} - return std::make_unique<WaterThermalConductivityIAPWS>(std::move(property_name)); + return std::make_unique<WaterThermalConductivityIAPWS>( + std::move(property_name)); } } // namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/ThermalConductivity/SaturationWeightedThermalConductivity.cpp b/MaterialLib/MPL/Properties/ThermalConductivity/SaturationWeightedThermalConductivity.cpp index aadfdafc45f8cf94c7b6d18835bfd1510cef620c..6aea39c592e988c411ca215185be5645831ba059 100644 --- a/MaterialLib/MPL/Properties/ThermalConductivity/SaturationWeightedThermalConductivity.cpp +++ b/MaterialLib/MPL/Properties/ThermalConductivity/SaturationWeightedThermalConductivity.cpp @@ -27,54 +27,55 @@ namespace MaterialPropertyLib template <MeanType MeanType> double computeAverage(const double /*S*/, double const /*k_dry*/, - double const /*k_wet*/) = delete; + double const /*k_wet*/) = delete; template <MeanType MeanType> double computeDAverage(const double /*S*/, double const /*k_dry*/, - double const /*k_wet*/) = delete; + double const /*k_wet*/) = delete; // specialization template <> -double computeAverage<MeanType::ARITHMETIC_LINEAR>(const double S, double const k_dry, - double const k_wet) +double computeAverage<MeanType::ARITHMETIC_LINEAR>(const double S, + double const k_dry, + double const k_wet) { return k_dry * (1.0 - S) + k_wet * S; } template <> double computeDAverage<MeanType::ARITHMETIC_LINEAR>(const double /*S*/, - double const k_dry, - double const k_wet) + double const k_dry, + double const k_wet) { return k_wet - k_dry; } template <> double computeAverage<MeanType::ARITHMETIC_SQUAREROOT>(const double S, - double const k_dry, - double const k_wet) + double const k_dry, + double const k_wet) { return k_dry + std::sqrt(S) * (k_wet - k_dry); } template <> double computeDAverage<MeanType::ARITHMETIC_SQUAREROOT>(const double S, - double const k_dry, - double const k_wet) + double const k_dry, + double const k_wet) { return 0.5 * (k_wet - k_dry) / std::sqrt(S); } template <> double computeAverage<MeanType::GEOMETRIC>(const double S, double const k_dry, - double const k_wet) + double const k_wet) { return k_dry * std::pow(k_wet / k_dry, S); } template <> double computeDAverage<MeanType::GEOMETRIC>(const double S, double const k_dry, - double const k_wet) + double const k_wet) { return k_dry * std::pow(k_wet / k_dry, S) * std::log(k_wet / k_dry); } @@ -150,8 +151,8 @@ SaturationWeightedThermalConductivity<MeanType, GlobalDimension>::value( { for (std::size_t i = 0; i < lambda_data.size(); i++) { - lambda_data[i] = computeAverage<MeanType>(S_L, lambda_data[i], - wet_thermal_conductivity_(t, pos)[i]); + lambda_data[i] = computeAverage<MeanType>( + S_L, lambda_data[i], wet_thermal_conductivity_(t, pos)[i]); } } @@ -183,8 +184,8 @@ SaturationWeightedThermalConductivity<MeanType, GlobalDimension>::dValue( } for (std::size_t i = 0; i < lambda_dry_data.size(); i++) { - derivative_data[i] = computeDAverage<MeanType>(S_L, lambda_dry_data[i], - wet_thermal_conductivity_(t, pos)[i]); + derivative_data[i] = computeDAverage<MeanType>( + S_L, lambda_dry_data[i], wet_thermal_conductivity_(t, pos)[i]); } return fromVector(derivative_data); } diff --git a/MaterialLib/MPL/Properties/ThermalConductivity/WaterThermalConductivityIAPWS.cpp b/MaterialLib/MPL/Properties/ThermalConductivity/WaterThermalConductivityIAPWS.cpp index 9dab62ce530ecda494bf48cd51afb0bf526b24bd..25d8b5c90a7aba53dd74b772fc5e8c9ad815e311 100644 --- a/MaterialLib/MPL/Properties/ThermalConductivity/WaterThermalConductivityIAPWS.cpp +++ b/MaterialLib/MPL/Properties/ThermalConductivity/WaterThermalConductivityIAPWS.cpp @@ -18,19 +18,24 @@ namespace MaterialPropertyLib { - // Li and Lij are coefficients from Tables 1 and 2 (Daucik and Dooley, 2011) -static const double Li[5] = {2.443221e-3, 1.323095e-2, 6.770357e-3, -3.454586e-3, 4.096266e-4}; +// Li and Lij are coefficients from Tables 1 and 2 (Daucik and Dooley, 2011) +static const double Li[5] = {2.443221e-3, 1.323095e-2, 6.770357e-3, + -3.454586e-3, 4.096266e-4}; static const double Lij[5][6] = { - {1.60397357, -0.646013523, 0.111443906, 0.102997357, -0.0504123634, 0.00609859258}, - {2.33771842, -2.78843778, 1.53616167, -0.463045512, 0.0832827019, -0.00719201245}, - {2.19650529, -4.54580785, 3.55777244, -1.40944978, 0.275418278, -0.0205938816}, + {1.60397357, -0.646013523, 0.111443906, 0.102997357, -0.0504123634, + 0.00609859258}, + {2.33771842, -2.78843778, 1.53616167, -0.463045512, 0.0832827019, + -0.00719201245}, + {2.19650529, -4.54580785, 3.55777244, -1.40944978, 0.275418278, + -0.0205938816}, {-1.21051378, 1.60812989, -0.621178141, 0.0716373224, 0, 0}, {-2.7203370, 4.57586331, -3.18369245, 1.1168348, -0.19268305, 0.012913842}}; static double computeBarLambda0Factor(const double barT); static std::array<double, 5> computeSeriesFactorTForLambda1(const double barT); -static std::array<double, 6> computeSeriesFactorRhoForLambda1(const double bar_rho); +static std::array<double, 6> computeSeriesFactorRhoForLambda1( + const double bar_rho); static double computeBarLambda1Factor( const std::array<double, 5>& series_factorT, const std::array<double, 6>& series_factorRho); @@ -38,7 +43,6 @@ static double computeBarLambda1Factor( static double computedBarLambda_dbarT(const double barT, double bar_rho); static double computedBarLambda_dbarRho(const double barT, double bar_rho); - PropertyDataType WaterThermalConductivityIAPWS::value( VariableArray const& variable_array, ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/, @@ -68,13 +72,16 @@ PropertyDataType WaterThermalConductivityIAPWS::dValue( switch (variable) { case Variable::temperature: - return ref_lambda_ * computedBarLambda_dbarT(bar_T, bar_rho) / ref_T_; + return ref_lambda_ * computedBarLambda_dbarT(bar_T, bar_rho) / + ref_T_; case Variable::density: - return ref_lambda_ * computedBarLambda_dbarRho(bar_T, bar_rho) / ref_rho_; + return ref_lambda_ * computedBarLambda_dbarRho(bar_T, bar_rho) / + ref_rho_; default: OGS_FATAL( - "WaterThermalConductivityIAPWS::dValue is implemented for " - "derivatives with respect to temperature and liquid density only."); + "WaterThermalConductivityIAPWS::dValue is implemented for " + "derivatives with respect to temperature and liquid density " + "only."); } } @@ -116,7 +123,7 @@ std::array<double, 6> computeSeriesFactorRhoForLambda1(const double bar_rho) } double computeBarLambda1Factor(const std::array<double, 5>& series_factorT, - const std::array<double, 6>& series_factorRho) + const std::array<double, 6>& series_factorRho) { double sum_val = 0.; for (int i = 0; i < 5; i++) @@ -160,8 +167,9 @@ double computedBarLambda_dbarT(const double barT, double bar_rho) { sum_val_j += Lij[i][j] * series_factorRho[j]; } - dlambda1_factor_dbarT -= static_cast<double>(i) * series_factorT[i - 1] * - sum_val_j / (barT * barT); + dlambda1_factor_dbarT -= static_cast<double>(i) * + series_factorT[i - 1] * sum_val_j / + (barT * barT); } const double lambda1_factor = diff --git a/MaterialLib/MPL/Properties/ThermalConductivity/WaterThermalConductivityIAPWS.h b/MaterialLib/MPL/Properties/ThermalConductivity/WaterThermalConductivityIAPWS.h index 1324fcb87896238eb0807903b52174f02eb6940f..39c760ba03d4d73234c30e710ae3f339be91a4b9 100644 --- a/MaterialLib/MPL/Properties/ThermalConductivity/WaterThermalConductivityIAPWS.h +++ b/MaterialLib/MPL/Properties/ThermalConductivity/WaterThermalConductivityIAPWS.h @@ -23,17 +23,21 @@ class Phase; * <a href="http://www.iapws.org/relguide/ThCond.pdf">IAPWS</a> * (File accessed at 13.01.2023) - (Daucik and Dooley, 2011) * - * With the definition, the thermal conductivity is a function of temperature and - * water density + * With the definition, the thermal conductivity is a function of + * temperature and water density * - * \attention The critical enhancement, \f$\bar{\lambda}_2\f$, is not considered. - * For information on region of significance and the significance, - * please see Figure 2 from the document linked in the upper paragraph. + * \attention The critical enhancement, \f$\bar{\lambda}_2\f$, is not + * considered. For information on region of significance and the significance, + * please see Figure 2 from the document linked in the upper + * paragraph. */ class WaterThermalConductivityIAPWS final : public Property { public: - explicit WaterThermalConductivityIAPWS(std::string name) { name_ = std::move(name); } + explicit WaterThermalConductivityIAPWS(std::string name) + { + name_ = std::move(name); + } void checkScale() const override { if (!std::holds_alternative<Phase*>(scale_)) @@ -54,10 +58,12 @@ public: Variable const variable, ParameterLib::SpatialPosition const& pos, double const t, double const dt) const override; + private: static constexpr double ref_T_ = 647.096; ///< reference temperature in K - static constexpr double ref_rho_ = 322.0; ///< reference density in `kg/m^3` - static constexpr double ref_lambda_ = 1.0e-3; ///< reference thermal conductivity in `W.K^-1.m^-1` - + static constexpr double ref_rho_ = + 322.0; ///< reference density in `kg/m^3` + static constexpr double ref_lambda_ = + 1.0e-3; ///< reference thermal conductivity in `W.K^-1.m^-1` }; } // namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/Viscosity/CreateLiquidViscosityVogels.cpp b/MaterialLib/MPL/Properties/Viscosity/CreateLiquidViscosityVogels.cpp index 631a267652f425103f17deac39ee1c66a2140f28..d1316e07ed5abc17b0e8718f20c94151dd7ab436 100644 --- a/MaterialLib/MPL/Properties/Viscosity/CreateLiquidViscosityVogels.cpp +++ b/MaterialLib/MPL/Properties/Viscosity/CreateLiquidViscosityVogels.cpp @@ -12,8 +12,8 @@ #include "CreateLiquidViscosityVogels.h" #include "BaseLib/ConfigTree.h" -#include "MaterialLib/MPL/Property.h" #include "LiquidViscosityVogels.h" +#include "MaterialLib/MPL/Property.h" namespace MaterialPropertyLib { @@ -29,8 +29,8 @@ std::unique_ptr<Property> createLiquidViscosityVogels( auto property_name = config.peekConfigParameter<std::string>("name"); auto const fluid_type = - //! \ogs_file_param{properties__property__LiquidViscosityVogels__liquid_type} - config.peekConfigParameter<std::string>("liquid_type"); + //! \ogs_file_param{properties__property__LiquidViscosityVogels__liquid_type} + config.peekConfigParameter<std::string>("liquid_type"); if (fluid_type == "Water") { diff --git a/MaterialLib/MPL/Properties/Viscosity/LiquidViscosityVogels.cpp b/MaterialLib/MPL/Properties/Viscosity/LiquidViscosityVogels.cpp index 63b4c9699e83edc9f2e4eb5824d6bfdec1f9bd7a..c99a4313ef631ba5c48c35bf712f2bda69f98e25 100644 --- a/MaterialLib/MPL/Properties/Viscosity/LiquidViscosityVogels.cpp +++ b/MaterialLib/MPL/Properties/Viscosity/LiquidViscosityVogels.cpp @@ -27,8 +27,7 @@ PropertyDataType LiquidViscosityVogels<VogelsConstants>::value( { const double T = variable_array.temperature; // Note: the constant of 1.e-3 is for the SI unit conversion. - return 1.e-3 * - std::exp(constants_.A + constants_.B / (constants_.C + T)); + return 1.e-3 * std::exp(constants_.A + constants_.B / (constants_.C + T)); } template <typename VogelsConstants> @@ -47,7 +46,7 @@ PropertyDataType LiquidViscosityVogels<VogelsConstants>::dValue( const double f_buff = constants_.B / (constants_.C + T); // Note: the constant of 1.e-3 is for the SI unit conversion. return -1.e-3 * f_buff * std::exp(constants_.A + f_buff) / - (constants_.C + T); + (constants_.C + T); } template class LiquidViscosityVogels<VogelsViscosityConstantsWater>; diff --git a/MaterialLib/MPL/Properties/Viscosity/LiquidViscosityVogels.h b/MaterialLib/MPL/Properties/Viscosity/LiquidViscosityVogels.h index c20309188247bdb6b87c3c1a2338bee64998eb31..18037a5fa96a5f3836dda15a47bcbe9784904868 100644 --- a/MaterialLib/MPL/Properties/Viscosity/LiquidViscosityVogels.h +++ b/MaterialLib/MPL/Properties/Viscosity/LiquidViscosityVogels.h @@ -26,7 +26,10 @@ class LiquidViscosityVogels final : public Property { public: explicit LiquidViscosityVogels(std::string name, VogelsConstants constants) - : constants_(std::move(constants)) { name_ = std::move(name); }; + : constants_(std::move(constants)) + { + name_ = std::move(name); + }; void checkScale() const override { @@ -48,6 +51,7 @@ public: Variable const variable, ParameterLib::SpatialPosition const& pos, double const t, double const dt) const override; + private: const VogelsConstants constants_; // Coefficients Hi and Hij are given in two static arrays in the cpp file. diff --git a/MaterialLib/MPL/Properties/Viscosity/WaterViscosityIAPWS.cpp b/MaterialLib/MPL/Properties/Viscosity/WaterViscosityIAPWS.cpp index 1f55297898dfb4315a822b6fd28f7b80c5b49a69..4bc4b27cb7c9f8314b085107af0b881a347364e5 100644 --- a/MaterialLib/MPL/Properties/Viscosity/WaterViscosityIAPWS.cpp +++ b/MaterialLib/MPL/Properties/Viscosity/WaterViscosityIAPWS.cpp @@ -38,7 +38,6 @@ static double computeBarMu1Factor( static double computedBarMu_dbarT(const double barT, double bar_rho); static double computedBarMu_dbarRho(const double barT, double bar_rho); - PropertyDataType WaterViscosityIAPWS::value( VariableArray const& variable_array, ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/, @@ -73,8 +72,9 @@ PropertyDataType WaterViscosityIAPWS::dValue( return ref_mu_ * computedBarMu_dbarRho(bar_T, bar_rho) / ref_rho_; default: OGS_FATAL( - "WaterViscosityIAPWS::dValue is implemented for " - "derivatives with respect to temperature and liquid density only."); + "WaterViscosityIAPWS::dValue is implemented for " + "derivatives with respect to temperature and liquid density " + "only."); } } diff --git a/MaterialLib/MPL/Properties/Viscosity/WaterViscosityIAPWS.h b/MaterialLib/MPL/Properties/Viscosity/WaterViscosityIAPWS.h index c8626dc427460d64b545b2c5d50287359df1ccae..1f362ec66ed3d74ccf4cb01fcecc9ddd23920859 100644 --- a/MaterialLib/MPL/Properties/Viscosity/WaterViscosityIAPWS.h +++ b/MaterialLib/MPL/Properties/Viscosity/WaterViscosityIAPWS.h @@ -56,9 +56,11 @@ public: Variable const variable, ParameterLib::SpatialPosition const& pos, double const t, double const dt) const override; + private: static constexpr double ref_T_ = 647.096; ///< reference temperature in K - static constexpr double ref_rho_ = 322.0; ///< reference density in `kg/m^3` + static constexpr double ref_rho_ = + 322.0; ///< reference density in `kg/m^3` static constexpr double ref_mu_ = 1.0e-6; ///< reference viscosity in Pa.s // Coefficients Hi and Hij are given in two static arrays in the cpp file.