Skip to content
Snippets Groups Projects
Unverified Commit 34baef7a authored by Tom Fischer's avatar Tom Fischer Committed by GitHub
Browse files

Merge pull request #2772 from Scinopode/checkMaterial-HT-PCS

refactoring the MPL verification of HT process
parents 430c1317 b1e5e487
No related branches found
No related tags found
No related merge requests found
......@@ -67,8 +67,7 @@ void HTProcess::initializeConcreteProcess(
ProcessLib::createLocalAssemblers<MonolithicHTFEM>(
mesh.getDimension(), mesh.getElements(), dof_table,
pv.getShapeFunctionOrder(), _local_assemblers,
mesh.isAxiallySymmetric(), integration_order,
_process_data);
mesh.isAxiallySymmetric(), integration_order, _process_data);
}
else
{
......@@ -291,6 +290,21 @@ void checkMPLProperties(MeshLib::Mesh const& mesh,
HTProcessData const& process_data)
{
DBUG("Check the media properties of HT process ...");
std::array const requiredPropertyMedium = {
MaterialPropertyLib::PropertyType::porosity,
MaterialPropertyLib::PropertyType::permeability};
std::array const requiredPropertyLiquidPhase = {
MaterialPropertyLib::PropertyType::viscosity,
MaterialPropertyLib::PropertyType::density,
MaterialPropertyLib::PropertyType::specific_heat_capacity};
std::array const requiredPropertySolidPhase = {
MaterialPropertyLib::PropertyType::specific_heat_capacity,
MaterialPropertyLib::PropertyType::density,
MaterialPropertyLib::PropertyType::storage};
for (auto const& element : mesh.getElements())
{
auto const element_id = element->getID();
......@@ -298,59 +312,42 @@ void checkMPLProperties(MeshLib::Mesh const& mesh,
// check if a definition of the porous media exists
auto const& medium = *process_data.media_map->getMedium(element_id);
// checking general medium properties
if (!medium.hasProperty(MaterialPropertyLib::PropertyType::porosity))
for (auto const property : requiredPropertyMedium)
{
OGS_FATAL("The porosity for the porous media isn't specified.");
}
if (!medium.hasProperty(
MaterialPropertyLib::PropertyType::permeability))
{
OGS_FATAL("The permeability for the porous media isn't specified.");
if (!medium.hasProperty(property))
{
OGS_FATAL("The property '%s' is not specified for the medium.",
MaterialPropertyLib::property_enum_to_string[property]
.c_str());
}
}
// check if liquid phase definition and the corresponding properties
// exists
auto const& liquid_phase = medium.phase("AqueousLiquid");
if (!liquid_phase.hasProperty(
MaterialPropertyLib::PropertyType::viscosity))
{
OGS_FATAL(
"The viscosity for the AqueousLiquid phase isn't specified.");
}
if (!liquid_phase.hasProperty(
MaterialPropertyLib::PropertyType::density))
{
OGS_FATAL(
"The density for the AqueousLiquid phase isn't specified.");
}
if (!liquid_phase.hasProperty(
MaterialPropertyLib::PropertyType::specific_heat_capacity))
for (auto const property : requiredPropertyLiquidPhase)
{
OGS_FATAL(
"The specific heat capacity for the AqueousLiquid phase "
"isn't specified.");
if (!liquid_phase.hasProperty(property))
{
OGS_FATAL(
"The property '%s' is not specified for the liquid phase.",
MaterialPropertyLib::property_enum_to_string[property]
.c_str());
}
}
// check if solid phase definition and the corresponding properties
// exists
auto const& solid_phase = medium.phase("Solid");
if (!solid_phase.hasProperty(
MaterialPropertyLib::PropertyType::specific_heat_capacity))
{
OGS_FATAL(
"The specific heat capacity for the Solid phase isn't "
"specified.");
}
if (!solid_phase.hasProperty(
MaterialPropertyLib::PropertyType::density))
{
OGS_FATAL("The density for the Solid phase isn't specified.");
}
if (!solid_phase.hasProperty(
MaterialPropertyLib::PropertyType::storage))
for (auto const property : requiredPropertySolidPhase)
{
OGS_FATAL("The storage for the Solid phase isn't specified.");
if (!solid_phase.hasProperty(property))
{
OGS_FATAL(
"The property '%s' is not specified for the solid phase.",
MaterialPropertyLib::property_enum_to_string[property]
.c_str());
}
}
}
DBUG("Media properties verified.");
......
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