https://mooseframework.inl.gov
PorousFlowMassTimeDerivative.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 
13 #include "PorousFlowDictator.h"
14 
26 template <bool is_ad>
28 {
29 public:
31 
33 
34 protected:
35  virtual GenericReal<is_ad> computeQpResidual() override;
36  virtual Real computeQpJacobian() override;
37  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
38 
40  Real computeQpJac(unsigned int pvar);
41 
43  const unsigned int _fluid_component;
44 
47 
49  const bool _var_is_porflow_var;
50 
52  const unsigned int _num_phases;
53 
56 
59 
61  const std::string _base_name;
62 
64  const bool _has_total_strain;
65 
68 
71 
74 
77 
80 
83 
86 
89 
92 
95 
98 
101 
104 
107 
110 
113 };
114 
Kernel = (mass_component - mass_component_old)/dt where mass_component = porosity*sum_phases(density_...
Moose::GenericType< Real, is_ad > GenericReal
const std::string _base_name
base name used in the Tensor Mechanics strain calculator
const MaterialProperty< std::vector< std::vector< Real > > > *const _dfluid_saturation_nodal_dvar
d(nodal fluid saturation)/d(PorousFlow variable) – null for AD path
PorousFlowMassTimeDerivativeTempl(const InputParameters &parameters)
const MaterialProperty< std::vector< Real > > & _fluid_saturation_nodal_old
Old value of fluid saturation (always non-AD)
const bool _var_is_porflow_var
Whether the Variable for this Kernel is a PorousFlow variable according to the Dictator.
const InputParameters & parameters() const
const MaterialProperty< unsigned int > *const _nearest_qp
The nearest qp to the node (unsigned int, always non-AD)
PorousFlowMassTimeDerivativeTempl< false > PorousFlowMassTimeDerivative
const MaterialProperty< std::vector< std::vector< Real > > > *const _dfluid_density_dvar
d(nodal fluid density)/d(PorousFlow variable) – null for AD path or if !multiply_by_density ...
Real computeQpJac(unsigned int pvar)
Derivative of residual wrt PorousFlow variable pvar (non-AD path only)
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
virtual GenericReal< is_ad > computeQpResidual() override
const GenericMaterialProperty< std::vector< Real >, is_ad > *const _fluid_density
Nodal fluid density (AD or non-AD); null if !multiply_by_density.
const bool _has_total_strain
Whether there is a Material called _base_name_total_strain.
const MaterialProperty< std::vector< RealGradient > > *const _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable) at qps – null for AD path
PorousFlowMassTimeDerivativeTempl< true > ADPorousFlowMassTimeDerivative
const MaterialProperty< std::vector< Real > > *const _dporosity_dvar
d(porosity)/d(PorousFlow variable) at nodes – null for AD path
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > *const _dmass_frac_dvar
d(nodal mass fraction)/d(PorousFlow variable) - null for AD path
const GenericMaterialProperty< Real, is_ad > & _porosity
Porosity at the nodes (AD or non-AD depending on is_ad)
const MaterialProperty< std::vector< std::vector< Real > > > & _mass_frac_old
Old value of nodal mass fraction (always non-AD)
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
const GenericMaterialProperty< std::vector< Real >, is_ad > & _fluid_saturation_nodal
Nodal fluid saturation (AD or non-AD)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const GenericMaterialProperty< std::vector< std::vector< Real > >, is_ad > & _mass_frac
Nodal mass fraction (AD or non-AD)
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< RankTwoTensor > *const _total_strain_old
Old value of total strain calculated by a Tensor Mechanics strain calculator, if it exists...
Base class for PorousFlow kernels that use mass-lumped (nodal) material properties.
const unsigned int _fluid_component
The fluid component index.
const bool _strain_at_nearest_qp
Whether the porosity uses the volumetric strain at the closest quadpoint.
const unsigned int _num_phases
Number of fluid phases.
const MaterialProperty< Real > & _porosity_old
Old value of porosity (always non-AD)
const MaterialProperty< std::vector< Real > > *const _fluid_density_old
Old value of nodal fluid density (always non-AD); null if !multiply_by_density.
const bool _multiply_by_density
Whether to multiply by density: if true then this Kernel is computing the time-derivative of fluid ma...