www.mooseframework.org
PorousFlowMassTimeDerivative.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #ifndef POROUSFLOWMASSTIMEDERIVATIVE_H
9 #define POROUSFLOWMASSTIMEDERIVATIVE_H
10 
11 #include "TimeDerivative.h"
12 #include "PorousFlowDictator.h"
13 
14 // Forward Declarations
16 
17 template <>
19 
26 class PorousFlowMassTimeDerivative : public TimeKernel
27 {
28 public:
29  PorousFlowMassTimeDerivative(const InputParameters & parameters);
30 
31 protected:
32  virtual Real computeQpResidual() override;
33  virtual Real computeQpJacobian() override;
34  virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
35 
37  const unsigned int _fluid_component;
38 
41 
43  const bool _var_is_porflow_var;
44 
46  const unsigned int _num_phases;
47 
50 
52  const MaterialProperty<Real> & _porosity;
53 
55  const MaterialProperty<Real> & _porosity_old;
56 
58  const MaterialProperty<std::vector<Real>> & _dporosity_dvar;
59 
61  const MaterialProperty<std::vector<RealGradient>> & _dporosity_dgradvar;
62 
64  const MaterialProperty<unsigned int> * const _nearest_qp;
65 
67  const MaterialProperty<std::vector<Real>> & _fluid_density;
68 
70  const MaterialProperty<std::vector<Real>> & _fluid_density_old;
71 
73  const MaterialProperty<std::vector<std::vector<Real>>> & _dfluid_density_dvar;
74 
76  const MaterialProperty<std::vector<Real>> & _fluid_saturation_nodal;
77 
79  const MaterialProperty<std::vector<Real>> & _fluid_saturation_nodal_old;
80 
82  const MaterialProperty<std::vector<std::vector<Real>>> & _dfluid_saturation_nodal_dvar;
83 
85  const MaterialProperty<std::vector<std::vector<Real>>> & _mass_frac;
86 
88  const MaterialProperty<std::vector<std::vector<Real>>> & _mass_frac_old;
89 
91  const MaterialProperty<std::vector<std::vector<std::vector<Real>>>> & _dmass_frac_dvar;
92 
98  Real computeQpJac(unsigned int pvar);
99 };
100 
101 #endif // POROUSFLOWMASSTIMEDERIVATIVE_H
const bool _strain_at_nearest_qp
whether the porosity uses the volumetric strain at the closest quadpoint
const MaterialProperty< Real > & _porosity_old
old value of porosity
const MaterialProperty< std::vector< Real > > & _fluid_density_old
old value of nodal fluid density
const MaterialProperty< Real > & _porosity
porosity at the nodes, but it can depend on grad(variables) which are actually evaluated at the qps ...
InputParameters validParams< PorousFlowMassTimeDerivative >()
Real computeQpJac(unsigned int pvar)
Derivative of residual with respect to PorousFlow variable number pvar This is used by both computeQp...
const MaterialProperty< std::vector< Real > > & _fluid_density
nodal fluid density
const MaterialProperty< std::vector< Real > > & _fluid_saturation_nodal
nodal fluid saturation
const MaterialProperty< std::vector< RealGradient > > & _dporosity_dgradvar
d(porosity)/d(grad porous-flow variable) - remember these derivatives will be wrt grad(vars) at qps ...
const bool _var_is_porflow_var
whether the Variable for this Kernel is a porous-flow variable according to the Dictator ...
PorousFlowMassTimeDerivative(const InputParameters &parameters)
const MaterialProperty< std::vector< Real > > & _fluid_saturation_nodal_old
old value of fluid saturation
const MaterialProperty< std::vector< std::vector< Real > > > & _mass_frac
nodal mass fraction
const PorousFlowDictator & _dictator
holds info on the PorousFlow variables
const MaterialProperty< std::vector< std::vector< Real > > > & _mass_frac_old
old value of nodal mass fraction
const MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_saturation_nodal_dvar
d(nodal fluid saturation)/d(porous-flow variable)
const MaterialProperty< std::vector< std::vector< std::vector< Real > > > > & _dmass_frac_dvar
d(nodal mass fraction)/d(porous-flow variable)
Kernel = (mass_component - mass_component_old)/dt where mass_component = porosity*sum_phases(density_...
const MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_density_dvar
d(nodal fluid density)/d(porous-flow variable)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
const unsigned int _num_phases
number of fluid phases
const unsigned int _fluid_component
the fluid component index
const MaterialProperty< std::vector< Real > > & _dporosity_dvar
d(porosity)/d(porous-flow variable) - these derivatives will be wrt variables at the nodes ...
const MaterialProperty< unsigned int > *const _nearest_qp
the nearest qp to the node