https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
23template <bool is_ad>
25{
26public:
28
30
31protected:
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
116 const RealVectorValue _gravity;
117
119 const std::vector<Real> _disp_long;
120
122 const std::vector<Real> _disp_trans;
123
125 const bool _perm_derivs;
126
128 using GenericKernel<is_ad>::_grad_phi;
129};
130
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
Moose::GenericType< Real, is_ad > GenericReal
Moose::GenericType< RankTwoTensor, is_ad > GenericRankTwoTensor
PorousFlowDispersiveFluxTempl< false > PorousFlowDispersiveFlux
PorousFlowDispersiveFluxTempl< true > ADPorousFlowDispersiveFlux
const VariablePhiGradient & _grad_phi
const InputParameters & parameters() const
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
Dispersive flux of component k in fluid phase alpha.
virtual Real computeQpJacobian() override
const GenericMaterialProperty< std::vector< Real >, is_ad > & _relative_permeability
Relative permeability of each phase.
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< Real > > > & _diffusion_coeff
Diffusion coefficients of component k in fluid phase alpha.
const GenericMaterialProperty< std::vector< Real >, is_ad > & _fluid_density_qp
Fluid density for each phase (at the qp)
const MaterialProperty< std::vector< Real > > *const _dporosity_qp_dvar
Derivative of porosity wrt PorousFlow variables – null for AD.
const MaterialProperty< std::vector< std::vector< Real > > > *const _dfluid_viscosity_dvar
Derivative of viscosity wrt PorousFlow variables – null for AD.
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > *const _dmass_frac_dvar
Derivative of mass fraction wrt PorousFlow variables – null for AD.
const RealVectorValue _gravity
Gravitational acceleration.
const GenericMaterialProperty< Real, is_ad > & _porosity_qp
Porosity at the qps.
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.
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 > > > *const _dfluid_density_qp_dvar
Derivative of the fluid density for each phase wrt PorousFlow variables – null for AD.
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 GenericMaterialProperty< RealTensorValue, is_ad > & _permeability
Permeability of porous material.
virtual GenericReal< is_ad > computeQpResidual() override
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const MaterialProperty< std::vector< RealTensorValue > > *const _dpermeability_dvar
Derivative of permeability wrt PorousFlow variables – null for AD.
const GenericMaterialProperty< std::vector< Real >, is_ad > & _fluid_viscosity
Viscosity of each component in each phase.
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 GenericMaterialProperty< std::vector< RealGradient >, is_ad > & _grad_p
Gradient of the pore pressure in each phase.
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const GenericMaterialProperty< std::vector< Real >, is_ad > & _tortuosity
Tortuosity tau_0 * tau_{alpha} for fluid phase alpha.
const GenericMaterialProperty< std::vector< std::vector< RealGradient > >, is_ad > & _grad_mass_frac
Gradient of mass fraction of each component in each phase.
const unsigned int _num_phases
The number of fluid phases.
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > *const _dpermeability_dgradvar
d(permeability)/d(grad(PorousFlow variable)) – null for AD
const GenericRankTwoTensor< is_ad > _identity_tensor
Identity tensor (generic type to support AD arithmetic)
const std::vector< Real > _disp_trans
Transverse dispersivity for each phase.
const MaterialProperty< std::vector< std::vector< Real > > > *const _drelative_permeability_dvar
Derivative of relative permeability wrt PorousFlow variables – null for AD.
const unsigned int _fluid_component
Index of the fluid component that this kernel acts on.
const bool _perm_derivs
Flag to check whether permeability derivatives are non-zero.
const std::vector< Real > _disp_long
Longitudinal dispersivity for each phase.