https://mooseframework.inl.gov
PorousFlowDispersiveFlux.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 "GenericKernel.h"
13 #include "PorousFlowDictator.h"
14 #include "RankTwoTensor.h"
15 
23 template <bool is_ad>
25 {
26 public:
28 
30 
31 protected:
32  virtual GenericReal<is_ad> computeQpResidual() override;
33  virtual Real computeQpJacobian() override;
34  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
35 
40  Real computeQpJac(unsigned int jvar) const;
41 
44 
47 
50 
53 
56 
59 
62 
65 
68 
72 
75 
77  const unsigned int _fluid_component;
78 
80  const unsigned int _num_phases;
81 
84 
87 
90 
93 
96 
99 
102 
105 
108 
111 
114 
117 
119  const std::vector<Real> _disp_long;
120 
122  const std::vector<Real> _disp_trans;
123 
125  const bool _perm_derivs;
126 
129 };
130 
Moose::GenericType< Real, is_ad > GenericReal
const GenericMaterialProperty< Real, is_ad > & _porosity_qp
Porosity at the qps.
const GenericMaterialProperty< std::vector< Real >, is_ad > & _tortuosity
Tortuosity tau_0 * tau_{alpha} for fluid phase alpha.
const std::vector< Real > _disp_long
Longitudinal dispersivity for each phase.
const MaterialProperty< std::vector< std::vector< Real > > > *const _dfluid_density_qp_dvar
Derivative of the fluid density for each phase wrt PorousFlow variables – null for AD...
PorousFlowDispersiveFluxTempl(const InputParameters &parameters)
const MaterialProperty< std::vector< std::vector< Real > > > *const _drelative_permeability_dvar
Derivative of relative permeability wrt PorousFlow variables – null for AD.
const bool _perm_derivs
Flag to check whether permeability derivatives are non-zero.
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > *const _ddiffusion_coeff_dvar
Derivative of the diffusion coefficients wrt PorousFlow variables – null for AD. ...
const InputParameters & parameters() const
const MaterialProperty< std::vector< std::vector< RealGradient > > > *const _dgrad_p_dvar
Derivative of Grad porepressure in each phase wrt PorousFlow variables – null for AD...
const MaterialProperty< std::vector< RealTensorValue > > *const _dpermeability_dvar
Derivative of permeability wrt PorousFlow variables – null for AD.
static InputParameters validParams()
virtual GenericReal< is_ad > computeQpResidual() override
const GenericMaterialProperty< std::vector< std::vector< RealGradient > >, is_ad > & _grad_mass_frac
Gradient of mass fraction of each component in each phase.
Real computeQpJac(unsigned int jvar) const
Derivative of the residual with respect to the PorousFlow variable with variable number jvar...
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const GenericRankTwoTensor< is_ad > _identity_tensor
Identity tensor (generic type to support AD arithmetic)
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > *const _dmass_frac_dvar
Derivative of mass fraction wrt PorousFlow variables – null for AD.
const GenericMaterialProperty< std::vector< RealGradient >, is_ad > & _grad_p
Gradient of the pore pressure in each phase.
PorousFlowDispersiveFluxTempl< true > ADPorousFlowDispersiveFlux
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
const GenericMaterialProperty< std::vector< Real >, is_ad > & _relative_permeability
Relative permeability of each phase.
const GenericMaterialProperty< std::vector< Real >, is_ad > & _fluid_viscosity
Viscosity of each component in each phase.
const MaterialProperty< std::vector< std::vector< Real > > > *const _dfluid_viscosity_dvar
Derivative of viscosity wrt PorousFlow variables – null for AD.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const GenericMaterialProperty< RealTensorValue, is_ad > & _permeability
Permeability of porous material.
const RealVectorValue _gravity
Gravitational acceleration.
const unsigned int _num_phases
The number of fluid phases.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
const MaterialProperty< std::vector< Real > > *const _dporosity_qp_dvar
Derivative of porosity wrt PorousFlow variables – null for AD.
virtual Real computeQpJacobian() override
const MaterialProperty< std::vector< std::vector< Real > > > *const _dtortuosity_dvar
Derivative of tortuosity wrt PorousFlow variables – null for AD.
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > *const _dpermeability_dgradvar
d(permeability)/d(grad(PorousFlow variable)) – null for AD
const std::vector< Real > _disp_trans
Transverse dispersivity for each phase.
Dispersive flux of component k in fluid phase alpha.
PorousFlowDispersiveFluxTempl< false > PorousFlowDispersiveFlux
const MaterialProperty< std::vector< std::vector< Real > > > & _diffusion_coeff
Diffusion coefficients of component k in fluid phase alpha.
const unsigned int _fluid_component
Index of the fluid component that this kernel acts on.
const GenericMaterialProperty< std::vector< Real >, is_ad > & _fluid_density_qp
Fluid density for each phase (at the qp)
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor
const MaterialProperty< std::vector< std::vector< Real > > > *const _dgrad_p_dgrad_var
Derivative of Grad porepressure in each phase wrt grad(PorousFlow variables) – null for AD...