www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected 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 Member Functions

 ThirdPhaseSuppressionMaterial (const InputParameters &parameters)
 

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

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 27 of file ThirdPhaseSuppressionMaterial.h.

Constructor & Destructor Documentation

◆ ThirdPhaseSuppressionMaterial()

ThirdPhaseSuppressionMaterial::ThirdPhaseSuppressionMaterial ( const InputParameters &  parameters)

Definition at line 26 of file ThirdPhaseSuppressionMaterial.C.

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

Member Function Documentation

◆ computeQpProperties()

void ThirdPhaseSuppressionMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 55 of file ThirdPhaseSuppressionMaterial.C.

56 {
57  // Initialize properties to zero before accumulating
58  _prop_g[_qp] = 0.0;
59  for (unsigned int i = 0; i < _num_eta; ++i)
60  {
61  (*_prop_dg[i])[_qp] = 0.0;
62  for (unsigned int j = i; j < _num_eta; ++j)
63  (*_prop_d2g[i][j])[_qp] = 0.0;
64  }
65 
66  // Create Interface barrier preventing interfaces involving more than two order parameters
67  for (unsigned int i = 0; i < _num_eta; ++i)
68  for (unsigned int j = 0; j < i; ++j)
69  for (unsigned int k = 0; k < j; ++k)
70  {
71  const Real ni = (*_eta[i])[_qp];
72  const Real nj = (*_eta[j])[_qp];
73  const Real nk = (*_eta[k])[_qp];
74 
75  _prop_g[_qp] += ni * ni * nj * nj * nk * nk;
76  (*_prop_dg[i])[_qp] += 2 * ni * nj * nj * nk * nk;
77  (*_prop_dg[j])[_qp] += 2 * ni * ni * nj * nk * nk;
78  (*_prop_dg[k])[_qp] += 2 * ni * ni * nj * nj * nk;
79  (*_prop_d2g[i][i])[_qp] += 2 * nj * nj * nk * nk;
80  (*_prop_d2g[j][j])[_qp] += 2 * ni * ni * nk * nk;
81  (*_prop_d2g[k][k])[_qp] += 2 * ni * ni * nj * nj;
82  (*_prop_d2g[i][j])[_qp] += 4 * ni * nj * nk * nk;
83  (*_prop_d2g[i][k])[_qp] += 4 * ni * nj * nj * nk;
84  (*_prop_d2g[k][j])[_qp] += 4 * ni * ni * nj * nk;
85  }
86 }
std::vector< std::vector< MaterialProperty< Real > * > > _prop_d2g
Material properties to store the second derivatives.
unsigned int _num_eta
order parameters
std::vector< const VariableValue * > _eta
MaterialProperty< Real > & _prop_g
Barrier functions and their drivatives.
std::vector< MaterialProperty< Real > * > _prop_dg

Member Data Documentation

◆ _eta

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

◆ _function_name

std::string ThirdPhaseSuppressionMaterial::_function_name
protected

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

Definition at line 36 of file ThirdPhaseSuppressionMaterial.h.

Referenced by ThirdPhaseSuppressionMaterial().

◆ _num_eta

unsigned int ThirdPhaseSuppressionMaterial::_num_eta
protected

order parameters

Definition at line 39 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 47 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 43 of file ThirdPhaseSuppressionMaterial.h.

Referenced by computeQpProperties().


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