LCOV - code coverage report
Current view: top level - include/kernels - PorousFlowMassVolumetricExpansion.h (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 1 1 100.0 %
Date: 2017-11-21 14:47:27 Functions: 2 2 100.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 POROUSFLOWMASSVOLUMETRICEXPANSION_H
       9             : #define POROUSFLOWMASSVOLUMETRICEXPANSION_H
      10             : 
      11             : #include "TimeDerivative.h"
      12             : #include "PorousFlowDictator.h"
      13             : #include "RankTwoTensor.h"
      14             : 
      15             : // Forward Declarations
      16             : class PorousFlowMassVolumetricExpansion;
      17             : 
      18             : template <>
      19             : InputParameters validParams<PorousFlowMassVolumetricExpansion>();
      20             : 
      21             : /**
      22             :  * Kernel = mass_component * d(volumetric_strain)/dt
      23             :  * where mass_component =
      24             :  * porosity*sum_phases(density_phase*saturation_phase*massfrac_phase^component)
      25             :  * which is lumped to the nodes
      26             :  */
      27          48 : class PorousFlowMassVolumetricExpansion : public TimeKernel
      28             : {
      29             : public:
      30             :   PorousFlowMassVolumetricExpansion(const InputParameters & parameters);
      31             : 
      32             : protected:
      33             :   virtual Real computeQpResidual() override;
      34             :   virtual Real computeQpJacobian() override;
      35             :   virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
      36             : 
      37             :   /// the fluid component index
      38             :   const unsigned int _fluid_component;
      39             : 
      40             :   /// holds info on the Porous Flow variables
      41             :   const PorousFlowDictator & _dictator;
      42             : 
      43             :   /// whether the Variable for this Kernel is a porous-flow variable according to the Dictator
      44             :   const bool _var_is_porflow_var;
      45             : 
      46             :   /// number of displacement variables
      47             :   unsigned int _ndisp;
      48             : 
      49             :   /// variable number of the displacements variables
      50             :   std::vector<unsigned int> _disp_var_num;
      51             : 
      52             :   /// whether the porosity uses the volumetric strain at the closest quadpoint
      53             :   const bool _strain_at_nearest_qp;
      54             : 
      55             :   /// porosity
      56             :   const MaterialProperty<Real> & _porosity;
      57             : 
      58             :   /// d(porosity)/d(porous-flow variable)
      59             :   const MaterialProperty<std::vector<Real>> & _dporosity_dvar;
      60             : 
      61             :   /// d(porosity)/d(grad porous-flow variable)
      62             :   const MaterialProperty<std::vector<RealGradient>> & _dporosity_dgradvar;
      63             : 
      64             :   /// the nearest qp to the node
      65             :   const MaterialProperty<unsigned int> * const _nearest_qp;
      66             : 
      67             :   /// fluid density
      68             :   const MaterialProperty<std::vector<Real>> & _fluid_density;
      69             : 
      70             :   /// d(fluid density)/d(porous-flow variable)
      71             :   const MaterialProperty<std::vector<std::vector<Real>>> & _dfluid_density_dvar;
      72             : 
      73             :   /// fluid saturation
      74             :   const MaterialProperty<std::vector<Real>> & _fluid_saturation;
      75             : 
      76             :   /// d(fluid saturation)/d(porous-flow variable)
      77             :   const MaterialProperty<std::vector<std::vector<Real>>> & _dfluid_saturation_dvar;
      78             : 
      79             :   /// mass fraction
      80             :   const MaterialProperty<std::vector<std::vector<Real>>> & _mass_frac;
      81             : 
      82             :   /// d(mass fraction)/d(porous-flow variable)
      83             :   const MaterialProperty<std::vector<std::vector<std::vector<Real>>>> & _dmass_frac_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 mass 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 mass part of the residual wrt this variable number
      96             :    */
      97             :   Real computedMassQpJac(unsigned int jvar) const;
      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) const;
     107             : };
     108             : 
     109             : #endif // POROUSFLOWMASSVOLUMETRICEXPANSION_H

Generated by: LCOV version 1.11