19 RealVectorValue g(0, 0, -9.81);
20 params.
addParam<RealVectorValue>(
"gravity", g,
"Gravity vector. Defaults to (0, 0, -9.81)");
22 "The PorousFlowDictator UserObject");
23 params.
addParam<
unsigned int>(
"fluid_component", 0,
"The fluid component for this kernel");
24 params.
set<
unsigned short>(
"ghost_layers") = 2;
32 _num_phases(_dictator.numPhases()),
33 _fluid_component(getParam<unsigned
int>(
"fluid_component")),
34 _density(getADMaterialProperty<
std::vector<Real>>(
"PorousFlow_fluid_phase_density_qp")),
36 getNeighborADMaterialProperty<
std::vector<Real>>(
"PorousFlow_fluid_phase_density_qp")),
37 _viscosity(getADMaterialProperty<
std::vector<Real>>(
"PorousFlow_viscosity_qp")),
39 getNeighborADMaterialProperty<
std::vector<Real>>(
"PorousFlow_viscosity_qp")),
40 _relperm(getADMaterialProperty<
std::vector<Real>>(
"PorousFlow_relative_permeability_qp")),
42 getNeighborADMaterialProperty<
std::vector<Real>>(
"PorousFlow_relative_permeability_qp")),
44 getADMaterialProperty<
std::vector<
std::vector<Real>>>(
"PorousFlow_mass_frac_qp")),
45 _mass_fractions_neighbor(
46 getNeighborADMaterialProperty<
std::vector<
std::vector<Real>>>(
"PorousFlow_mass_frac_qp")),
47 _permeability(getADMaterialProperty<RealTensorValue>(
"PorousFlow_permeability_qp")),
48 _permeability_neighbor(
49 getNeighborADMaterialProperty<RealTensorValue>(
"PorousFlow_permeability_qp")),
50 _pressure(getADMaterialProperty<
std::vector<Real>>(
"PorousFlow_porepressure_qp")),
52 getNeighborADMaterialProperty<
std::vector<Real>>(
"PorousFlow_porepressure_qp")),
53 _grad_p(getADMaterialProperty<
std::vector<RealGradient>>(
"PorousFlow_grad_porepressure_qp")),
54 _gravity(getParam<RealVectorValue>(
"gravity"))
59 "The Dictator proclaims that the maximum fluid component index in this simulation is ",
61 " whereas you have used ",
63 ". Remember that indexing starts at 0. The Dictator does not take such mistakes lightly.");
101 interpolate(Moose::FV::InterpMethod::Upwind,
110 flux += mobility * pressure_grad *
_normal;
DualNumber< Real, DNDerivativeType, true > ADReal
registerADMooseObject("PorousFlowApp", FVPorousFlowAdvectiveFlux)
void ErrorVector unsigned int
static InputParameters validParams()
bool onBoundary(const FaceInfo &fi) const
const FaceInfo * _face_info
Advective flux of fluid component k in fluid phase alpha.
const ADMaterialProperty< std::vector< Real > > & _relperm_neighbor
const ADMaterialProperty< std::vector< Real > > & _pressure_neighbor
const ADMaterialProperty< std::vector< Real > > & _viscosity_neighbor
FVPorousFlowAdvectiveFlux(const InputParameters ¶ms)
const ADMaterialProperty< std::vector< Real > > & _pressure
Fluid pressure.
const ADMaterialProperty< std::vector< Real > > & _density
Fluid density.
const unsigned int _fluid_component
Index of the fluid component this kernel applies to.
const ADMaterialProperty< RealTensorValue > & _permeability_neighbor
const ADMaterialProperty< std::vector< Real > > & _density_neighbor
const ADMaterialProperty< std::vector< Real > > & _viscosity
Fluid viscosity.
const ADMaterialProperty< std::vector< Real > > & _relperm
Relative permeability.
const unsigned int _num_phases
Number of fluid phases present.
const PorousFlowDictator & _dictator
UserObject that holds information (number of phases, components, etc)
const RealVectorValue & _gravity
Gravity vector.
const ADMaterialProperty< std::vector< std::vector< Real > > > & _mass_fractions
Mass fraction of fluid components in fluid phases.
static InputParameters validParams()
const ADMaterialProperty< RealTensorValue > & _permeability
Permeability.
const ADMaterialProperty< std::vector< RealGradient > > & _grad_p
virtual ADReal computeQpResidual() override
const ADMaterialProperty< std::vector< std::vector< Real > > > & _mass_fractions_neighbor
const Point & eCN() const
void paramError(const std::string ¶m, Args... args) const
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
unsigned int numComponents() const
The number of fluid components.