www.mooseframework.org
PFCElementEnergyIntegral.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 // MOOSE includes
11 #include "MooseVariable.h"
12 
13 template <>
14 InputParameters
16 {
17  InputParameters params = validParams<ElementIntegralPostprocessor>();
18  params.addRequiredParam<VariableName>("variable",
19  "The name of the variable that this object operates on");
20  params.addParam<Real>("temp", 1833.0, "Temperature of simulation");
21  return params;
22 }
23 
24 PFCElementEnergyIntegral::PFCElementEnergyIntegral(const InputParameters & parameters)
25  : ElementIntegralPostprocessor(parameters),
26  MooseVariableInterface(this, false),
27  _var(_subproblem.getVariable(_tid, parameters.get<VariableName>("variable"))),
28  _u(_var.sln()),
29  _grad_u(_var.gradSln()),
30  _u_dot(_var.uDot()),
31  _temp(getParam<Real>("temp")) // K
32 {
33  addMooseVariableDependency(mooseVariable());
34 }
35 
36 Real
38 {
39  // const Real kb = 1.3806488e-23; // A^2 kg s^-2 K^-1
40  // const Real p0 = 0.0801; // A^-3
41 
42  return _u[_qp]; // * (kb * _temp);
43 }
InputParameters validParams< PFCElementEnergyIntegral >()
const VariableValue & _u
Holds the solution at current quadrature points.
PFCElementEnergyIntegral(const InputParameters &parameters)