Skip to content

Commit

Permalink
Merge pull request #2548 from renchao-lu/RetardationFactor
Browse files Browse the repository at this point in the history
[PL/CT] Retardation Factor invoked from MPL
  • Loading branch information
TomFischer authored Jul 1, 2019
2 parents 7b5d6b1 + 07168a2 commit 6e72880
Show file tree
Hide file tree
Showing 38 changed files with 248 additions and 223 deletions.

This file was deleted.

7 changes: 7 additions & 0 deletions MaterialLib/MPL/PropertyType.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ enum PropertyType : int
relative_permeability,
residual_gas_saturation,
residual_liquid_saturation,
/// specify retardation factor used in component transport process.
retardation_factor,
saturation,
specific_heat_capacity,
storage,
Expand Down Expand Up @@ -201,6 +203,10 @@ inline PropertyType convertStringToProperty(std::string const& inString)
{
return PropertyType::residual_liquid_saturation;
}
if (boost::iequals(inString, "retardation_factor"))
{
return PropertyType::retardation_factor;
}
if (boost::iequals(inString, "saturation"))
{
return PropertyType::saturation;
Expand Down Expand Up @@ -276,6 +282,7 @@ static const std::array<std::string, PropertyType::number_of_properties>
"relative_permeability",
"residual_gas_saturation",
"residual_liquid_saturation",
"retardation_factor",
"saturation",
"specific_heat_capacity",
"storage",
Expand Down
30 changes: 16 additions & 14 deletions ProcessLib/ComponentTransport/ComponentTransportFEM.h
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,17 @@ class LocalAssemblerData : public ComponentTransportLocalAssemblerInterface
_process_data.porous_media_properties.getPorosity(t, pos)
.getValue(t, pos, 0.0, C_int_pt);

auto const retardation_factor =
_process_data.retardation_factor(t, pos)[0];
auto const& retardation_factor = component.template value<double>(
MaterialPropertyLib::PropertyType::retardation_factor);

auto const& solute_dispersivity_transverse =
medium.template value<double>(
MaterialPropertyLib::transversal_dispersivity);
auto const& solute_dispersivity_transverse = medium.template value<
double>(
MaterialPropertyLib::PropertyType::transversal_dispersivity);

auto const& solute_dispersivity_longitudinal =
medium.template value<double>(
MaterialPropertyLib::longitudinal_dispersivity);
MaterialPropertyLib::PropertyType::
longitudinal_dispersivity);

// Use the fluid density model to compute the density
// TODO (renchao): concentration of which component as the argument
Expand All @@ -299,7 +300,7 @@ class LocalAssemblerData : public ComponentTransportLocalAssemblerInterface

auto const& molecular_diffusion_coefficient =
component.template value<double>(
MaterialPropertyLib::molecular_diffusion);
MaterialPropertyLib::PropertyType::molecular_diffusion);

auto const& K =
_process_data.porous_media_properties.getIntrinsicPermeability(
Expand Down Expand Up @@ -567,15 +568,16 @@ class LocalAssemblerData : public ComponentTransportLocalAssemblerInterface
_process_data.porous_media_properties.getPorosity(t, pos)
.getValue(t, pos, 0.0, C_int_pt);

auto const retardation_factor =
_process_data.retardation_factor(t, pos)[0];
auto const& retardation_factor = component.template value<double>(
MaterialPropertyLib::PropertyType::retardation_factor);

auto const& solute_dispersivity_transverse =
medium.template value<double>(
MaterialPropertyLib::transversal_dispersivity);
auto const& solute_dispersivity_transverse = medium.template value<
double>(
MaterialPropertyLib::PropertyType::transversal_dispersivity);
auto const& solute_dispersivity_longitudinal =
medium.template value<double>(
MaterialPropertyLib::longitudinal_dispersivity);
MaterialPropertyLib::PropertyType::
longitudinal_dispersivity);

// Use the fluid density model to compute the density
vars[static_cast<int>(
Expand All @@ -588,7 +590,7 @@ class LocalAssemblerData : public ComponentTransportLocalAssemblerInterface

auto const& molecular_diffusion_coefficient =
component.template value<double>(
MaterialPropertyLib::molecular_diffusion);
MaterialPropertyLib::PropertyType::molecular_diffusion);

auto const& K =
_process_data.porous_media_properties.getIntrinsicPermeability(
Expand Down
3 changes: 0 additions & 3 deletions ProcessLib/ComponentTransport/ComponentTransportProcessData.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@ struct ComponentTransportProcessData
fluid_properties_,
std::unique_ptr<MaterialPropertyLib::MaterialSpatialDistributionMap>&&
media_map_,
ParameterLib::Parameter<double> const& retardation_factor_,
ParameterLib::Parameter<double> const& decay_rate_,
Eigen::VectorXd const& specific_body_force_, bool const has_gravity_,
bool const non_advective_form_)
: porous_media_properties(std::move(porous_media_properties_)),
fluid_reference_density(fluid_reference_density_),
fluid_properties(std::move(fluid_properties_)),
media_map(std::move(media_map_)),
retardation_factor(retardation_factor_),
decay_rate(decay_rate_),
specific_body_force(specific_body_force_),
has_gravity(has_gravity_),
Expand All @@ -72,7 +70,6 @@ struct ComponentTransportProcessData
std::unique_ptr<MaterialLib::Fluid::FluidProperties> fluid_properties;
std::unique_ptr<MaterialPropertyLib::MaterialSpatialDistributionMap>
media_map;
ParameterLib::Parameter<double> const& retardation_factor;
ParameterLib::Parameter<double> const& decay_rate;
Eigen::VectorXd const specific_body_force;
bool const has_gravity;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,6 @@ std::unique_ptr<Process> createComponentTransportProcess(
DBUG("Use '%s' as fluid_reference_density parameter.",
fluid_reference_density.name.c_str(), &mesh);

// Parameter for the retardation factor.
auto const& retardation_factor = ParameterLib::findParameter<double>(
config,
//! \ogs_file_param_special{prj__processes__process__ComponentTransport__retardation_factor}
"retardation_factor", parameters, 1, &mesh);

// Parameter for the decay rate.
auto const& decay_rate = ParameterLib::findParameter<double>(
config,
Expand Down Expand Up @@ -172,7 +166,6 @@ std::unique_ptr<Process> createComponentTransportProcess(
fluid_reference_density,
std::move(fluid_properties),
std::move(media_map),
retardation_factor,
decay_rate,
specific_body_force,
has_gravity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
</porous_medium>
</porous_medium>
<fluid_reference_density>rho_fluid</fluid_reference_density>
<retardation_factor>retardation</retardation_factor>
<decay_rate>decay</decay_rate>
<specific_body_force>0 0</specific_body_force>
<secondary_variables>
Expand All @@ -60,6 +59,11 @@
<type>Constant</type>
<value>1e-5</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
</components>
Expand Down Expand Up @@ -126,11 +130,6 @@
<type>Constant</type>
<value>1000</value>
</parameter>
<parameter>
<name>retardation</name>
<type>Constant</type>
<value>1</value>
</parameter>
<parameter>
<name>decay</name>
<type>Constant</type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
</porous_medium>
</porous_medium>
<fluid_reference_density>rho_fluid</fluid_reference_density>
<retardation_factor>retardation</retardation_factor>
<decay_rate>decay</decay_rate>
<specific_body_force>0 0 0</specific_body_force>
<secondary_variables>
Expand All @@ -66,6 +65,11 @@
<value>1e-7</value>
<type>Constant</type>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
</components>
Expand Down Expand Up @@ -133,11 +137,6 @@
<type>Constant</type>
<value>1000</value>
</parameter>
<parameter>
<name>retardation</name>
<type>Constant</type>
<value>1</value>
</parameter>
<parameter>
<name>decay</name>
<type>Constant</type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
</porous_medium>
</porous_medium>
<fluid_reference_density>rho_fluid</fluid_reference_density>
<retardation_factor>retardation</retardation_factor>
<decay_rate>decay</decay_rate>
<specific_body_force>0 0</specific_body_force>
<secondary_variables>
Expand All @@ -65,6 +64,11 @@
<type>Constant</type>
<value>0</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
<component>
Expand All @@ -75,6 +79,11 @@
<type>Constant</type>
<value>0</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
<component>
Expand All @@ -85,6 +94,11 @@
<type>Constant</type>
<value>0</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
<component>
Expand All @@ -95,6 +109,11 @@
<type>Constant</type>
<value>0</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
<component>
Expand All @@ -105,6 +124,11 @@
<type>Constant</type>
<value>0</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
</components>
Expand Down Expand Up @@ -369,11 +393,6 @@
<type>Constant</type>
<value>1000</value>
</parameter>
<parameter>
<name>retardation</name>
<type>Constant</type>
<value>1</value>
</parameter>
<parameter>
<name>decay</name>
<type>Constant</type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
</porous_medium>
</porous_medium>
<fluid_reference_density>rho_fluid</fluid_reference_density>
<retardation_factor>retardation</retardation_factor>
<decay_rate>decay</decay_rate>
<specific_body_force>0 0</specific_body_force>
<secondary_variables>
Expand All @@ -63,6 +62,11 @@
<type>Constant</type>
<value>1e-7</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
<component>
Expand All @@ -73,6 +77,11 @@
<type>Constant</type>
<value>1e-7</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
<component>
Expand All @@ -83,6 +92,11 @@
<type>Constant</type>
<value>1e-7</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
</components>
Expand Down Expand Up @@ -290,11 +304,6 @@
<type>Constant</type>
<value>1000</value>
</parameter>
<parameter>
<name>retardation</name>
<type>Constant</type>
<value>1</value>
</parameter>
<parameter>
<name>decay</name>
<type>Constant</type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
</porous_medium>
</porous_medium>
<fluid_reference_density>rho_fluid</fluid_reference_density>
<retardation_factor>retardation</retardation_factor>
<decay_rate>decay</decay_rate>
<specific_body_force>0 0</specific_body_force>
<secondary_variables>
Expand All @@ -63,6 +62,11 @@
<type>Constant</type>
<value>1e-7</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
<component>
Expand All @@ -73,6 +77,11 @@
<type>Constant</type>
<value>1e-7</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
<component>
Expand All @@ -83,6 +92,11 @@
<type>Constant</type>
<value>1e-7</value>
</property>
<property>
<name>retardation_factor</name>
<type>Constant</type>
<value>1</value>
</property>
</properties>
</component>
</components>
Expand Down Expand Up @@ -291,11 +305,6 @@
<type>Constant</type>
<value>1000</value>
</parameter>
<parameter>
<name>retardation</name>
<type>Constant</type>
<value>1</value>
</parameter>
<parameter>
<name>decay</name>
<type>Constant</type>
Expand Down
Loading

0 comments on commit 6e72880

Please sign in to comment.