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

CrossTermBarrierFunctionBase is the base to a set of free energy penalties that set the phase interface barriers for arbitrary pairs of phases. More...

#include <CrossTermBarrierFunctionBase.h>

Inheritance diagram for CrossTermBarrierFunctionBase:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 CrossTermBarrierFunctionBase (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

std::string _function_name
 name of the function of eta (used to generate the material property names)
 
unsigned int _g_order
 polynomial order of the switching function \( g(\eta) \)
 
std::vector< Real > _W_ij
 barrier function height matrix
 
unsigned int _num_eta
 order parameters
 
const std::vector< VariableName > _eta_names
 
const std::vector< const VariableValue * > _eta
 
MaterialProperty< Real > & _prop_g
 Barrier function and its derivatives.
 
std::vector< MaterialProperty< Real > * > _prop_dg
 
std::vector< std::vector< MaterialProperty< Real > * > > _prop_d2g
 
std::vector< const MaterialProperty< Real > * > _h
 Switching functions and their derivatives.
 
std::vector< std::vector< const MaterialProperty< Real > * > > _dh
 

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

CrossTermBarrierFunctionBase is the base to a set of free energy penalties that set the phase interface barriers for arbitrary pairs of phases.

Definition at line 21 of file CrossTermBarrierFunctionBase.h.

Constructor & Destructor Documentation

◆ CrossTermBarrierFunctionBase()

CrossTermBarrierFunctionBase::CrossTermBarrierFunctionBase ( const InputParameters parameters)

Definition at line 27 of file CrossTermBarrierFunctionBase.C.

29 _function_name(getParam<std::string>("function_name")),
30 _g_order(getParam<MooseEnum>("g_order")),
31 _W_ij(getParam<std::vector<Real>>("W_ij")),
32 _num_eta(coupledComponents("etas")),
33 _eta_names(coupledNames("etas")),
34 _eta(coupledValues("etas")),
35 _prop_g(declareProperty<Real>(_function_name)),
38{
39 // if Vector W_ij is not the correct size to fill the matrix give error
40 if (_num_eta * _num_eta != _W_ij.size())
41 paramError("W_ij",
42 "Size of W_ij does not match (number of etas)^2. Supply W_ij of correct size.");
43
44 // error out if the W_ij diagonal values are not zero
45 for (unsigned int i = 0; i < _num_eta; ++i)
46 if (_W_ij[_num_eta * i + i] != 0)
47 paramError("W_ij", "Set on-diagonal values of W_ij to zero.");
48
49 // declare g derivative properties, fetch eta values
50 for (unsigned int i = 0; i < _num_eta; ++i)
51 _prop_d2g[i].resize(_num_eta);
52
53 for (unsigned int i = 0; i < _num_eta; ++i)
54 {
55 _prop_dg[i] = &declarePropertyDerivative<Real>(_function_name, _eta_names[i]);
56 for (unsigned int j = i; j < _num_eta; ++j)
57 {
58 _prop_d2g[i][j] = _prop_d2g[j][i] =
59 &declarePropertyDerivative<Real>(_function_name, _eta_names[i], _eta_names[j]);
60 }
61 }
62}
MaterialProperty< Real > & _prop_g
Barrier function and its derivatives.
unsigned int _num_eta
order parameters
std::string _function_name
name of the function of eta (used to generate the material property names)
std::vector< Real > _W_ij
barrier function height matrix
const std::vector< const VariableValue * > _eta
std::vector< MaterialProperty< Real > * > _prop_dg
unsigned int _g_order
polynomial order of the switching function
std::vector< std::vector< MaterialProperty< Real > * > > _prop_d2g
const std::vector< VariableName > _eta_names

Member Function Documentation

◆ computeQpProperties()

void CrossTermBarrierFunctionBase::computeQpProperties ( )
protectedvirtual

Reimplemented in AsymmetricCrossTermBarrierFunctionMaterial, and CrossTermBarrierFunctionMaterial.

Definition at line 65 of file CrossTermBarrierFunctionBase.C.

66{
67 // Initialize properties to zero before accumulating
68 _prop_g[_qp] = 0.0;
69 for (unsigned int i = 0; i < _num_eta; ++i)
70 {
71 (*_prop_dg[i])[_qp] = 0.0;
72 (*_prop_d2g[i][i])[_qp] = 0.0;
73 }
74}

Referenced by AsymmetricCrossTermBarrierFunctionMaterial::computeQpProperties(), and CrossTermBarrierFunctionMaterial::computeQpProperties().

◆ validParams()

InputParameters CrossTermBarrierFunctionBase::validParams ( )
static

Definition at line 13 of file CrossTermBarrierFunctionBase.C.

14{
16 params.addParam<std::string>("function_name", "g", "actual name for g(eta_i)");
17 MooseEnum g_order("SIMPLE=0 LOW", "SIMPLE");
18 params.addParam<MooseEnum>("g_order", g_order, "Polynomial order of the barrier function g(eta)");
19 params.addRequiredCoupledVar("etas", "eta_i order parameters, one for each h");
20 params.addRequiredParam<std::vector<Real>>("W_ij",
21 "Terms controlling barrier height set W=1 in "
22 "DerivativeMultiPhaseMaterial for these to "
23 "apply");
24 return params;
25}
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()

Referenced by AsymmetricCrossTermBarrierFunctionMaterial::validParams(), and CrossTermBarrierFunctionMaterial::validParams().

Member Data Documentation

◆ _dh

std::vector<std::vector<const MaterialProperty<Real> *> > CrossTermBarrierFunctionBase::_dh
protected

Definition at line 53 of file CrossTermBarrierFunctionBase.h.

◆ _eta

const std::vector<const VariableValue *> CrossTermBarrierFunctionBase::_eta
protected

◆ _eta_names

const std::vector<VariableName> CrossTermBarrierFunctionBase::_eta_names
protected

◆ _function_name

std::string CrossTermBarrierFunctionBase::_function_name
protected

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

Definition at line 32 of file CrossTermBarrierFunctionBase.h.

Referenced by CrossTermBarrierFunctionBase().

◆ _g_order

unsigned int CrossTermBarrierFunctionBase::_g_order
protected

polynomial order of the switching function \( g(\eta) \)

Definition at line 35 of file CrossTermBarrierFunctionBase.h.

Referenced by AsymmetricCrossTermBarrierFunctionMaterial::computeQpProperties(), and CrossTermBarrierFunctionMaterial::computeQpProperties().

◆ _h

std::vector<const MaterialProperty<Real> *> CrossTermBarrierFunctionBase::_h
protected

Switching functions and their derivatives.

Definition at line 52 of file CrossTermBarrierFunctionBase.h.

◆ _num_eta

unsigned int CrossTermBarrierFunctionBase::_num_eta
protected

◆ _prop_d2g

std::vector<std::vector<MaterialProperty<Real> *> > CrossTermBarrierFunctionBase::_prop_d2g
protected

◆ _prop_dg

std::vector<MaterialProperty<Real> *> CrossTermBarrierFunctionBase::_prop_dg
protected

◆ _prop_g

MaterialProperty<Real>& CrossTermBarrierFunctionBase::_prop_g
protected

◆ _W_ij

std::vector<Real> CrossTermBarrierFunctionBase::_W_ij
protected

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