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

Constructor & Destructor Documentation

ThirdPhaseSuppressionMaterial::ThirdPhaseSuppressionMaterial ( const InputParameters &  parameters)

Definition at line 21 of file ThirdPhaseSuppressionMaterial.C.

22  : DerivativeMaterialInterface<Material>(parameters),
23  _function_name(getParam<std::string>("function_name")),
24  _num_eta(coupledComponents("etas")),
25  _eta(_num_eta),
26  _prop_g(declareProperty<Real>(_function_name)),
29 {
30  std::vector<std::string> eta_name(_num_eta);
31  for (unsigned int i = 0; i < _num_eta; ++i)
32  {
33  _prop_d2g[i].resize(_num_eta);
34  // declare derivative properties, fetch eta values
35  eta_name[i] = getVar("etas", i)->name();
36  }
37  for (unsigned int i = 0; i < _num_eta; ++i)
38  {
39  _prop_dg[i] = &declarePropertyDerivative<Real>(_function_name, eta_name[i]);
40  _eta[i] = &coupledValue("etas", i);
41  for (unsigned int j = i; j < _num_eta; ++j)
42  {
43  _prop_d2g[i][j] = _prop_d2g[j][i] =
44  &declarePropertyDerivative<Real>(_function_name, eta_name[i], eta_name[j]);
45  }
46  }
47 }
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

void ThirdPhaseSuppressionMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 50 of file ThirdPhaseSuppressionMaterial.C.

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

std::vector<const VariableValue *> ThirdPhaseSuppressionMaterial::_eta
protected
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().

unsigned int ThirdPhaseSuppressionMaterial::_num_eta
protected

order parameters

Definition at line 36 of file ThirdPhaseSuppressionMaterial.h.

Referenced by computeQpProperties(), and ThirdPhaseSuppressionMaterial().

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().

std::vector<MaterialProperty<Real> *> ThirdPhaseSuppressionMaterial::_prop_dg
protected
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: