diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index d3d46f9b44269b2af7d50493a89857026d2a860f..9dd8e4c06ebfb2b728c59bae1ee3542ed22dd81f 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -35,6 +35,7 @@ #include "ProcessLib/UncoupledProcessesTimeLoop.h" #include "ProcessLib/GroundwaterFlow/CreateGroundwaterFlowProcess.h" +#include "ProcessLib/ComponentTransport/CreateComponentTransportProcess.h" #include "ProcessLib/HT/CreateHTProcess.h" #include "ProcessLib/HeatConduction/CreateHeatConductionProcess.h" #include "ProcessLib/HydroMechanics/CreateHydroMechanicsProcess.h" @@ -383,6 +384,14 @@ void ProjectData::parseProcesses(BaseLib::ConfigTree const& processes_config, _process_variables, _parameters, integration_order, process_config); } + else if (type == "ComponentTransport") + { + process = + ProcessLib::ComponentTransport::createComponentTransportProcess( + *_mesh_vec[0], std::move(jacobian_assembler), + _process_variables, _parameters, integration_order, + process_config); + } else if (type == "SMALL_DEFORMATION") { //! \ogs_file_param{prj__processes__process__SMALL_DEFORMATION__dimension} diff --git a/Documentation/ProjectFile/material/fluid/density/ConcentrationDependent/c_ConcentrationDependent.md b/Documentation/ProjectFile/material/fluid/density/ConcentrationDependent/c_ConcentrationDependent.md new file mode 100644 index 0000000000000000000000000000000000000000..f5ce8b16c79f1e13fbd4869721b44758cf7efa50 --- /dev/null +++ b/Documentation/ProjectFile/material/fluid/density/ConcentrationDependent/c_ConcentrationDependent.md @@ -0,0 +1 @@ +\copydoc MaterialLib::Fluid::LinearConcentrationDependentDensity diff --git a/Documentation/ProjectFile/material/fluid/density/ConcentrationDependent/t_fluid_density_difference_ratio.md b/Documentation/ProjectFile/material/fluid/density/ConcentrationDependent/t_fluid_density_difference_ratio.md new file mode 100644 index 0000000000000000000000000000000000000000..202846b20b248e49fd85150859b328879bfbc5eb --- /dev/null +++ b/Documentation/ProjectFile/material/fluid/density/ConcentrationDependent/t_fluid_density_difference_ratio.md @@ -0,0 +1 @@ +\f$ \bar \alpha\f$ is the fluid density difference ratio diff --git a/Documentation/ProjectFile/material/fluid/density/ConcentrationDependent/t_reference_concentration.md b/Documentation/ProjectFile/material/fluid/density/ConcentrationDependent/t_reference_concentration.md new file mode 100644 index 0000000000000000000000000000000000000000..e200f1d8ff747b570284bad199c9d476efa16b0b --- /dev/null +++ b/Documentation/ProjectFile/material/fluid/density/ConcentrationDependent/t_reference_concentration.md @@ -0,0 +1 @@ +\f$ C_{\text{ref}}\f$ is the reference concentration diff --git a/Documentation/ProjectFile/material/fluid/density/ConcentrationDependent/t_reference_density.md b/Documentation/ProjectFile/material/fluid/density/ConcentrationDependent/t_reference_density.md new file mode 100644 index 0000000000000000000000000000000000000000..37ddf686c4ba3c63f4c008ada63a62d589641b8b --- /dev/null +++ b/Documentation/ProjectFile/material/fluid/density/ConcentrationDependent/t_reference_density.md @@ -0,0 +1 @@ +\f$ \varrho_{\text{ref}}\f$ is the reference density diff --git a/Documentation/ProjectFile/material/fluid/density/i_density.md b/Documentation/ProjectFile/material/fluid/density/i_density.md new file mode 100644 index 0000000000000000000000000000000000000000..4e66f4d9591407aa5d73b4fc586729b5b061d65c --- /dev/null +++ b/Documentation/ProjectFile/material/fluid/density/i_density.md @@ -0,0 +1 @@ +Various constitutive relationships for the fluid density. diff --git a/Documentation/ProjectFile/material/fluid/viscosity/i_viscosity.md b/Documentation/ProjectFile/material/fluid/viscosity/i_viscosity.md new file mode 100644 index 0000000000000000000000000000000000000000..d4bdf12871bf502d28e1dba29d193e0a71dde4f5 --- /dev/null +++ b/Documentation/ProjectFile/material/fluid/viscosity/i_viscosity.md @@ -0,0 +1 @@ +List of constitutive relationships for viscosity models. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/c_ComponentTransport.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/c_ComponentTransport.md new file mode 100644 index 0000000000000000000000000000000000000000..64ccf4a965a3723aeaf0c3df081e0d35e16b37a4 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/c_ComponentTransport.md @@ -0,0 +1 @@ +Implementation of the component transport. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/fluid/i_fluid.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/fluid/i_fluid.md new file mode 100644 index 0000000000000000000000000000000000000000..82d8c9d54553e63e79421d319e75d2acdc461388 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/fluid/i_fluid.md @@ -0,0 +1 @@ +Description of the fluid properties using constitutive relations. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/fluid/t_density.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/fluid/t_density.md new file mode 100644 index 0000000000000000000000000000000000000000..254641a5414e1206e0f4d131a52922516403adb1 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/fluid/t_density.md @@ -0,0 +1 @@ +The constitutive relation for the fluid density model. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/fluid/t_viscosity.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/fluid/t_viscosity.md new file mode 100644 index 0000000000000000000000000000000000000000..9c6e090a7eec87e7e03bd929d9ae6536eefd7a2e --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/fluid/t_viscosity.md @@ -0,0 +1 @@ +The constitutive relation for the fluid viscosity model. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/i_porous_medium.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/i_porous_medium.md new file mode 100644 index 0000000000000000000000000000000000000000..b0d0a13f289c7ab931aaf6ba73d933a91274e5d2 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/i_porous_medium.md @@ -0,0 +1 @@ +Tag to specify various porous media. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/a_id.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/a_id.md new file mode 100644 index 0000000000000000000000000000000000000000..15139e4fbcf5bc1bd69fc35c822a5b6b79553d35 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/a_id.md @@ -0,0 +1,3 @@ +The 'id' attribute maps the porous medium property to the mesh elements assigned +to the same 'MaterialIDs' id, where 'MaterialIDs' property vector stored as a +property withinn the mesh. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/i_porous_medium.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/i_porous_medium.md new file mode 100644 index 0000000000000000000000000000000000000000..d877e666d2aca38cd0b049506ce53e710f92c010 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/i_porous_medium.md @@ -0,0 +1,2 @@ +Tag to specify a porous medium property consisting of the permeability, storage +and porosity constitutive laws. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/t_permeability.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/t_permeability.md new file mode 100644 index 0000000000000000000000000000000000000000..18b24ec305fa92156cfc7c9f1e0718baf30ae8c8 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/t_permeability.md @@ -0,0 +1 @@ +This tag describes the permeability model of the porous medium. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/t_porosity.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/t_porosity.md new file mode 100644 index 0000000000000000000000000000000000000000..989158e5409a7bf5d6a78b4f5a58a6c9698b97b1 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/t_porosity.md @@ -0,0 +1 @@ +Tag describing the porosity model of the porous medium. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/t_storage.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/t_storage.md new file mode 100644 index 0000000000000000000000000000000000000000..ae3f924782c2989916388f67995e03a2873f8d28 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/porous_medium/porous_medium/t_storage.md @@ -0,0 +1 @@ +Tag describing the specific storage model of the porous medium. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/process_variables/i_process_variables.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/process_variables/i_process_variables.md new file mode 100644 index 0000000000000000000000000000000000000000..52ddbe66f7f8d21395cce5a1471b522f174c9a09 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/process_variables/i_process_variables.md @@ -0,0 +1 @@ +List of tags for the specification of the name of the process variables. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/process_variables/t_concentration.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/process_variables/t_concentration.md new file mode 100644 index 0000000000000000000000000000000000000000..5181c9dbab88e3c2d1fffa38da22e91f8e2f00ba --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/process_variables/t_concentration.md @@ -0,0 +1 @@ +Definition of the process variable for the transport process, i.e., the concentration. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/process_variables/t_pressure.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/process_variables/t_pressure.md new file mode 100644 index 0000000000000000000000000000000000000000..bb11eb313da590ea2d095bffecde2a69baf517ec --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/process_variables/t_pressure.md @@ -0,0 +1 @@ +Definition of the process variable for the hydraulic process, i.e., the pressure. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_decay_rate.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_decay_rate.md new file mode 100644 index 0000000000000000000000000000000000000000..b4992a3ad7ed0168eb9b3cc33da764dd4ed0819d --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_decay_rate.md @@ -0,0 +1 @@ +Parameter to specify the decay rate. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_fluid_reference_density.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_fluid_reference_density.md new file mode 100644 index 0000000000000000000000000000000000000000..7a9d865b220af527c3d672b644f8875d8b924c75 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_fluid_reference_density.md @@ -0,0 +1 @@ +Parameter for the specification of the reference density of the fluid. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_retardation_factor.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_retardation_factor.md new file mode 100644 index 0000000000000000000000000000000000000000..418ad86524af0595f76fcaa2a209f440e5227b33 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_retardation_factor.md @@ -0,0 +1 @@ +Parameter for the specification of the retardation factor. diff --git a/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_specific_body_force.md b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_specific_body_force.md new file mode 100644 index 0000000000000000000000000000000000000000..0a6e4c9cc98de615fa9f8b442cb84bf1d9d30e43 --- /dev/null +++ b/Documentation/ProjectFile/prj/processes/process/ComponentTransport/t_specific_body_force.md @@ -0,0 +1,3 @@ +Specific body forces applied to fluid. + +It is usually used to apply gravitational forces. Given as a 2d or 3d vector. diff --git a/MaterialLib/Fluid/Density/CreateFluidDensityModel.cpp b/MaterialLib/Fluid/Density/CreateFluidDensityModel.cpp index d13aaa66810f6990eb1f834c5dce48ea8b1387bd..34f87172b33f812de08aaa3c6b93175d86209902 100644 --- a/MaterialLib/Fluid/Density/CreateFluidDensityModel.cpp +++ b/MaterialLib/Fluid/Density/CreateFluidDensityModel.cpp @@ -16,6 +16,7 @@ #include "BaseLib/Error.h" #include "IdealGasLaw.h" +#include "LinearConcentrationDependentDensity.h" #include "LinearTemperatureDependentDensity.h" #include "LiquidDensity.h" #include "WaterDensityIAPWSIF97Region1.h" @@ -72,6 +73,28 @@ static std::unique_ptr<FluidProperty> createLinearTemperatureDependentDensity( new LinearTemperatureDependentDensity(rho0, T0, beta)); } +static std::unique_ptr<FluidProperty> createLinearConcentrationDependentDensity( + BaseLib::ConfigTree const& config) +{ + //! \ogs_file_param{material__fluid__density__type} + config.checkConfigParameter("type", "ConcentrationDependent"); + + const double reference_density = + //! \ogs_file_param{material__fluid__density__ConcentrationDependent__reference_density} + config.getConfigParameter<double>("reference_density"); + const double reference_concentration = + //! \ogs_file_param{material__fluid__density__ConcentrationDependent__reference_concentration} + config.getConfigParameter<double>("reference_concentration"); + const double fluid_density_difference_ratio = + //! \ogs_file_param{material__fluid__density__ConcentrationDependent__fluid_density_difference_ratio} + config.getConfigParameter<double>("fluid_density_difference_ratio"); + return std::unique_ptr<FluidProperty>( + new LinearConcentrationDependentDensity( + reference_density, + reference_concentration, + fluid_density_difference_ratio)); +} + std::unique_ptr<FluidProperty> createFluidDensityModel( BaseLib::ConfigTree const& config) { @@ -90,6 +113,8 @@ std::unique_ptr<FluidProperty> createFluidDensityModel( return createLiquidDensity(config); else if (type == "TemperatureDependent") return createLinearTemperatureDependentDensity(config); + else if (type == "ConcentrationDependent") + return createLinearConcentrationDependentDensity(config); else if (type == "IdealGasLaw") { //! \ogs_file_param{material__fluid__density__type} diff --git a/MaterialLib/Fluid/Density/LinearConcentrationDependentDensity.h b/MaterialLib/Fluid/Density/LinearConcentrationDependentDensity.h new file mode 100644 index 0000000000000000000000000000000000000000..1754c912ecc5d23f5db39097d73e174239f995c6 --- /dev/null +++ b/MaterialLib/Fluid/Density/LinearConcentrationDependentDensity.h @@ -0,0 +1,86 @@ +/** + * @copyright + * Copyright (c) 2012-2017, 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 <string> + +#include "BaseLib/ConfigTree.h" + +#include "MaterialLib/Fluid/FluidProperty.h" + +namespace MaterialLib +{ +namespace Fluid +{ +/// Linear concentration dependent density model. +/// \f[ \varrho = \varrho_{\text{ref}} +/// (1 + \bar \alpha (C - C_{\text{ref}})) \f] +/// where +/// - \f$ \varrho_{\text{ref}}\f$ is the reference density +/// - \f$ \bar \alpha\f$ is the fluid density difference ratio +/// - \f$ C_{\text{ref}}\f$ is the reference concentration +class LinearConcentrationDependentDensity final : public FluidProperty +{ +public: + /** + * @param reference_density \f$\rho_0\f$ + * @param reference_concentration \f$C_0\f$ + * @param fluid_density_difference_ratio \f$ \bar \alpha \f$ in reference + * Coupled groundwater flow and transport: 2. Thermohaline and 3D convection + * systems + */ + explicit LinearConcentrationDependentDensity( + const double reference_density, double reference_concentration, + const double fluid_density_difference_ratio) + : _reference_density(reference_density), + _reference_concentration(reference_concentration), + _fluid_density_difference_ratio(fluid_density_difference_ratio) + { + } + + /// Get model name. + std::string getName() const override + { + return "Linear concentration dependent density"; + } + + /// Get density value. + /// \param var_vals Variable values in an array. The order of its elements + /// is given in enum class PropertyVariableType. + double getValue(const ArrayType& var_vals) const override + { + const double C = var_vals[static_cast<int>(PropertyVariableType::C)]; + return _reference_density * (1 + + _fluid_density_difference_ratio * + (C - _reference_concentration)); + } + + /// Get the partial differential of the density with respect to + /// concentration. + /// \param var_vals Variable values in an array. The order of its elements + /// is given in enum class PropertyVariableType. + /// \param var Variable type. + double getdValue(const ArrayType& var_vals, + const PropertyVariableType var) const override + { + (void)var_vals; + if (var != PropertyVariableType::C) + return 0.0; + return _reference_density * _fluid_density_difference_ratio; + } + +private: + const double _reference_density; + const double _reference_concentration; + const double _fluid_density_difference_ratio; +}; + +} // end namespace +} // end namespace diff --git a/MaterialLib/Fluid/FluidProperties/FluidProperties.h b/MaterialLib/Fluid/FluidProperties/FluidProperties.h index 94a65388ee43432d362220618c6c6816752973e9..72192805b6df0b28f265e86c2fadc4f444db51b3 100644 --- a/MaterialLib/Fluid/FluidProperties/FluidProperties.h +++ b/MaterialLib/Fluid/FluidProperties/FluidProperties.h @@ -29,7 +29,8 @@ enum class FluidPropertyType Viscosity = 1, HeatCapacity = 2, ThermalConductivity = 3, - number_of_property_types = 4 ///< Number of property types. + Concentration = 4, + number_of_property_types = 5 ///< Number of property types. }; const unsigned FluidPropertyTypeNumber = diff --git a/MaterialLib/Fluid/PropertyVariableType.h b/MaterialLib/Fluid/PropertyVariableType.h index af8f0e58a253af56230529295226b505dcf07a35..0a1e125a32df7d45663ec89bdfc2ee4ea027df8b 100644 --- a/MaterialLib/Fluid/PropertyVariableType.h +++ b/MaterialLib/Fluid/PropertyVariableType.h @@ -22,7 +22,8 @@ enum class PropertyVariableType T = 0, ///< temperature. p = 1, ///< pressure. rho = p, ///< density. For some models, rho substitutes p - number_of_variables = 2 ///< Number of property variables. + C = 2, ///< concentration. + number_of_variables = 3 ///< Number of property variables. }; const unsigned PropertyVariableNumber = diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt index befb3595358128e00fdeb2e5732c9ab60572756e..2737edafb88f63e44e77a4abaf6cddd378076134 100644 --- a/ProcessLib/CMakeLists.txt +++ b/ProcessLib/CMakeLists.txt @@ -45,6 +45,9 @@ APPEND_SOURCE_FILES(SOURCES HeatConduction) add_subdirectory(RichardsFlow) APPEND_SOURCE_FILES(SOURCES RichardsFlow) +add_subdirectory(ComponentTransport) +APPEND_SOURCE_FILES(SOURCES ComponentTransport) + add_subdirectory(HT) APPEND_SOURCE_FILES(SOURCES HT) diff --git a/ProcessLib/ComponentTransport/CMakeLists.txt b/ProcessLib/ComponentTransport/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..871c6b8d46f03029cd99e99735d879e32b058b41 --- /dev/null +++ b/ProcessLib/ComponentTransport/CMakeLists.txt @@ -0,0 +1,290 @@ +AddTest( + NAME 2D_ComponentTransport_ConcentrationDiffusionOnly + PATH Parabolic/ComponentTransport/ + EXECUTABLE ogs + EXECUTABLE_ARGS ConcentrationDiffusionOnly.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT OGS_USE_MPI + ABSTOL 1e-7 RELTOL 1e-10 + DIFF_DATA + DiffusionOnly_pcs_0_ts_1_t_1.000000_expected.vtu DiffusionOnly_pcs_0_ts_1_t_1.000000.vtu linear_1_to_0 concentration + DiffusionOnly_pcs_0_ts_1_t_1.000000_expected.vtu DiffusionOnly_pcs_0_ts_1_t_1.000000.vtu zero pressure + DiffusionOnly_pcs_0_ts_1_t_1.000000_expected.vtu DiffusionOnly_pcs_0_ts_1_t_1.000000.vtu zero darcy_velocity_x + DiffusionOnly_pcs_0_ts_1_t_1.000000_expected.vtu DiffusionOnly_pcs_0_ts_1_t_1.000000.vtu zero darcy_velocity_y + VIS DiffusionOnly_pcs_0_ts_1_t_1.000000.vtu +) + +AddTest( + NAME 2D_ComponentTransport_ConcentrationDiffusionAndStorage + PATH Parabolic/ComponentTransport/ + EXECUTABLE ogs + EXECUTABLE_ARGS ConcentrationDiffusionAndStorage.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT OGS_USE_MPI + ABSTOL 1e-7 RELTOL 1e-10 + DIFF_DATA + DiffusionAndStorage_pcs_0_ts_100_t_0.150000_expected.vtu DiffusionAndStorage_pcs_0_ts_100_t_0.150000.vtu concentration concentration + DiffusionAndStorage_pcs_0_ts_100_t_0.150000_expected.vtu DiffusionAndStorage_pcs_0_ts_100_t_0.150000.vtu pressure pressure + DiffusionAndStorage_pcs_0_ts_100_t_0.150000_expected.vtu DiffusionAndStorage_pcs_0_ts_100_t_0.150000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorage_pcs_0_ts_100_t_0.150000_expected.vtu DiffusionAndStorage_pcs_0_ts_100_t_0.150000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorage_pcs_0_ts_134_t_1.500000_expected.vtu DiffusionAndStorage_pcs_0_ts_134_t_1.500000.vtu concentration concentration + DiffusionAndStorage_pcs_0_ts_134_t_1.500000_expected.vtu DiffusionAndStorage_pcs_0_ts_134_t_1.500000.vtu zero pressure + DiffusionAndStorage_pcs_0_ts_134_t_1.500000_expected.vtu DiffusionAndStorage_pcs_0_ts_134_t_1.500000.vtu zero darcy_velocity_x + DiffusionAndStorage_pcs_0_ts_134_t_1.500000_expected.vtu DiffusionAndStorage_pcs_0_ts_134_t_1.500000.vtu zero darcy_velocity_y + VIS DiffusionAndStorage_pcs_0_ts_134_t_1.500000.vtu +) + +AddTest( + NAME 2D_ComponentTransport_DiffusionAndStorageAndAdvection + PATH Parabolic/ComponentTransport/ + EXECUTABLE ogs + EXECUTABLE_ARGS DiffusionAndStorageAndAdvection.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT OGS_USE_MPI + ABSTOL 1e-7 RELTOL 1e-10 + DIFF_DATA + DiffusionAndStorageAndAdvection_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_100_t_5.700000.vtu concentration concentration + DiffusionAndStorageAndAdvection_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_200_t_35.700000.vtu concentration concentration + DiffusionAndStorageAndAdvection_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_300_t_155.700000.vtu concentration concentration + DiffusionAndStorageAndAdvection_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_400_t_315.700000.vtu concentration concentration + DiffusionAndStorageAndAdvection_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_500_t_495.700000.vtu concentration concentration + DiffusionAndStorageAndAdvection_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_600_t_720.700000.vtu concentration concentration + DiffusionAndStorageAndAdvection_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_672_t_900.000000.vtu concentration concentration + DiffusionAndStorageAndAdvection_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_100_t_5.700000.vtu pressure pressure + DiffusionAndStorageAndAdvection_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_200_t_35.700000.vtu pressure pressure + DiffusionAndStorageAndAdvection_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_300_t_155.700000.vtu pressure pressure + DiffusionAndStorageAndAdvection_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_400_t_315.700000.vtu pressure pressure + DiffusionAndStorageAndAdvection_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_500_t_495.700000.vtu pressure pressure + DiffusionAndStorageAndAdvection_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_600_t_720.700000.vtu pressure pressure + DiffusionAndStorageAndAdvection_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_672_t_900.000000.vtu pressure pressure + DiffusionAndStorageAndAdvection_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_100_t_5.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvection_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_200_t_35.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvection_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_300_t_155.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvection_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_400_t_315.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvection_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_500_t_495.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvection_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_600_t_720.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvection_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_672_t_900.000000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvection_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_100_t_5.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvection_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_200_t_35.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvection_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_300_t_155.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvection_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_400_t_315.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvection_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_500_t_495.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvection_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_600_t_720.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvection_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvection_pcs_0_ts_672_t_900.000000.vtu darcy_velocity_y darcy_velocity_y + VIS DiffusionAndStorageAndAdvection_pcs_0_ts_672_t_900.000000.vtu +) + +AddTest( + NAME 2D_ComponentTransport_DiffusionAndStorageAndGravityAndDispersionHalf + PATH Parabolic/ComponentTransport/ + EXECUTABLE ogs + EXECUTABLE_ARGS DiffusionAndStorageAndGravityAndDispersionHalf.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT OGS_USE_MPI + ABSTOL 1e-5 RELTOL 1e-10 + DIFF_DATA + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_100_t_5.700000.vtu concentration concentration + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_200_t_35.700000.vtu concentration concentration + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_300_t_155.700000.vtu concentration concentration + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_400_t_315.700000.vtu concentration concentration + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_500_t_495.700000.vtu concentration concentration + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_600_t_720.700000.vtu concentration concentration + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_672_t_900.000000.vtu concentration concentration + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_100_t_5.700000.vtu pressure pressure + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_200_t_35.700000.vtu pressure pressure + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_300_t_155.700000.vtu pressure pressure + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_400_t_315.700000.vtu pressure pressure + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_500_t_495.700000.vtu pressure pressure + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_600_t_720.700000.vtu pressure pressure + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_672_t_900.000000.vtu pressure pressure + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_100_t_5.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_200_t_35.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_300_t_155.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_400_t_315.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_500_t_495.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_600_t_720.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_672_t_900.000000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_100_t_5.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_200_t_35.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_300_t_155.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_400_t_315.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_500_t_495.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_600_t_720.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndGravityAndDispersionHalf_pcs_0_ts_672_t_900.000000.vtu darcy_velocity_y darcy_velocity_y + VIS DiffusionAndStorageAndAdvection_pcs_0_ts_672_t_900.000000.vtu +) + +AddTest( + NAME 2D_ComponentTransport_DiffusionAndStorageAndAdvectionAndDispersion + PATH Parabolic/ComponentTransport/ + EXECUTABLE ogs + EXECUTABLE_ARGS DiffusionAndStorageAndAdvectionAndDispersion.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT OGS_USE_MPI + ABSTOL 1e-7 RELTOL 1e-10 + DIFF_DATA + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_100_t_5.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_200_t_35.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_300_t_155.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_400_t_315.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_500_t_495.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_600_t_720.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_672_t_900.000000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_100_t_5.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_200_t_35.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_300_t_155.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_400_t_315.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_500_t_495.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_600_t_720.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_672_t_900.000000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_100_t_5.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_200_t_35.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_300_t_155.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_400_t_315.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_500_t_495.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_600_t_720.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_672_t_900.000000.vtu darcy_velocity_x darcy_velocity_x +DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_100_t_5.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_200_t_35.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_300_t_155.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_400_t_315.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_500_t_495.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_600_t_720.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_672_t_900.000000.vtu darcy_velocity_y darcy_velocity_y + VIS DiffusionAndStorageAndAdvectionAndDispersion_pcs_0_ts_672_t_900.000000.vtu +) + +AddTest( + NAME 2D_ComponentTransport_DiffusionAndStorageAndAdvectionAndDecay + PATH Parabolic/ComponentTransport/ + EXECUTABLE ogs + EXECUTABLE_ARGS DiffusionAndStorageAndAdvectionAndDecay.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT OGS_USE_MPI + ABSTOL 1e-7 RELTOL 1e-10 + DIFF_DATA + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_100_t_5.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_200_t_35.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_300_t_155.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_400_t_315.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_500_t_495.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_600_t_720.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_672_t_900.000000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_100_t_5.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_200_t_35.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_300_t_155.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_400_t_315.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_500_t_495.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_600_t_720.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_672_t_900.000000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_100_t_5.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_200_t_35.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_300_t_155.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_400_t_315.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_500_t_495.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_600_t_720.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_672_t_900.000000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_100_t_5.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_200_t_35.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_300_t_155.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_400_t_315.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_500_t_495.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_600_t_720.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_672_t_900.000000.vtu darcy_velocity_y darcy_velocity_y + VIS DiffusionAndStorageAndAdvectionAndDecay_pcs_0_ts_672_t_900.000000.vtu +) + +AddTest( + NAME 2D_ComponentTransport_DiffusionAndStorageAndAdvectionAndDispersionHalf + PATH Parabolic/ComponentTransport/ + EXECUTABLE ogs + EXECUTABLE_ARGS DiffusionAndStorageAndAdvectionAndDispersionHalf.prj + WRAPPER time + TESTER vtkdiff + REQUIREMENTS NOT OGS_USE_MPI + ABSTOL 1e-7 RELTOL 1e-10 + DIFF_DATA + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_100_t_5.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_200_t_35.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_300_t_155.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_400_t_315.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_500_t_495.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_600_t_720.700000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_672_t_900.000000.vtu concentration concentration + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_100_t_5.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_200_t_35.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_300_t_155.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_400_t_315.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_500_t_495.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_600_t_720.700000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_672_t_900.000000.vtu pressure pressure + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_100_t_5.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_200_t_35.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_300_t_155.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_400_t_315.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_500_t_495.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_600_t_720.700000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_672_t_900.000000.vtu darcy_velocity_x darcy_velocity_x + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_100_t_5.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_100_t_5.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_200_t_35.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_200_t_35.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_300_t_155.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_300_t_155.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_400_t_315.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_400_t_315.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_500_t_495.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_500_t_495.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_600_t_720.700000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_600_t_720.700000.vtu darcy_velocity_y darcy_velocity_y + DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_672_t_900.000000_expected.vtu DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_672_t_900.000000.vtu darcy_velocity_y darcy_velocity_y + VIS DiffusionAndStorageAndAdvectionAndDispersionHalf_pcs_0_ts_672_t_900.000000.vtu +) + +# Disable test until the mesh node search issue is fixed, if you want run this +# benchmark adjust the search length in line 26 in the file +# MeshGeoToolsLib/SearchLength.h from 1e-9 to 1e-3 +#AddTest( +# NAME LARGE_2D_ComponentTransport_Goswami +# PATH Parabolic/ComponentTransport/goswami/ +# EXECUTABLE ogs +# EXECUTABLE_ARGS goswami_input.prj +# WRAPPER time +# TESTER vtkdiff +# REQUIREMENTS NOT OGS_USE_MPI +# ABSTOL 1e-1 RELTOL 1e-5 +# DIFF_DATA +# hc_pcs_0_ts_100_t_150.000000_expected.vtu hc_pcs_0_ts_100_t_150.000000.vtu concentration concentration +# hc_pcs_0_ts_150_t_350.000000_expected.vtu hc_pcs_0_ts_150_t_350.000000.vtu concentration concentration +# hc_pcs_0_ts_200_t_750.000000_expected.vtu hc_pcs_0_ts_200_t_750.000000.vtu concentration concentration +# hc_pcs_0_ts_250_t_1150.000000_expected.vtu hc_pcs_0_ts_250_t_1150.000000.vtu concentration concentration +# hc_pcs_0_ts_300_t_1950.000000_expected.vtu hc_pcs_0_ts_300_t_1950.000000.vtu concentration concentration +# hc_pcs_0_ts_350_t_2750.000000_expected.vtu hc_pcs_0_ts_350_t_2750.000000.vtu concentration concentration +# hc_pcs_0_ts_366_t_3000.000000_expected.vtu hc_pcs_0_ts_366_t_3000.000000.vtu concentration concentration +# hc_pcs_0_ts_50_t_50.000000_expected.vtu hc_pcs_0_ts_50_t_50.000000.vtu concentration concentration +# hc_pcs_0_ts_100_t_150.000000_expected.vtu hc_pcs_0_ts_100_t_150.000000.vtu pressure pressure +# hc_pcs_0_ts_150_t_350.000000_expected.vtu hc_pcs_0_ts_150_t_350.000000.vtu pressure pressure +# hc_pcs_0_ts_200_t_750.000000_expected.vtu hc_pcs_0_ts_200_t_750.000000.vtu pressure pressure +# hc_pcs_0_ts_250_t_1150.000000_expected.vtu hc_pcs_0_ts_250_t_1150.000000.vtu pressure pressure +# hc_pcs_0_ts_300_t_1950.000000_expected.vtu hc_pcs_0_ts_300_t_1950.000000.vtu pressure pressure +# hc_pcs_0_ts_350_t_2750.000000_expected.vtu hc_pcs_0_ts_350_t_2750.000000.vtu pressure pressure +# hc_pcs_0_ts_366_t_3000.000000_expected.vtu hc_pcs_0_ts_366_t_3000.000000.vtu pressure pressure +# hc_pcs_0_ts_50_t_50.000000_expected.vtu hc_pcs_0_ts_50_t_50.000000.vtu pressure pressure +# hc_pcs_0_ts_100_t_150.000000_expected.vtu hc_pcs_0_ts_100_t_150.000000.vtu darcy_velocity_x darcy_velocity_x +# hc_pcs_0_ts_150_t_350.000000_expected.vtu hc_pcs_0_ts_150_t_350.000000.vtu darcy_velocity_x darcy_velocity_x +# hc_pcs_0_ts_200_t_750.000000_expected.vtu hc_pcs_0_ts_200_t_750.000000.vtu darcy_velocity_x darcy_velocity_x +# hc_pcs_0_ts_250_t_1150.000000_expected.vtu hc_pcs_0_ts_250_t_1150.000000.vtu darcy_velocity_x darcy_velocity_x +# hc_pcs_0_ts_300_t_1950.000000_expected.vtu hc_pcs_0_ts_300_t_1950.000000.vtu darcy_velocity_x darcy_velocity_x +# hc_pcs_0_ts_350_t_2750.000000_expected.vtu hc_pcs_0_ts_350_t_2750.000000.vtu darcy_velocity_x darcy_velocity_x +# hc_pcs_0_ts_366_t_3000.000000_expected.vtu hc_pcs_0_ts_366_t_3000.000000.vtu darcy_velocity_x darcy_velocity_x +# hc_pcs_0_ts_50_t_50.000000_expected.vtu hc_pcs_0_ts_50_t_50.000000.vtu darcy_velocity_x darcy_velocity_x +# hc_pcs_0_ts_100_t_150.000000_expected.vtu hc_pcs_0_ts_100_t_150.000000.vtu darcy_velocity_y darcy_velocity_y +# hc_pcs_0_ts_150_t_350.000000_expected.vtu hc_pcs_0_ts_150_t_350.000000.vtu darcy_velocity_y darcy_velocity_y +# hc_pcs_0_ts_200_t_750.000000_expected.vtu hc_pcs_0_ts_200_t_750.000000.vtu darcy_velocity_y darcy_velocity_y +# hc_pcs_0_ts_250_t_1150.000000_expected.vtu hc_pcs_0_ts_250_t_1150.000000.vtu darcy_velocity_y darcy_velocity_y +# hc_pcs_0_ts_300_t_1950.000000_expected.vtu hc_pcs_0_ts_300_t_1950.000000.vtu darcy_velocity_y darcy_velocity_y +# hc_pcs_0_ts_350_t_2750.000000_expected.vtu hc_pcs_0_ts_350_t_2750.000000.vtu darcy_velocity_y darcy_velocity_y +# hc_pcs_0_ts_366_t_3000.000000_expected.vtu hc_pcs_0_ts_366_t_3000.000000.vtu darcy_velocity_y darcy_velocity_y +# hc_pcs_0_ts_50_t_50.000000_expected.vtu hc_pcs_0_ts_50_t_50.000000.vtu darcy_velocity_y darcy_velocity_y +# VIS hc_pcs_0_ts_366_t_3000.000000.vtu +#) diff --git a/ProcessLib/ComponentTransport/ComponentTransportFEM.h b/ProcessLib/ComponentTransport/ComponentTransportFEM.h new file mode 100644 index 0000000000000000000000000000000000000000..852a8efbaaf547639309e5b1d53345c00fd7a730 --- /dev/null +++ b/ProcessLib/ComponentTransport/ComponentTransportFEM.h @@ -0,0 +1,357 @@ +/** + * \copyright + * Copyright (c) 2012-2017, 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 <Eigen/Dense> +#include <vector> + + +#include "ComponentTransportProcessData.h" +#include "MaterialLib/Fluid/FluidProperties/FluidProperties.h" +#include "MathLib/LinAlg/Eigen/EigenMapTools.h" +#include "NumLib/Extrapolation/ExtrapolatableElement.h" +#include "NumLib/Fem/FiniteElement/TemplateIsoparametric.h" +#include "NumLib/Fem/ShapeMatrixPolicy.h" +#include "NumLib/Function/Interpolation.h" +#include "ProcessLib/LocalAssemblerInterface.h" +#include "ProcessLib/Parameter/Parameter.h" +#include "ProcessLib/Utils/InitShapeMatrices.h" + +namespace ProcessLib +{ +namespace ComponentTransport +{ +template <typename NodalRowVectorType, typename GlobalDimNodalMatrixType> +struct IntegrationPointData final +{ + IntegrationPointData(NodalRowVectorType const& N_, + GlobalDimNodalMatrixType const& dNdx_, + double const& integration_weight_) + : N(N_), dNdx(dNdx_), integration_weight(integration_weight_) + {} + + NodalRowVectorType const N; + GlobalDimNodalMatrixType const dNdx; + double const integration_weight; +}; + +const unsigned NUM_NODAL_DOF = 2; + +class ComponentTransportLocalAssemblerInterface + : public ProcessLib::LocalAssemblerInterface, + public NumLib::ExtrapolatableElement +{ +public: + virtual std::vector<double> const& getIntPtDarcyVelocityX( + std::vector<double>& /*cache*/) const = 0; + + virtual std::vector<double> const& getIntPtDarcyVelocityY( + std::vector<double>& /*cache*/) const = 0; + + virtual std::vector<double> const& getIntPtDarcyVelocityZ( + std::vector<double>& /*cache*/) const = 0; +}; + +template <typename ShapeFunction, typename IntegrationMethod, + unsigned GlobalDim> +class LocalAssemblerData : public ComponentTransportLocalAssemblerInterface +{ + using ShapeMatricesType = ShapeMatrixPolicyType<ShapeFunction, GlobalDim>; + using ShapeMatrices = typename ShapeMatricesType::ShapeMatrices; + + using LocalMatrixType = typename ShapeMatricesType::template MatrixType< + NUM_NODAL_DOF * ShapeFunction::NPOINTS, + NUM_NODAL_DOF * ShapeFunction::NPOINTS>; + using LocalVectorType = + typename ShapeMatricesType::template VectorType<NUM_NODAL_DOF * + ShapeFunction::NPOINTS>; + + using NodalVectorType = typename ShapeMatricesType::NodalVectorType; + using NodalRowVectorType = typename ShapeMatricesType::NodalRowVectorType; + + using GlobalDimVectorType = typename ShapeMatricesType::GlobalDimVectorType; + using GlobalDimNodalMatrixType = + typename ShapeMatricesType::GlobalDimNodalMatrixType; + using GlobalDimMatrixType = typename ShapeMatricesType::GlobalDimMatrixType; + +public: + LocalAssemblerData(MeshLib::Element const& element, + std::size_t const local_matrix_size, + bool is_axially_symmetric, + unsigned const integration_order, + ComponentTransportProcessData const& process_data) + : _element(element), + _process_data(process_data), + _integration_method(integration_order), + _darcy_velocities( + GlobalDim, + std::vector<double>(_integration_method.getNumberOfPoints())) + { + // This assertion is valid only if all nodal d.o.f. use the same shape + // matrices. + assert(local_matrix_size == ShapeFunction::NPOINTS * NUM_NODAL_DOF); + (void)local_matrix_size; + + unsigned const n_integration_points = + _integration_method.getNumberOfPoints(); + _ip_data.reserve(n_integration_points); + + auto const shape_matrices = + initShapeMatrices<ShapeFunction, ShapeMatricesType, + IntegrationMethod, GlobalDim>( + element, is_axially_symmetric, _integration_method); + + for (unsigned ip = 0; ip < n_integration_points; ip++) + { + _ip_data.emplace_back( + shape_matrices[ip].N, shape_matrices[ip].dNdx, + _integration_method.getWeightedPoint(ip).getWeight() * + shape_matrices[ip].integralMeasure * + shape_matrices[ip].detJ); + } + } + + void assemble(double const t, std::vector<double> const& local_x, + std::vector<double>& local_M_data, + std::vector<double>& local_K_data, + std::vector<double>& local_b_data) override + { + auto const local_matrix_size = local_x.size(); + // This assertion is valid only if all nodal d.o.f. use the same shape + // matrices. + assert(local_matrix_size == ShapeFunction::NPOINTS * NUM_NODAL_DOF); + + auto local_M = MathLib::createZeroedMatrix<LocalMatrixType>( + local_M_data, local_matrix_size, local_matrix_size); + auto local_K = MathLib::createZeroedMatrix<LocalMatrixType>( + local_K_data, local_matrix_size, local_matrix_size); + auto local_b = MathLib::createZeroedVector<LocalVectorType>( + local_b_data, local_matrix_size); + + unsigned const n_integration_points = + _integration_method.getNumberOfPoints(); + + SpatialPosition pos; + pos.setElementID(_element.getID()); + + auto const num_nodes = ShapeFunction::NPOINTS; + auto p_nodal_values = + Eigen::Map<const NodalVectorType>(&local_x[num_nodes], num_nodes); + + auto const& b = _process_data.specific_body_force; + + MaterialLib::Fluid::FluidProperty::ArrayType vars; + + GlobalDimMatrixType const& I( + GlobalDimMatrixType::Identity(GlobalDim, GlobalDim)); + + auto KCC = local_K.template block<num_nodes, num_nodes>(0, 0); + auto MCC = local_M.template block<num_nodes, num_nodes>(0, 0); + auto Kpp = + local_K.template block<num_nodes, num_nodes>(num_nodes, num_nodes); + auto Mpp = + local_M.template block<num_nodes, num_nodes>(num_nodes, num_nodes); + auto Bp = local_b.template block<num_nodes, 1>(num_nodes, 0); + + for (std::size_t ip(0); ip < n_integration_points; ++ip) + { + pos.setIntegrationPoint(ip); + + // \todo the argument to getValue() has to be changed for non + // constant storage model + auto const specific_storage = + _process_data.porous_media_properties.getSpecificStorage(t, pos) + .getValue(0.0); + + auto const& ip_data = _ip_data[ip]; + auto const& N = ip_data.N; + auto const& dNdx = ip_data.dNdx; + auto const& w = ip_data.integration_weight; + + double C_int_pt = 0.0; + double p_int_pt = 0.0; + // Order matters: First C, then p! + NumLib::shapeFunctionInterpolate(local_x, N, C_int_pt, p_int_pt); + + // \todo the first argument has to be changed for non constant + // porosity model + auto const porosity = + _process_data.porous_media_properties.getPorosity(t, pos) + .getValue(0.0, C_int_pt); + + auto const retardation_factor = + _process_data.retardation_factor(t, pos)[0]; + + auto const& solute_dispersivity_transverse = + _process_data.solute_dispersivity_transverse(t, pos)[0]; + auto const& solute_dispersivity_longitudinal = + _process_data.solute_dispersivity_longitudinal(t, pos)[0]; + + // Use the fluid density model to compute the density + vars[static_cast<int>( + MaterialLib::Fluid::PropertyVariableType::C)] = C_int_pt; + vars[static_cast<int>( + MaterialLib::Fluid::PropertyVariableType::p)] = p_int_pt; + auto const density = _process_data.fluid_properties->getValue( + MaterialLib::Fluid::FluidPropertyType::Density, vars); + auto const& decay_rate = _process_data.decay_rate(t, pos)[0]; + auto const& molecular_diffusion_coefficient = + _process_data.molecular_diffusion_coefficient(t, pos)[0]; + + auto const& K = + _process_data.porous_media_properties.getIntrinsicPermeability( + t, pos); + // Use the viscosity model to compute the viscosity + auto const mu = _process_data.fluid_properties->getValue( + MaterialLib::Fluid::FluidPropertyType::Viscosity, vars); + + GlobalDimMatrixType const K_over_mu = K / mu; + + GlobalDimVectorType const velocity = + _process_data.has_gravity + ? GlobalDimVectorType(-K_over_mu * + (dNdx * p_nodal_values - density * b)) + : GlobalDimVectorType(-K_over_mu * dNdx * p_nodal_values); + + double const velocity_magnitude = velocity.norm(); + GlobalDimMatrixType const hydrodynamic_dispersion = + velocity_magnitude != 0.0 + ? GlobalDimMatrixType( + (porosity * molecular_diffusion_coefficient + + solute_dispersivity_transverse * + velocity_magnitude) * + I + + (solute_dispersivity_longitudinal - + solute_dispersivity_transverse) / + velocity_magnitude * velocity * + velocity.transpose()) + : GlobalDimMatrixType( + (porosity * molecular_diffusion_coefficient + + solute_dispersivity_transverse * + velocity_magnitude) * + I); + + // matrix assembly + KCC.noalias() += + (dNdx.transpose() * hydrodynamic_dispersion * dNdx + + N.transpose() * velocity.transpose() * dNdx + + N.transpose() * decay_rate * porosity * retardation_factor * + N) * + w; + MCC.noalias() += + w * N.transpose() * porosity * retardation_factor * N; + Kpp.noalias() += w * dNdx.transpose() * K_over_mu * dNdx; + Mpp.noalias() += w * N.transpose() * specific_storage * N; + if (_process_data.has_gravity) + Bp += w * density * dNdx.transpose() * K_over_mu * b; + /* with Oberbeck-Boussing assumption density difference only exists + * in buoyancy effects */ + } + } + + void computeSecondaryVariableConcrete( + double const t, std::vector<double> const& local_x) override + { + SpatialPosition pos; + pos.setElementID(_element.getID()); + + auto const& K = + _process_data.porous_media_properties.getIntrinsicPermeability(t, + pos); + MaterialLib::Fluid::FluidProperty::ArrayType vars; + + auto const mu = _process_data.fluid_properties->getValue( + MaterialLib::Fluid::FluidPropertyType::Viscosity, vars); + GlobalDimMatrixType const K_over_mu = K / mu; + + unsigned const n_integration_points = + _integration_method.getNumberOfPoints(); + + auto const p_nodal_values = Eigen::Map<const NodalVectorType>( + &local_x[ShapeFunction::NPOINTS], ShapeFunction::NPOINTS); + + for (unsigned ip = 0; ip < n_integration_points; ++ip) + { + auto const& ip_data = _ip_data[ip]; + auto const& N = ip_data.N; + auto const& dNdx = ip_data.dNdx; + + GlobalDimVectorType velocity = -K_over_mu * dNdx * p_nodal_values; + if (_process_data.has_gravity) + { + double C_int_pt = 0.0; + double p_int_pt = 0.0; + NumLib::shapeFunctionInterpolate(local_x, N, C_int_pt, + p_int_pt); + vars[static_cast<int>( + MaterialLib::Fluid::PropertyVariableType::C)] = C_int_pt; + vars[static_cast<int>( + MaterialLib::Fluid::PropertyVariableType::p)] = p_int_pt; + + auto const rho_w = _process_data.fluid_properties->getValue( + MaterialLib::Fluid::FluidPropertyType::Density, vars); + auto const b = _process_data.specific_body_force; + // here it is assumed that the vector b is directed 'downwards' + velocity += K_over_mu * rho_w * b; + } + + for (unsigned d = 0; d < GlobalDim; ++d) + { + _darcy_velocities[d][ip] = velocity[d]; + } + } + } + + + Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix( + const unsigned integration_point) const override + { + auto const& N = _ip_data[integration_point].N; + + // assumes N is stored contiguously in memory + return Eigen::Map<const Eigen::RowVectorXd>(N.data(), N.size()); + } + + std::vector<double> const& getIntPtDarcyVelocityX( + std::vector<double>& /*cache*/) const override + { + assert(_darcy_velocities.size() > 0); + return _darcy_velocities[0]; + } + + std::vector<double> const& getIntPtDarcyVelocityY( + std::vector<double>& /*cache*/) const override + { + assert(_darcy_velocities.size() > 1); + return _darcy_velocities[1]; + } + + std::vector<double> const& getIntPtDarcyVelocityZ( + std::vector<double>& /*cache*/) const override + { + assert(_darcy_velocities.size() > 2); + return _darcy_velocities[2]; + } + +private: + MeshLib::Element const& _element; + ComponentTransportProcessData const& _process_data; + + IntegrationMethod const _integration_method; + std::vector< + IntegrationPointData<NodalRowVectorType, GlobalDimNodalMatrixType>, + Eigen::aligned_allocator< + IntegrationPointData<NodalRowVectorType, GlobalDimNodalMatrixType>>> + _ip_data; + std::vector<std::vector<double>> _darcy_velocities; +}; + +} // namespace ComponentTransport +} // namespace ProcessLib diff --git a/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp b/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3b83bc3d4e405d5d5d5ab9704c705c40d336d6e1 --- /dev/null +++ b/ProcessLib/ComponentTransport/ComponentTransportProcess.cpp @@ -0,0 +1,114 @@ +/** + * \copyright + * Copyright (c) 2012-2017, 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 "ComponentTransportProcess.h" + +#include <cassert> + +#include "ProcessLib/Utils/CreateLocalAssemblers.h" + +namespace ProcessLib +{ +namespace ComponentTransport +{ +ComponentTransportProcess::ComponentTransportProcess( + MeshLib::Mesh& mesh, + std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& jacobian_assembler, + std::vector<std::unique_ptr<ParameterBase>> const& parameters, + unsigned const integration_order, + std::vector<std::reference_wrapper<ProcessVariable>>&& process_variables, + ComponentTransportProcessData&& process_data, + SecondaryVariableCollection&& secondary_variables, + NumLib::NamedFunctionCaller&& named_function_caller) + : Process(mesh, std::move(jacobian_assembler), parameters, + integration_order, std::move(process_variables), + std::move(secondary_variables), std::move(named_function_caller)), + _process_data(std::move(process_data)) +{ +} + +void ComponentTransportProcess::initializeConcreteProcess( + NumLib::LocalToGlobalIndexMap const& dof_table, + MeshLib::Mesh const& mesh, + unsigned const integration_order) +{ + ProcessLib::ProcessVariable const& pv = getProcessVariables()[0]; + ProcessLib::createLocalAssemblers<LocalAssemblerData>( + mesh.getDimension(), mesh.getElements(), dof_table, + pv.getShapeFunctionOrder(), _local_assemblers, + mesh.isAxiallySymmetric(), integration_order, _process_data); + + _secondary_variables.addSecondaryVariable( + "darcy_velocity_x", 1, + makeExtrapolator(getExtrapolator(), _local_assemblers, + &ComponentTransportLocalAssemblerInterface:: + getIntPtDarcyVelocityX)); + + if (mesh.getDimension() > 1) + { + _secondary_variables.addSecondaryVariable( + "darcy_velocity_y", 1, + makeExtrapolator(getExtrapolator(), _local_assemblers, + &ComponentTransportLocalAssemblerInterface:: + getIntPtDarcyVelocityY)); + } + if (mesh.getDimension() > 2) + { + _secondary_variables.addSecondaryVariable( + "darcy_velocity_z", 1, + makeExtrapolator(getExtrapolator(), _local_assemblers, + &ComponentTransportLocalAssemblerInterface:: + getIntPtDarcyVelocityZ)); + } +} + +void ComponentTransportProcess::assembleConcreteProcess( + const double t, + GlobalVector const& x, + GlobalMatrix& M, + GlobalMatrix& K, + GlobalVector& b, + StaggeredCouplingTerm const& coupling_term) +{ + DBUG("Assemble ComponentTransportProcess."); + + // Call global assembler for each local assembly item. + GlobalExecutor::executeMemberDereferenced( + _global_assembler, &VectorMatrixAssembler::assemble, _local_assemblers, + *_local_to_global_index_map, t, x, M, K, b, coupling_term); +} + +void ComponentTransportProcess::assembleWithJacobianConcreteProcess( + const double t, GlobalVector const& x, GlobalVector const& xdot, + const double dxdot_dx, const double dx_dx, GlobalMatrix& M, GlobalMatrix& K, + GlobalVector& b, GlobalMatrix& Jac, + StaggeredCouplingTerm const& coupling_term) +{ + DBUG("AssembleWithJacobian ComponentTransportProcess."); + + // Call global assembler for each local assembly item. + GlobalExecutor::executeMemberDereferenced( + _global_assembler, &VectorMatrixAssembler::assembleWithJacobian, + _local_assemblers, *_local_to_global_index_map, t, x, xdot, dxdot_dx, + dx_dx, M, K, b, Jac, coupling_term); +} + +void ComponentTransportProcess::computeSecondaryVariableConcrete( + double const t, GlobalVector const& x, + StaggeredCouplingTerm const& coupling_term) +{ + DBUG("Compute the Darcy velocity for ComponentTransportProcess."); + GlobalExecutor::executeMemberOnDereferenced( + &ComponentTransportLocalAssemblerInterface::computeSecondaryVariable, + _local_assemblers, *_local_to_global_index_map, t, x, coupling_term); +} + +} // namespace ComponentTransport +} // namespace ProcessLib + diff --git a/ProcessLib/ComponentTransport/ComponentTransportProcess.h b/ProcessLib/ComponentTransport/ComponentTransportProcess.h new file mode 100644 index 0000000000000000000000000000000000000000..728598db83366a7ba607943bff20882f8caab3e6 --- /dev/null +++ b/ProcessLib/ComponentTransport/ComponentTransportProcess.h @@ -0,0 +1,88 @@ +/** + * \copyright + * Copyright (c) 2012-2017, 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 "ComponentTransportFEM.h" +#include "ComponentTransportProcessData.h" +#include "NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.h" +#include "ProcessLib/Process.h" + +namespace ProcessLib +{ +namespace ComponentTransport +{ +/** + * # ComponentTransport process + * + * The implementation uses a monolithic approach, i.e., both processes + * are assembled within one global system of equations. + * + * ## Process Coupling + * + * The advective term of the concentration equation is given by the confined + * groundwater flow process, i.e., the concentration distribution depends on + * darcy velocity of the groundwater flow process. On the other hand the + * concentration dependencies of the viscosity and density in the groundwater + * flow couples the H process to the C process. + * + * \note At the moment there is not any coupling by source or sink terms, i.e., + * the coupling is implemented only by density changes due to concentration + * changes in the buoyance term in the groundwater flow. This coupling schema is + * referred to as the Boussinesq approximation. + * */ +class ComponentTransportProcess final : public Process +{ +public: + ComponentTransportProcess( + MeshLib::Mesh& mesh, + std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&& + jacobian_assembler, + std::vector<std::unique_ptr<ParameterBase>> const& parameters, + unsigned const integration_order, + std::vector<std::reference_wrapper<ProcessVariable>>&& + process_variables, + ComponentTransportProcessData&& process_data, + SecondaryVariableCollection&& secondary_variables, + NumLib::NamedFunctionCaller&& named_function_caller); + + //! \name ODESystem interface + //! @{ + + bool isLinear() const override { return false; } + //! @} + + void computeSecondaryVariableConcrete( + double const t, GlobalVector const& x, + StaggeredCouplingTerm const& coupling_term) override; + +private: + void initializeConcreteProcess( + NumLib::LocalToGlobalIndexMap const& dof_table, + MeshLib::Mesh const& mesh, + unsigned const integration_order) override; + + void assembleConcreteProcess( + const double t, GlobalVector const& x, GlobalMatrix& M, GlobalMatrix& K, + GlobalVector& b, StaggeredCouplingTerm const& coupling_term) override; + + void assembleWithJacobianConcreteProcess( + const double t, GlobalVector const& x, GlobalVector const& xdot, + const double dxdot_dx, const double dx_dx, GlobalMatrix& M, + GlobalMatrix& K, GlobalVector& b, GlobalMatrix& Jac, + StaggeredCouplingTerm const& coupling_term) override; + + ComponentTransportProcessData _process_data; + + std::vector<std::unique_ptr<ComponentTransportLocalAssemblerInterface>> + _local_assemblers; +}; + +} // namespace ComponentTransport +} // namespace ProcessLib diff --git a/ProcessLib/ComponentTransport/ComponentTransportProcessData.h b/ProcessLib/ComponentTransport/ComponentTransportProcessData.h new file mode 100644 index 0000000000000000000000000000000000000000..7e4b1e3bea916fa6d9c20be4bef36436a499e3c1 --- /dev/null +++ b/ProcessLib/ComponentTransport/ComponentTransportProcessData.h @@ -0,0 +1,98 @@ +/** + * \copyright + * Copyright (c) 2012-2017, 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 "MaterialLib/Fluid/FluidProperties/FluidProperties.h" +#include "MaterialLib/PorousMedium/Porosity/Porosity.h" +#include "MaterialLib/PorousMedium/Storage/Storage.h" + +#include "PorousMediaProperties.h" + +namespace MeshLib +{ +class Element; +} + +namespace ProcessLib +{ +template <typename ReturnType> +struct Parameter; + +namespace ComponentTransport +{ +struct ComponentTransportProcessData +{ + ComponentTransportProcessData( + PorousMediaProperties&& porous_media_properties_, + 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_, + ProcessLib::Parameter<double> const& retardation_factor_, + ProcessLib::Parameter<double> const& decay_rate_, + Eigen::VectorXd const& specific_body_force_, + bool const has_gravity_) + : 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_), + retardation_factor(retardation_factor_), + decay_rate(decay_rate_), + specific_body_force(specific_body_force_), + has_gravity(has_gravity_) + { + } + + 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) + { + } + + //! Copies are forbidden. + ComponentTransportProcessData(ComponentTransportProcessData const&) = + delete; + + //! Assignments are not needed. + void operator=(ComponentTransportProcessData const&) = delete; + + //! Assignments are not needed. + void operator=(ComponentTransportProcessData&&) = delete; + + 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; + Parameter<double> const& retardation_factor; + Parameter<double> const& decay_rate; + Eigen::VectorXd const specific_body_force; + bool const has_gravity; +}; + +} // namespace ComponentTransport +} // namespace ProcessLib diff --git a/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp b/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79e53c0cd9d18a64eb0b05ee5b48773bbe33c6c9 --- /dev/null +++ b/ProcessLib/ComponentTransport/CreateComponentTransportProcess.cpp @@ -0,0 +1,153 @@ +/** + * \copyright + * Copyright (c) 2012-2017, 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 "CreateComponentTransportProcess.h" + +#include "MaterialLib/Fluid/FluidProperties/CreateFluidProperties.h" + +#include "ProcessLib/Parameter/ConstantParameter.h" +#include "ProcessLib/Utils/ParseSecondaryVariables.h" +#include "ProcessLib/Utils/ProcessUtils.h" + +#include "CreatePorousMediaProperties.h" +#include "ComponentTransportProcess.h" +#include "ComponentTransportProcessData.h" + +namespace ProcessLib +{ +namespace ComponentTransport +{ +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) +{ + //! \ogs_file_param{prj__processes__process__type} + config.checkConfigParameter("type", "ComponentTransport"); + + DBUG("Create ComponentTransportProcess."); + + // Process variable. + + //! \ogs_file_param{prj__processes__process__ComponentTransport__process_variables} + auto const pv_config = config.getConfigSubtree("process_variables"); + + auto process_variables = findProcessVariables( + variables, pv_config, + { + //! \ogs_file_param_special{prj__processes__process__ComponentTransport__process_variables__concentration} + "concentration", + //! \ogs_file_param_special{prj__processes__process__ComponentTransport__process_variables__pressure} + "pressure"}); + + auto const& porous_medium_configs = + //! \ogs_file_param{prj__processes__process__ComponentTransport__porous_medium} + config.getConfigSubtree("porous_medium"); + PorousMediaProperties porous_media_properties{ + createPorousMediaProperties(mesh, porous_medium_configs)}; + + //! \ogs_file_param{prj__processes__process__ComponentTransport__fluid} + auto const& fluid_config = config.getConfigSubtree("fluid"); + + auto fluid_properties = + MaterialLib::Fluid::createFluidProperties(fluid_config); + + // Parameter for the density of the fluid. + auto& fluid_reference_density= findParameter<double>( + config, + //! \ogs_file_param_special{prj__processes__process__ComponentTransport__fluid_reference_density} + "fluid_reference_density", parameters, 1); + DBUG("Use \'%s\' as fluid_reference_density parameter.", + fluid_reference_density.name.c_str()); + + // Parameter for the longitudinal solute dispersivity. + 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, + //! \ogs_file_param_special{prj__processes__process__ComponentTransport__retardation_factor} + "retardation_factor", parameters, 1); + + // Parameter for the decay rate. + auto const& decay_rate = + findParameter<double>(config, + //! \ogs_file_param_special{prj__processes__process__ComponentTransport__decay_rate} + "decay_rate", parameters, 1); + + // Specific body force parameter. + Eigen::VectorXd specific_body_force; + std::vector<double> const b = + //! \ogs_file_param{prj__processes__process__ComponentTransport__specific_body_force} + config.getConfigParameter<std::vector<double>>("specific_body_force"); + assert(b.size() > 0 && b.size() < 4); + if (b.size() < mesh.getDimension()) + OGS_FATAL( + "specific body force (gravity vector) has %d components, mesh " + "dimension is %d", + b.size(), mesh.getDimension()); + bool const has_gravity = MathLib::toVector(b).norm() > 0; + if (has_gravity) + { + specific_body_force.resize(b.size()); + std::copy_n(b.data(), b.size(), specific_body_force.data()); + } + + ComponentTransportProcessData process_data{ + std::move(porous_media_properties), + fluid_reference_density, + std::move(fluid_properties), + molecular_diffusion_coefficient, + solute_dispersivity_longitudinal, + solute_dispersivity_transverse, + retardation_factor, + decay_rate, + specific_body_force, + has_gravity}; + + SecondaryVariableCollection secondary_variables; + + NumLib::NamedFunctionCaller named_function_caller( + {"ComponentTransport_concentration_pressure"}); + + ProcessLib::parseSecondaryVariables(config, secondary_variables, + named_function_caller); + + return std::unique_ptr<Process>{new ComponentTransportProcess{ + mesh, std::move(jacobian_assembler), parameters, integration_order, + std::move(process_variables), std::move(process_data), + std::move(secondary_variables), std::move(named_function_caller)}}; +} + +} // namespace ComponentTransport +} // namespace ProcessLib diff --git a/ProcessLib/ComponentTransport/CreateComponentTransportProcess.h b/ProcessLib/ComponentTransport/CreateComponentTransportProcess.h new file mode 100644 index 0000000000000000000000000000000000000000..3e142f302f94ab0f9f2fbece006d8adb21e83df4 --- /dev/null +++ b/ProcessLib/ComponentTransport/CreateComponentTransportProcess.h @@ -0,0 +1,28 @@ +/** + * \copyright + * Copyright (c) 2012-2017, 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 "ProcessLib/Process.h" + +namespace ProcessLib +{ +namespace ComponentTransport +{ +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); + +} // namespace ComponentTransport +} // namespace ProcessLib diff --git a/ProcessLib/ComponentTransport/CreatePorousMediaProperties.cpp b/ProcessLib/ComponentTransport/CreatePorousMediaProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4a642260f67d7d1821260663fb81525596efb943 --- /dev/null +++ b/ProcessLib/ComponentTransport/CreatePorousMediaProperties.cpp @@ -0,0 +1,90 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2017, 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/reorderVector.h" + +#include "MaterialLib/PorousMedium/Permeability/createPermeabilityModel.h" +#include "MaterialLib/PorousMedium/Porosity/createPorosityModel.h" +#include "MaterialLib/PorousMedium/Storage/createStorageModel.h" + +#include "MeshLib/Mesh.h" + +namespace ProcessLib +{ +namespace ComponentTransport +{ +PorousMediaProperties createPorousMediaProperties( + MeshLib::Mesh& mesh, BaseLib::ConfigTree const& porous_medium_configs) +{ + DBUG("Create PorousMediaProperties."); + + std::vector<Eigen::MatrixXd> intrinsic_permeability_models; + std::vector<std::unique_ptr<MaterialLib::PorousMedium::Porosity>> + porosity_models; + std::vector<std::unique_ptr<MaterialLib::PorousMedium::Storage>> + storage_models; + + std::vector<int> mat_ids; + for (auto const& porous_medium_config : + //! \ogs_file_param{prj__processes__process__ComponentTransport__porous_medium__porous_medium} + porous_medium_configs.getConfigSubtreeList("porous_medium")) + { + //! \ogs_file_attr{prj__processes__process__ComponentTransport__porous_medium__porous_medium__id} + auto const id = porous_medium_config.getConfigAttribute<int>("id"); + mat_ids.push_back(id); + + auto const& porosity_config = + //! \ogs_file_param{prj__processes__process__ComponentTransport__porous_medium__porous_medium__porosity} + porous_medium_config.getConfigSubtree("porosity"); + porosity_models.emplace_back( + MaterialLib::PorousMedium::createPorosityModel(porosity_config)); + + // Configuration for the intrinsic permeability (only one scalar per + // element, i.e., the isotropic case is handled at the moment) + auto const& permeability_config = + //! \ogs_file_param{prj__processes__process__ComponentTransport__porous_medium__porous_medium__permeability} + porous_medium_config.getConfigSubtree("permeability"); + intrinsic_permeability_models.emplace_back( + MaterialLib::PorousMedium::createPermeabilityModel( + permeability_config)); + + // Configuration for the specific storage. + auto const& storage_config = + //! \ogs_file_param{prj__processes__process__ComponentTransport__porous_medium__porous_medium__storage} + porous_medium_config.getConfigSubtree("storage"); + storage_models.emplace_back( + MaterialLib::PorousMedium::createStorageModel(storage_config)); + } + + BaseLib::reorderVector(intrinsic_permeability_models, mat_ids); + BaseLib::reorderVector(porosity_models, mat_ids); + BaseLib::reorderVector(storage_models, mat_ids); + + 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(porosity_models), + std::move(intrinsic_permeability_models), + std::move(storage_models), + std::move(material_ids)}; +} + +} // namespace ComponentTransport +} // namespace ProcessLib diff --git a/ProcessLib/ComponentTransport/CreatePorousMediaProperties.h b/ProcessLib/ComponentTransport/CreatePorousMediaProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..1a1baf427e079563a6b33fff166cc3c783104ca9 --- /dev/null +++ b/ProcessLib/ComponentTransport/CreatePorousMediaProperties.h @@ -0,0 +1,29 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2017, 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 ComponentTransport +{ +PorousMediaProperties createPorousMediaProperties( + MeshLib::Mesh& mesh, BaseLib::ConfigTree const& porous_media_config); +} +} diff --git a/ProcessLib/ComponentTransport/PorousMediaProperties.cpp b/ProcessLib/ComponentTransport/PorousMediaProperties.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2a02ff0aa306ba0779b77eae705fb4297919bd32 --- /dev/null +++ b/ProcessLib/ComponentTransport/PorousMediaProperties.cpp @@ -0,0 +1,43 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2017, 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" + +namespace ProcessLib +{ +namespace ComponentTransport +{ +int PorousMediaProperties::getMaterialID(SpatialPosition const& pos) const +{ + int const element_id = pos.getElementID().get(); + return _material_ids[element_id]; +} + +MaterialLib::PorousMedium::Porosity const& PorousMediaProperties::getPorosity( + double /*t*/, SpatialPosition const& pos) const +{ + return *_porosity_models[getMaterialID(pos)]; +} + +Eigen::MatrixXd const& PorousMediaProperties::getIntrinsicPermeability( + double /*t*/, SpatialPosition const& pos) const +{ + return _intrinsic_permeability_models[getMaterialID(pos)]; +} + +MaterialLib::PorousMedium::Storage const& +PorousMediaProperties::getSpecificStorage(double /*t*/, + SpatialPosition const& pos) const +{ + return *_specific_storage_models[getMaterialID(pos)]; +} +} +} diff --git a/ProcessLib/ComponentTransport/PorousMediaProperties.h b/ProcessLib/ComponentTransport/PorousMediaProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..058af9eee453013758d64f37d556f2847e905e97 --- /dev/null +++ b/ProcessLib/ComponentTransport/PorousMediaProperties.h @@ -0,0 +1,77 @@ +/** + * \file + * + * \copyright + * Copyright (c) 2012-2017, 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 <Eigen/Dense> +#include "BaseLib/reorderVector.h" + + +#include "MaterialLib/PorousMedium/Porosity/Porosity.h" +#include "MaterialLib/PorousMedium/Storage/Storage.h" + +#include "ProcessLib/Parameter/SpatialPosition.h" + +namespace ProcessLib +{ +namespace ComponentTransport +{ + +class PorousMediaProperties +{ +public: + PorousMediaProperties( + std::vector<std::unique_ptr<MaterialLib::PorousMedium::Porosity>>&& + porosity_models, + std::vector<Eigen::MatrixXd>&& intrinsic_permeability_models, + std::vector<std::unique_ptr<MaterialLib::PorousMedium::Storage>>&& + specific_storage_models, + std::vector<int>&& material_ids) + : _porosity_models(std::move(porosity_models)), + _intrinsic_permeability_models( + std::move(intrinsic_permeability_models)), + _specific_storage_models(std::move(specific_storage_models)), + _material_ids(std::move(material_ids)) + { + } + + PorousMediaProperties(PorousMediaProperties&& other) + : _porosity_models(std::move(other._porosity_models)), + _intrinsic_permeability_models(other._intrinsic_permeability_models), + _specific_storage_models(std::move(other._specific_storage_models)), + _material_ids(other._material_ids) + { + } + + MaterialLib::PorousMedium::Porosity const& getPorosity( + double t, SpatialPosition const& pos) const; + + Eigen::MatrixXd const& getIntrinsicPermeability( + double t, SpatialPosition const& pos) const; + + MaterialLib::PorousMedium::Storage const& getSpecificStorage( + double t, SpatialPosition const& pos) const; + +private: + int getMaterialID(SpatialPosition const& pos) const; +private: + std::vector<std::unique_ptr<MaterialLib::PorousMedium::Porosity>> + _porosity_models; + std::vector<Eigen::MatrixXd> _intrinsic_permeability_models; + std::vector<std::unique_ptr<MaterialLib::PorousMedium::Storage>> + _specific_storage_models; + std::vector<int> _material_ids; +}; + +} +} diff --git a/Tests/Data b/Tests/Data index bf0291d349170d99f2d62fbaa077051006ca5f02..080c9ab598a9f1671b8237f82de4c4697fce9e4c 160000 --- a/Tests/Data +++ b/Tests/Data @@ -1 +1 @@ -Subproject commit bf0291d349170d99f2d62fbaa077051006ca5f02 +Subproject commit 080c9ab598a9f1671b8237f82de4c4697fce9e4c