https://mooseframework.inl.gov
Loading...
Searching...
No Matches
IdealGasFreeEnergy.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 "IdealGasFreeEnergy.h"
11
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)
User facing host object for a function. This combines a term with an argument list.
Material class that provides the free energy of an ideal gas with the expression builder and uses aut...
const EBTerm _n
gas number density n = N/V = c/Omega (where Omega is the lattice site volume)
const EBTerm _T
Coupled variable value for the Temperature.
const EBTerm _c
Coupled variable value for the concentration .
const EBTerm _nq
quantum concentration
static InputParameters validParams()
Material class that provides the free energy of an ideal gas with the expression builder and uses aut...
IdealGasFreeEnergy(const InputParameters &parameters)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
void functionParse(const std::string &function_expression)