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 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<GasFreeEnergyBase>();
19  params.addClassDescription("Free energy of an ideal gas.");
20  return params;
21 }
22 
23 IdealGasFreeEnergy::IdealGasFreeEnergy(const InputParameters & parameters)
24  : GasFreeEnergyBase(parameters)
25 {
26  // Definition of the free energy for the expression builder
27  EBFunction free_energy;
28  free_energy(_c, _T) = -_n * _kB * _T * (log(_nq / _n) + 1.0);
29 
30  // Parse function for automatic differentiation
31  functionParse(free_energy);
32 }
ExpressionBuilder::EBFunction
User facing host object for a function. This combines a term with an argument list.
Definition: ExpressionBuilder.h:520
GasFreeEnergyBase::_kB
const Real _kB
Definition: GasFreeEnergyBase.h:45
IdealGasFreeEnergy.h
GasFreeEnergyBase::_n
const EBTerm _n
gas number density n = N/V = c/Omega (where Omega is the lattice site volume)
Definition: GasFreeEnergyBase.h:49
IdealGasFreeEnergy::IdealGasFreeEnergy
IdealGasFreeEnergy(const InputParameters &parameters)
Definition: IdealGasFreeEnergy.C:23
GasFreeEnergyBase::_nq
const EBTerm _nq
quantum concentration
Definition: GasFreeEnergyBase.h:52
IdealGasFreeEnergy
Material class that provides the free energy of an ideal gas with the expression builder and uses aut...
Definition: IdealGasFreeEnergy.h:24
validParams< GasFreeEnergyBase >
InputParameters validParams< GasFreeEnergyBase >()
Definition: GasFreeEnergyBase.C:14
GasFreeEnergyBase::_T
const EBTerm _T
Coupled variable value for the Temperature.
Definition: GasFreeEnergyBase.h:32
GasFreeEnergyBase::_c
const EBTerm _c
Coupled variable value for the concentration .
Definition: GasFreeEnergyBase.h:35
validParams< IdealGasFreeEnergy >
InputParameters validParams< IdealGasFreeEnergy >()
Definition: IdealGasFreeEnergy.C:16
registerMooseObject
registerMooseObject("PhaseFieldApp", IdealGasFreeEnergy)
GasFreeEnergyBase
Material class that provides the free energy of an ideal gas with the expression builder and uses aut...
Definition: GasFreeEnergyBase.h:25