Skip to content
Snippets Groups Projects
Commit 416f5820 authored by Norbert Grunwald's avatar Norbert Grunwald
Browse files

refactoring the MPL verification of HT process

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