https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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),
31 MooseVariableInterface<Real>(this,
32 false,
33 "variable",
34 Moose::VarKindType::VAR_ANY,
35 Moose::VarFieldType::VAR_FIELD_STANDARD),
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
46Real
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}
registerMooseObject("PhaseFieldApp", PFCElementEnergyIntegral)
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addMooseVariableDependency(MooseVariableFieldBase *var)
MooseVariableField< T > & mooseVariableField()
Compute a volume integral of the specified variable.
PFCElementEnergyIntegral(const InputParameters &parameters)
static InputParameters validParams()
const VariableValue & _u
Holds the solution at current quadrature points.