https://mooseframework.inl.gov
PorousFlowOutflowBC.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "IntegratedBC.h"
13 #include "PorousFlowDictator.h"
14 
19 {
20 public:
22 
24 
25 protected:
26  virtual Real computeQpResidual() override;
27  virtual Real computeQpJacobian() override;
28  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
29 
32 
34  const unsigned _num_phases;
35 
37  const bool _perm_derivs;
38 
40  const enum class FluxTypeChoiceEnum { FLUID, HEAT } _flux_type;
41 
43  const unsigned int _sp;
44 
47 
49  const bool _include_relperm;
50 
53 
56 
59 
62 
65 
68 
71 
74 
77 
80 
83 
86 
88  const bool _has_density;
89 
91  const bool _has_mass_fraction;
92 
94  const bool _has_relperm;
95 
97  const bool _has_enthalpy;
98 
101 
103  const bool _has_t;
104 
107 
110 
113 
116 
119 
122 
125 
128 
131 
134 
137 
140 
143 
144 private:
146  Real jac(unsigned int jvar) const;
147 
149  Real darcy(unsigned ph) const;
150 
152  Real mobility(unsigned ph) const;
153 
155  Real prefactor(unsigned ph) const;
156 };
const MaterialProperty< std::vector< RealTensorValue > > *const _dthermal_conductivity_dvar
d(Thermal_Conductivity)/d(PorousFlow variable)
Real jac(unsigned int jvar) const
Derivative of residual with respect to the jvar variable.
const MaterialProperty< std::vector< Real > > *const _relative_permeability
Relative permeability of each phase.
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _dpermeability_dgradvar
d(permeabiity)/d(grad(PorousFlow variable))
const bool _perm_derivs
Flag indicating whether to include derivatives of the permeability in the Jacobian.
const MaterialProperty< std::vector< std::vector< Real > > > & _dgrad_p_dgrad_var
Derivative of Grad porepressure in each phase wrt grad(PorousFlow variables)
const MaterialProperty< std::vector< Real > > *const _enthalpy
Enthalpy of each phase.
const MaterialProperty< std::vector< std::vector< Real > > > *const _mass_fractions
Mass fraction of each component in each phase.
const unsigned _num_phases
Number of phases in the simulation.
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const MaterialProperty< std::vector< Real > > & _fluid_density_qp
Fluid density for each phase (at the qp)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const MaterialProperty< std::vector< std::vector< Real > > > *const _denthalpy_dvar
d(enthalpy of each phase)/d(PorousFlow variable)
enum PorousFlowOutflowBC::FluxTypeChoiceEnum _flux_type
virtual Real computeQpJacobian() override
const MaterialProperty< RealGradient > *const _grad_t
grad(temperature)
const bool _has_mass_fraction
Whether there is a mass_frac_nodal Material.
Applies a flux to a boundary such that fluid or heat will flow freely out of the boundary.
const MaterialProperty< std::vector< RealGradient > > *const _dgrad_t_dvar
d(gradT)/d(PorousFlow variable)
const RealVectorValue _gravity
Gravitational acceleration.
const bool _has_thermal_conductivity
Whether there is a thermal_conductivity_qp Material.
const bool _include_relperm
Whether to multiply the Darcy flux by the relative permeability.
PorousFlowOutflowBC(const InputParameters &parameters)
FluxTypeChoiceEnum
Indicates the type of flux that this BC will apply.
const MaterialProperty< std::vector< RealTensorValue > > & _dpermeability_dvar
d(permeabiity)/d(PorousFlow variable)
const bool _has_t
Whether there is a grad_temp Material.
const MaterialProperty< std::vector< Real > > *const _fluid_density_node
Fluid density for each phase (at the node)
Real darcy(unsigned ph) const
Darcy contribution to the outflowBC.
const MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_density_qp_dvar
Derivative of the fluid density for each phase wrt PorousFlow variables (at the qp) ...
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const bool _has_density
Whether there is a fluid_phase_density_nodal Material.
Real prefactor(unsigned ph) const
Either mass_fraction or enthalpy, depending on _flux_type.
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
const MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_viscosity_dvar
Derivative of the fluid viscosity for each phase wrt PorousFlow variables.
const MaterialProperty< std::vector< std::vector< Real > > > *const _dfluid_density_node_dvar
d(Fluid density for each phase (at the node))/d(PorousFlow variable)
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > *const _dmass_fractions_dvar
d(Mass fraction of each component in each phase)/d(PorousFlow variable)
const InputParameters & parameters() const
const Real _multiplier
Multiply the flux by this quantity. This is mainly used for testing purposes, for instance...
const MaterialProperty< std::vector< Real > > & _fluid_viscosity
Viscosity of each phase.
const MaterialProperty< std::vector< std::vector< RealGradient > > > & _dgrad_p_dvar
Derivative of Grad porepressure in each phase wrt PorousFlow variables.
const bool _has_enthalpy
Whether there is an enthalpy Material.
const bool _has_relperm
Whether there is a relative_permeability_nodal Material.
const MaterialProperty< std::vector< Real > > *const _dgrad_t_dgradvar
d(gradT)/d(grad PorousFlow variable)
const MaterialProperty< RealTensorValue > & _permeability
Permeability of porous material.
const MaterialProperty< std::vector< std::vector< Real > > > *const _drelative_permeability_dvar
d(Relative permeability of each phase)/d(PorousFlow variable)
const unsigned int _sp
The fluid component number (only used if _flux_type==FLUID))
const MaterialProperty< RealTensorValue > *const _thermal_conductivity
Thermal_Conductivity of porous material.
Real mobility(unsigned ph) const
Mobility contribution to the outflowBC.
virtual Real computeQpResidual() override
const bool _multiply_by_density
Whether to multiply the Darcy flux by the fluid density. This is automatically set to true if _flux_t...
const MaterialProperty< std::vector< RealGradient > > & _grad_p
Gradient of the pore pressure in each phase.