www.mooseframework.org
IdealGasFreeEnergy.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 "IdealGasFreeEnergy.h"
11 
12 registerMooseObject("PhaseFieldApp", IdealGasFreeEnergy);
13 
16 {
18  params.addClassDescription("Free energy of an ideal gas.");
19  return params;
20 }
21 
23  : GasFreeEnergyBase(parameters)
24 {
25  // Definition of the free energy for the expression builder
26  EBFunction free_energy;
27  free_energy(_c, _T) = -_n * _kB * _T * (log(_nq / _n) + 1.0);
28 
29  // Parse function for automatic differentiation
30  functionParse(free_energy);
31 }
registerMooseObject("PhaseFieldApp", IdealGasFreeEnergy)
const EBTerm _n
gas number density n = N/V = c/Omega (where Omega is the lattice site volume)
static InputParameters validParams()
static InputParameters validParams()
const EBTerm _nq
quantum concentration
auto log(const T &)
User facing host object for a function. This combines a term with an argument list.
void addClassDescription(const std::string &doc_string)
const EBTerm _T
Coupled variable value for the Temperature.
Material class that provides the free energy of an ideal gas with the expression builder and uses aut...
Material class that provides the free energy of an ideal gas with the expression builder and uses aut...
IdealGasFreeEnergy(const InputParameters &parameters)
const EBTerm _c
Coupled variable value for the concentration .
void functionParse(const std::string &function_expression)