https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PorousFlowEnergyTimeDerivative.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
22template <bool is_ad>
24{
25public:
27
29
30protected:
31 virtual GenericReal<is_ad> computeQpResidual() override;
32 virtual Real computeQpJacobian() override;
33 virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
34
39 Real computeQpJac(unsigned int pvar) const;
40
43
46
48 const unsigned int _num_phases;
49
51 const bool _fluid_present;
52
55
57 const std::string _base_name;
58
61
64
67
70
73
76
79
82
85
88
91
94
97
100
103
106
109
112
115
117 using GenericKernel<is_ad>::_grad_phi;
118};
119
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
Moose::GenericType< Real, is_ad > GenericReal
PorousFlowEnergyTimeDerivativeTempl< true > ADPorousFlowEnergyTimeDerivative
PorousFlowEnergyTimeDerivativeTempl< false > PorousFlowEnergyTimeDerivative
const VariablePhiGradient & _grad_phi
const InputParameters & parameters() const
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
Kernel = (heat_energy - heat_energy_old)/dt It is lumped to the nodes.
const MaterialProperty< Real > & _rock_energy_nodal_old
Old value of nodal rock energy density (always non-AD)
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 GenericMaterialProperty< std::vector< Real >, is_ad > *const _fluid_saturation_nodal
Nodal fluid saturation (AD or non-AD); null if !_fluid_present.
const MaterialProperty< std::vector< Real > > *const _drock_energy_nodal_dvar
d(nodal rock energy density)/d(PorousFlow variable) – null for AD path
const bool _var_is_porflow_var
Whether the Variable for this Kernel is a PorousFlow variable according to the Dictator.
const MaterialProperty< std::vector< std::vector< Real > > > *const _dfluid_saturation_nodal_dvar
d(nodal fluid saturation)/d(PorousFlow variable) – null for AD path or if !_fluid_present
const MaterialProperty< std::vector< Real > > *const _dporosity_dvar
d(porosity)/d(PorousFlow variable) at nodes – null for AD path
const bool _fluid_present
Whether _num_phases > 0 (ie. there is a fluid present)
const MaterialProperty< std::vector< Real > > *const _fluid_saturation_nodal_old
Old value of fluid saturation (always non-AD); null if !_fluid_present.
const GenericMaterialProperty< Real, is_ad > & _rock_energy_nodal
Nodal rock energy density (AD or non-AD)
const MaterialProperty< std::vector< Real > > *const _energy_nodal_old
Old value of internal energy of the phases, evaluated at the nodes (always non-AD); null if !...
const MaterialProperty< std::vector< Real > > *const _fluid_density_old
Old value of nodal fluid density (always non-AD); null if !_fluid_present.
virtual GenericReal< is_ad > computeQpResidual() override
Real computeQpJac(unsigned int pvar) const
Derivative of residual with respect to PorousFlow variable number pvar (non-AD path only)
const MaterialProperty< std::vector< RealGradient > > *const _dporosity_dgradvar
d(porosity)/d(grad PorousFlow variable) at qps – null for AD path
const MaterialProperty< std::vector< std::vector< Real > > > *const _denergy_nodal_dvar
d(internal energy)/d(PorousFlow variable) – null for AD path or if !_fluid_present
const bool _has_total_strain
Whether there is a Material called _base_name_total_strain.
const MaterialProperty< unsigned int > *const _nearest_qp
The nearest qp to the node (always non-AD)
const GenericMaterialProperty< Real, is_ad > & _porosity
Porosity at the nodes (AD or non-AD depending on is_ad)
const std::string _base_name
base name used in the Tensor Mechanics strain calculator
const PorousFlowDictator & _dictator
PorousFlowDictator UserObject.
const MaterialProperty< std::vector< std::vector< Real > > > *const _dfluid_density_dvar
d(nodal fluid density)/d(PorousFlow variable) – null for AD path or if !_fluid_present
const GenericMaterialProperty< std::vector< Real >, is_ad > *const _energy_nodal
Internal energy of the phases, evaluated at the nodes (AD or non-AD); null if !_fluid_present.
const MaterialProperty< Real > & _porosity_old
Old value of porosity (always non-AD)
const GenericMaterialProperty< std::vector< Real >, is_ad > *const _fluid_density
Nodal fluid density (AD or non-AD); null if !_fluid_present.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
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.