LCOV - code coverage report
Current view: top level - include/kernels - PorousFlowMassRadioactiveDecay.h (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 1 1 100.0 %
Date: 2017-11-21 14:47:27 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 POROUSFLOWMASSRADIOACTIVEDECAY_H
       9             : #define POROUSFLOWMASSRADIOACTIVEDECAY_H
      10             : 
      11             : #include "TimeDerivative.h"
      12             : #include "PorousFlowDictator.h"
      13             : 
      14             : // Forward Declarations
      15             : class PorousFlowMassRadioactiveDecay;
      16             : 
      17             : template <>
      18             : InputParameters validParams<PorousFlowMassRadioactiveDecay>();
      19             : 
      20             : /**
      21             :  * Kernel = _decay_rate * masscomponent
      22             :  * where mass_component =
      23             :  * porosity*sum_phases(density_phase*saturation_phase*massfrac_phase^component)
      24             :  * It is lumped to the nodes
      25             :  */
      26           2 : class PorousFlowMassRadioactiveDecay : public TimeKernel
      27             : {
      28             : public:
      29             :   PorousFlowMassRadioactiveDecay(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             : 
      36             :   /// The decay rate
      37             :   const Real _decay_rate;
      38             : 
      39             :   /// the fluid component index
      40             :   const unsigned int _fluid_component;
      41             : 
      42             :   /// holds info on the PorousFlow variables
      43             :   const PorousFlowDictator & _dictator;
      44             : 
      45             :   /// whether the Variable for this Kernel is a porous-flow variable according to the Dictator
      46             :   const bool _var_is_porflow_var;
      47             : 
      48             :   /// number of fluid phases
      49             :   const unsigned int _num_phases;
      50             : 
      51             :   /// whether the porosity uses the volumetric strain at the closest quadpoint
      52             :   const bool _strain_at_nearest_qp;
      53             : 
      54             :   /// porosity at the nodes, but it can depend on grad(variables) which are actually evaluated at the qps
      55             :   const MaterialProperty<Real> & _porosity;
      56             : 
      57             :   /// d(porosity)/d(porous-flow variable) - these derivatives will be wrt variables at the nodes
      58             :   const MaterialProperty<std::vector<Real>> & _dporosity_dvar;
      59             : 
      60             :   /// d(porosity)/d(grad porous-flow variable) - remember these derivatives will be wrt grad(vars) at qps
      61             :   const MaterialProperty<std::vector<RealGradient>> & _dporosity_dgradvar;
      62             : 
      63             :   /// the nearest qp to the node
      64             :   const MaterialProperty<unsigned int> * const _nearest_qp;
      65             : 
      66             :   /// nodal fluid density
      67             :   const MaterialProperty<std::vector<Real>> & _fluid_density;
      68             : 
      69             :   /// d(nodal fluid density)/d(porous-flow variable)
      70             :   const MaterialProperty<std::vector<std::vector<Real>>> & _dfluid_density_dvar;
      71             : 
      72             :   /// nodal fluid saturation
      73             :   const MaterialProperty<std::vector<Real>> & _fluid_saturation_nodal;
      74             : 
      75             :   /// d(nodal fluid saturation)/d(porous-flow variable)
      76             :   const MaterialProperty<std::vector<std::vector<Real>>> & _dfluid_saturation_nodal_dvar;
      77             : 
      78             :   /// nodal mass fraction
      79             :   const MaterialProperty<std::vector<std::vector<Real>>> & _mass_frac;
      80             : 
      81             :   /// d(nodal mass fraction)/d(porous-flow variable)
      82             :   const MaterialProperty<std::vector<std::vector<std::vector<Real>>>> & _dmass_frac_dvar;
      83             : 
      84             :   /**
      85             :    * Derivative of residual with respect to PorousFlow variable number pvar
      86             :    * This is used by both computeQpJacobian and computeQpOffDiagJacobian
      87             :    * @param pvar take the derivative of the residual wrt this PorousFlow variable
      88             :    */
      89             :   Real computeQpJac(unsigned int pvar);
      90             : };
      91             : 
      92             : #endif // POROUSFLOWMASSRADIOACTIVEDECAY_H

Generated by: LCOV version 1.11