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

Material class that creates the math free energy and its derivatives for use with CHParsed and SplitCHParsed. More...

#include <MathFreeEnergy.h>

Inheritance diagram for MathFreeEnergy:
[legend]

Public Member Functions

 MathFreeEnergy (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeF ()
 
virtual Real computeDF (unsigned int j_var)
 
virtual Real computeD2F (unsigned int j_var, unsigned int k_var)
 
virtual Real computeD3F (unsigned int j_var, unsigned int k_var, unsigned int l_var)
 

Private Attributes

const VariableValue & _c
 Coupled variable value for the concentration \( c \). More...
 
unsigned int _c_var
 

Detailed Description

Material class that creates the math free energy and its derivatives for use with CHParsed and SplitCHParsed.

\( F = \frac14(1 + c)^2(1 - c)^2 \).

Definition at line 25 of file MathFreeEnergy.h.

Constructor & Destructor Documentation

◆ MathFreeEnergy()

MathFreeEnergy::MathFreeEnergy ( const InputParameters &  parameters)

Definition at line 25 of file MathFreeEnergy.C.

26  : DerivativeFunctionMaterialBase(parameters), _c(coupledValue("c")), _c_var(coupled("c"))
27 {
28 }
const VariableValue & _c
Coupled variable value for the concentration .
unsigned int _c_var

Member Function Documentation

◆ computeD2F()

Real MathFreeEnergy::computeD2F ( unsigned int  j_var,
unsigned int  k_var 
)
protectedvirtual

Definition at line 47 of file MathFreeEnergy.C.

48 {
49  if ((j_var == _c_var) && (k_var == _c_var))
50  return 3 * _c[_qp] * _c[_qp] - 1.0;
51  else
52  return 0.0;
53 }
const VariableValue & _c
Coupled variable value for the concentration .
unsigned int _c_var

◆ computeD3F()

Real MathFreeEnergy::computeD3F ( unsigned int  j_var,
unsigned int  k_var,
unsigned int  l_var 
)
protectedvirtual

Definition at line 56 of file MathFreeEnergy.C.

57 {
58  if ((j_var == _c_var) && (k_var == _c_var) && (l_var == _c_var))
59  return 6 * _c[_qp];
60  else
61  return 0.0;
62 }
const VariableValue & _c
Coupled variable value for the concentration .
unsigned int _c_var

◆ computeDF()

Real MathFreeEnergy::computeDF ( unsigned int  j_var)
protectedvirtual

Definition at line 37 of file MathFreeEnergy.C.

38 {
39  if (j_var == _c_var) // Note that these checks are only really necessary when the material has
40  // more than one coupled variable
41  return _c[_qp] * (_c[_qp] * _c[_qp] - 1.0);
42  else
43  return 0.0;
44 }
const VariableValue & _c
Coupled variable value for the concentration .
unsigned int _c_var

◆ computeF()

Real MathFreeEnergy::computeF ( )
protectedvirtual

Definition at line 31 of file MathFreeEnergy.C.

32 {
33  return 1.0 / 4.0 * (1.0 + _c[_qp]) * (1.0 + _c[_qp]) * (1.0 - _c[_qp]) * (1.0 - _c[_qp]);
34 }
const VariableValue & _c
Coupled variable value for the concentration .

Member Data Documentation

◆ _c

const VariableValue& MathFreeEnergy::_c
private

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

Definition at line 38 of file MathFreeEnergy.h.

Referenced by computeD2F(), computeD3F(), computeDF(), and computeF().

◆ _c_var

unsigned int MathFreeEnergy::_c_var
private

Definition at line 39 of file MathFreeEnergy.h.

Referenced by computeD2F(), computeD3F(), and computeDF().


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