diff --git a/MaterialLib/MPL/Properties/Density/WaterVapourDensity.cpp b/MaterialLib/MPL/Properties/Density/WaterVapourDensity.cpp index a2c535db6f798f713a834b1efd33091a912219a8..682d208767b44a89d9ee4786b1ff4fad811aaf97 100644 --- a/MaterialLib/MPL/Properties/Density/WaterVapourDensity.cpp +++ b/MaterialLib/MPL/Properties/Density/WaterVapourDensity.cpp @@ -46,7 +46,9 @@ PropertyDataType WaterVapourDensity::value( { double const p = variable_array.liquid_phase_pressure; double const T = variable_array.temperature; + assert(T >= 273.); double const water_density = variable_array.density; + assert(water_density > 0.); return humidity(T, p, water_density) * saturatedVaporDensity(T); } @@ -58,7 +60,9 @@ PropertyDataType WaterVapourDensity::dValue( { double const p = variable_array.liquid_phase_pressure; double const T = variable_array.temperature; + assert(T >= 273.); double const water_density = variable_array.density; + assert(water_density > 0.); if (variable == Variable::temperature) { diff --git a/MaterialLib/MPL/Properties/Density/WaterVapourDensity.h b/MaterialLib/MPL/Properties/Density/WaterVapourDensity.h index e545b5b423ca467f8206c90e2e535e7474ec9aa3..953033a1f2a0edfdef0d7dfc86e6f584b68cbc93 100644 --- a/MaterialLib/MPL/Properties/Density/WaterVapourDensity.h +++ b/MaterialLib/MPL/Properties/Density/WaterVapourDensity.h @@ -49,6 +49,9 @@ class Phase; * equation are multiplied with \f$1-S\f$ with \f$ S \f$, the water * saturation. Therefore the application of the water vapour density model is * naturally restricted in the unsaturated zones. + * + * \note The temperature must be greater then the freezing temperature. In the + * paper the offset is 273K, not 273.15 which might cause small inconsistencies. */ class WaterVapourDensity final : public Property {