20 RealVectorValue g(0, 0, -9.81);
21 params.
addParam<RealVectorValue>(
"gravity", g,
"Gravity vector. Defaults to (0, 0, -9.81)");
23 "The PorousFlowDictator UserObject");
24 params.
addParam<
unsigned int>(
"phase", 0,
"The fluid phase for this BC");
25 params.
addParam<
unsigned int>(
"fluid_component", 0,
"The fluid component for this BC");
27 params.
addRequiredParam<Real>(
"porepressure_value",
"The porepressure value on the boundary");
34 _num_phases(_dictator.numPhases()),
35 _phase(getParam<unsigned
int>(
"phase")),
36 _fluid_component(getParam<unsigned
int>(
"fluid_component")),
37 _density(getADMaterialProperty<
std::vector<Real>>(
"PorousFlow_fluid_phase_density_qp")),
39 getNeighborADMaterialProperty<
std::vector<Real>>(
"PorousFlow_fluid_phase_density_qp")),
40 _viscosity(getADMaterialProperty<
std::vector<Real>>(
"PorousFlow_viscosity_qp")),
42 getNeighborADMaterialProperty<
std::vector<Real>>(
"PorousFlow_viscosity_qp")),
43 _relperm(getADMaterialProperty<
std::vector<Real>>(
"PorousFlow_relative_permeability_qp")),
45 getNeighborADMaterialProperty<
std::vector<Real>>(
"PorousFlow_relative_permeability_qp")),
47 getADMaterialProperty<
std::vector<
std::vector<Real>>>(
"PorousFlow_mass_frac_qp")),
48 _mass_fractions_neighbor(
49 getNeighborADMaterialProperty<
std::vector<
std::vector<Real>>>(
"PorousFlow_mass_frac_qp")),
50 _permeability(getADMaterialProperty<RealTensorValue>(
"PorousFlow_permeability_qp")),
51 _permeability_neighbor(
52 getNeighborADMaterialProperty<RealTensorValue>(
"PorousFlow_permeability_qp")),
53 _pressure(getADMaterialProperty<
std::vector<Real>>(
"PorousFlow_porepressure_qp")),
55 getNeighborADMaterialProperty<
std::vector<Real>>(
"PorousFlow_porepressure_qp")),
56 _gravity(getParam<RealVectorValue>(
"gravity")),
57 _pp_value(getParam<Real>(
"porepressure_value"))
62 "The Dictator proclaims that the maximum fluid phase index in this simulation is ",
64 " whereas you have used ",
66 ". Remember that indexing starts at 0. The Dictator does not take such mistakes lightly.");
71 "The Dictator proclaims that the maximum fluid component index in this simulation is ",
73 " whereas you have used ",
75 ". Remember that indexing starts at 0.");
81 diri_params.applySpecificParameters(
_pars, {
"variable",
"boundary"});
83 diri_params.set<Real>(
"value") =
_pp_value;
92 const bool out_of_elem = (
_face_type == FaceInfo::VarFaceNeighbors::ELEM);
107 return mobility * pressure_grad *
_normal;
DualNumber< Real, DNDerivativeType, true > ADReal
registerADMooseObject("PorousFlowApp", FVPorousFlowAdvectiveFluxBC)
void ErrorVector unsigned int
virtual void addFVBC(const std::string &fv_bc_name, const std::string &name, InputParameters ¶meters)
bool fvBCsIntegrityCheck() const
FEProblemBase & _fv_problem
const FaceInfo * _face_info
static InputParameters validParams()
ADRealVectorValue _normal
FaceInfo::VarFaceNeighbors _face_type
static InputParameters validParams()
Flux boundary condition where an advective flux is applied.
const ADMaterialProperty< std::vector< std::vector< Real > > > & _mass_fractions
Mass fraction of fluid components in fluid phases.
const ADMaterialProperty< std::vector< Real > > & _pressure
Fluid pressure.
const unsigned int _fluid_component
Index of the fluid component this BC applies to.
const ADMaterialProperty< RealTensorValue > & _permeability
Permeability.
const ADMaterialProperty< std::vector< Real > > & _density_neighbor
static InputParameters validParams()
const PorousFlowDictator & _dictator
UserObject that holds information (number of phases, components, etc)
const ADMaterialProperty< std::vector< Real > > & _relperm
Relative permeability.
const ADMaterialProperty< std::vector< Real > > & _relperm_neighbor
const ADMaterialProperty< std::vector< Real > > & _viscosity_neighbor
FVPorousFlowAdvectiveFluxBC(const InputParameters ¶ms)
const unsigned int _num_phases
Number of fluid phases present.
const ADMaterialProperty< std::vector< std::vector< Real > > > & _mass_fractions_neighbor
const ADMaterialProperty< std::vector< Real > > & _density
Fluid density.
const ADMaterialProperty< std::vector< Real > > & _pressure_neighbor
const ADMaterialProperty< RealTensorValue > & _permeability_neighbor
const ADMaterialProperty< std::vector< Real > > & _viscosity
Fluid viscosity.
const Real _pp_value
The porepressure value at the boundary.
const RealVectorValue & _gravity
Gravity vector.
virtual ADReal computeQpResidual() override
const unsigned int _phase
Index of the fluid phase this BC applies to.
const Point & eCN() const
const std::string & name() const
void paramError(const std::string ¶m, Args... args) const
const InputParameters & _pars
static const std::string app_param
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.