diff --git a/Documentation/ProjectFile/prj/processes/process/RichardsComponentTransport/porous_medium/i_porous_medium.md b/Documentation/ProjectFile/prj/processes/process/RichardsComponentTransport/porous_medium/i_porous_medium.md deleted file mode 100644 index d7849410e30e3af70dde2746445407b46f6c9d61..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/RichardsComponentTransport/porous_medium/i_porous_medium.md +++ /dev/null @@ -1,3 +0,0 @@ -The id of the porous medium as an integer between 0 and the number of material -groups minus one. There must be a corresponding data array 'MaterialIDs' in the -mesh file. diff --git a/Documentation/ProjectFile/prj/processes/process/RichardsComponentTransport/porous_medium/porous_medium/a_id.md b/Documentation/ProjectFile/prj/processes/process/RichardsComponentTransport/porous_medium/porous_medium/a_id.md deleted file mode 100644 index c1dae9f80b40a7c5ba5eb2fc7fae385bf250a298..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/RichardsComponentTransport/porous_medium/porous_medium/a_id.md +++ /dev/null @@ -1,2 +0,0 @@ -It specifies the material ID of a porous medium. The material IDs of elements -must be given in the mesh's cell data array "MaterialIDs". diff --git a/Documentation/ProjectFile/prj/processes/process/RichardsComponentTransport/porous_medium/porous_medium/i_porous_medium.md b/Documentation/ProjectFile/prj/processes/process/RichardsComponentTransport/porous_medium/porous_medium/i_porous_medium.md deleted file mode 100644 index bb330dc056ceff8400e948dfb52a53fb0f44252a..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/RichardsComponentTransport/porous_medium/porous_medium/i_porous_medium.md +++ /dev/null @@ -1 +0,0 @@ -A tag for the properties of a porous medium with material ID. \ No newline at end of file diff --git a/Documentation/ProjectFile/prj/processes/process/RichardsComponentTransport/porous_medium/porous_medium/t_capillary_pressure.md b/Documentation/ProjectFile/prj/processes/process/RichardsComponentTransport/porous_medium/porous_medium/t_capillary_pressure.md deleted file mode 100644 index 19d854870d0c3537197cc8edb349b03503fcbede..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/RichardsComponentTransport/porous_medium/porous_medium/t_capillary_pressure.md +++ /dev/null @@ -1 +0,0 @@ -Capillary pressure model. diff --git a/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.cpp b/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.cpp deleted file mode 100644 index 4a8b0155acf3c6c0338e40ce5099338c870bdece..0000000000000000000000000000000000000000 --- a/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/** - * \file - * - * \copyright - * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - */ - -#include "CreatePorousMediaProperties.h" - -#include "BaseLib/Algorithm.h" -#include "MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CreateCapillaryPressureModel.h" -#include "MeshLib/Mesh.h" - -namespace ProcessLib -{ -namespace RichardsComponentTransport -{ -PorousMediaProperties createPorousMediaProperties( - MeshLib::Mesh& mesh, BaseLib::ConfigTree const& porous_medium_configs) -{ - DBUG("Create PorousMediaProperties."); - - std::vector< - std::unique_ptr<MaterialLib::PorousMedium::CapillaryPressureSaturation>> - capillary_pressure_models; - - std::vector<int> mat_ids; - for ( - auto const& porous_medium_config : - //! \ogs_file_param{prj__processes__process__RichardsComponentTransport__porous_medium__porous_medium} - porous_medium_configs.getConfigSubtreeList("porous_medium")) - { - //! \ogs_file_attr{prj__processes__process__RichardsComponentTransport__porous_medium__porous_medium__id} - auto const id = porous_medium_config.getConfigAttribute<int>("id"); - mat_ids.push_back(id); - - auto const& capillary_pressure_config = - //! \ogs_file_param{prj__processes__process__RichardsComponentTransport__porous_medium__porous_medium__capillary_pressure} - porous_medium_config.getConfigSubtree("capillary_pressure"); - auto capillary_pressure = - MaterialLib::PorousMedium::createCapillaryPressureModel( - capillary_pressure_config); - capillary_pressure_models.emplace_back(std::move(capillary_pressure)); - } - - std::vector<int> material_ids(mesh.getNumberOfElements()); - if (mesh.getProperties().existsPropertyVector<int>("MaterialIDs")) - { - auto const& mesh_material_ids = - mesh.getProperties().getPropertyVector<int>("MaterialIDs"); - material_ids.reserve(mesh_material_ids->size()); - std::copy(mesh_material_ids->cbegin(), mesh_material_ids->cend(), - material_ids.begin()); - } - - return PorousMediaProperties{std::move(capillary_pressure_models), - std::move(material_ids)}; -} - -} // namespace RichardsComponentTransport -} // namespace ProcessLib diff --git a/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.h b/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.h deleted file mode 100644 index f56fd14a0d70ca3d7b640752d8433351ff973a71..0000000000000000000000000000000000000000 --- a/ProcessLib/RichardsComponentTransport/CreatePorousMediaProperties.h +++ /dev/null @@ -1,28 +0,0 @@ -/** - * \file - * - * \copyright - * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - */ - -#pragma once - -#include "BaseLib/ConfigTree.h" -#include "PorousMediaProperties.h" - -namespace MeshLib -{ -class Mesh; -} - -namespace ProcessLib -{ -namespace RichardsComponentTransport -{ -PorousMediaProperties createPorousMediaProperties( - MeshLib::Mesh& mesh, BaseLib::ConfigTree const& porous_medium_configs); -} -} diff --git a/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp b/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp index 1175e3a80bc729a1559c2f93db332bd7c7c0527c..b5dcc6eb0fc0e9f2af52085b8ad7352729cb9254 100644 --- a/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp +++ b/ProcessLib/RichardsComponentTransport/CreateRichardsComponentTransportProcess.cpp @@ -9,12 +9,9 @@ */ #include "CreateRichardsComponentTransportProcess.h" -#include "CreatePorousMediaProperties.h" #include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" #include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" -#include "ParameterLib/ConstantParameter.h" -#include "ParameterLib/Utils.h" #include "ProcessLib/Output/CreateSecondaryVariables.h" #include "ProcessLib/Utils/ProcessUtils.h" #include "RichardsComponentTransportProcess.h" @@ -136,12 +133,6 @@ std::unique_ptr<Process> createRichardsComponentTransportProcess( } } - auto const& porous_medium_configs = - //! \ogs_file_param{prj__processes__process__RichardsComponentTransport__porous_medium} - config.getConfigSubtree("porous_medium"); - PorousMediaProperties porous_media_properties{ - createPorousMediaProperties(mesh, porous_medium_configs)}; - // Specific body force parameter. Eigen::VectorXd specific_body_force; std::vector<double> const b = @@ -172,7 +163,6 @@ std::unique_ptr<Process> createRichardsComponentTransportProcess( RichardsComponentTransportProcessData process_data{ std::move(media_map), - std::move(porous_media_properties), specific_body_force, has_gravity}; diff --git a/ProcessLib/RichardsComponentTransport/PorousMediaProperties.cpp b/ProcessLib/RichardsComponentTransport/PorousMediaProperties.cpp deleted file mode 100644 index bc9d029a7ad54f2ba8717361da811832e4955830..0000000000000000000000000000000000000000 --- a/ProcessLib/RichardsComponentTransport/PorousMediaProperties.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/** - * \file - * - * \copyright - * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - */ - -#include "PorousMediaProperties.h" - -#include "ParameterLib/SpatialPosition.h" - -namespace ProcessLib -{ -namespace RichardsComponentTransport -{ -int PorousMediaProperties::getMaterialID( - ParameterLib::SpatialPosition const& pos) const -{ - int const element_id = pos.getElementID().value(); - return _material_ids[element_id]; -} - -MaterialLib::PorousMedium::CapillaryPressureSaturation const& -PorousMediaProperties::getCapillaryPressureSaturationModel( - double /*t*/, ParameterLib::SpatialPosition const& pos) const -{ - return *_capillary_pressure_saturation_models[getMaterialID(pos)]; -} -} // namespace RichardsComponentTransport -} // namespace ProcessLib diff --git a/ProcessLib/RichardsComponentTransport/PorousMediaProperties.h b/ProcessLib/RichardsComponentTransport/PorousMediaProperties.h deleted file mode 100644 index 32cac790d0a631e8e7b0b6f86673ccab7908fa7a..0000000000000000000000000000000000000000 --- a/ProcessLib/RichardsComponentTransport/PorousMediaProperties.h +++ /dev/null @@ -1,64 +0,0 @@ -/** - * \file - * - * \copyright - * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org) - * Distributed under a Modified BSD License. - * See accompanying file LICENSE.txt or - * http://www.opengeosys.org/project/license - */ - -#pragma once - -#include <memory> -#include <vector> - -#include "MaterialLib/PorousMedium/UnsaturatedProperty/CapillaryPressure/CapillaryPressureSaturation.h" - -namespace ParameterLib -{ -class SpatialPosition; -} - -namespace ProcessLib -{ -namespace RichardsComponentTransport -{ - -class PorousMediaProperties -{ -public: - PorousMediaProperties( - std::vector<std::unique_ptr< - MaterialLib::PorousMedium::CapillaryPressureSaturation>>&& - capillary_pressure_saturation_models, - std::vector<int>&& material_ids) - : _capillary_pressure_saturation_models( - std::move(capillary_pressure_saturation_models)), - _material_ids(std::move(material_ids)) - { - } - - PorousMediaProperties(PorousMediaProperties&& other) - : _capillary_pressure_saturation_models( - std::move(other._capillary_pressure_saturation_models)), - _material_ids(other._material_ids) - { - } - - MaterialLib::PorousMedium::CapillaryPressureSaturation const& - getCapillaryPressureSaturationModel( - double t, ParameterLib::SpatialPosition const& pos) const; - -private: - int getMaterialID(ParameterLib::SpatialPosition const& pos) const; - -private: - std::vector< - std::unique_ptr<MaterialLib::PorousMedium::CapillaryPressureSaturation>> - _capillary_pressure_saturation_models; - std::vector<int> _material_ids; -}; - -} // namespace RichardsComponentTransport -} // namespace ProcessLib diff --git a/ProcessLib/RichardsComponentTransport/RichardsComponentTransportFEM-impl.h b/ProcessLib/RichardsComponentTransport/RichardsComponentTransportFEM-impl.h index 2e135774a68ac1df6ffdb57edd8fb59e40c82d07..e91a1570565940ced189059b8b8e25a7693de9e3 100644 --- a/ProcessLib/RichardsComponentTransport/RichardsComponentTransportFEM-impl.h +++ b/ProcessLib/RichardsComponentTransport/RichardsComponentTransportFEM-impl.h @@ -132,9 +132,10 @@ void LocalAssemblerData<ShapeFunction, IntegrationMethod, GlobalDim>::assemble( .template value<double>(vars, pos, t, dt); double const dSw_dpc = - 1. / _process_data.porous_media_properties - .getCapillaryPressureSaturationModel(t, pos) - .getdPcdS(Sw); + medium[MaterialPropertyLib::PropertyType::saturation] + .template dValue<double>( + vars, MaterialPropertyLib::Variable::capillary_pressure, + pos, t, dt); vars[static_cast<int>(MaterialPropertyLib::Variable::concentration)] = C_int_pt; diff --git a/ProcessLib/RichardsComponentTransport/RichardsComponentTransportFEM.h b/ProcessLib/RichardsComponentTransport/RichardsComponentTransportFEM.h index 490eaf139e83ece2f869dd57aad5739c455e74fa..530378796b3b7c56323e9384cb2b79eed6173e08 100644 --- a/ProcessLib/RichardsComponentTransport/RichardsComponentTransportFEM.h +++ b/ProcessLib/RichardsComponentTransport/RichardsComponentTransportFEM.h @@ -13,7 +13,6 @@ #include <Eigen/Dense> #include <vector> -#include "MaterialLib/Fluid/FluidProperties/FluidProperties.h" #include "MathLib/LinAlg/Eigen/EigenMapTools.h" #include "NumLib/DOF/DOFTableUtil.h" #include "NumLib/Extrapolation/ExtrapolatableElement.h" diff --git a/ProcessLib/RichardsComponentTransport/RichardsComponentTransportProcessData.h b/ProcessLib/RichardsComponentTransport/RichardsComponentTransportProcessData.h index 450cd3aa5e889cdc089f9444c65030eed3e65f3c..a48d3bcc68bcbbd40bf9ddc2370cd9588bc04b73 100644 --- a/ProcessLib/RichardsComponentTransport/RichardsComponentTransportProcessData.h +++ b/ProcessLib/RichardsComponentTransport/RichardsComponentTransportProcessData.h @@ -10,10 +10,9 @@ #pragma once +#include <Eigen/Eigen> #include <memory> -#include "PorousMediaProperties.h" - namespace MaterialPropertyLib { class MaterialSpatialDistributionMap; @@ -21,16 +20,12 @@ class MaterialSpatialDistributionMap; namespace ProcessLib { -template <typename ReturnType> -struct Parameter; - namespace RichardsComponentTransport { struct RichardsComponentTransportProcessData { std::unique_ptr<MaterialPropertyLib::MaterialSpatialDistributionMap> media_map; - PorousMediaProperties porous_media_properties; Eigen::VectorXd const specific_body_force; bool const has_gravity; }; diff --git a/Tests/Data/Parabolic/RichardsComponentTransport/Padilla/Padilla_NaCl1/Padilla_NaCl1.prj b/Tests/Data/Parabolic/RichardsComponentTransport/Padilla/Padilla_NaCl1/Padilla_NaCl1.prj index 667b9621af079488be5adbc19de8c54f06810cd2..41fcf58dac1f20ec9cdbfdc6e57263f204e4ff9d 100644 --- a/Tests/Data/Parabolic/RichardsComponentTransport/Padilla/Padilla_NaCl1/Padilla_NaCl1.prj +++ b/Tests/Data/Parabolic/RichardsComponentTransport/Padilla/Padilla_NaCl1/Padilla_NaCl1.prj @@ -12,18 +12,6 @@ <concentration>concentration</concentration> <pressure>pressure</pressure> </process_variables> - <porous_medium> - <porous_medium id="0"> - <capillary_pressure> - <type>vanGenuchten</type> - <m>0.789029535864979</m> - <pc_max>36333.30</pc_max> - <pd>3633.33</pd> - <smax>1</smax> - <sr>0.1689</sr> - </capillary_pressure> - </porous_medium> - </porous_medium> <specific_body_force>-9.81</specific_body_force> <secondary_variables> <secondary_variable internal_name="saturation" output_name="saturation"/> diff --git a/Tests/Data/Parabolic/RichardsComponentTransport/Padilla/Padilla_NaCl1/Padilla_NaCl1_quadratic.prj b/Tests/Data/Parabolic/RichardsComponentTransport/Padilla/Padilla_NaCl1/Padilla_NaCl1_quadratic.prj index e7316030fb2cccc59801fd9da6dd87a38108aab2..0e625b47c2428860afa53631c9d56d8209d88318 100644 --- a/Tests/Data/Parabolic/RichardsComponentTransport/Padilla/Padilla_NaCl1/Padilla_NaCl1_quadratic.prj +++ b/Tests/Data/Parabolic/RichardsComponentTransport/Padilla/Padilla_NaCl1/Padilla_NaCl1_quadratic.prj @@ -12,18 +12,6 @@ <concentration>concentration</concentration> <pressure>pressure</pressure> </process_variables> - <porous_medium> - <porous_medium id="0"> - <capillary_pressure> - <type>vanGenuchten</type> - <m>0.789029535864979</m> - <pc_max>36333.30</pc_max> - <pd>3633.33</pd> - <smax>1</smax> - <sr>0.1689</sr> - </capillary_pressure> - </porous_medium> - </porous_medium> <specific_body_force>-9.81</specific_body_force> <secondary_variables> <secondary_variable internal_name="saturation" output_name="saturation"/> diff --git a/Tests/Data/Parabolic/RichardsComponentTransport/Padilla/Padilla_NaCl6/Padilla_NaCl6.prj b/Tests/Data/Parabolic/RichardsComponentTransport/Padilla/Padilla_NaCl6/Padilla_NaCl6.prj index 8c03a8cdbc394ce1c5e2529b94a6ee920e2c46df..5feffeb97d7f9dbd20c060f7f51093136abde972 100644 --- a/Tests/Data/Parabolic/RichardsComponentTransport/Padilla/Padilla_NaCl6/Padilla_NaCl6.prj +++ b/Tests/Data/Parabolic/RichardsComponentTransport/Padilla/Padilla_NaCl6/Padilla_NaCl6.prj @@ -12,18 +12,6 @@ <concentration>concentration</concentration> <pressure>pressure</pressure> </process_variables> - <porous_medium> - <porous_medium id="0"> - <capillary_pressure> - <type>vanGenuchten</type> - <m>0.789029535864979</m> - <pc_max>36333.30</pc_max> - <pd>3633.33</pd> - <smax>1</smax> - <sr>0.1689</sr> - </capillary_pressure> - </porous_medium> - </porous_medium> <specific_body_force>-9.81</specific_body_force> <secondary_variables> <secondary_variable internal_name="saturation" output_name="saturation"/>