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 25 of file BarrierFunctionMaterial.h.

Constructor & Destructor Documentation

BarrierFunctionMaterial::BarrierFunctionMaterial ( const InputParameters &  parameters)

Definition at line 28 of file BarrierFunctionMaterial.C.

29  : OrderParameterFunctionMaterial(parameters),
30  _g_order(getParam<MooseEnum>("g_order")),
31  _well_only(getParam<bool>("well_only"))
32 {
33 }
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

void BarrierFunctionMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 36 of file BarrierFunctionMaterial.C.

37 {
38  const Real n = _eta[_qp];
39 
40  if (_well_only && n >= 0.0 && n <= 1.0)
41  {
42  _prop_f[_qp] = 0.0;
43  _prop_df[_qp] = 0.0;
44  _prop_d2f[_qp] = 0.0;
45  return;
46  }
47 
48  switch (_g_order)
49  {
50  case 0: // SIMPLE
51  _prop_f[_qp] = n * n * (1.0 - n) * (1.0 - n);
52  _prop_df[_qp] = 2.0 * n * (n - 1.0) * (2.0 * n - 1.0);
53  _prop_d2f[_qp] = 12.0 * (n * n - n) + 2.0;
54  break;
55 
56  case 1: // LOW
57  _prop_f[_qp] = n * (1.0 - n);
58  _prop_df[_qp] = 1.0 - 2.0 * n;
59  _prop_d2f[_qp] = -2.0;
60  break;
61 
62  case 2: // HIGH
63  _prop_f[_qp] = n * n * (1.0 - n * n) * (1.0 - n * n);
64  _prop_df[_qp] = n * (2.0 - n * n * (8.0 + 6.0 * n * n));
65  _prop_d2f[_qp] = 2.0 - n * n * (24.0 + 30.0 * n * n);
66  break;
67 
68  default:
69  mooseError("Internal error");
70  }
71 }
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

const VariableValue& OrderParameterFunctionMaterial::_eta
protectedinherited

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

Definition at line 31 of file OrderParameterFunctionMaterial.h.

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

VariableName OrderParameterFunctionMaterial::_eta_name
protectedinherited

Definition at line 33 of file OrderParameterFunctionMaterial.h.

unsigned int OrderParameterFunctionMaterial::_eta_var
protectedinherited

Definition at line 32 of file OrderParameterFunctionMaterial.h.

std::string OrderParameterFunctionMaterial::_function_name
protectedinherited

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

Definition at line 36 of file OrderParameterFunctionMaterial.h.

MooseEnum BarrierFunctionMaterial::_g_order
protected

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

Definition at line 34 of file BarrierFunctionMaterial.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& OrderParameterFunctionMaterial::_prop_d2f
protectedinherited

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

Definition at line 45 of file OrderParameterFunctionMaterial.h.

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

MaterialProperty<Real>& OrderParameterFunctionMaterial::_prop_df
protectedinherited

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

Definition at line 42 of file OrderParameterFunctionMaterial.h.

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

MaterialProperty<Real>& OrderParameterFunctionMaterial::_prop_f
protectedinherited
bool BarrierFunctionMaterial::_well_only
protected

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

Definition at line 37 of file BarrierFunctionMaterial.h.

Referenced by computeQpProperties().


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