www.mooseframework.org
GasFreeEnergyBase.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 #include "GasFreeEnergyBase.h"
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<DerivativeParsedMaterialHelper>();
14  params.addRequiredCoupledVar("T", "Temperature");
15  // MooseEnum molecule("MONOATOMIC DIATOMIC", "MONOATOMIC");
16  // params.addParam<MooseEnum>("molecule", molecule, "Gas molecule size");
17  params.addRequiredCoupledVar("c", "Concentration variable");
18  params.addRequiredParam<Real>(
19  "omega", "Lattice site volume (default mass_unit_conversion requires this to be in [Ang^3])");
20  params.addRequiredParam<Real>(
21  "m", "Gas atom mass (the default mass_unit_conversion requires this to be in [u])");
22  params.addParam<Real>("mass_unit_conversion",
23  1.0364271410595204e-28,
24  "Conversion factor to get the gas atom mass in [eV*s^2/Ang^2] (defaults "
25  "to [eV*s^2/(Ang^2*u)])");
26  params.addParam<Real>("h",
27  4.135667662e-15,
28  "Planck constant - units need to be consistent with "
29  "the units of omega (default in [eV*s])");
30  params.addParam<Real>("kB", 8.6173303e-5, "Boltzmann constant (default in [eV/K])");
31  params.addParamNamesToGroup("mass_unit_conversion h kB", "Units");
32  return params;
33 }
34 
35 GasFreeEnergyBase::GasFreeEnergyBase(const InputParameters & parameters)
36  : DerivativeParsedMaterialHelper(parameters),
37  _T("T"),
38  _c("c"),
39  _omega(getParam<Real>("omega")),
40  _m(getParam<Real>("m") * getParam<Real>("mass_unit_conversion")),
41  _h(getParam<Real>("h")),
42  _kB(getParam<Real>("kB")),
43  _n(_c / _omega),
44  _nq(pow(2.0 * libMesh::pi * _m * _kB * _T / (_h * _h), 3.0 / 2.0))
45 {
46 }
GasFreeEnergyBase(const InputParameters &parameters)
Helper class to perform the auto derivative taking.
InputParameters validParams< GasFreeEnergyBase >()
InputParameters validParams< DerivativeParsedMaterialHelper >()
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)