Skip to content
Snippets Groups Projects
Commit 551bf4ad authored by wenqing's avatar wenqing
Browse files

[MPL] Changed the name of GeneralWaterVapourLatentHeat

 to WaterVapourLatentHeatWithCriticalTemperature
parent 1a17c15e
No related branches found
No related tags found
No related merge requests found
Showing
with 32 additions and 30 deletions
\copydoc MaterialPropertyLib::GeneralWaterVapourLatentHeat
\copydoc MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature
Documentation/images/general_latent_heat_water_vapour.png

5.79 KiB

Documentation/images/latent_heat_water_vapour_with_critical_T.png

11.1 KiB

......@@ -247,9 +247,10 @@ std::unique_ptr<MaterialPropertyLib::Property> createProperty(
return createLinearWaterVapourLatentHeat(config);
}
if (boost::iequals(property_type, "GeneralWaterVapourLatentHeat"))
if (boost::iequals(property_type,
"WaterVapourLatentHeatWithCriticalTemperature"))
{
return createGeneralWaterVapourLatentHeat(config);
return createWaterVapourLatentHeatWithCriticalTemperature(config);
}
// If none of the above property types are found, OGS throws an error.
......
......@@ -39,8 +39,8 @@
#include "CreateStrainDependentPermeability.h"
#include "CreateTransportPorosityFromMassBalance.h"
#include "Density/CreateWaterVapourDensity.h"
#include "Enthalpy/CreateGeneralWaterVapourLatentHeat.h"
#include "Enthalpy/CreateLinearWaterVapourLatentHeat.h"
#include "Enthalpy/CreateWaterVapourLatentHeatWithCriticalTemperature.h"
#include "RelativePermeability/CreateRelPermBrooksCorey.h"
#include "RelativePermeability/CreateRelPermBrooksCoreyNonwettingPhase.h"
#include "RelativePermeability/CreateRelPermLiakopoulos.h"
......
......@@ -9,27 +9,28 @@
* Created on March 19, 2021, 11:51 AM
*/
#include "CreateGeneralWaterVapourLatentHeat.h"
#include "CreateWaterVapourLatentHeatWithCriticalTemperature.h"
#include "BaseLib/ConfigTree.h"
#include "GeneralWaterVapourLatentHeat.h"
#include "MaterialLib/MPL/Property.h"
#include "WaterVapourLatentHeatWithCriticalTemperature.h"
namespace MaterialPropertyLib
{
std::unique_ptr<Property> createGeneralWaterVapourLatentHeat(
std::unique_ptr<Property> createWaterVapourLatentHeatWithCriticalTemperature(
BaseLib::ConfigTree const& config)
{
//! \ogs_file_param{properties__property__type}
config.checkConfigParameter("type", "GeneralWaterVapourLatentHeat");
DBUG("Create GeneralWaterVapourLatentHeat phase property");
config.checkConfigParameter("type",
"WaterVapourLatentHeatWithCriticalTemperature");
DBUG("Create WaterVapourLatentHeatWithCriticalTemperature phase property");
// Second access for storage.
//! \ogs_file_param{properties__property__name}
auto property_name = config.peekConfigParameter<std::string>("name");
//! \ogs_file_param_special{properties__property__GeneralWaterVapourLatentHeat}
return std::make_unique<GeneralWaterVapourLatentHeat>(
//! \ogs_file_param_special{properties__property__WaterVapourLatentHeatWithCriticalTemperature}
return std::make_unique<WaterVapourLatentHeatWithCriticalTemperature>(
std::move(property_name));
}
} // namespace MaterialPropertyLib
......@@ -21,6 +21,6 @@ class ConfigTree;
namespace MaterialPropertyLib
{
class Property;
std::unique_ptr<Property> createGeneralWaterVapourLatentHeat(
std::unique_ptr<Property> createWaterVapourLatentHeatWithCriticalTemperature(
BaseLib::ConfigTree const& config);
} // namespace MaterialPropertyLib
......@@ -9,7 +9,7 @@
* Created on March 19, 2021, 11:49 AM
*/
#include "GeneralWaterVapourLatentHeat.h"
#include "WaterVapourLatentHeatWithCriticalTemperature.h"
#include <algorithm>
#include <array>
......@@ -28,7 +28,7 @@ static std::array<double, 3> constexpr a_exp = {0.3333333333333333, 0.79,
static std::array<double, 5> constexpr b = {
-28989.28947, -19797.03646, 28403.32283, -30382.306422, 15210.380};
PropertyDataType GeneralWaterVapourLatentHeat::value(
PropertyDataType WaterVapourLatentHeatWithCriticalTemperature::value(
const VariableArray& variable_array,
const ParameterLib::SpatialPosition& /*pos*/, const double /*t*/,
const double /*dt*/) const
......@@ -60,7 +60,7 @@ PropertyDataType GeneralWaterVapourLatentHeat::value(
return 1000.0 * L_w;
}
PropertyDataType GeneralWaterVapourLatentHeat::dValue(
PropertyDataType WaterVapourLatentHeatWithCriticalTemperature::dValue(
VariableArray const& variable_array, Variable const primary_variable,
ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
double const /*dt*/) const
......@@ -97,7 +97,8 @@ PropertyDataType GeneralWaterVapourLatentHeat::dValue(
}
OGS_FATAL(
"GeneralWaterVapourLatentHeat::dValue is implemented for "
"WaterVapourLatentHeatWithCriticalTemperature::dValue is implemented "
"for "
"the derivative with respect to temperature only.");
}
......
......@@ -19,7 +19,8 @@ namespace MaterialPropertyLib
class Phase;
/**
* \brief A general latent heat model of vaporisation of water.
* \brief A latent heat model of vaporisation of water considering the critical
* temperature.
*
* The model uses an equation for a general expression of the latent heat of
* vaporisation of water in the vicinity of and far away from the critical
......@@ -53,17 +54,13 @@ class Phase;
* MaterialPropertyLib::LinearWaterVapourLatentHeat
* is given in the following figure.
*
* \image{inline} html general_latent_heat_water_vapour.png ""
*
* Based on the comparison, a conclusion can be drawn such that
* the linear model can be applied for the applications with temperature
* below 400 K.
* \image{inline} html latent_heat_water_vapour_with_critical_T.png ""
*
*/
class GeneralWaterVapourLatentHeat final : public Property
class WaterVapourLatentHeatWithCriticalTemperature final : public Property
{
public:
explicit GeneralWaterVapourLatentHeat(std::string name)
explicit WaterVapourLatentHeatWithCriticalTemperature(std::string name)
{
name_ = std::move(name);
}
......@@ -73,7 +70,8 @@ public:
if (!std::holds_alternative<Phase*>(scale_))
{
OGS_FATAL(
"The property 'GeneralWaterVapourLatentHeat' is "
"The property 'WaterVapourLatentHeatWithCriticalTemperature' "
"is "
"implemented on the 'phase' scale only.");
}
}
......
......@@ -24,8 +24,8 @@
#include "DupuitPermeability.h"
#include "EffectiveThermalConductivityPorosityMixing.h"
#include "EmbeddedFracturePermeability.h"
#include "Enthalpy/GeneralWaterVapourLatentHeat.h"
#include "Enthalpy/LinearWaterVapourLatentHeat.h"
#include "Enthalpy/WaterVapourLatentHeatWithCriticalTemperature.h"
#include "Exponential.h"
#include "GasPressureDependentPermeability.h"
#include "IdealGasLaw.h"
......
......@@ -15,21 +15,22 @@
#include <cmath>
#include <limits>
#include "MaterialLib/MPL/Properties/Enthalpy/CreateGeneralWaterVapourLatentHeat.h"
#include "MaterialLib/MPL/Properties/Enthalpy/CreateWaterVapourLatentHeatWithCriticalTemperature.h"
#include "MaterialLib/PhysicalConstant.h"
#include "TestMPL.h"
TEST(MaterialPropertyLib, GeneralWaterVapourLatentHeat)
TEST(MaterialPropertyLib, WaterVapourLatentHeatWithCriticalTemperature)
{
char const xml[] =
"<property>"
" <name>latent_heat</name>"
" <type>GeneralWaterVapourLatentHeat</type>"
" <type>WaterVapourLatentHeatWithCriticalTemperature</type>"
"</property>";
std::unique_ptr<MaterialPropertyLib::Property> const property_ptr =
Tests::createTestProperty(
xml, MaterialPropertyLib::createGeneralWaterVapourLatentHeat);
xml, MaterialPropertyLib::
createWaterVapourLatentHeatWithCriticalTemperature);
MaterialPropertyLib::Property const& property = *property_ptr;
MaterialPropertyLib::VariableArray variable_array;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment