https://mooseframework.inl.gov
GasFreeEnergyBase.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 
10 #include "GasFreeEnergyBase.h"
11 
14 {
16  params.addRequiredCoupledVar("T", "Temperature");
17  // MooseEnum molecule("MONOATOMIC DIATOMIC", "MONOATOMIC");
18  // params.addParam<MooseEnum>("molecule", molecule, "Gas molecule size");
19  params.addRequiredCoupledVar("c", "Concentration variable");
20  params.addRequiredParam<Real>(
21  "omega", "Lattice site volume (default mass_unit_conversion requires this to be in [Ang^3])");
22  params.addRequiredParam<Real>(
23  "m", "Gas atom mass (the default mass_unit_conversion requires this to be in [u])");
24  params.addParam<Real>("mass_unit_conversion",
25  1.0364271410595204e-28,
26  "Conversion factor to get the gas atom mass in [eV*s^2/Ang^2] (defaults "
27  "to [eV*s^2/(Ang^2*u)])");
28  params.addParam<Real>("h",
29  4.135667662e-15,
30  "Planck constant - units need to be consistent with "
31  "the units of omega (default in [eV*s])");
32  params.addParam<Real>("kB", 8.6173303e-5, "Boltzmann constant (default in [eV/K])");
33  params.addParamNamesToGroup("mass_unit_conversion h kB", "Units");
34  return params;
35 }
36 
38  : DerivativeParsedMaterialHelper(parameters),
39  _T("T"),
40  _c("c"),
41  _omega(getParam<Real>("omega")),
42  _m(getParam<Real>("m") * getParam<Real>("mass_unit_conversion")),
43  _h(getParam<Real>("h")),
44  _kB(getParam<Real>("kB")),
45  _n(_c / _omega),
46  _nq(pow(2.0 * libMesh::pi * _m * _kB * _T / (_h * _h), 3.0 / 2.0))
47 {
48 }
GasFreeEnergyBase(const InputParameters &parameters)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real pi
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)