14namespace ConstitutiveRelations
16template <
int DisplacementDim>
38 auto const S_L = S_L_data.
S_L;
39 auto const S_G = 1. - S_L;
40 double const rho_W_FR =
41 S_G * constituent_density_data.
rho_W_GR + S_L * rho_W_LR();
44 porosity_data.
phi * (rho_W_LR() - constituent_density_data.
rho_W_GR) -
45 rho_W_FR * pCap() * (biot_data() - porosity_data.
phi) * beta_p_SR();
60 double const S_L = S_L_data.
S_L;
61 double const S_G = 1. - S_L;
63 double const drho_C_FR_dp_GR =
70 drho_C_FR_dp_GR * pCap() * (biot_data() - porosity_data.
phi) *
73 double const dfW_2a_dp_cap =
76 double const rho_W_FR =
77 S_G * constituent_density_data.
rho_W_GR + S_L * rho_W_LR();
79 double const drho_W_FR_dp_cap =
80 -dS_L_dp_cap() * constituent_density_data.
rho_W_GR +
82 dS_L_dp_cap() * rho_W_LR() -
85 double const dfW_2b_dp_cap =
86 drho_W_FR_dp_cap * pCap() * (biot_data() - porosity_data.
phi) *
88 rho_W_FR * (biot_data() - porosity_data.
phi) * beta_p_SR();
90 dfW_2.
dp_cap = dfW_2a_dp_cap - dfW_2b_dp_cap;
92 double const drho_W_FR_dT = S_G * phase_transition_data.
drho_W_GR_dT +
95 double const dfW_2a_dT =
97 (rho_W_LR() - constituent_density_data.
rho_W_GR) +
100 double const dfW_2b_dT =
101 drho_W_FR_dT * pCap() * (biot_data() - porosity_data.
phi) *
103 rho_W_FR * pCap() * porosity_d_data.
dphi_dT * beta_p_SR();
105 dfW_2.
dT = dfW_2a_dT - dfW_2b_dT;
123 double const rho_W_GR_dot = (constituent_density_data.
rho_W_GR -
124 constituent_density_data_prev->rho_W_GR) /
126 double const rho_W_LR_dot = (rho_W_LR() - **rho_W_LR_prev) / dt;
127 auto const S_L = S_L_data.
S_L;
128 auto const S_G = 1. - S_L;
129 fW_3a.
a = S_G * rho_W_GR_dot + S_L * rho_W_LR_dot;
151 auto const S_L = S_L_data.
S_L;
152 auto const S_G = 1. - S_L;
154 double const rho_W_GR_dot = (constituent_density_data.
rho_W_GR -
155 constituent_density_data_prev->rho_W_GR) /
157 double const rho_W_LR_dot = (rho_W_LR() - **rho_W_LR_prev) / dt;
164 dfW_3a.
dp_cap = -dS_L_dp_cap() * rho_W_GR_dot +
166 dS_L_dp_cap() * rho_W_LR_dot -
172template <
int DisplacementDim>
187 double const phi_G = (1 - S_L_data.
S_L) * porosity_data.
phi;
188 double const phi_L = S_L_data.
S_L * porosity_data.
phi;
190 double const diffusion_WGpGR = phi_G * fluid_density_data.
rho_GR * sD_G *
192 double const diffusion_WLpGR = phi_L * fluid_density_data.
rho_LR * sD_L *
194 double const diffusion_W_pGR = diffusion_WGpGR + diffusion_WLpGR;
197 Eigen::Matrix<double, DisplacementDim, DisplacementDim>::Identity();
198 fW_4_LWpG.
L.noalias() = diffusion_W_pGR * I + advection_W;
201template <
int DisplacementDim>
214 auto const k_over_mu_G =
215 permeability_data.
Ki * permeability_data.
k_rel_G / viscosity_data.
mu_GR;
216 auto const k_over_mu_L =
217 permeability_data.
Ki * permeability_data.
k_rel_L / viscosity_data.
mu_LR;
227 auto const dk_over_mu_G_dp_cap = permeability_data.
Ki *
229 dS_L_dp_cap() / viscosity_data.
mu_GR;
231 auto const dk_over_mu_L_dp_cap = permeability_data.
Ki *
233 dS_L_dp_cap() / viscosity_data.
mu_LR;
243 constituent_density_data.
rho_W_GR * dk_over_mu_G_dp_cap +
245 rho_W_LR() * dk_over_mu_L_dp_cap;
257template <
int DisplacementDim>
269 double const phi_G = (1 - S_L_data.
S_L) * porosity_data.
phi;
270 double const phi_L = S_L_data.
S_L * porosity_data.
phi;
272 double const diffusion_WGpCap = phi_G * fluid_density_data.
rho_GR * sD_G *
274 double const diffusion_WLpCap = phi_L * fluid_density_data.
rho_LR * sD_L *
277 double const diffusion_W_pCap = diffusion_WGpCap + diffusion_WLpCap;
280 Eigen::Matrix<double, DisplacementDim, DisplacementDim>::Identity();
282 fW_4_LWpC.
L.noalias() = diffusion_W_pCap * I - advection_data.
advection_W_L;
285template <
int DisplacementDim>
303 permeability_data.
Ki * permeability_data.
k_rel_L / viscosity_data.
mu_LR;
312 double const phi_G = (1 - S_L_data.
S_L) * porosity_data.
phi;
313 double const phi_L = S_L_data.
S_L * porosity_data.
phi;
315 double const diffusion_WGpCap = phi_G * fluid_density_data.
rho_GR * sD_G *
317 double const diffusion_WLpCap = phi_L * fluid_density_data.
rho_LR * sD_L *
320 double const diffusion_W_pCap = diffusion_WGpCap + diffusion_WLpCap;
323 Eigen::Matrix<double, DisplacementDim, DisplacementDim>::Identity();
327 auto const dk_over_mu_L_dp_cap = permeability_data.
Ki *
329 dS_L_dp_cap() / viscosity_data.
mu_LR;
331 rho_W_LR() * dk_over_mu_L_dp_cap;
341template <
int DisplacementDim>
352 double const phi_G = (1 - S_L_data.
S_L) * porosity_data.
phi;
353 double const phi_L = S_L_data.
S_L * porosity_data.
phi;
355 double const diffusion_W_G_T = phi_G * fluid_density_data.
rho_GR * sD_G *
357 double const diffusion_W_L_T = phi_L * fluid_density_data.
rho_LR * sD_L *
360 double const diffusion_W_T = diffusion_W_G_T + diffusion_W_L_T;
363 Eigen::Matrix<double, DisplacementDim, DisplacementDim>::Identity();
365 fW_4_LWT.
L.noalias() = diffusion_W_T * I;
379 double const S_L = S_L_data.
S_L;
380 double const S_G = 1. - S_L;
382 double const rho_W_FR =
383 S_G * constituent_density_data.
rho_W_GR + S_L * rho_W_LR();
385 fW_4_MWpG.
m = rho_W_FR * (biot_data() - porosity_data.
phi) * beta_p_SR();
398 auto const S_L = S_L_data.
S_L;
399 auto const S_G = 1. - S_L;
400 double const rho_W_FR =
401 S_G * constituent_density_data.
rho_W_GR + S_L * rho_W_LR();
404 -rho_W_FR * (biot_data() - porosity_data.
phi) * beta_p_SR() * S_L;
407 (porosity_data.
phi * (rho_W_LR() - constituent_density_data.
rho_W_GR) -
408 rho_W_FR * pCap() * (biot_data() - porosity_data.
phi) * beta_p_SR()) *
409 (S_L - S_L_data_prev->S_L);
412template <
int DisplacementDim>
422 auto const S_L = S_L_data.
S_L;
423 auto const S_G = 1. - S_L;
424 double const rho_W_FR =
425 S_G * constituent_density_data.
rho_W_GR + S_L * rho_W_LR();
427 fW_4_MWT.
m = -rho_W_FR * (biot_data() - porosity_data.
phi) *
440 auto const S_L = S_L_data.
S_L;
441 auto const S_G = 1. - S_L;
442 double const rho_W_FR =
443 S_G * constituent_density_data.
rho_W_GR + S_L * rho_W_LR();
445 fW_4_MWu.
m = rho_W_FR * biot_data();
Eigen::Matrix< double, DisplacementDim, DisplacementDim, Eigen::RowMajor > GlobalDimMatrix
Represents a previous state of type T.
GlobalDimMatrix< DisplacementDim > advection_W_G
GlobalDimMatrix< DisplacementDim > advection_W_L
Real constituent partial densities.
GlobalDimMatrix< DisplacementDim > A
void eval(AdvectionData< DisplacementDim > const &advection_data, FluidDensityData const &fluid_density_data, FW1Data< DisplacementDim > &fW_1) const
void dEval(BiotData const &biot_data, CapillaryPressureData const pCap, ConstituentDensityData const &constituent_density_data, PhaseTransitionData const &phase_transition_data, PorosityData const &porosity_data, PorosityDerivativeData const &porosity_d_data, PureLiquidDensityData const &rho_W_LR, SaturationData const &S_L_data, SaturationDataDeriv const &dS_L_dp_cap, SolidCompressibilityData const &beta_p_SR, FW2DerivativeData &dfW_2) const
void eval(BiotData const biot_data, CapillaryPressureData const pCap, ConstituentDensityData const &constituent_density_data, PorosityData const &porosity_data, PureLiquidDensityData const &rho_W_LR, SaturationData const &S_L_data, SolidCompressibilityData const beta_p_SR, FW2Data &fW_2) const
void dEval(double const dt, ConstituentDensityData const &constituent_density_data, PhaseTransitionData const &phase_transition_data, PrevState< ConstituentDensityData > const &constituent_density_data_prev, PrevState< PureLiquidDensityData > const &rho_W_LR_prev, PureLiquidDensityData const &rho_W_LR, SaturationData const &S_L_data, SaturationDataDeriv const &dS_L_dp_cap, FW3aDerivativeData &dfW_3a) const
void eval(double const dt, ConstituentDensityData const &constituent_density_data, PrevState< ConstituentDensityData > const &constituent_density_data_prev, PrevState< PureLiquidDensityData > const &rho_W_LR_prev, PureLiquidDensityData const &rho_W_LR, SaturationData const &S_L_data, FW3aData &fW_3a) const
GlobalDimMatrix< DisplacementDim > L
void eval(FluidDensityData const &fluid_density_data, PhaseTransitionData const &phase_transition_data, PorosityData const &porosity_data, SaturationData const &S_L_data, FW4LWTData< DisplacementDim > &fW_4_LWT) const
GlobalDimMatrix< DisplacementDim > L
GlobalDimMatrix< DisplacementDim > dT
GlobalDimMatrix< DisplacementDim > dp_GR
GlobalDimMatrix< DisplacementDim > dp_cap
void eval(AdvectionData< DisplacementDim > const &advection_data, FluidDensityData const &fluid_density_data, PhaseTransitionData const &phase_transition_data, PorosityData const &porosity_data, SaturationData const &S_L_data, FW4LWpCData< DisplacementDim > &fW_4_LWpC) const
void dEval(AdvectionData< DisplacementDim > const &advection_data, FluidDensityData const &fluid_density_data, PermeabilityData< DisplacementDim > const &permeability_data, PhaseTransitionData const &phase_transition_data, PorosityData const &porosity_data, PureLiquidDensityData const &rho_W_LR, SaturationData const &S_L_data, SaturationDataDeriv const &dS_L_dp_cap, ViscosityData const &viscosity_data, FW4LWpCDerivativeData< DisplacementDim > &dfW_4_LWpC) const
GlobalDimMatrix< DisplacementDim > L
GlobalDimMatrix< DisplacementDim > dp_GR
GlobalDimMatrix< DisplacementDim > dp_cap
GlobalDimMatrix< DisplacementDim > dT
void dEval(ConstituentDensityData const &constituent_density_data, PermeabilityData< DisplacementDim > const &permeability_data, PhaseTransitionData const &phase_transition_data, PureLiquidDensityData const &rho_W_LR, SaturationDataDeriv const &dS_L_dp_cap, ViscosityData const &viscosity_data, FW4LWpGDerivativeData< DisplacementDim > &dfW_4_LWpG) const
void eval(AdvectionData< DisplacementDim > const &advection_data, FluidDensityData const &fluid_density_data, PhaseTransitionData const &phase_transition_data, PorosityData const &porosity_data, SaturationData const &S_L_data, FW4LWpGData< DisplacementDim > &fW_4_LWpG) const
void eval(BiotData const &biot_data, ConstituentDensityData const &constituent_density_data, PorosityData const &porosity_data, PureLiquidDensityData const &rho_W_LR, SaturationData const &S_L_data, SolidThermalExpansionData< DisplacementDim > const &s_therm_exp_data, FW4MWTData &fW_4_MWT) const
void eval(BiotData const &biot_data, CapillaryPressureData const pCap, ConstituentDensityData const &constituent_density_data, PorosityData const &porosity_data, PrevState< SaturationData > const &S_L_data_prev, PureLiquidDensityData const &rho_W_LR, SaturationData const &S_L_data, SolidCompressibilityData const &beta_p_SR, FW4MWpCData &fW_4_MWpC) const
void eval(BiotData const &biot_data, ConstituentDensityData const &constituent_density_data, PorosityData const &porosity_data, PureLiquidDensityData const &rho_W_LR, SaturationData const &S_L_data, SolidCompressibilityData const &beta_p_SR, FW4MWpGData &fW_4_MWpG) const
void eval(BiotData const &biot_data, ConstituentDensityData const &constituent_density_data, PureLiquidDensityData const &rho_W_LR, SaturationData const &S_L_data, FW4MWuData &fW_4_MWu) const
GlobalDimMatrix< DisplacementDim > Ki
double diffusion_coefficient_solute
static constexpr double drho_C_LR_dp_GR
double diffusion_coefficient_vapour