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 22 of file CrossTermBarrierFunctionMaterial.h.

Constructor & Destructor Documentation

CrossTermBarrierFunctionMaterial::CrossTermBarrierFunctionMaterial ( const InputParameters &  parameters)

Definition at line 19 of file CrossTermBarrierFunctionMaterial.C.

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

Member Function Documentation

void CrossTermBarrierFunctionMaterial::computeQpProperties ( )
protectedvirtual

Reimplemented from CrossTermBarrierFunctionBase.

Definition at line 32 of file CrossTermBarrierFunctionMaterial.C.

33 {
34  // Initialize properties to zero before accumulating
36 
37  // Sum the components of our W_ij matrix to get constant used in our g function
38  for (unsigned int i = 0; i < _num_eta; ++i)
39  for (unsigned int j = i + 1; j < _num_eta; ++j)
40  {
41  const Real ni = (*_eta[i])[_qp];
42  const Real nj = (*_eta[j])[_qp];
43  const Real Wij = _W_ij[_num_eta * i + j];
44 
45  switch (_g_order)
46  {
47  case 0: // SIMPLE
48  _prop_g[_qp] += 16.0 * Wij * (ni * ni * nj * nj);
49  // first derivatives
50  (*_prop_dg[i])[_qp] += 16.0 * Wij * (2 * ni * nj * nj);
51  (*_prop_dg[j])[_qp] += 16.0 * Wij * (2 * ni * ni * nj);
52  // second derivatives (diagonal)
53  (*_prop_d2g[i][i])[_qp] += 16.0 * Wij * (2 * nj * nj);
54  (*_prop_d2g[j][j])[_qp] += 16.0 * Wij * (2 * ni * ni);
55  // second derivatives (off-diagonal)
56  (*_prop_d2g[i][j])[_qp] = 16.0 * Wij * (4 * ni * nj);
57  break;
58 
59  case 1: // LOW
60  _prop_g[_qp] += 4.0 * Wij * (ni * nj);
61  // first derivatives
62  (*_prop_dg[i])[_qp] += 4.0 * Wij * nj;
63  (*_prop_dg[j])[_qp] += 4.0 * Wij * ni;
64  // second derivatives (diagonal) vanish
65  // second derivatives (off-diagonal)
66  (*_prop_d2g[i][j])[_qp] = 4.0 * Wij;
67  break;
68 
69  default:
70  mooseError("Internal error");
71  }
72  }
73 }
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

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

Definition at line 53 of file CrossTermBarrierFunctionBase.h.

std::vector<const VariableValue *> CrossTermBarrierFunctionBase::_eta
protectedinherited
std::vector<VariableName> CrossTermBarrierFunctionBase::_eta_names
protectedinherited
std::string CrossTermBarrierFunctionBase::_function_name
protectedinherited

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

Definition at line 32 of file CrossTermBarrierFunctionBase.h.

Referenced by CrossTermBarrierFunctionBase::CrossTermBarrierFunctionBase().

unsigned int CrossTermBarrierFunctionBase::_g_order
protectedinherited

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

Definition at line 35 of file CrossTermBarrierFunctionBase.h.

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

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

Switching functions and their derivatives.

Definition at line 52 of file CrossTermBarrierFunctionBase.h.

unsigned int CrossTermBarrierFunctionBase::_num_eta
protectedinherited
std::vector<std::vector<MaterialProperty<Real> *> > CrossTermBarrierFunctionBase::_prop_d2g
protectedinherited
std::vector<MaterialProperty<Real> *> CrossTermBarrierFunctionBase::_prop_dg
protectedinherited
MaterialProperty<Real>& CrossTermBarrierFunctionBase::_prop_g
protectedinherited
std::vector<Real> CrossTermBarrierFunctionBase::_W_ij
protectedinherited

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