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

Material class to provide the double well function \( g(\eta) \) for the KKS system. More...

#include <BarrierFunctionMaterial.h>

Inheritance diagram for BarrierFunctionMaterial:
[legend]

Public Member Functions

 BarrierFunctionMaterial (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpProperties ()
 

Protected Attributes

MooseEnum _g_order
 Polynomial order of the switching function \( g(\eta) \). More...
 
bool _well_only
 zero out g contribution in the eta interval [0:1] More...
 
const VariableValue & _eta
 Coupled variable value for the order parameter \( \eta \). More...
 
unsigned int _eta_var
 
VariableName _eta_name
 
std::string _function_name
 name of the function of eta (used to generate the material property names) More...
 
MaterialProperty< Real > & _prop_f
 Material property to store \( f(\eta) \). More...
 
MaterialProperty< Real > & _prop_df
 Material property to store the derivative \( df(\eta)/d\eta \). More...
 
MaterialProperty< Real > & _prop_d2f
 Material property to store the second derivative \( d^2f(\eta)/d\eta^2 \). More...
 

Detailed Description

Material class to provide the double well function \( g(\eta) \) for the KKS system.

See also
KKSPhaseChemicalPotential
KKSCHBulk

Definition at line 28 of file BarrierFunctionMaterial.h.

Constructor & Destructor Documentation

◆ BarrierFunctionMaterial()

BarrierFunctionMaterial::BarrierFunctionMaterial ( const InputParameters &  parameters)

Definition at line 33 of file BarrierFunctionMaterial.C.

34  : OrderParameterFunctionMaterial(parameters),
35  _g_order(getParam<MooseEnum>("g_order")),
36  _well_only(getParam<bool>("well_only"))
37 {
38 }
MooseEnum _g_order
Polynomial order of the switching function .
OrderParameterFunctionMaterial(const InputParameters &parameters)
bool _well_only
zero out g contribution in the eta interval [0:1]

Member Function Documentation

◆ computeQpProperties()

void BarrierFunctionMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 41 of file BarrierFunctionMaterial.C.

42 {
43  const Real n = _eta[_qp];
44 
45  if (_well_only && n >= 0.0 && n <= 1.0)
46  {
47  _prop_f[_qp] = 0.0;
48  _prop_df[_qp] = 0.0;
49  _prop_d2f[_qp] = 0.0;
50  return;
51  }
52 
53  switch (_g_order)
54  {
55  case 0: // SIMPLE
56  _prop_f[_qp] = n * n * (1.0 - n) * (1.0 - n);
57  _prop_df[_qp] = 2.0 * n * (n - 1.0) * (2.0 * n - 1.0);
58  _prop_d2f[_qp] = 12.0 * (n * n - n) + 2.0;
59  break;
60 
61  case 1: // LOW
62  _prop_f[_qp] = n * (1.0 - n);
63  _prop_df[_qp] = 1.0 - 2.0 * n;
64  _prop_d2f[_qp] = -2.0;
65  break;
66 
67  case 2: // HIGH
68  _prop_f[_qp] = n * n * (1.0 - n * n) * (1.0 - n * n);
69  _prop_df[_qp] = n * (2.0 - n * n * (8.0 + 6.0 * n * n));
70  _prop_d2f[_qp] = 2.0 - n * n * (24.0 + 30.0 * n * n);
71  break;
72 
73  default:
74  mooseError("Internal error");
75  }
76 }
MooseEnum _g_order
Polynomial order of the switching function .
MaterialProperty< Real > & _prop_d2f
Material property to store the second derivative .
bool _well_only
zero out g contribution in the eta interval [0:1]
MaterialProperty< Real > & _prop_df
Material property to store the derivative .
MaterialProperty< Real > & _prop_f
Material property to store .
const VariableValue & _eta
Coupled variable value for the order parameter .

Member Data Documentation

◆ _eta

const VariableValue& OrderParameterFunctionMaterial::_eta
protectedinherited

Coupled variable value for the order parameter \( \eta \).

Definition at line 34 of file OrderParameterFunctionMaterial.h.

Referenced by computeQpProperties(), SwitchingFunctionMaterial::computeQpProperties(), and MixedSwitchingFunctionMaterial::computeQpProperties().

◆ _eta_name

VariableName OrderParameterFunctionMaterial::_eta_name
protectedinherited

Definition at line 36 of file OrderParameterFunctionMaterial.h.

◆ _eta_var

unsigned int OrderParameterFunctionMaterial::_eta_var
protectedinherited

Definition at line 35 of file OrderParameterFunctionMaterial.h.

◆ _function_name

std::string OrderParameterFunctionMaterial::_function_name
protectedinherited

name of the function of eta (used to generate the material property names)

Definition at line 39 of file OrderParameterFunctionMaterial.h.

◆ _g_order

MooseEnum BarrierFunctionMaterial::_g_order
protected

Polynomial order of the switching function \( g(\eta) \).

Definition at line 37 of file BarrierFunctionMaterial.h.

Referenced by computeQpProperties().

◆ _prop_d2f

MaterialProperty<Real>& OrderParameterFunctionMaterial::_prop_d2f
protectedinherited

Material property to store the second derivative \( d^2f(\eta)/d\eta^2 \).

Definition at line 48 of file OrderParameterFunctionMaterial.h.

Referenced by computeQpProperties(), SwitchingFunctionMaterial::computeQpProperties(), and MixedSwitchingFunctionMaterial::computeQpProperties().

◆ _prop_df

MaterialProperty<Real>& OrderParameterFunctionMaterial::_prop_df
protectedinherited

Material property to store the derivative \( df(\eta)/d\eta \).

Definition at line 45 of file OrderParameterFunctionMaterial.h.

Referenced by computeQpProperties(), SwitchingFunctionMaterial::computeQpProperties(), and MixedSwitchingFunctionMaterial::computeQpProperties().

◆ _prop_f

MaterialProperty<Real>& OrderParameterFunctionMaterial::_prop_f
protectedinherited

◆ _well_only

bool BarrierFunctionMaterial::_well_only
protected

zero out g contribution in the eta interval [0:1]

Definition at line 40 of file BarrierFunctionMaterial.h.

Referenced by computeQpProperties().


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