https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private 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 Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 SwitchingFunctionMaterial (const InputParameters &parameters)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeQpProperties ()
 

Protected Attributes

MooseEnum _h_order
 Polynomial order of the switching function \( h(\eta) \).
 
const VariableValue_eta
 Coupled variable value for the order parameter \( \eta \).
 
unsigned int _eta_var
 
VariableName _eta_name
 
std::string _function_name
 name of the function of eta (used to generate the material property names)
 
MaterialProperty< Real > & _prop_f
 Material property to store \( f(\eta) \).
 
MaterialProperty< Real > & _prop_df
 Material property to store the derivative \( df(\eta)/d\eta \).
 
MaterialProperty< Real > & _prop_d2f
 Material property to store the second derivative \( d^2f(\eta)/d\eta^2 \).
 

Private Member Functions

bool haveMaterialProperty (const std::string &prop_name)
 
std::vector< VariableName > buildVariableVector (const VariableName &c1, const VariableName &c2, const VariableName &c3)
 
void validateCouplingHelper (const MaterialPropertyName &base, const std::vector< VariableName > &c, const System &system, std::vector< VariableName > &missing)
 
bool isNotObjectVariable (const VariableName &name)
 

Private Attributes

FEProblemBase_dmi_fe_problem
 

Detailed Description

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

See also
KKSPhaseChemicalPotential
KKSCHBulk

Definition at line 23 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}
Material base class for materials that provide the switching function or the double well function .
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}
void mooseError(Args &&... args)
MaterialProperty< Real > & _prop_df
Material property to store the derivative .
MaterialProperty< Real > & _prop_f
Material property to store .
MaterialProperty< Real > & _prop_d2f
Material property to store the second derivative .
const VariableValue & _eta
Coupled variable value for the order parameter .
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ validParams()

InputParameters SwitchingFunctionMaterial::validParams ( )
static

Definition at line 15 of file SwitchingFunctionMaterial.C.

16{
19 "Helper material to provide $h(\\eta)$ and its derivative in one of two "
20 "polynomial forms.\nSIMPLE: $3\\eta^2-2\\eta^3$\nHIGH: "
21 "$\\eta^3(6\\eta^2-15\\eta+10)$");
22 MooseEnum h_order("SIMPLE=0 HIGH", "SIMPLE");
23 params.addParam<MooseEnum>(
24 "h_order", h_order, "Polynomial order of the switching function h(eta)");
25 params.set<std::string>("function_name") = std::string("h");
26 return params;
27}
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)

Member Data Documentation

◆ _eta

const VariableValue& OrderParameterFunctionMaterial::_eta
protectedinherited

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

Definition at line 31 of file OrderParameterFunctionMaterial.h.

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

◆ _eta_name

VariableName OrderParameterFunctionMaterial::_eta_name
protectedinherited

Definition at line 33 of file OrderParameterFunctionMaterial.h.

◆ _eta_var

unsigned int OrderParameterFunctionMaterial::_eta_var
protectedinherited

Definition at line 32 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 36 of file OrderParameterFunctionMaterial.h.

◆ _h_order

MooseEnum SwitchingFunctionMaterial::_h_order
protected

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

Definition at line 34 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 45 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 42 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: