14namespace ConstitutiveRelations
16template <
int DisplacementDim>
37 auto const S_L = S_L_data.
S_L;
38 auto const S_G = 1. - S_L;
39 double const rho_C_FR = S_G * constituent_density_data.
rho_C_GR +
40 S_L * constituent_density_data.
rho_C_LR;
42 porosity_data.
phi * (constituent_density_data.
rho_C_LR -
44 rho_C_FR * pCap() * (biot_data() - porosity_data.
phi) * beta_p_SR();
58 double const S_L = S_L_data.
S_L;
59 double const S_G = 1. - S_L;
61 double const drho_C_FR_dp_GR =
68 drho_C_FR_dp_GR * pCap() *
69 (biot_data() - porosity_data.
phi) * beta_p_SR();
71 double const dS_G_dp_cap = -dS_L_dp_cap();
72 double const rho_C_FR = S_G * constituent_density_data.
rho_C_GR +
73 S_L * constituent_density_data.
rho_C_LR;
76 constexpr double drho_C_GR_dp_cap = 0;
78 double const drho_C_FR_dp_cap =
79 dS_G_dp_cap * constituent_density_data.
rho_C_GR +
80 S_G * drho_C_GR_dp_cap +
81 dS_L_dp_cap() * constituent_density_data.
rho_C_LR -
87 drho_C_FR_dp_cap * pCap() * (biot_data() - porosity_data.
phi) *
89 rho_C_FR * (biot_data() - porosity_data.
phi) * beta_p_SR();
91 double const drho_C_FR_dT = S_G * phase_transition_data.
drho_C_GR_dT +
97 drho_C_FR_dT * pCap() * (biot_data() - porosity_data.
phi) *
99 rho_C_FR * pCap() * porosity_d_data.
dphi_dT * beta_p_SR();
115 double const rho_C_GR_dot = (constituent_density_data.
rho_C_GR -
116 constituent_density_data_prev->rho_C_GR) /
118 double const rho_C_LR_dot = (constituent_density_data.
rho_C_LR -
119 constituent_density_data_prev->rho_C_LR) /
121 auto const S_L = S_L_data.
S_L;
122 auto const S_G = 1. - S_L;
123 fC_3a.
a = S_G * rho_C_GR_dot + S_L * rho_C_LR_dot;
142 double const rho_C_GR_dot = (constituent_density_data.
rho_C_GR -
143 constituent_density_data_prev->rho_C_GR) /
145 double const rho_C_LR_dot = (constituent_density_data.
rho_C_LR -
146 constituent_density_data_prev->rho_C_LR) /
149 auto const S_L = S_L_data.
S_L;
150 auto const S_G = 1. - S_L;
157 double const dS_G_dp_cap = -dS_L_dp_cap();
159 constexpr double drho_C_GR_dp_cap = 0;
161 dfC_3a.
dp_cap = dS_G_dp_cap * rho_C_GR_dot + S_G * drho_C_GR_dp_cap / dt +
162 dS_L_dp_cap() * rho_C_LR_dot -
169template <
int DisplacementDim>
184 double const phi_G = (1 - S_L_data.
S_L) * porosity_data.
phi;
185 double const phi_L = S_L_data.
S_L * porosity_data.
phi;
187 double const diffusion_CGpGR = -phi_G * fluid_density_data.
rho_GR * sD_G *
189 double const diffusion_CLpGR = -phi_L * fluid_density_data.
rho_LR * sD_L *
192 double const diffusion_C_pGR = diffusion_CGpGR + diffusion_CLpGR;
195 Eigen::Matrix<double, DisplacementDim, DisplacementDim>::Identity();
196 fC_4_LCpG.
L.noalias() = diffusion_C_pGR * I + advection_C;
199template <
int DisplacementDim>
216 permeability_data.
Ki * permeability_data.
k_rel_G / viscosity_data.
mu_GR;
218 permeability_data.
Ki * permeability_data.
k_rel_L / viscosity_data.
mu_LR;
220 dfC_4_LCpG.
dT = phase_transition_data.
drho_C_GR_dT * k_over_mu_G +
229template <
int DisplacementDim>
241 double const phi_G = (1 - S_L_data.
S_L) * porosity_data.
phi;
242 double const phi_L = S_L_data.
S_L * porosity_data.
phi;
244 double const diffusion_CGpCap = -phi_G * fluid_density_data.
rho_GR * sD_G *
246 double const diffusion_CLpCap = -phi_L * fluid_density_data.
rho_LR * sD_L *
249 double const diffusion_C_pCap = diffusion_CGpCap + diffusion_CLpCap;
252 Eigen::Matrix<double, DisplacementDim, DisplacementDim>::Identity();
254 fC_4_LCpC.
L.noalias() = diffusion_C_pCap * I - advection_data.
advection_C_L;
257template <
int DisplacementDim>
271 permeability_data.
Ki * permeability_data.
k_rel_L / viscosity_data.
mu_LR;
277 auto const dk_over_mu_L_dp_cap = permeability_data.
Ki *
279 dS_L_dp_cap() / viscosity_data.
mu_LR;
282 constituent_density_data.
rho_C_LR * dk_over_mu_L_dp_cap;
292template <
int DisplacementDim>
303 double const phi_G = (1 - S_L_data.
S_L) * porosity_data.
phi;
304 double const phi_L = S_L_data.
S_L * porosity_data.
phi;
306 double const diffusion_C_G_T = -phi_G * fluid_density_data.
rho_GR * sD_G *
308 double const diffusion_C_L_T = -phi_L * fluid_density_data.
rho_LR * sD_L *
311 double const diffusion_C_T = diffusion_C_G_T + diffusion_C_L_T;
314 Eigen::Matrix<double, DisplacementDim, DisplacementDim>::Identity();
316 fC_4_LCT.
L.noalias() = diffusion_C_T * I;
329 auto const S_L = S_L_data.
S_L;
330 auto const S_G = 1. - S_L;
331 double const rho_C_FR = S_G * constituent_density_data.
rho_C_GR +
332 S_L * constituent_density_data.
rho_C_LR;
334 fC_4_MCpG.
m = rho_C_FR * (biot_data() - porosity_data.
phi) * beta_p_SR();
346 auto const S_L = S_L_data.
S_L;
347 auto const S_G = 1. - S_L;
348 double const rho_C_FR = S_G * constituent_density_data.
rho_C_GR +
349 S_L * constituent_density_data.
rho_C_LR;
351 double const drho_C_FR_dp_GR =
358 drho_C_FR_dp_GR * (biot_data() - porosity_data.
phi) * beta_p_SR();
360 double const drho_C_FR_dT = S_G * phase_transition_data.
drho_C_GR_dT +
363 drho_C_FR_dT * (biot_data() - porosity_data.
phi) * beta_p_SR() -
364 rho_C_FR * porosity_d_data.
dphi_dT * beta_p_SR();
376 auto const S_L = S_L_data.
S_L;
377 auto const S_G = 1. - S_L;
378 double const rho_C_FR = S_G * constituent_density_data.
rho_C_GR +
379 S_L * constituent_density_data.
rho_C_LR;
382 -rho_C_FR * (biot_data() - porosity_data.
phi) * beta_p_SR() * S_L;
385 (porosity_data.
phi * (constituent_density_data.
rho_C_LR -
386 constituent_density_data.
rho_C_GR) -
387 rho_C_FR * pCap() * (biot_data() - porosity_data.
phi) * beta_p_SR()) *
388 (S_L - S_L_data_prev->S_L);
391template <
int DisplacementDim>
400 auto const S_L = S_L_data.
S_L;
401 auto const S_G = 1. - S_L;
402 double const rho_C_FR = S_G * constituent_density_data.
rho_C_GR +
403 S_L * constituent_density_data.
rho_C_LR;
405 fC_4_MCT.
m = -rho_C_FR * (biot_data() - porosity_data.
phi) *
409template <
int DisplacementDim>
420 auto const S_L = S_L_data.
S_L;
421 auto const S_G = 1. - S_L;
422#ifdef NON_CONSTANT_SOLID_PHASE_VOLUME_FRACTION
423 double const rho_C_FR = S_G * constituent_density_data.rho_C_GR +
424 S_L * constituent_density_data.rho_C_LR;
427 double const drho_C_FR_dT = S_G * phase_transition_data.
drho_C_GR_dT +
430 dfC_4_MCT.
dT = drho_C_FR_dT * (biot_data() - porosity_data.
phi) *
432#ifdef NON_CONSTANT_SOLID_PHASE_VOLUME_FRACTION
433 + rho_C_FR * (biot_data() - porosity_d_data.dphi_dT) *
447 auto const S_L = S_L_data.
S_L;
448 auto const S_G = 1. - S_L;
449 double const rho_C_FR = S_G * constituent_density_data.
rho_C_GR +
450 S_L * constituent_density_data.
rho_C_LR;
452 fC_4_MCu.
m = rho_C_FR * biot_data();
460 auto const S_L = S_L_data.
S_L;
461 auto const S_G = 1. - S_L;
462 double const drho_C_FR_dT = S_G * phase_transition_data.
drho_C_GR_dT +
464 dfC_4_MCu.
dT = drho_C_FR_dT * biot_data();
Eigen::Matrix< double, DisplacementDim, DisplacementDim, Eigen::RowMajor > GlobalDimMatrix
Represents a previous state of type T.
GlobalDimMatrix< DisplacementDim > advection_C_G
GlobalDimMatrix< DisplacementDim > advection_C_L
GlobalDimMatrix< DisplacementDim > dadvection_C_dp_cap
GlobalDimMatrix< DisplacementDim > dadvection_C_dp_GR
Real constituent partial densities.
GlobalDimMatrix< DisplacementDim > A
void eval(AdvectionData< DisplacementDim > const &advection_data, FluidDensityData const &fluid_density_data, FC1Data< DisplacementDim > &fC_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, SaturationData const &S_L_data, SaturationDataDeriv const &dS_L_dp_cap, SolidCompressibilityData const &beta_p_SR, FC2aDerivativeData &dfC_2a) const
void eval(BiotData const biot_data, CapillaryPressureData const pCap, ConstituentDensityData const &constituent_density_data, PorosityData const &porosity_data, SaturationData const &S_L_data, SolidCompressibilityData const beta_p_SR, FC2aData &fC_2a) const
void eval(double const dt, ConstituentDensityData const &constituent_density_data, PrevState< ConstituentDensityData > const &constituent_density_data_prev, SaturationData const &S_L_data, FC3aData &fC_3a) const
void dEval(double const dt, ConstituentDensityData const &constituent_density_data, PrevState< ConstituentDensityData > const &constituent_density_data_prev, PhaseTransitionData const &phase_transition_data, SaturationData const &S_L_data, SaturationDataDeriv const &dS_L_dp_cap, FC3aDerivativeData &dfC_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, FC4LCTData< DisplacementDim > &fC_4_LCT) const
GlobalDimMatrix< DisplacementDim > L
GlobalDimMatrix< DisplacementDim > dp_cap
GlobalDimMatrix< DisplacementDim > dT
GlobalDimMatrix< DisplacementDim > dp_GR
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, FC4LCpCData< DisplacementDim > &fC_4_LCpC) const
void dEval(ConstituentDensityData const &constituent_density_data, PermeabilityData< DisplacementDim > const &permeability_data, PhaseTransitionData const &phase_transition_data, SaturationDataDeriv const &dS_L_dp_cap, ViscosityData const &viscosity_data, FC4LCpCDerivativeData< DisplacementDim > &dfC_4_LCpC) const
GlobalDimMatrix< DisplacementDim > L
GlobalDimMatrix< DisplacementDim > dT
GlobalDimMatrix< DisplacementDim > dp_GR
GlobalDimMatrix< DisplacementDim > dp_cap
void dEval(PermeabilityData< DisplacementDim > const &permeability_data, ViscosityData const &viscosity_data, PhaseTransitionData const &phase_transition_data, AdvectionDerivativeData< DisplacementDim > const &advection_d_data, FC4LCpGDerivativeData< DisplacementDim > &dfC_4_LCpG) 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, FC4LCpGData< DisplacementDim > &fC_4_LCpG) const
void dEval(BiotData const &biot_data, ConstituentDensityData const &constituent_density_data, PhaseTransitionData const &phase_transition_data, PorosityData const &porosity_data, PorosityDerivativeData const &porosity_d_data, SaturationData const &S_L_data, SolidThermalExpansionData< DisplacementDim > const &s_therm_exp_data, FC4MCTDerivativeData &dfC_4_MCT) const
void eval(BiotData const &biot_data, ConstituentDensityData const &constituent_density_data, PorosityData const &porosity_data, SaturationData const &S_L_data, SolidThermalExpansionData< DisplacementDim > const &s_therm_exp_data, FC4MCTData &fC_4_MCT) 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, SaturationData const &S_L_data, SolidCompressibilityData const &beta_p_SR, FC4MCpCData &fC_4_MCpC) const
void eval(BiotData const &biot_data, ConstituentDensityData const &constituent_density_data, PorosityData const &porosity_data, SaturationData const &S_L_data, SolidCompressibilityData const &beta_p_SR, FC4MCpGData &fC_4_MCpG) const
void dEval(BiotData const &biot_data, ConstituentDensityData const &constituent_density_data, PhaseTransitionData const &phase_transition_data, PorosityData const &porosity_data, PorosityDerivativeData const &porosity_d_data, SaturationData const &S_L_data, SolidCompressibilityData const &beta_p_SR, FC4MCpGDerivativeData &dfC_4_MCpG) const
void eval(BiotData const &biot_data, ConstituentDensityData const &constituent_density_data, SaturationData const &S_L_data, FC4MCuData &fC_4_MCu) const
void dEval(BiotData const &biot_data, PhaseTransitionData const &phase_transition_data, SaturationData const &S_L_data, FC4MCuDerivativeData &dfC_4_MCu) const
GlobalDimMatrix< DisplacementDim > Ki
double diffusion_coefficient_solute
static constexpr double drho_C_LR_dp_LR
static constexpr double drho_C_LR_dT
static constexpr double drho_C_LR_dp_GR
double diffusion_coefficient_vapour