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")),
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.");
110 flux += mobility * pressure_grad *
_normal;
static InputParameters validParams()
const ADMaterialProperty< std::vector< RealGradient > > & _grad_p
const RealVectorValue & _gravity
Gravity vector.
const ADMaterialProperty< RealTensorValue > & _permeability
Permeability.
const FaceInfo * _face_info
virtual ADReal computeQpResidual() override
unsigned int numComponents() const
The number of fluid components.
DualNumber< Real, DNDerivativeType, true > ADReal
const ADMaterialProperty< std::vector< std::vector< Real > > > & _mass_fractions
Mass fraction of fluid components in fluid phases.
bool onBoundary(const FaceInfo &fi) const
TensorValue< Real > RealTensorValue
static InputParameters validParams()
const ADMaterialProperty< std::vector< Real > > & _viscosity_neighbor
const PorousFlowDictator & _dictator
UserObject that holds information (number of phases, components, etc)
const ADMaterialProperty< std::vector< Real > > & _viscosity
Fluid viscosity.
const ADMaterialProperty< std::vector< Real > > & _density
Fluid density.
void paramError(const std::string ¶m, Args... args) const
const unsigned int _fluid_component
Index of the fluid component this kernel applies to.
const ADMaterialProperty< std::vector< std::vector< Real > > > & _mass_fractions_neighbor
const ADMaterialProperty< std::vector< Real > > & _density_neighbor
FVPorousFlowAdvectiveFlux(const InputParameters ¶ms)
const unsigned int _num_phases
Number of fluid phases present.
const ADMaterialProperty< std::vector< Real > > & _relperm_neighbor
const ADMaterialProperty< std::vector< Real > > & _relperm
Relative permeability.
const ADMaterialProperty< std::vector< Real > > & _pressure
Fluid pressure.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Point & eCN() const
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
IntRange< T > make_range(T beg, T end)
Advective flux of fluid component k in fluid phase alpha.
const ADMaterialProperty< RealTensorValue > & _permeability_neighbor
const ADMaterialProperty< std::vector< Real > > & _pressure_neighbor
void interpolate(InterpMethod m, T &result, const T2 &value1, const T3 &value2, const FaceInfo &fi, const bool one_is_elem)
void ErrorVector unsigned int
registerADMooseObject("PorousFlowApp", FVPorousFlowAdvectiveFlux)