www.mooseframework.org
PorousFlowMatrixInternalEnergy.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
11 
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<PorousFlowMaterialVectorBase>();
19  params.addRequiredParam<Real>("specific_heat_capacity",
20  "Specific heat capacity of the rock grains (J/kg/K).");
21  params.addRequiredParam<Real>("density", "Density of the rock grains");
22  params.set<bool>("at_nodes") = true;
23  params.addPrivateParam<std::string>("pf_material_type", "matrix_internal_energy");
24  params.addClassDescription("This Material calculates the internal energy of solid rock grains, "
25  "which is specific_heat_capacity * density * temperature. Kernels "
26  "multiply this by (1 - porosity) to find the energy density of the "
27  "porous rock in a rock-fluid system");
28  return params;
29 }
30 
32  : PorousFlowMaterialVectorBase(parameters),
33  _cp(getParam<Real>("specific_heat_capacity")),
34  _density(getParam<Real>("density")),
35  _heat_cap(_cp * _density),
36  _temperature_nodal(getMaterialProperty<Real>("PorousFlow_temperature_nodal")),
37  _dtemperature_nodal_dvar(
38  getMaterialProperty<std::vector<Real>>("dPorousFlow_temperature_nodal_dvar")),
39  _en_nodal(declareProperty<Real>("PorousFlow_matrix_internal_energy_nodal")),
40  _den_nodal_dvar(
41  declareProperty<std::vector<Real>>("dPorousFlow_matrix_internal_energy_nodal_dvar"))
42 {
43  if (_nodal_material != true)
44  mooseError("PorousFlowMatrixInternalEnergy classes are only defined for at_nodes = true");
45 }
46 
47 void
49 {
51 }
52 
53 void
55 {
57 
58  _den_nodal_dvar[_qp].assign(_num_var, 0.0);
59  for (unsigned v = 0; v < _num_var; ++v)
61 }
This material computes internal energy (J/m^3) for a rock matrix assuming constant grain density...
const Real _heat_cap
Heat capacity = _cp * _density.
PorousFlowMatrixInternalEnergy(const InputParameters &parameters)
InputParameters validParams< PorousFlowMaterialVectorBase >()
const MaterialProperty< std::vector< Real > > & _dtemperature_nodal_dvar
d(temperature at the nodes)/d(PorousFlow variable)
Base class for all PorousFlow vector materials.
MaterialProperty< std::vector< Real > > & _den_nodal_dvar
d(matrix internal energy)/d(PorousFlow variable)
const MaterialProperty< Real > & _temperature_nodal
Temperature at the nodes.
const unsigned int _num_var
Number of PorousFlow variables.
registerMooseObject("PorousFlowApp", PorousFlowMatrixInternalEnergy)
InputParameters validParams< PorousFlowMatrixInternalEnergy >()
MaterialProperty< Real > & _en_nodal
Matrix internal_energy at the nodes.