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

Material class to provide the switching function \( h(\eta) \) for the KKS system. More...

#include <SwitchingFunctionMaterial.h>

Inheritance diagram for SwitchingFunctionMaterial:
[legend]

Public Member Functions

 SwitchingFunctionMaterial (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpProperties ()
 

Protected Attributes

MooseEnum _h_order
 Polynomial order of the switching function \( h(\eta) \). 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 switching function \( h(\eta) \) for the KKS system.

See also
KKSPhaseChemicalPotential
KKSCHBulk

Definition at line 28 of file SwitchingFunctionMaterial.h.

Constructor & Destructor Documentation

◆ SwitchingFunctionMaterial()

SwitchingFunctionMaterial::SwitchingFunctionMaterial ( const InputParameters &  parameters)

Definition at line 29 of file SwitchingFunctionMaterial.C.

30  : OrderParameterFunctionMaterial(parameters), _h_order(getParam<MooseEnum>("h_order"))
31 {
32 }
OrderParameterFunctionMaterial(const InputParameters &parameters)
MooseEnum _h_order
Polynomial order of the switching function .

Member Function Documentation

◆ computeQpProperties()

void SwitchingFunctionMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 35 of file SwitchingFunctionMaterial.C.

36 {
37  Real n = _eta[_qp];
38  n = n > 1 ? 1 : (n < 0 ? 0 : n);
39 
40  switch (_h_order)
41  {
42  case 0: // SIMPLE
43  _prop_f[_qp] = 3.0 * n * n - 2.0 * n * n * n;
44  _prop_df[_qp] = 6.0 * n - 6.0 * n * n;
45  _prop_d2f[_qp] = 6.0 - 12.0 * n;
46  break;
47 
48  case 1: // HIGH
49  _prop_f[_qp] = n * n * n * (6.0 * n * n - 15.0 * n + 10.0);
50  _prop_df[_qp] = 30.0 * n * n * (n * n - 2.0 * n + 1.0);
51  _prop_d2f[_qp] = n * (120.0 * n * n - 180.0 * n + 60.0);
52  break;
53 
54  default:
55  mooseError("Internal error");
56  }
57 }
MaterialProperty< Real > & _prop_d2f
Material property to store the second derivative .
MaterialProperty< Real > & _prop_df
Material property to store the derivative .
MooseEnum _h_order
Polynomial order of the switching function .
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 BarrierFunctionMaterial::computeQpProperties(), MixedSwitchingFunctionMaterial::computeQpProperties(), and 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.

◆ _h_order

MooseEnum SwitchingFunctionMaterial::_h_order
protected

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

Definition at line 37 of file SwitchingFunctionMaterial.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 BarrierFunctionMaterial::computeQpProperties(), MixedSwitchingFunctionMaterial::computeQpProperties(), and 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 BarrierFunctionMaterial::computeQpProperties(), MixedSwitchingFunctionMaterial::computeQpProperties(), and computeQpProperties().

◆ _prop_f

MaterialProperty<Real>& OrderParameterFunctionMaterial::_prop_f
protectedinherited

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