www.mooseframework.org
Public Types | Public Member Functions | Protected Attributes | List of all members
RegularSolutionFreeEnergy Class Reference

Material class that creates regular solution free energy with the expression builder and uses automatic differentiation to get the derivatives \( F = \frac14 \omega c(1 - c) + k_bT (c\log c + (1 - c)\log(1 - c))\). More...

#include <RegularSolutionFreeEnergy.h>

Inheritance diagram for RegularSolutionFreeEnergy:
[legend]

Public Types

typedef std::vector< EBTermEBTermList
 
typedef std::vector< EBTermNode * > EBTermNodeList
 
typedef std::vector< const EBSubstitutionRule * > EBSubstitutionRuleList
 

Public Member Functions

 RegularSolutionFreeEnergy (const InputParameters &parameters)
 
 BINARYFUNC_OP_IMPLEMENT (+, ADD) BINARYFUNC_OP_IMPLEMENT(-
 
SUB BINARYFUNC_OP_IMPLEMENT MUL BINARYFUNC_OP_IMPLEMENT (/, DIV) BINARYFUNC_OP_IMPLEMENT(%
 
SUB BINARYFUNC_OP_IMPLEMENT MUL MOD BINARYFUNC_OP_IMPLEMENT (<, LESS) BINARYFUNC_OP_IMPLEMENT(>
 
SUB BINARYFUNC_OP_IMPLEMENT MUL MOD GREATER BINARYFUNC_OP_IMPLEMENT (<=, LESSEQ) BINARYFUNC_OP_IMPLEMENT(>
 
SUB BINARYFUNC_OP_IMPLEMENT MUL MOD GREATER GREATEREQ BINARYFUNC_OP_IMPLEMENT (==, EQ) BINARYFUNC_OP_IMPLEMENT(!
 

Protected Attributes

EBTerm _c
 Coupled variable value for the concentration \( c \). More...
 
EBTerm _T
 Coupled temperature variable \( T \). More...
 
const Real _omega
 Prefactor. More...
 
const Real _kB
 Boltzmann constant. More...
 

Detailed Description

Material class that creates regular solution free energy with the expression builder and uses automatic differentiation to get the derivatives \( F = \frac14 \omega c(1 - c) + k_bT (c\log c + (1 - c)\log(1 - c))\).

Definition at line 27 of file RegularSolutionFreeEnergy.h.

Member Typedef Documentation

◆ EBSubstitutionRuleList

typedef std::vector<const EBSubstitutionRule *> ExpressionBuilder::EBSubstitutionRuleList
inherited

Definition at line 60 of file ExpressionBuilder.h.

◆ EBTermList

typedef std::vector<EBTerm> ExpressionBuilder::EBTermList
inherited

Definition at line 57 of file ExpressionBuilder.h.

◆ EBTermNodeList

typedef std::vector<EBTermNode *> ExpressionBuilder::EBTermNodeList
inherited

Definition at line 59 of file ExpressionBuilder.h.

Constructor & Destructor Documentation

◆ RegularSolutionFreeEnergy()

RegularSolutionFreeEnergy::RegularSolutionFreeEnergy ( const InputParameters &  parameters)

Definition at line 29 of file RegularSolutionFreeEnergy.C.

30  : DerivativeParsedMaterialHelper(parameters),
31  _c("c"),
32  _T("T"),
33  _omega(getParam<Real>("omega")),
34  _kB(getParam<Real>("kB"))
35 {
36  EBFunction free_energy;
37  // Definition of the free energy for the expression builder
38  free_energy(_c) =
39  _omega * _c * (1.0 - _c) + _kB * _T * (_c * log(_c) + (1.0 - _c) * log(1.0 - _c));
40 
41  // Use Taylor expanded logarithm?
42  if (isParamValid("log_tol"))
43  free_energy.substitute(EBLogPlogSubstitution(getParam<Real>("log_tol")));
44 
45  // Parse function for automatic differentiation
46  functionParse(free_energy);
47 }
EBTerm _c
Coupled variable value for the concentration .
EBTerm _T
Coupled temperature variable .
unsigned int substitute(const EBSubstitutionRule &rule)
const Real _kB
Boltzmann constant.

Member Function Documentation

◆ BINARYFUNC_OP_IMPLEMENT() [1/5]

ExpressionBuilder::BINARYFUNC_OP_IMPLEMENT ( ,
ADD   
)
inherited

◆ BINARYFUNC_OP_IMPLEMENT() [2/5]

SUB BINARYFUNC_OP_IMPLEMENT MUL ExpressionBuilder::BINARYFUNC_OP_IMPLEMENT ( ,
DIV   
)
inherited

◆ BINARYFUNC_OP_IMPLEMENT() [3/5]

SUB BINARYFUNC_OP_IMPLEMENT MUL MOD ExpressionBuilder::BINARYFUNC_OP_IMPLEMENT ( )
inherited

◆ BINARYFUNC_OP_IMPLEMENT() [4/5]

SUB BINARYFUNC_OP_IMPLEMENT MUL MOD GREATER ExpressionBuilder::BINARYFUNC_OP_IMPLEMENT ( <=  ,
LESSEQ   
)
inherited

◆ BINARYFUNC_OP_IMPLEMENT() [5/5]

SUB BINARYFUNC_OP_IMPLEMENT MUL MOD GREATER GREATEREQ ExpressionBuilder::BINARYFUNC_OP_IMPLEMENT ( EQ  )
inherited

Member Data Documentation

◆ _c

EBTerm RegularSolutionFreeEnergy::_c
protected

Coupled variable value for the concentration \( c \).

Definition at line 34 of file RegularSolutionFreeEnergy.h.

Referenced by RegularSolutionFreeEnergy().

◆ _kB

const Real RegularSolutionFreeEnergy::_kB
protected

Boltzmann constant.

Definition at line 43 of file RegularSolutionFreeEnergy.h.

Referenced by RegularSolutionFreeEnergy().

◆ _omega

const Real RegularSolutionFreeEnergy::_omega
protected

Prefactor.

Definition at line 40 of file RegularSolutionFreeEnergy.h.

Referenced by RegularSolutionFreeEnergy().

◆ _T

EBTerm RegularSolutionFreeEnergy::_T
protected

Coupled temperature variable \( T \).

Definition at line 37 of file RegularSolutionFreeEnergy.h.

Referenced by RegularSolutionFreeEnergy().


The documentation for this class was generated from the following files: