24 "The PorousFlowDictator UserObject");
25 params.
addParam<
unsigned int>(
"fluid_component", 0,
"The fluid component");
27 "disp_long",
"Vector of longitudinal dispersion coefficients for each phase");
29 "disp_trans",
"Vector of transverse dispersion coefficients for each phase");
31 "Dispersive and diffusive flux of the component given by fluid_component in all phases");
32 params.
set<
unsigned short>(
"ghost_layers") = 2;
37 "ElementSideNeighborLayers",
51 _num_phases(_dictator.numPhases()),
52 _fluid_component(getParam<unsigned
int>(
"fluid_component")),
53 _density(getADMaterialProperty<
std::vector<
Real>>(
"PorousFlow_fluid_phase_density_qp")),
54 _viscosity(getADMaterialProperty<
std::vector<
Real>>(
"PorousFlow_viscosity_qp")),
56 getNeighborADMaterialProperty<
std::vector<
Real>>(
"PorousFlow_viscosity_qp")),
57 _relperm(getADMaterialProperty<
std::vector<
Real>>(
"PorousFlow_relative_permeability_qp")),
59 getNeighborADMaterialProperty<
std::vector<
Real>>(
"PorousFlow_relative_permeability_qp")),
61 getADMaterialProperty<
std::vector<
std::vector<
Real>>>(
"PorousFlow_mass_frac_qp")),
62 _mass_fractions_neighbor(
63 getNeighborADMaterialProperty<
std::vector<
std::vector<
Real>>>(
"PorousFlow_mass_frac_qp")),
65 "PorousFlow_grad_mass_frac_qp")),
66 _permeability(getADMaterialProperty<
RealTensorValue>(
"PorousFlow_permeability_qp")),
67 _permeability_neighbor(
68 getNeighborADMaterialProperty<
RealTensorValue>(
"PorousFlow_permeability_qp")),
69 _pressure(getADMaterialProperty<
std::vector<
Real>>(
"PorousFlow_porepressure_qp")),
71 getNeighborADMaterialProperty<
std::vector<
Real>>(
"PorousFlow_porepressure_qp")),
72 _grad_p(getADMaterialProperty<
std::vector<
RealGradient>>(
"PorousFlow_grad_porepressure_qp")),
73 _porosity(getADMaterialProperty<
Real>(
"PorousFlow_porosity_qp")),
74 _porosity_neighbor(getNeighborADMaterialProperty<
Real>(
"PorousFlow_porosity_qp")),
75 _tortuosity(getADMaterialProperty<
std::vector<
Real>>(
"PorousFlow_tortuosity_qp")),
77 getNeighborADMaterialProperty<
std::vector<
Real>>(
"PorousFlow_tortuosity_qp")),
79 getMaterialProperty<
std::vector<
std::vector<
Real>>>(
"PorousFlow_diffusion_coeff_qp")),
80 _diffusion_coeff_neighbor(getNeighborMaterialProperty<
std::vector<
std::vector<
Real>>>(
81 "PorousFlow_diffusion_coeff_qp")),
84 _disp_long(getParam<
std::vector<
Real>>(
"disp_long")),
85 _disp_trans(getParam<
std::vector<
Real>>(
"disp_trans"))
90 "The Dictator proclaims that the maximum fluid component index in this simulation is ",
92 " whereas you have used ",
94 ". Remember that indexing starts at 0. The Dictator does not take such mistakes lightly.");
100 "The number of longitudinal dispersion coefficients is not equal to the number of phases");
104 "The number of transverse dispersion coefficients disp_trans is not equal to the " 169 const auto mobility_neighbor =
181 const auto velocity = mobility * gradp;
FVPorousFlowDispersiveFlux(const InputParameters ¶ms)
virtual ADReal gradUDotNormal(const Moose::StateArg &time, const bool correct_skewness) const
const ADMaterialProperty< std::vector< Real > > & _viscosity_neighbor
const PorousFlowDictator & _dictator
UserObject that holds information (number of phases, components, etc)
bool isZero(const T &value, const Real tolerance=TOLERANCE *TOLERANCE *TOLERANCE)
const FaceInfo * _face_info
Moose::StateArg determineState() const
const ADMaterialProperty< Real > & _porosity
Porosity.
unsigned int numComponents() const
The number of fluid components.
const ADMaterialProperty< std::vector< Real > > & _pressure_neighbor
const ADMaterialProperty< std::vector< RealGradient > > & _grad_p
const std::vector< Real > _disp_trans
Transverse dispersivity for each phase.
const ADMaterialProperty< std::vector< Real > > & _density
Fluid density.
DualNumber< Real, DNDerivativeType, true > ADReal
const ADMaterialProperty< std::vector< Real > > & _relperm_neighbor
static RankTwoTensorTempl< ADReal > selfOuterProduct(const libMesh::TypeVector< ADReal > &)
bool onBoundary(const FaceInfo &fi) const
TensorValue< Real > RealTensorValue
static InputParameters validParams()
const ADRankTwoTensor _identity_tensor
const bool _correct_skewness
Dispersive flux of component k in fluid phase alpha.
const unsigned int _num_phases
Number of fluid phases present.
static InputParameters validParams()
const ADMaterialProperty< RealTensorValue > & _permeability
Permeability.
registerADMooseObject("PorousFlowApp", FVPorousFlowDispersiveFlux)
const ADMaterialProperty< std::vector< std::vector< Real > > > & _mass_fractions
Mass fraction of fluid components in fluid phases.
void paramError(const std::string ¶m, Args... args) const
const ADMaterialProperty< std::vector< Real > > & _pressure
Fluid pressure.
const ADMaterialProperty< std::vector< Real > > & _tortuosity_neighbor
virtual ADReal computeQpResidual() override
const ADMaterialProperty< RealTensorValue > & _permeability_neighbor
const ADMaterialProperty< Real > & _porosity_neighbor
const MaterialProperty< std::vector< std::vector< Real > > > & _diffusion_coeff
Diffusion coefficients of component k in fluid phase alpha.
const ADMaterialProperty< std::vector< Real > > & _tortuosity
Tortuosity tau_0 * tau_{alpha} for fluid phase alpha.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const ADMaterialProperty< std::vector< std::vector< Real > > > & _mass_fractions_neighbor
const Point & eCN() const
const ADMaterialProperty< std::vector< Real > > & _viscosity
Fluid viscosity.
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
static InputParameters validParams()
const MaterialProperty< std::vector< std::vector< Real > > > & _diffusion_coeff_neighbor
const std::vector< Real > _disp_long
Longitudinal dispersivity for each phase.
const RealVectorValue & _gravity
Gravity vector.
static const std::string velocity
const ADMaterialProperty< std::vector< std::vector< RealGradient > > > & _grad_mass_frac
static void setRMParamsDiffusion(const InputParameters &obj_params, InputParameters &rm_params, const unsigned short conditional_extended_layers)
void interpolate(InterpMethod m, T &result, const T2 &value1, const T3 &value2, const FaceInfo &fi, const bool one_is_elem)
const unsigned int _fluid_component
Index of the fluid component this kernel applies to.
const ADMaterialProperty< std::vector< Real > > & _relperm
Relative permeability.
void ErrorVector unsigned int