diff --git a/ProcessLib/HT/HTProcess.cpp b/ProcessLib/HT/HTProcess.cpp index 7a19811e92ac927d1ac2f4fd8b8c5a3fcf975497..b9097fc45ac1b7c6e84075d43b42dbe4208324ce 100644 --- a/ProcessLib/HT/HTProcess.cpp +++ b/ProcessLib/HT/HTProcess.cpp @@ -24,6 +24,42 @@ namespace ProcessLib { namespace HT { +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(); + + auto const& medium = *process_data.media_map->getMedium(element_id); + MaterialPropertyLib::checkRequiredProperties( + medium, requiredPropertyMedium); + + MaterialPropertyLib::checkRequiredProperties( + medium.phase("AqueousLiquid"), requiredPropertyLiquidPhase); + + MaterialPropertyLib::checkRequiredProperties( + medium.phase("Solid"), requiredPropertySolidPhase); + } + DBUG("Media properties verified."); +} + HTProcess::HTProcess( std::string name, MeshLib::Mesh& mesh, @@ -285,41 +321,5 @@ void HTProcess::postTimestepConcreteProcess(std::vector<GlobalVector*> const& x, pv.getActiveElementIDs()); _surfaceflux->save(t); } - -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(); - - auto const& medium = *process_data.media_map->getMedium(element_id); - MaterialPropertyLib::checkRequiredProperties( - medium, requiredPropertyMedium); - - MaterialPropertyLib::checkRequiredProperties( - medium.phase("AqueousLiquid"), requiredPropertyLiquidPhase); - - MaterialPropertyLib::checkRequiredProperties( - medium.phase("Solid"), requiredPropertySolidPhase); - } - DBUG("Media properties verified."); -} } // namespace HT } // namespace ProcessLib diff --git a/ProcessLib/HT/HTProcess.h b/ProcessLib/HT/HTProcess.h index e39b241ae47406f282ffd37bdd8f3391b4674f1d..a65bea11323cf4c6ffd2f98f20ac37605ec6893d 100644 --- a/ProcessLib/HT/HTProcess.h +++ b/ProcessLib/HT/HTProcess.h @@ -135,8 +135,5 @@ private: const int _hydraulic_process_id; }; -void checkMPLProperties(MeshLib::Mesh const& mesh, - HTProcessData const& process_data); - } // namespace HT } // namespace ProcessLib