https://mooseframework.inl.gov
PFCElementEnergyIntegral.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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.addClassDescription("Computes the integral of the energy from the temperature. Note that "
22  "the kb factor is missing.");
23  params.addRequiredParam<VariableName>("variable",
24  "The name of the variable that this object operates on");
25  params.addParam<Real>("temp", 1833.0, "Temperature of simulation");
26  return params;
27 }
28 
30  : ElementIntegralPostprocessor(parameters),
32  false,
33  "variable",
36  _var(_subproblem.getStandardVariable(_tid, parameters.get<VariableName>("variable"))),
37  _u(_var.sln()),
38  _grad_u(_var.gradSln()),
39  _u_dot(_var.uDot()),
40  _temp(getParam<Real>("temp")) // K
41 {
42  // TODO: error on unused parameters
44 }
45 
46 Real
48 {
49  // const Real kb = 1.3806488e-23; // A^2 kg s^-2 K^-1
50  // const Real p0 = 0.0801; // A^-3
51 
52  return _u[_qp]; // * (kb * _temp);
53 }
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()
void addClassDescription(const std::string &doc_string)
VAR_FIELD_STANDARD
Compute a volume integral of the specified variable.
const Elem & get(const ElemType type_in)