www.mooseframework.org
PorousFlowDispersiveFlux.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef POROUSFLOWDISPERSIVEFLUX_H
9 #define POROUSFLOWDISPERSIVEFLUX_H
10 
11 #include "Kernel.h"
12 #include "PorousFlowDictator.h"
13 #include "RankTwoTensor.h"
14 
16 
17 template <>
19 
24 class PorousFlowDispersiveFlux : public Kernel
25 {
26 public:
27  PorousFlowDispersiveFlux(const InputParameters & parameters);
28 
29 protected:
30  virtual Real computeQpResidual() override;
31 
32  virtual Real computeQpJacobian() override;
33 
34  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
35 
43  Real computeQpJac(unsigned int jvar) const;
44 
46  const MaterialProperty<std::vector<Real>> & _fluid_density_qp;
47 
49  const MaterialProperty<std::vector<std::vector<Real>>> & _dfluid_density_qp_dvar;
50 
52  const MaterialProperty<std::vector<std::vector<RealGradient>>> & _grad_mass_frac;
53 
55  const MaterialProperty<std::vector<std::vector<std::vector<Real>>>> & _dmass_frac_dvar;
56 
58  const MaterialProperty<Real> & _porosity_qp;
59 
61  const MaterialProperty<std::vector<Real>> & _dporosity_qp_dvar;
62 
64  const MaterialProperty<std::vector<Real>> & _tortuosity;
65 
67  const MaterialProperty<std::vector<std::vector<Real>>> & _dtortuosity_dvar;
68 
70  const MaterialProperty<std::vector<std::vector<Real>>> & _diffusion_coeff;
71 
73  const MaterialProperty<std::vector<std::vector<std::vector<Real>>>> & _ddiffusion_coeff_dvar;
74 
77 
79  const unsigned int _fluid_component;
80 
82  const unsigned int _num_phases;
83 
85  const RankTwoTensor _identity_tensor;
86 
88  const MaterialProperty<std::vector<Real>> & _relative_permeability;
89 
91  const MaterialProperty<std::vector<std::vector<Real>>> & _drelative_permeability_dvar;
92 
94  const MaterialProperty<std::vector<Real>> & _fluid_viscosity;
95 
97  const MaterialProperty<std::vector<std::vector<Real>>> & _dfluid_viscosity_dvar;
98 
100  const MaterialProperty<RealTensorValue> & _permeability;
101 
103  const MaterialProperty<std::vector<RealTensorValue>> & _dpermeability_dvar;
104 
106  const MaterialProperty<std::vector<std::vector<RealTensorValue>>> & _dpermeability_dgradvar;
107 
109  const MaterialProperty<std::vector<RealGradient>> & _grad_p;
110 
112  const MaterialProperty<std::vector<std::vector<Real>>> & _dgrad_p_dgrad_var;
113 
115  const MaterialProperty<std::vector<std::vector<RealGradient>>> & _dgrad_p_dvar;
116 
118  const RealVectorValue _gravity;
119 
121  const std::vector<Real> _disp_long;
122 
124  const std::vector<Real> _disp_trans;
125 };
126 
127 #endif // POROUSFLOWDISPERSIVEFLUX_H
const MaterialProperty< std::vector< std::vector< Real > > > & _dtortuosity_dvar
Derivative of tortuosity wrt PorousFlow variables.
const RankTwoTensor _identity_tensor
Identity tensor.
const MaterialProperty< std::vector< RealGradient > > & _grad_p
Gradient of the pore pressure in each phase.
virtual Real computeQpJacobian() override
const MaterialProperty< std::vector< Real > > & _tortuosity
Tortuosity tau_0 * tau_{alpha} for fluid phase alpha.
const MaterialProperty< std::vector< RealTensorValue > > & _dpermeability_dvar
Derivative of permeability wrt PorousFlow variables.
const MaterialProperty< std::vector< std::vector< RealGradient > > > & _dgrad_p_dvar
Derivative of Grad porepressure in each phase wrt PorousFlow variables.
const RealVectorValue _gravity
Gravitational acceleration.
const MaterialProperty< std::vector< Real > > & _fluid_density_qp
Fluid density for each phase (at the qp)
const MaterialProperty< std::vector< std::vector< Real > > > & _diffusion_coeff
Diffusion coefficients of component k in fluid phase alpha.
const MaterialProperty< std::vector< std::vector< RealGradient > > > & _grad_mass_frac
Gradient of mass fraction of each component in each phase.
const MaterialProperty< std::vector< Real > > & _fluid_viscosity
Viscosity of each component in each phase.
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _dpermeability_dgradvar
d(permeabiity)/d(grad(porous-flow variable))
const MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_viscosity_dvar
Derivative of viscosity wrt PorousFlow variables.
const unsigned int _num_phases
The number of fluid phases.
InputParameters validParams< PorousFlowDispersiveFlux >()
virtual Real computeQpResidual() override
const MaterialProperty< std::vector< Real > > & _dporosity_qp_dvar
Derivative of porosity wrt PorousFlow variables (at the qps)
const PorousFlowDictator & _dictator
PorousFlow Dictator UserObject.
PorousFlowDispersiveFlux(const InputParameters &parameters)
const MaterialProperty< RealTensorValue > & _permeability
Permeability of porous material.
const std::vector< Real > _disp_long
Longitudinal dispersivity for each phase.
Real computeQpJac(unsigned int jvar) const
Derivative of the residual with respect to the PorousFLow Variable with variable number jvar...
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) ...
const MaterialProperty< std::vector< Real > > & _relative_permeability
Relative permeability of each phase.
Dispersive flux of component k in fluid phase alpha.
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
const MaterialProperty< std::vector< std::vector< Real > > > & _drelative_permeability_dvar
Derivative of relative permeability wrt PorousFlow variables.
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _ddiffusion_coeff_dvar
Derivative of the diffusion coefficients wrt PorousFlow variables.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const unsigned int _fluid_component
Index of the fluid component that this kernel acts on.
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _dmass_frac_dvar
Derivative of mass fraction wrt PorousFlow variables.
const MaterialProperty< std::vector< std::vector< Real > > > & _dgrad_p_dgrad_var
Derivative of Grad porepressure in each phase wrt grad(PorousFlow variables)
const MaterialProperty< Real > & _porosity_qp
Porosity at the qps.
const std::vector< Real > _disp_trans
Transverse dispersivity for each phase.