OGS
Advection.cpp
Go to the documentation of this file.
1
10#include "Advection.h"
11
13{
14namespace ConstitutiveRelations
15{
16template <int DisplacementDim>
18 ConstituentDensityData const& constituent_density_data,
19 PermeabilityData<DisplacementDim> const& permeability_data,
20 PureLiquidDensityData const& rho_W_LR,
21 ViscosityData const& viscosity_data,
22 AdvectionData<DisplacementDim>& advection_data) const
23{
24 GlobalDimMatrix<DisplacementDim> const k_over_mu_G =
25 permeability_data.Ki * permeability_data.k_rel_G / viscosity_data.mu_GR;
26 GlobalDimMatrix<DisplacementDim> const k_over_mu_L =
27 permeability_data.Ki * permeability_data.k_rel_L / viscosity_data.mu_LR;
28
29 advection_data.advection_C_G =
30 constituent_density_data.rho_C_GR * k_over_mu_G;
31 advection_data.advection_C_L =
32 constituent_density_data.rho_C_LR * k_over_mu_L;
33 advection_data.advection_W_G =
34 constituent_density_data.rho_W_GR * k_over_mu_G;
35 advection_data.advection_W_L = rho_W_LR() * k_over_mu_L;
36}
37
38template <int DisplacementDim>
40 ConstituentDensityData const& constituent_density_data,
41 PermeabilityData<DisplacementDim> const& permeability_data,
42 ViscosityData const& viscosity_data,
43 SaturationDataDeriv const& dS_L_dp_cap,
44 PhaseTransitionData const& phase_transition_data,
45 AdvectionDerivativeData<DisplacementDim>& advection_d_data) const
46{
47 GlobalDimMatrix<DisplacementDim> const k_over_mu_G =
48 permeability_data.Ki * permeability_data.k_rel_G / viscosity_data.mu_GR;
49 GlobalDimMatrix<DisplacementDim> const k_over_mu_L =
50 permeability_data.Ki * permeability_data.k_rel_L / viscosity_data.mu_LR;
51
52 GlobalDimMatrix<DisplacementDim> const dk_over_mu_G_dp_cap =
53 permeability_data.Ki * permeability_data.dk_rel_G_dS_L * dS_L_dp_cap() /
54 viscosity_data.mu_GR;
55 GlobalDimMatrix<DisplacementDim> const dk_over_mu_L_dp_cap =
56 permeability_data.Ki * permeability_data.dk_rel_L_dS_L * dS_L_dp_cap() /
57 viscosity_data.mu_LR;
58
59 advection_d_data.dadvection_C_dp_GR =
60 phase_transition_data.drho_C_GR_dp_GR * k_over_mu_G
61 // + rhoCGR * (dk_over_mu_G_dp_GR = 0)
62 // + rhoCLR * (dk_over_mu_L_dp_GR = 0)
63 + phase_transition_data.drho_C_LR_dp_GR * k_over_mu_L;
64
65 advection_d_data.dadvection_C_dp_cap =
66 //(drho_C_GR_dp_cap = 0) * k_over_mu_G
67 constituent_density_data.rho_C_GR * dk_over_mu_G_dp_cap +
68 (-phase_transition_data.drho_C_LR_dp_LR) * k_over_mu_L +
69 constituent_density_data.rho_C_LR * dk_over_mu_L_dp_cap;
70}
71
72template struct AdvectionModel<2>;
73template struct AdvectionModel<3>;
74} // namespace ConstitutiveRelations
75} // namespace ProcessLib::TH2M
Eigen::Matrix< double, DisplacementDim, DisplacementDim, Eigen::RowMajor > GlobalDimMatrix
Definition Base.h:32
GlobalDimMatrix< DisplacementDim > advection_C_G
Definition Advection.h:27
GlobalDimMatrix< DisplacementDim > advection_W_G
Definition Advection.h:29
GlobalDimMatrix< DisplacementDim > advection_C_L
Definition Advection.h:28
GlobalDimMatrix< DisplacementDim > advection_W_L
Definition Advection.h:30
void dEval(ConstituentDensityData const &constituent_density_data, PermeabilityData< DisplacementDim > const &permeability_data, ViscosityData const &viscosity_data, SaturationDataDeriv const &dS_L_dp_cap, PhaseTransitionData const &phase_transition_data, AdvectionDerivativeData< DisplacementDim > &advection_d_data) const
Definition Advection.cpp:39
void eval(ConstituentDensityData const &constituent_density_data, PermeabilityData< DisplacementDim > const &permeability_data, PureLiquidDensityData const &rho_W_LR, ViscosityData const &viscosity_data, AdvectionData< DisplacementDim > &advection_data) const
Definition Advection.cpp:17