LCOV - code coverage report
Current view: top level - include/kernels - PorousFlowHeatVolumetricExpansion.h (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 1 1 100.0 %
Date: 2017-11-17 17:48:31 Functions: 1 2 50.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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 POROUSFLOWHEATVOLUMETRICEXPANSION_H
       9             : #define POROUSFLOWHEATVOLUMETRICEXPANSION_H
      10             : 
      11             : #include "TimeDerivative.h"
      12             : #include "PorousFlowDictator.h"
      13             : 
      14             : // Forward Declarations
      15             : class PorousFlowHeatVolumetricExpansion;
      16             : 
      17             : template <>
      18             : InputParameters validParams<PorousFlowHeatVolumetricExpansion>();
      19             : 
      20             : /**
      21             :  * Kernel = energy_density * d(volumetric_strain)/dt
      22             :  * which is lumped to the nodes
      23             :  */
      24          10 : class PorousFlowHeatVolumetricExpansion : public TimeKernel
      25             : {
      26             : public:
      27             :   PorousFlowHeatVolumetricExpansion(const InputParameters & parameters);
      28             : 
      29             : protected:
      30             :   virtual Real computeQpResidual() override;
      31             :   virtual Real computeQpJacobian() override;
      32             :   virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
      33             : 
      34             :   /// holds info on the Porous Flow variables
      35             :   const PorousFlowDictator & _dictator;
      36             : 
      37             :   /// whether the Variable for this Kernel is a porous-flow variable according to the Dictator
      38             :   const bool _var_is_porflow_var;
      39             : 
      40             :   /// number of fluid phases
      41             :   const unsigned int _num_phases;
      42             : 
      43             :   /// whether fluid is present
      44             :   const bool _fluid_present;
      45             : 
      46             :   /// whether the porosity uses the volumetric strain at the closest quadpoint
      47             :   const bool _strain_at_nearest_qp;
      48             : 
      49             :   /// porosity
      50             :   const MaterialProperty<Real> & _porosity;
      51             : 
      52             :   /// d(porosity)/d(porous-flow variable)
      53             :   const MaterialProperty<std::vector<Real>> & _dporosity_dvar;
      54             : 
      55             :   /// d(porosity)/d(grad porous-flow variable)
      56             :   const MaterialProperty<std::vector<RealGradient>> & _dporosity_dgradvar;
      57             : 
      58             :   /// the nearest qp to the node
      59             :   const MaterialProperty<unsigned int> * const _nearest_qp;
      60             : 
      61             :   /// nodal rock energy density
      62             :   const MaterialProperty<Real> & _rock_energy_nodal;
      63             : 
      64             :   /// d(nodal rock energy density)/d(PorousFlow variable)
      65             :   const MaterialProperty<std::vector<Real>> & _drock_energy_nodal_dvar;
      66             : 
      67             :   /// nodal fluid density
      68             :   const MaterialProperty<std::vector<Real>> * const _fluid_density;
      69             : 
      70             :   /// d(nodal fluid density)/d(porous-flow variable)
      71             :   const MaterialProperty<std::vector<std::vector<Real>>> * const _dfluid_density_dvar;
      72             : 
      73             :   /// nodal fluid saturation
      74             :   const MaterialProperty<std::vector<Real>> * const _fluid_saturation_nodal;
      75             : 
      76             :   /// d(nodal fluid saturation)/d(porous-flow variable)
      77             :   const MaterialProperty<std::vector<std::vector<Real>>> * const _dfluid_saturation_nodal_dvar;
      78             : 
      79             :   /// internal energy of the phases, evaluated at the nodes
      80             :   const MaterialProperty<std::vector<Real>> * const _energy_nodal;
      81             : 
      82             :   /// d(internal energy)/d(PorousFlow variable)
      83             :   const MaterialProperty<std::vector<std::vector<Real>>> * const _denergy_nodal_dvar;
      84             : 
      85             :   /// strain rate
      86             :   const MaterialProperty<Real> & _strain_rate_qp;
      87             : 
      88             :   /// d(strain rate)/d(porous-flow variable)
      89             :   const MaterialProperty<std::vector<RealGradient>> & _dstrain_rate_qp_dvar;
      90             : 
      91             :   /**
      92             :    * Derivative of energy part of the residual with respect to the Variable
      93             :    * with variable number jvar.
      94             :    * This is used by both computeQpJacobian and computeQpOffDiagJacobian
      95             :    * @param jvar take the derivative of the energy part of the residual wrt this variable number
      96             :    */
      97             :   Real computedEnergyQpJac(unsigned int jvar);
      98             : 
      99             :   /**
     100             :    * Derivative of volumetric-strain part of the residual with respect to the Variable
     101             :    * with variable number jvar.
     102             :    * This is used by both computeQpJacobian and computeQpOffDiagJacobian
     103             :    * @param jvar take the derivative of the volumetric-strain part of the residual wrt this variable
     104             :    * number
     105             :    */
     106             :   Real computedVolQpJac(unsigned int jvar);
     107             : };
     108             : 
     109             : #endif // POROUSFLOWHEATVOLUMETRICEXPANSION_H

Generated by: LCOV version 1.11