www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CrossTermBarrierFunctionMaterial Class Reference

CrossTermBarrierFunctionMaterial adds free energy contribution on the interfaces between arbitrary pairs of phases in a symmetric way. More...

#include <CrossTermBarrierFunctionMaterial.h>

Inheritance diagram for CrossTermBarrierFunctionMaterial:
[legend]

Public Member Functions

 CrossTermBarrierFunctionMaterial (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 _g_order
 polynomial order of the switching function \( g(\eta) \) More...
 
std::vector< Real > _W_ij
 barrier function height matrix More...
 
unsigned int _num_eta
 order parameters More...
 
std::vector< VariableName > _eta_names
 
std::vector< const VariableValue * > _eta
 
MaterialProperty< Real > & _prop_g
 Barrier function and its derivatives. More...
 
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. More...
 
std::vector< std::vector< const MaterialProperty< Real > * > > _dh
 

Detailed Description

CrossTermBarrierFunctionMaterial adds free energy contribution on the interfaces between arbitrary pairs of phases in a symmetric way.

Definition at line 25 of file CrossTermBarrierFunctionMaterial.h.

Constructor & Destructor Documentation

◆ CrossTermBarrierFunctionMaterial()

CrossTermBarrierFunctionMaterial::CrossTermBarrierFunctionMaterial ( const InputParameters &  parameters)

Definition at line 24 of file CrossTermBarrierFunctionMaterial.C.

26  : CrossTermBarrierFunctionBase(parameters)
27 {
28  // error out if W_ij is not symmetric
29  for (unsigned int i = 0; i < _num_eta; ++i)
30  for (unsigned int j = 0; j < i; ++j)
31  if (_W_ij[_num_eta * i + j] != _W_ij[_num_eta * j + i])
32  paramError("W_ij", "Please supply a symmetric W_ij matrix");
33 }
std::vector< Real > _W_ij
barrier function height matrix
unsigned int _num_eta
order parameters
CrossTermBarrierFunctionBase(const InputParameters &parameters)

Member Function Documentation

◆ computeQpProperties()

void CrossTermBarrierFunctionMaterial::computeQpProperties ( )
protectedvirtual

Reimplemented from CrossTermBarrierFunctionBase.

Definition at line 36 of file CrossTermBarrierFunctionMaterial.C.

37 {
38  // Initialize properties to zero before accumulating
40 
41  // Sum the components of our W_ij matrix to get constant used in our g function
42  for (unsigned int i = 0; i < _num_eta; ++i)
43  for (unsigned int j = i + 1; j < _num_eta; ++j)
44  {
45  const Real ni = (*_eta[i])[_qp];
46  const Real nj = (*_eta[j])[_qp];
47  const Real Wij = _W_ij[_num_eta * i + j];
48 
49  switch (_g_order)
50  {
51  case 0: // SIMPLE
52  _prop_g[_qp] += 16.0 * Wij * (ni * ni * nj * nj);
53  // first derivatives
54  (*_prop_dg[i])[_qp] += 16.0 * Wij * (2 * ni * nj * nj);
55  (*_prop_dg[j])[_qp] += 16.0 * Wij * (2 * ni * ni * nj);
56  // second derivatives (diagonal)
57  (*_prop_d2g[i][i])[_qp] += 16.0 * Wij * (2 * nj * nj);
58  (*_prop_d2g[j][j])[_qp] += 16.0 * Wij * (2 * ni * ni);
59  // second derivatives (off-diagonal)
60  (*_prop_d2g[i][j])[_qp] = 16.0 * Wij * (4 * ni * nj);
61  break;
62 
63  case 1: // LOW
64  _prop_g[_qp] += 4.0 * Wij * (ni * nj);
65  // first derivatives
66  (*_prop_dg[i])[_qp] += 4.0 * Wij * nj;
67  (*_prop_dg[j])[_qp] += 4.0 * Wij * ni;
68  // second derivatives (diagonal) vanish
69  // second derivatives (off-diagonal)
70  (*_prop_d2g[i][j])[_qp] = 4.0 * Wij;
71  break;
72 
73  default:
74  mooseError("Internal error");
75  }
76  }
77 }
std::vector< Real > _W_ij
barrier function height matrix
std::vector< std::vector< MaterialProperty< Real > * > > _prop_d2g
unsigned int _num_eta
order parameters
std::vector< MaterialProperty< Real > * > _prop_dg
MaterialProperty< Real > & _prop_g
Barrier function and its derivatives.
std::vector< const VariableValue * > _eta
unsigned int _g_order
polynomial order of the switching function

Member Data Documentation

◆ _dh

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

Definition at line 56 of file CrossTermBarrierFunctionBase.h.

◆ _eta

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

◆ _eta_names

std::vector<VariableName> CrossTermBarrierFunctionBase::_eta_names
protectedinherited

◆ _function_name

std::string CrossTermBarrierFunctionBase::_function_name
protectedinherited

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

Definition at line 35 of file CrossTermBarrierFunctionBase.h.

Referenced by CrossTermBarrierFunctionBase::CrossTermBarrierFunctionBase().

◆ _g_order

unsigned int CrossTermBarrierFunctionBase::_g_order
protectedinherited

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

Definition at line 38 of file CrossTermBarrierFunctionBase.h.

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

◆ _h

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

Switching functions and their derivatives.

Definition at line 55 of file CrossTermBarrierFunctionBase.h.

◆ _num_eta

unsigned int CrossTermBarrierFunctionBase::_num_eta
protectedinherited

◆ _prop_d2g

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

◆ _prop_dg

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

◆ _prop_g

MaterialProperty<Real>& CrossTermBarrierFunctionBase::_prop_g
protectedinherited

◆ _W_ij

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

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