www.mooseframework.org
PFCElementEnergyIntegral.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 
12 // MOOSE includes
13 #include "MooseVariable.h"
14 
16 
19 {
21  params.addRequiredParam<VariableName>("variable",
22  "The name of the variable that this object operates on");
23  params.addParam<Real>("temp", 1833.0, "Temperature of simulation");
24  return params;
25 }
26 
28  : ElementIntegralPostprocessor(parameters),
30  false,
31  "variable",
34  _var(_subproblem.getStandardVariable(_tid, parameters.get<VariableName>("variable"))),
35  _u(_var.sln()),
36  _grad_u(_var.gradSln()),
37  _u_dot(_var.uDot()),
38  _temp(getParam<Real>("temp")) // K
39 {
41 }
42 
43 Real
45 {
46  // const Real kb = 1.3806488e-23; // A^2 kg s^-2 K^-1
47  // const Real p0 = 0.0801; // A^-3
48 
49  return _u[_qp]; // * (kb * _temp);
50 }
VarFieldType
registerMooseObject("PhaseFieldApp", PFCElementEnergyIntegral)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
const VariableValue & _u
Holds the solution at current quadrature points.
VarKindType
static InputParameters validParams()
PFCElementEnergyIntegral(const InputParameters &parameters)
void addMooseVariableDependency(MooseVariableFieldBase *var)
VAR_ANY
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
MooseVariableField< Real > & mooseVariableField()
VAR_FIELD_STANDARD
Compute a volume integral of the specified variable.
const Elem & get(const ElemType type_in)