www.mooseframework.org
PorousFlowHeatAdvection.C
Go to the documentation of this file.
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 
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<PorousFlowDarcyBase>();
15  params.addClassDescription("Fully-upwinded heat flux, advected by the fluid");
16  return params;
17 }
18 
19 PorousFlowHeatAdvection::PorousFlowHeatAdvection(const InputParameters & parameters)
20  : PorousFlowDarcyBase(parameters),
21  _enthalpy(getMaterialProperty<std::vector<Real>>("PorousFlow_fluid_phase_enthalpy_nodal")),
22  _denthalpy_dvar(getMaterialProperty<std::vector<std::vector<Real>>>(
23  "dPorousFlow_fluid_phase_enthalpy_nodal_dvar")),
24  _relative_permeability(
25  getMaterialProperty<std::vector<Real>>("PorousFlow_relative_permeability_nodal")),
26  _drelative_permeability_dvar(getMaterialProperty<std::vector<std::vector<Real>>>(
27  "dPorousFlow_relative_permeability_nodal_dvar"))
28 {
29 }
30 
31 Real
32 PorousFlowHeatAdvection::mobility(unsigned nodenum, unsigned phase) const
33 {
34  return _enthalpy[nodenum][phase] * _fluid_density_node[nodenum][phase] *
35  _relative_permeability[nodenum][phase] / _fluid_viscosity[nodenum][phase];
36 }
37 
38 Real
39 PorousFlowHeatAdvection::dmobility(unsigned nodenum, unsigned phase, unsigned pvar) const
40 {
41  Real dm = _denthalpy_dvar[nodenum][phase][pvar] * _fluid_density_node[nodenum][phase] *
42  _relative_permeability[nodenum][phase] / _fluid_viscosity[nodenum][phase];
43  dm += _enthalpy[nodenum][phase] * _dfluid_density_node_dvar[nodenum][phase][pvar] *
44  _relative_permeability[nodenum][phase] / _fluid_viscosity[nodenum][phase];
45  dm += _enthalpy[nodenum][phase] * _fluid_density_node[nodenum][phase] *
46  _drelative_permeability_dvar[nodenum][phase][pvar] / _fluid_viscosity[nodenum][phase];
47  dm -= _enthalpy[nodenum][phase] * _fluid_density_node[nodenum][phase] *
48  _relative_permeability[nodenum][phase] * _dfluid_viscosity_dvar[nodenum][phase][pvar] /
49  std::pow(_fluid_viscosity[nodenum][phase], 2);
50  return dm;
51 }
const MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_density_node_dvar
Derivative of the fluid density for each phase wrt PorousFlow variables (at the node) ...
const MaterialProperty< std::vector< Real > > & _fluid_viscosity
Viscosity of each component in each phase.
Darcy advective flux.
virtual Real dmobility(unsigned nodenum, unsigned phase, unsigned pvar) const override
The derivative of mobility with respect to PorousFlow variable pvar.
const MaterialProperty< std::vector< Real > > & _enthalpy
Enthalpy of each phase.
const MaterialProperty< std::vector< std::vector< Real > > > & _drelative_permeability_dvar
Derivative of relative permeability of each phase wrt PorousFlow variables.
InputParameters validParams< PorousFlowHeatAdvection >()
const MaterialProperty< std::vector< std::vector< Real > > > & _dfluid_viscosity_dvar
Derivative of the fluid viscosity for each phase wrt PorousFlow variables.
InputParameters validParams< PorousFlowDarcyBase >()
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const MaterialProperty< std::vector< Real > > & _relative_permeability
Relative permeability of each phase.
PorousFlowHeatAdvection(const InputParameters &parameters)
virtual Real mobility(unsigned nodenum, unsigned phase) const override
The mobility of the fluid.
const MaterialProperty< std::vector< Real > > & _fluid_density_node
Fluid density for each phase (at the node)
const MaterialProperty< std::vector< std::vector< Real > > > & _denthalpy_dvar
Derivative of the enthalpy wrt PorousFlow variables.