LCOV - code coverage report
Current view: top level - src/materials - GasFreeEnergyBase.C (source / functions) Hit Total Coverage
Test: idaholab/moose phase_field: #31405 (292dce) with base fef103 Lines: 23 24 95.8 %
Date: 2025-09-04 07:55:36 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      12             : InputParameters
      13          94 : GasFreeEnergyBase::validParams()
      14             : {
      15          94 :   InputParameters params = DerivativeParsedMaterialHelper::validParams();
      16         188 :   params.addRequiredCoupledVar("T", "Temperature");
      17             :   // MooseEnum molecule("MONOATOMIC DIATOMIC", "MONOATOMIC");
      18             :   // params.addParam<MooseEnum>("molecule", molecule, "Gas molecule size");
      19         188 :   params.addRequiredCoupledVar("c", "Concentration variable");
      20         188 :   params.addRequiredParam<Real>(
      21             :       "omega", "Lattice site volume (default mass_unit_conversion requires this to be in [Ang^3])");
      22         188 :   params.addRequiredParam<Real>(
      23             :       "m", "Gas atom mass (the default mass_unit_conversion requires this to be in [u])");
      24         188 :   params.addParam<Real>("mass_unit_conversion",
      25         188 :                         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         188 :   params.addParam<Real>("h",
      29         188 :                         4.135667662e-15,
      30             :                         "Planck constant - units need to be consistent with "
      31             :                         "the units of omega (default in [eV*s])");
      32         188 :   params.addParam<Real>("kB", 8.6173303e-5, "Boltzmann constant (default in [eV/K])");
      33         188 :   params.addParamNamesToGroup("mass_unit_conversion h kB", "Units");
      34          94 :   return params;
      35           0 : }
      36             : 
      37          72 : GasFreeEnergyBase::GasFreeEnergyBase(const InputParameters & parameters)
      38             :   : DerivativeParsedMaterialHelper(parameters),
      39          72 :     _T("T"),
      40          72 :     _c("c"),
      41         144 :     _omega(getParam<Real>("omega")),
      42         216 :     _m(getParam<Real>("m") * getParam<Real>("mass_unit_conversion")),
      43         144 :     _h(getParam<Real>("h")),
      44         144 :     _kB(getParam<Real>("kB")),
      45          72 :     _n(_c / _omega),
      46         216 :     _nq(pow(2.0 * libMesh::pi * _m * _kB * _T / (_h * _h), 3.0 / 2.0))
      47             : {
      48          72 : }

Generated by: LCOV version 1.14