diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index 2408ccafed5d48a6753284401ef76d4b9a62a2ea..ce542f45ea2d19eb90e9b5b9e797d9fdb92cbc75 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -517,7 +517,7 @@ void ProjectData::parseProcesses(BaseLib::ConfigTree const& processes_config, ProcessLib::ComponentTransport::createComponentTransportProcess( *_mesh_vec[0], std::move(jacobian_assembler), _process_variables, _parameters, integration_order, - process_config, _mesh_vec, output_directory); + process_config, _mesh_vec, output_directory, _media); } else #endif diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_molecular_diffusion_coefficient.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_molecular_diffusion_coefficient.md deleted file mode 100644 index ba1c95fe91099233c51072710d9817f7dfeac8e8..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_molecular_diffusion_coefficient.md +++ /dev/null @@ -1,2 +0,0 @@ -Molecular diffusion coefficient \f$D_d\f$ used to compute the hydrodynamic -dispersion tensor. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_solute_dispersivity_longitudinal.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_solute_dispersivity_longitudinal.md deleted file mode 100644 index 31b59b61b5f888522149c2bb4c47b192d41b84df..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_solute_dispersivity_longitudinal.md +++ /dev/null @@ -1,2 +0,0 @@ -The longitudinal dispersivity of chemical species \f$\beta_L\f$ used to compute -the hydrodynamic dispersion tensor. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_solute_dispersivity_transverse.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_solute_dispersivity_transverse.md deleted file mode 100644 index e4b2f6360e7d9053f5ce04455d4cc6ce022aab81..0000000000000000000000000000000000000000 --- a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_solute_dispersivity_transverse.md +++ /dev/null @@ -1,2 +0,0 @@ -The transverse dispersivity of chemical species \f$\beta_T\f$ used to compute -the hydrodynamic dispersion tensor. diff --git a/ProcessLib/ComponentTransport/ComponentTransportProcessData.h b/ProcessLib/ComponentTransport/ComponentTransportProcessData.h index 6989264390cff8b4d7ffe844d18ddcc8a84f6fb6..4ca9c3bf8e3d1bb86d82f2fc6fb73dc91dfe35f0 100644 --- a/ProcessLib/ComponentTransport/ComponentTransportProcessData.h +++ b/ProcessLib/ComponentTransport/ComponentTransportProcessData.h @@ -12,10 +12,16 @@ #include <memory> #include "MaterialLib/Fluid/FluidProperties/FluidProperties.h" +#include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" #include "MaterialLib/PorousMedium/Porosity/Porosity.h" #include "MaterialLib/PorousMedium/Storage/Storage.h" #include "MaterialLib/PorousMedium/PorousMediaProperties.h" +namespace MaterialPropertyLib +{ +class Medium; +} + namespace ProcessLib { template <typename ReturnType> @@ -31,9 +37,8 @@ struct ComponentTransportProcessData ProcessLib::Parameter<double> const& fluid_reference_density_, std::unique_ptr<MaterialLib::Fluid::FluidProperties>&& fluid_properties_, - ProcessLib::Parameter<double> const& molecular_diffusion_coefficient_, - ProcessLib::Parameter<double> const& solute_dispersivity_longitudinal_, - ProcessLib::Parameter<double> const& solute_dispersivity_transverse_, + std::unique_ptr<MaterialPropertyLib::MaterialSpatialDistributionMap>&& + media_map_, ProcessLib::Parameter<double> const& retardation_factor_, ProcessLib::Parameter<double> const& decay_rate_, Eigen::VectorXd const& specific_body_force_, @@ -41,9 +46,7 @@ struct ComponentTransportProcessData : porous_media_properties(std::move(porous_media_properties_)), fluid_reference_density(fluid_reference_density_), fluid_properties(std::move(fluid_properties_)), - molecular_diffusion_coefficient(molecular_diffusion_coefficient_), - solute_dispersivity_longitudinal(solute_dispersivity_longitudinal_), - solute_dispersivity_transverse(solute_dispersivity_transverse_), + media_map(std::move(media_map_)), retardation_factor(retardation_factor_), decay_rate(decay_rate_), specific_body_force(specific_body_force_), @@ -51,21 +54,7 @@ struct ComponentTransportProcessData { } - ComponentTransportProcessData(ComponentTransportProcessData&& other) - : porous_media_properties(std::move(other.porous_media_properties)), - fluid_reference_density(other.fluid_reference_density), - fluid_properties(other.fluid_properties.release()), - molecular_diffusion_coefficient( - other.molecular_diffusion_coefficient), - solute_dispersivity_longitudinal( - other.solute_dispersivity_longitudinal), - solute_dispersivity_transverse(other.solute_dispersivity_transverse), - retardation_factor(other.retardation_factor), - decay_rate(other.decay_rate), - specific_body_force(other.specific_body_force), - has_gravity(other.has_gravity) - { - } + ComponentTransportProcessData(ComponentTransportProcessData&&) = default; //! Copies are forbidden. ComponentTransportProcessData(ComponentTransportProcessData const&) = @@ -80,9 +69,8 @@ struct ComponentTransportProcessData MaterialLib::PorousMedium::PorousMediaProperties porous_media_properties; Parameter<double> const& fluid_reference_density; std::unique_ptr<MaterialLib::Fluid::FluidProperties> fluid_properties; - Parameter<double> const& molecular_diffusion_coefficient; - Parameter<double> const& solute_dispersivity_longitudinal; - Parameter<double> const& solute_dispersivity_transverse; + std::unique_ptr<MaterialPropertyLib::MaterialSpatialDistributionMap> + media_map; Parameter<double> const& retardation_factor; Parameter<double> const& decay_rate; Eigen::VectorXd const specific_body_force; diff --git a/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp b/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp index 8e8741531ac811172dbaf4a2b929065152b4b082..e2684608558ae86b04523779b2bfc8f7ed6f06c0 100644 --- a/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp +++ b/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp @@ -10,6 +10,7 @@ #include "CreateComponentTransportProcess.h" #include "MaterialLib/Fluid/FluidProperties/CreateFluidProperties.h" +#include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" #include "MaterialLib/PorousMedium/CreatePorousMediaProperties.h" #include "MeshLib/IO/readMeshFromFile.h" @@ -21,7 +22,6 @@ #include "ComponentTransportProcess.h" #include "ComponentTransportProcessData.h" - namespace ProcessLib { namespace ComponentTransport @@ -34,7 +34,8 @@ std::unique_ptr<Process> createComponentTransportProcess( unsigned const integration_order, BaseLib::ConfigTree const& config, std::vector<std::unique_ptr<MeshLib::Mesh>> const& meshes, - std::string const& output_directory) + std::string const& output_directory, + std::map<int, std::unique_ptr<MaterialPropertyLib::Medium>> const& media) { //! \ogs_file_param{prj__processes__process__type} config.checkConfigParameter("type", "ComponentTransport"); @@ -113,30 +114,6 @@ std::unique_ptr<Process> createComponentTransportProcess( DBUG("Use '%s' as fluid_reference_density parameter.", fluid_reference_density.name.c_str()); - // Parameter for the longitudinal molecular diffusion coefficient. - auto const& molecular_diffusion_coefficient = findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__ComponentTransport__molecular_diffusion_coefficient} - "molecular_diffusion_coefficient", parameters, 1); - DBUG("Use '%s' as molecular diffusion coefficient parameter.", - molecular_diffusion_coefficient.name.c_str()); - - // Parameter for the longitudinal solute dispersivity. - auto const& solute_dispersivity_longitudinal = findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__ComponentTransport__solute_dispersivity_longitudinal} - "solute_dispersivity_longitudinal", parameters, 1); - DBUG("Use '%s' as longitudinal solute dispersivity parameter.", - solute_dispersivity_longitudinal.name.c_str()); - - // Parameter for the transverse solute dispersivity. - auto const& solute_dispersivity_transverse = findParameter<double>( - config, - //! \ogs_file_param_special{prj__processes__process__ComponentTransport__solute_dispersivity_transverse} - "solute_dispersivity_transverse", parameters, 1); - DBUG("Use '%s' as transverse solute dispersivity parameter.", - solute_dispersivity_transverse.name.c_str()); - // Parameter for the retardation factor. auto const& retardation_factor = findParameter<double>(config, @@ -167,13 +144,14 @@ std::unique_ptr<Process> createComponentTransportProcess( std::copy_n(b.data(), b.size(), specific_body_force.data()); } + auto media_map = + MaterialPropertyLib::createMaterialSpatialDistributionMap(media, mesh); + ComponentTransportProcessData process_data{ std::move(porous_media_properties), fluid_reference_density, std::move(fluid_properties), - molecular_diffusion_coefficient, - solute_dispersivity_longitudinal, - solute_dispersivity_transverse, + std::move(media_map), retardation_factor, decay_rate, specific_body_force, diff --git a/ProcessLib/ComponentTransport/CreateComponentTransportProcess.h b/ProcessLib/ComponentTransport/CreateComponentTransportProcess.h index 4a198adba394f731de80eba1726d2916bacd9960..2c7d306756e8497f7135ff704c420ca9a7b0c68a 100644 --- a/ProcessLib/ComponentTransport/CreateComponentTransportProcess.h +++ b/ProcessLib/ComponentTransport/CreateComponentTransportProcess.h @@ -12,19 +12,24 @@ #include <memory> #include "ProcessLib/Process.h" +namespace MaterialPropertyLib +{ +class Medium; +} + namespace ProcessLib { namespace ComponentTransport { -std::unique_ptr<Process> createComponentTransportProcess( - MeshLib::Mesh& mesh, +std::unique_ptr<Process> createComponentTransportProcess(MeshLib::Mesh& mesh, std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler, std::vector<ProcessVariable> const& variables, std::vector<std::unique_ptr<ParameterBase>> const& parameters, unsigned const integration_order, BaseLib::ConfigTree const& config, std::vector<std::unique_ptr<MeshLib::Mesh>> const& meshes, - std::string const& output_directory); + std::string const& output_directory, + std::map<int, std::unique_ptr<MaterialPropertyLib::Medium> > const& media); } // namespace ComponentTransport } // namespace ProcessLib