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
MixedSwitchingFunctionMaterial Class Reference

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

#include <MixedSwitchingFunctionMaterial.h>

Inheritance diagram for MixedSwitchingFunctionMaterial:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 MixedSwitchingFunctionMaterial (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) \).
 
Real _weight
 Weight parameter of mixed-type 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 MixedSwitchingFunctionMaterial.h.

Constructor & Destructor Documentation

◆ MixedSwitchingFunctionMaterial()

MixedSwitchingFunctionMaterial::MixedSwitchingFunctionMaterial ( const InputParameters parameters)

Definition at line 31 of file MixedSwitchingFunctionMaterial.C.

33 _h_order(getParam<MooseEnum>("h_order")),
34 _weight(getParam<Real>("weight"))
35{
36}
Real _weight
Weight parameter of mixed-type h(eta)
MooseEnum _h_order
Polynomial order of the switching function .
Material base class for materials that provide the switching function or the double well function .

Member Function Documentation

◆ computeQpProperties()

void MixedSwitchingFunctionMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 39 of file MixedSwitchingFunctionMaterial.C.

40{
41 Real n = _eta[_qp];
42 n = n > 1 ? 1 : (n < 0 ? 0 : n);
43
44 switch (_h_order)
45 {
46 case 0: // MIX234
47 _prop_f[_qp] =
48 n * n * (3.0 * _weight + (4.0 - 6.0 * _weight) * n + (3.0 * _weight - 3.0) * n * n);
49 _prop_df[_qp] =
50 n * (6.0 * _weight + (12.0 - 18.0 * _weight) * n + (12.0 * _weight - 12.0) * n * n);
51 _prop_d2f[_qp] = 6.0 * _weight + ((24.0 - 36.0 * _weight) + (36.0 * _weight - 36.0) * n) * n;
52 break;
53
54 case 1: // MIX246
55 _prop_f[_qp] =
56 n * n * (2.0 * _weight + n * n * ((3.0 - 4.0 * _weight) + (2.0 * _weight - 2.0) * n * n));
57 _prop_df[_qp] =
58 n * (4.0 * _weight + n * n * ((12.0 - 16.0 * _weight) + (12.0 * _weight - 12.0) * n * n));
59 _prop_d2f[_qp] =
60 4.0 * _weight + n * n * ((36.0 - 48.0 * _weight) + (60.0 * _weight - 60.0) * n * n);
61 break;
62
63 default:
64 mooseError("Internal error");
65 }
66}
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 MixedSwitchingFunctionMaterial::validParams ( )
static

Definition at line 15 of file MixedSwitchingFunctionMaterial.C.

16{
18 params.addClassDescription("Helper material to provide h(eta) and its derivative in one of two "
19 "polynomial forms. MIX234 and MIX246");
20 MooseEnum h_order("MIX234=0 MIX246", "MIX234");
21 params.addParam<MooseEnum>(
22 "h_order", h_order, "Polynomial order of the switching function h(eta)");
23 params.set<std::string>("function_name") = std::string("h");
24
26 "weight", 1.0, "weight <= 1 & weight >= 0", "Weight parameter for MIX type h(eta)");
27
28 return params;
29}
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)
void addRangeCheckedParam(const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)

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(), computeQpProperties(), and SwitchingFunctionMaterial::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 MixedSwitchingFunctionMaterial::_h_order
protected

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

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

◆ _prop_f

MaterialProperty<Real>& OrderParameterFunctionMaterial::_prop_f
protectedinherited

◆ _weight

Real MixedSwitchingFunctionMaterial::_weight
protected

Weight parameter of mixed-type h(eta)

Definition at line 37 of file MixedSwitchingFunctionMaterial.h.

Referenced by computeQpProperties().


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