https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowMassVolumetricExpansion.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
21template <bool is_ad>
23{
24public:
26
28
29protected:
30 virtual GenericReal<is_ad> computeQpResidual() override;
31 virtual Real computeQpJacobian() override;
32 virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
33
35 const unsigned int _fluid_component;
36
39
42
44 const unsigned int _num_phases;
45
48
51
54
57
60
63
66
69
72
75
78
81
84
87
94 Real computedMassQpJac(unsigned int jvar) const;
95
103 Real computedVolQpJac(unsigned int jvar) const;
104
106 using GenericKernel<is_ad>::_grad_phi;
107};
108
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
Moose::GenericType< Real, is_ad > GenericReal
PorousFlowMassVolumetricExpansionTempl< false > PorousFlowMassVolumetricExpansion
PorousFlowMassVolumetricExpansionTempl< true > ADPorousFlowMassVolumetricExpansion
const VariablePhiGradient & _grad_phi
const InputParameters & parameters() const
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
Base class for PorousFlow kernels that use mass-lumped (nodal) material properties.
Kernel = mass_component * rate_of_solid_volumetric_expansion where mass_component = porosity * sum_ph...
const GenericMaterialProperty< std::vector< Real >, is_ad > & _fluid_saturation
Nodal fluid saturation.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const unsigned int _fluid_component
The fluid component index.
const MaterialProperty< std::vector< Real > > *const _dporosity_dvar
d(porosity)/d(PorousFlow variable) at the nodes
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > *const _dmass_frac_dvar
d(nodal mass fraction)/d(PorousFlow variable)
const bool _multiply_by_density
Whether to multiply by density.
Real computedVolQpJac(unsigned int jvar) const
Derivative of volumetric-strain part of the residual with respect to the Variable with variable numbe...
Real computedMassQpJac(unsigned int jvar) const
Derivative of mass part of the residual with respect to the Variable with variable number jvar.
const bool _var_is_porflow_var
Whether the Variable for this Kernel is a PorousFlow variable according to the Dictator.
const MaterialProperty< std::vector< RealGradient > > *const _dstrain_rate_qp_dvar
d(strain rate)/d(PorousFlow variable)
const unsigned int _num_phases
Number of fluid phases.
const GenericMaterialProperty< std::vector< std::vector< Real > >, is_ad > & _mass_frac
Nodal mass fraction.
const MaterialProperty< std::vector< std::vector< Real > > > *const _dfluid_saturation_dvar
d(nodal fluid saturation)/d(PorousFlow variable)
const GenericMaterialProperty< std::vector< Real >, is_ad > *const _fluid_density
Nodal fluid density.
virtual GenericReal< is_ad > computeQpResidual() override
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const MaterialProperty< unsigned int > *const _nearest_qp
The nearest qp to the node.
const GenericMaterialProperty< Real, is_ad > & _porosity
Porosity at the nodes.
const MaterialProperty< std::vector< RealGradient > > *const _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable) at the qps
const bool _strain_at_nearest_qp
Whether the porosity uses the volumetric strain at the closest quadpoint.
const MaterialProperty< std::vector< std::vector< Real > > > *const _dfluid_density_dvar
d(nodal fluid density)/d(PorousFlow variable)
const GenericMaterialProperty< Real, is_ad > & _strain_rate_qp
Strain rate.