www.mooseframework.org
phase_field
src
postprocessors
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
10
#include "
PFCElementEnergyIntegral.h
"
11
12
// MOOSE includes
13
#include "
MooseVariable.h
"
14
15
registerMooseObject
(
"PhaseFieldApp"
,
PFCElementEnergyIntegral
);
16
17
InputParameters
18
PFCElementEnergyIntegral::validParams
()
19
{
20
InputParameters
params =
ElementIntegralPostprocessor::validParams
();
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
27
PFCElementEnergyIntegral::PFCElementEnergyIntegral
(
const
InputParameters
& parameters)
28
:
ElementIntegralPostprocessor
(parameters),
29
MooseVariableInterface
<
Real
>(this,
30
false,
31
"variable"
,
32
Moose
::
VarKindType
::
VAR_ANY
,
33
Moose
::
VarFieldType
::
VAR_FIELD_STANDARD
),
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
{
40
addMooseVariableDependency
(&
mooseVariableField
());
41
}
42
43
Real
44
PFCElementEnergyIntegral::computeQpIntegral
()
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
VarFieldType
ElementIntegralPostprocessor
registerMooseObject
registerMooseObject("PhaseFieldApp", PFCElementEnergyIntegral)
InputParameters::addParam
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
ElementIntegralPostprocessor::_qp
unsigned int _qp
MooseVariable.h
InputParameters::addRequiredParam
void addRequiredParam(const std::string &name, const std::string &doc_string)
PFCElementEnergyIntegral.h
InputParameters
ElementIntegralPostprocessor::validParams
static InputParameters validParams()
PFCElementEnergyIntegral::_u
const VariableValue & _u
Holds the solution at current quadrature points.
Definition:
PFCElementEnergyIntegral.h:37
VarKindType
VarKindType
PFCElementEnergyIntegral::validParams
static InputParameters validParams()
Definition:
PFCElementEnergyIntegral.C:18
PFCElementEnergyIntegral::PFCElementEnergyIntegral
PFCElementEnergyIntegral(const InputParameters ¶meters)
Definition:
PFCElementEnergyIntegral.C:27
ElementIntegralPostprocessor::addMooseVariableDependency
void addMooseVariableDependency(MooseVariableFieldBase *var)
VAR_ANY
VAR_ANY
Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
PFCElementEnergyIntegral::computeQpIntegral
virtual Real computeQpIntegral()
Definition:
PFCElementEnergyIntegral.C:44
MooseVariableInterface
MooseVariableInterface< Real >::mooseVariableField
MooseVariableField< Real > & mooseVariableField()
VAR_FIELD_STANDARD
VAR_FIELD_STANDARD
Moose
PFCElementEnergyIntegral
Compute a volume integral of the specified variable.
Definition:
PFCElementEnergyIntegral.h:23
get
const Elem & get(const ElemType type_in)
Generated on Thu Apr 18 2024 15:39:09 for www.mooseframework.org by
1.8.14