OGS
Gravity.cpp
Go to the documentation of this file.
1
11#include "Gravity.h"
12
14{
15template <int DisplacementDim>
17 PorosityData const& poro_data, SolidDensityData const& rho_S_data,
18 LiquidDensityData const& rho_L_data, SaturationData const& S_L_data,
19 SaturationDataDeriv const& dS_L_data,
21{
22 auto const rho_SR = rho_S_data.rho_SR;
23 auto const phi = poro_data.phi;
24 auto const S_L = S_L_data.S_L;
25 auto const rho_LR = rho_L_data.rho_LR;
26 auto const b = specific_body_force_;
27
28 double const rho = rho_SR * (1 - phi) + S_L * phi * rho_LR;
29 out.volumetric_body_force = rho * b;
30
31 // There is no minus in the Jacobian block, because volumetric_body_force is
32 // subtracted from the residual vector.
33 out.J_up_HT_V_N =
34 poro_data.phi * rho_L_data.rho_LR * dS_L_data.dS_L_dp_cap * b;
35}
36
37template struct GravityModel<2>;
38template struct GravityModel<3>;
39} // namespace ProcessLib::ThermoRichardsMechanics
GlobalDimVector< DisplacementDim > volumetric_body_force
Definition Gravity.h:23
GlobalDimVector< DisplacementDim > J_up_HT_V_N
Definition Gravity.h:24
void eval(PorosityData const &poro_data, SolidDensityData const &rho_S_data, LiquidDensityData const &rho_L_data, SaturationData const &S_L_data, SaturationDataDeriv const &dS_L_data, GravityData< DisplacementDim > &out) const
Definition Gravity.cpp:16