Skip to content
Snippets Groups Projects
Commit 0e3d135d authored by Tom Fischer's avatar Tom Fischer
Browse files

[PL] RichardsComponentTransport: Add K_times_k_rel_over_mu.

Summarize several times used mathematical expression
into a variable.
parent e0a61423
No related branches found
No related tags found
No related merge requests found
...@@ -263,13 +263,14 @@ public: ...@@ -263,13 +263,14 @@ public:
auto const mu = _process_data.fluid_properties->getValue( auto const mu = _process_data.fluid_properties->getValue(
MaterialLib::Fluid::FluidPropertyType::Viscosity, vars); MaterialLib::Fluid::FluidPropertyType::Viscosity, vars);
GlobalDimMatrixType const K_over_mu = K / mu; auto const K_times_k_rel_over_mu = K * (k_rel/mu);
GlobalDimVectorType const velocity = GlobalDimVectorType const velocity =
_process_data.has_gravity _process_data.has_gravity
? GlobalDimVectorType(-K_over_mu * ? GlobalDimVectorType(-K_times_k_rel_over_mu *
(dNdx * p_nodal_values - density * b)) (dNdx * p_nodal_values - density * b))
: GlobalDimVectorType(-K_over_mu * dNdx * p_nodal_values); : GlobalDimVectorType(-K_times_k_rel_over_mu * dNdx *
p_nodal_values);
double const velocity_magnitude = velocity.norm(); double const velocity_magnitude = velocity.norm();
GlobalDimMatrixType const hydrodynamic_dispersion = GlobalDimMatrixType const hydrodynamic_dispersion =
...@@ -298,7 +299,8 @@ public: ...@@ -298,7 +299,8 @@ public:
w; w;
MCC.noalias() += MCC.noalias() +=
w * N.transpose() * porosity * retardation_factor * N; w * N.transpose() * porosity * retardation_factor * N;
Kpp.noalias() += w * dNdx.transpose() * K * dNdx * (k_rel/mu); Kpp.noalias() +=
w * dNdx.transpose() * K_times_k_rel_over_mu * dNdx;
// \TODO Extend to pressure dependent density. // \TODO Extend to pressure dependent density.
double const drhow_dp(0.0); double const drhow_dp(0.0);
Mpp.noalias() += (specific_storage * Sw + porosity * Sw * drhow_dp - Mpp.noalias() += (specific_storage * Sw + porosity * Sw * drhow_dp -
...@@ -306,7 +308,8 @@ public: ...@@ -306,7 +308,8 @@ public:
ip_data.mass_operator; ip_data.mass_operator;
if (_process_data.has_gravity) if (_process_data.has_gravity)
Bp += w * density * dNdx.transpose() * K * b * (k_rel/mu); Bp +=
w * density * dNdx.transpose() * K_times_k_rel_over_mu * b;
/* with Oberbeck-Boussing assumption density difference only exists /* with Oberbeck-Boussing assumption density difference only exists
* in buoyancy effects */ * in buoyancy effects */
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment