www.mooseframework.org
PorousFlowMatrixInternalEnergy.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<PorousFlowMaterialVectorBase>();
15  params.addRequiredParam<Real>("specific_heat_capacity",
16  "Specific heat capacity of the rock grains (J/kg/K). Internal "
17  "energy = specific_heat_capacity * density * temperature, and this "
18  "is multiplied by (1 - porosity) to find the energy density of the "
19  "rock in a rock-fluid system.");
20  params.addRequiredParam<Real>("density", "Density of the rock grains");
21  params.set<bool>("at_nodes") = true;
22  params.addClassDescription("This Material calculates rock-fluid combined thermal conductivity by "
23  "using a weighted sum. Thermal conductivity = "
24  "dry_thermal_conductivity + S^exponent * (wet_thermal_conductivity - "
25  "dry_thermal_conductivity), where S is the aqueous saturation");
26  return params;
27 }
28 
30  : PorousFlowMaterialVectorBase(parameters),
31  _cp(getParam<Real>("specific_heat_capacity")),
32  _density(getParam<Real>("density")),
33  _heat_cap(_cp * _density),
34  _temperature_nodal(getMaterialProperty<Real>("PorousFlow_temperature_nodal")),
35  _dtemperature_nodal_dvar(
36  getMaterialProperty<std::vector<Real>>("dPorousFlow_temperature_nodal_dvar")),
37  _en_nodal(declareProperty<Real>("PorousFlow_matrix_internal_energy_nodal")),
38  _den_nodal_dvar(
39  declareProperty<std::vector<Real>>("dPorousFlow_matrix_internal_energy_nodal_dvar"))
40 {
41  if (_nodal_material != true)
42  mooseError("PorousFlowMatrixInternalEnergy classes are only defined for at_nodes = true");
43 }
44 
45 void
47 {
49 }
50 
51 void
53 {
55 
56  _den_nodal_dvar[_qp].assign(_num_var, 0.0);
57  for (unsigned v = 0; v < _num_var; ++v)
59 }
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.
InputParameters validParams< PorousFlowMatrixInternalEnergy >()
MaterialProperty< Real > & _en_nodal
Matrix internal_energy at the nodes.