LCOV - code coverage report
Current view: top level - src/kernels - PorousFlowHeatAdvection.C (source / functions) Hit Total Coverage
Test: porous_flow Test Coverage Lines: 24 24 100.0 %
Date: 2017-11-18 13:30:36 Functions: 6 6 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             : #include "PorousFlowHeatAdvection.h"
       9             : 
      10             : template <>
      11             : InputParameters
      12           7 : validParams<PorousFlowHeatAdvection>()
      13             : {
      14           7 :   InputParameters params = validParams<PorousFlowDarcyBase>();
      15          14 :   params.addClassDescription("Fully-upwinded heat flux, advected by the fluid");
      16           7 :   return params;
      17             : }
      18             : 
      19           7 : PorousFlowHeatAdvection::PorousFlowHeatAdvection(const InputParameters & parameters)
      20             :   : PorousFlowDarcyBase(parameters),
      21          14 :     _enthalpy(getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_enthalpy_nodal")),
      22             :     _denthalpy_dvar(getMaterialProperty<std::vector<std::vector<Real>>>(
      23          14 :         "dPorousFlow_fluid_phase_enthalpy_nodal_dvar")),
      24             :     _relative_permeability(
      25          14 :         getMaterialProperty<std::vector<Real>>("PorousFlow_relative_permeability_nodal")),
      26             :     _drelative_permeability_dvar(getMaterialProperty<std::vector<std::vector<Real>>>(
      27          42 :         "dPorousFlow_relative_permeability_nodal_dvar"))
      28             : {
      29           7 : }
      30             : 
      31             : Real
      32       24051 : PorousFlowHeatAdvection::mobility(unsigned nodenum, unsigned phase) const
      33             : {
      34       96204 :   return _enthalpy[nodenum][phase] * _fluid_density_node[nodenum][phase] *
      35       72153 :          _relative_permeability[nodenum][phase] / _fluid_viscosity[nodenum][phase];
      36             : }
      37             : 
      38             : Real
      39       11195 : PorousFlowHeatAdvection::dmobility(unsigned nodenum, unsigned phase, unsigned pvar) const
      40             : {
      41       44780 :   Real dm = _denthalpy_dvar[nodenum][phase][pvar] * _fluid_density_node[nodenum][phase] *
      42       33585 :             _relative_permeability[nodenum][phase] / _fluid_viscosity[nodenum][phase];
      43       44780 :   dm += _enthalpy[nodenum][phase] * _dfluid_density_node_dvar[nodenum][phase][pvar] *
      44       11195 :         _relative_permeability[nodenum][phase] / _fluid_viscosity[nodenum][phase];
      45       33585 :   dm += _enthalpy[nodenum][phase] * _fluid_density_node[nodenum][phase] *
      46       22390 :         _drelative_permeability_dvar[nodenum][phase][pvar] / _fluid_viscosity[nodenum][phase];
      47       22390 :   dm -= _enthalpy[nodenum][phase] * _fluid_density_node[nodenum][phase] *
      48       33585 :         _relative_permeability[nodenum][phase] * _dfluid_viscosity_dvar[nodenum][phase][pvar] /
      49             :         std::pow(_fluid_viscosity[nodenum][phase], 2);
      50       11195 :   return dm;
      51        2499 : }

Generated by: LCOV version 1.11