Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #include "PorousFlowAdvectiveFluxCalculatorSaturatedHeat.h" 11 : 12 : registerMooseObject("PorousFlowApp", PorousFlowAdvectiveFluxCalculatorSaturatedHeat); 13 : 14 : InputParameters 15 222 : PorousFlowAdvectiveFluxCalculatorSaturatedHeat::validParams() 16 : { 17 222 : InputParameters params = PorousFlowAdvectiveFluxCalculatorSaturated::validParams(); 18 222 : params.addClassDescription( 19 : "Computes the advective flux of heat energy in the given phase, assuming fully-saturated " 20 : "conditions. Hence this UserObject is only relevant to single-phase situations. " 21 : "Explicitly, the UserObject computes (density * enthalpy / viscosity) * (- permeability * " 22 : "(grad(P) - density * gravity)), using the Kuzmin-Turek FEM-TVD multidimensional " 23 : "stabilization scheme"); 24 222 : return params; 25 0 : } 26 : 27 135 : PorousFlowAdvectiveFluxCalculatorSaturatedHeat::PorousFlowAdvectiveFluxCalculatorSaturatedHeat( 28 135 : const InputParameters & parameters) 29 : : PorousFlowAdvectiveFluxCalculatorSaturated(parameters), 30 135 : _enthalpy(getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_enthalpy_nodal")), 31 270 : _denthalpy_dvar(getMaterialProperty<std::vector<std::vector<Real>>>( 32 135 : "dPorousFlow_fluid_phase_enthalpy_nodal_dvar")) 33 : { 34 135 : } 35 : 36 : Real 37 495416 : PorousFlowAdvectiveFluxCalculatorSaturatedHeat::computeU(unsigned i) const 38 : { 39 495416 : return _enthalpy[i][_phase] * PorousFlowAdvectiveFluxCalculatorSaturated::computeU(i); 40 : } 41 : 42 : Real 43 977952 : PorousFlowAdvectiveFluxCalculatorSaturatedHeat::computedU_dvar(unsigned i, unsigned pvar) const 44 : { 45 : Real du = 46 977952 : _denthalpy_dvar[i][_phase][pvar] * PorousFlowAdvectiveFluxCalculatorSaturated::computeU(i); 47 977952 : du += _enthalpy[i][_phase] * PorousFlowAdvectiveFluxCalculatorSaturated::computedU_dvar(i, pvar); 48 977952 : return du; 49 : }