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

Derivative free energy material defining polynomial free energies for single component materials, with derivatives from ExpressionBuilder. More...

#include <PolynomialFreeEnergy.h>

Inheritance diagram for PolynomialFreeEnergy:
[legend]

Public Types

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

Public Member Functions

 PolynomialFreeEnergy (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
 Concentration variable used in the free energy expression. More...
 
EBTerm _a
 Equilibrium concentration. More...
 
EBTerm _W
 Barrier height. More...
 
MooseEnum _order
 Polynomial order. More...
 

Detailed Description

Derivative free energy material defining polynomial free energies for single component materials, with derivatives from ExpressionBuilder.

Definition at line 25 of file PolynomialFreeEnergy.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

◆ PolynomialFreeEnergy()

PolynomialFreeEnergy::PolynomialFreeEnergy ( const InputParameters &  parameters)

Definition at line 30 of file PolynomialFreeEnergy.C.

31  : DerivativeParsedMaterialHelper(parameters),
32  _c("c"),
33  _a("c_eq_name"),
34  _W("W_name"),
35  _order(getParam<MooseEnum>("polynomial_order"))
36 {
37  EBFunction free_energy;
38 
39  // Free energy
40  switch (_order)
41  {
42  case 0: // 4th order
43  free_energy(_c, _W, _a) = pow(2.0, 4.0) * _W * pow(_c - _a, 2) * pow(1 - _c - _a, 2);
44  break;
45  case 1: // 6th order
46  free_energy(_c, _W, _a) =
47  pow(2.0, 6.0) * _W * (2.0 * pow(_c, 6) - 6.0 * pow(_c, 5) +
48  (3.0 * _a + 27.0 / 4.0 - 3.0 * _a * _a) * pow(_c, 4) +
49  (-6.0 * _a - 7.0 / 2.0 + 6.0 * _a * _a) * pow(_c, 3) +
50  (9.0 / 2.0 * _a - 9.0 / 2.0 * _a * _a + 3.0 / 4.0) * pow(_c, 2) +
51  (3.0 / 2.0 * _a * _a - 3.0 / 2.0 * _a) * _c);
52  break;
53  case 2: // 8th order
54  free_energy(_c, _W, _a) =
55  pow(2.0, 8.0) * _W *
56  (3.0 * pow(_c, 8) - 12.0 * pow(_c, 7) + (-4.0 * _a * _a + 4.0 * _a + 20.0) * pow(_c, 6) +
57  (12.0 * _a * _a - 12.0 * _a - 18.0) * pow(_c, 5) +
58  (15.0 * _a + 75.0 / 8.0 - 15.0 * _a * _a) * pow(_c, 4) +
59  (-10.0 * _a - 11.0 / 4.0 + 10.0 * _a * _a) * pow(_c, 3) +
60  (15.0 / 4.0 * _a - 15.0 / 4.0 * _a * _a + 3.0 / 8.0) * pow(_c, 2) +
61  (3.0 / 4.0 * _a * _a - 3.0 / 4.0 * _a) * _c);
62  break;
63  default:
64  mooseError("Error in PolynomialFreeEnergy: incorrect polynomial order");
65  }
66 
67  // Parse function
68  functionParse(free_energy, {}, {}, {"W_name", "c_eq_name"}, {}, {});
69 }
EBTerm _W
Barrier height.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
EBTerm _a
Equilibrium concentration.
EBTerm _c
Concentration variable used in the free energy expression.
MooseEnum _order
Polynomial order.

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

◆ _a

EBTerm PolynomialFreeEnergy::_a
protected

Equilibrium concentration.

Definition at line 35 of file PolynomialFreeEnergy.h.

Referenced by PolynomialFreeEnergy().

◆ _c

EBTerm PolynomialFreeEnergy::_c
protected

Concentration variable used in the free energy expression.

Definition at line 32 of file PolynomialFreeEnergy.h.

Referenced by PolynomialFreeEnergy().

◆ _order

MooseEnum PolynomialFreeEnergy::_order
protected

Polynomial order.

Definition at line 41 of file PolynomialFreeEnergy.h.

Referenced by PolynomialFreeEnergy().

◆ _W

EBTerm PolynomialFreeEnergy::_W
protected

Barrier height.

Definition at line 38 of file PolynomialFreeEnergy.h.

Referenced by PolynomialFreeEnergy().


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