www.mooseframework.org
PorousFlowFluidPropertiesBase.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<PorousFlowMaterialBase>();
15  MooseEnum unit_choice("Kelvin=0 Celsius=1", "Kelvin");
16  params.addParam<MooseEnum>(
17  "temperature_unit", unit_choice, "The unit of the temperature variable");
18  params.addClassDescription("Base class for PorousFlow fluid materials");
19  return params;
20 }
21 
23  : PorousFlowMaterialBase(parameters),
24  _porepressure(_nodal_material
25  ? getMaterialProperty<std::vector<Real>>("PorousFlow_porepressure_nodal")
26  : getMaterialProperty<std::vector<Real>>("PorousFlow_porepressure_qp")),
27  _temperature(_nodal_material ? getMaterialProperty<Real>("PorousFlow_temperature_nodal")
28  : getMaterialProperty<Real>("PorousFlow_temperature_qp")),
29  _pressure_variable_name(_dictator.pressureVariableNameDummy()),
30  _temperature_variable_name(_dictator.temperatureVariableNameDummy()),
31  _t_c2k(getParam<MooseEnum>("temperature_unit") == 0 ? 0.0 : 273.15),
32  _R(8.3144598)
33 {
34 }
35 
36 void
38 {
39  mooseError("computeQpProperties() must be overriden in materials derived from "
40  "PorousFlowFluidPropertiesBase");
41 }
InputParameters validParams< PorousFlowFluidPropertiesBase >()
Base class for all PorousFlow materials that provide phase-dependent properties.
InputParameters validParams< PorousFlowMaterialBase >()
PorousFlowFluidPropertiesBase(const InputParameters &parameters)