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

OPInterfaceBarrierMaterial is a Free Energy Penalty contribution material that acts on all of the eta_i variables to prevent more than two eta variables going above 0 on an interface. More...

#include <ThirdPhaseSuppressionMaterial.h>

Inheritance diagram for ThirdPhaseSuppressionMaterial:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 ThirdPhaseSuppressionMaterial (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)
 
const unsigned int _num_eta
 order parameters
 
const std::vector< const VariableValue * > _eta
 
MaterialProperty< Real > & _prop_g
 Barrier functions and their drivatives.
 
std::vector< MaterialProperty< Real > * > _prop_dg
 
std::vector< std::vector< MaterialProperty< Real > * > > _prop_d2g
 Material properties to store the second derivatives.
 

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

OPInterfaceBarrierMaterial is a Free Energy Penalty contribution material that acts on all of the eta_i variables to prevent more than two eta variables going above 0 on an interface.

Definition at line 22 of file ThirdPhaseSuppressionMaterial.h.

Constructor & Destructor Documentation

◆ ThirdPhaseSuppressionMaterial()

ThirdPhaseSuppressionMaterial::ThirdPhaseSuppressionMaterial ( const InputParameters parameters)

Definition at line 25 of file ThirdPhaseSuppressionMaterial.C.

27 _function_name(getParam<std::string>("function_name")),
28 _num_eta(coupledComponents("etas")),
29 _eta(coupledValues("etas")),
30 _prop_g(declareProperty<Real>(_function_name)),
33{
34 const auto eta_name = coupledNames("etas");
35
36 for (unsigned int i = 0; i < _num_eta; ++i)
37 _prop_d2g[i].resize(_num_eta);
38
39 for (unsigned int i = 0; i < _num_eta; ++i)
40 {
41 _prop_dg[i] = &declarePropertyDerivative<Real>(_function_name, eta_name[i]);
42 for (unsigned int j = i; j < _num_eta; ++j)
43 {
44 _prop_d2g[i][j] = _prop_d2g[j][i] =
45 &declarePropertyDerivative<Real>(_function_name, eta_name[i], eta_name[j]);
46 }
47 }
48}
const std::vector< const VariableValue * > _eta
const unsigned int _num_eta
order parameters
std::vector< MaterialProperty< Real > * > _prop_dg
MaterialProperty< Real > & _prop_g
Barrier functions and their drivatives.
std::string _function_name
name of the function of eta (used to generate the material property names)
std::vector< std::vector< MaterialProperty< Real > * > > _prop_d2g
Material properties to store the second derivatives.

Member Function Documentation

◆ computeQpProperties()

void ThirdPhaseSuppressionMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 51 of file ThirdPhaseSuppressionMaterial.C.

52{
53 // Initialize properties to zero before accumulating
54 _prop_g[_qp] = 0.0;
55 for (unsigned int i = 0; i < _num_eta; ++i)
56 {
57 (*_prop_dg[i])[_qp] = 0.0;
58 for (unsigned int j = i; j < _num_eta; ++j)
59 (*_prop_d2g[i][j])[_qp] = 0.0;
60 }
61
62 // Create Interface barrier preventing interfaces involving more than two order parameters
63 for (unsigned int i = 0; i < _num_eta; ++i)
64 for (unsigned int j = 0; j < i; ++j)
65 for (unsigned int k = 0; k < j; ++k)
66 {
67 const Real ni = (*_eta[i])[_qp];
68 const Real nj = (*_eta[j])[_qp];
69 const Real nk = (*_eta[k])[_qp];
70
71 _prop_g[_qp] += ni * ni * nj * nj * nk * nk;
72 (*_prop_dg[i])[_qp] += 2 * ni * nj * nj * nk * nk;
73 (*_prop_dg[j])[_qp] += 2 * ni * ni * nj * nk * nk;
74 (*_prop_dg[k])[_qp] += 2 * ni * ni * nj * nj * nk;
75 (*_prop_d2g[i][i])[_qp] += 2 * nj * nj * nk * nk;
76 (*_prop_d2g[j][j])[_qp] += 2 * ni * ni * nk * nk;
77 (*_prop_d2g[k][k])[_qp] += 2 * ni * ni * nj * nj;
78 (*_prop_d2g[i][j])[_qp] += 4 * ni * nj * nk * nk;
79 (*_prop_d2g[i][k])[_qp] += 4 * ni * nj * nj * nk;
80 (*_prop_d2g[k][j])[_qp] += 4 * ni * ni * nj * nk;
81 }
82}
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ validParams()

InputParameters ThirdPhaseSuppressionMaterial::validParams ( )
static

Definition at line 15 of file ThirdPhaseSuppressionMaterial.C.

16{
18 params.addParam<std::string>("function_name", "g", "actual name for g(eta_i)");
19 params.addRequiredCoupledVar("etas", "eta_i order parameters, one for each h");
21 "Free Energy contribution that penalizes more than two order parameters being non-zero");
22 return params;
23}
void addRequiredCoupledVar(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)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()

Member Data Documentation

◆ _eta

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

Definition at line 37 of file ThirdPhaseSuppressionMaterial.h.

Referenced by computeQpProperties().

◆ _function_name

std::string ThirdPhaseSuppressionMaterial::_function_name
protected

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

Definition at line 33 of file ThirdPhaseSuppressionMaterial.h.

Referenced by ThirdPhaseSuppressionMaterial().

◆ _num_eta

const unsigned int ThirdPhaseSuppressionMaterial::_num_eta
protected

order parameters

Definition at line 36 of file ThirdPhaseSuppressionMaterial.h.

Referenced by computeQpProperties(), and ThirdPhaseSuppressionMaterial().

◆ _prop_d2g

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

Material properties to store the second derivatives.

Definition at line 44 of file ThirdPhaseSuppressionMaterial.h.

Referenced by computeQpProperties(), and ThirdPhaseSuppressionMaterial().

◆ _prop_dg

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

◆ _prop_g

MaterialProperty<Real>& ThirdPhaseSuppressionMaterial::_prop_g
protected

Barrier functions and their drivatives.

Definition at line 40 of file ThirdPhaseSuppressionMaterial.h.

Referenced by computeQpProperties().


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