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

Double well phase transformation barrier free energy contribution. More...

#include <MultiBarrierFunctionMaterial.h>

Inheritance diagram for MultiBarrierFunctionMaterial:
[legend]

Public Member Functions

 MultiBarrierFunctionMaterial (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...
 
MooseEnum _g_order
 Polynomial order of the barrier function \( g(\eta) \). More...
 
bool _well_only
 zero out g contribution in the eta interval [0:1] 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< MaterialProperty< Real > * > _prop_d2g
 

Detailed Description

Double well phase transformation barrier free energy contribution.

\( g(\vec\eta) = \sum_i \eta_i^2(1-\eta_i)^2 \)

Definition at line 23 of file MultiBarrierFunctionMaterial.h.

Constructor & Destructor Documentation

MultiBarrierFunctionMaterial::MultiBarrierFunctionMaterial ( const InputParameters &  parameters)

Definition at line 28 of file MultiBarrierFunctionMaterial.C.

29  : DerivativeMaterialInterface<Material>(parameters),
30  _function_name(getParam<std::string>("function_name")),
31  _g_order(getParam<MooseEnum>("g_order")),
32  _well_only(getParam<bool>("well_only")),
33  _num_eta(coupledComponents("etas")),
34  _eta(_num_eta),
35  _prop_g(declareProperty<Real>(_function_name)),
38 {
39  // declare derivative properties, fetch eta values
40  for (unsigned int i = 0; i < _num_eta; ++i)
41  {
42  const VariableName & eta_name = getVar("etas", i)->name();
43  _prop_dg[i] = &declarePropertyDerivative<Real>(_function_name, eta_name);
44  _prop_d2g[i] = &declarePropertyDerivative<Real>(_function_name, eta_name, eta_name);
45  _eta[i] = &coupledValue("etas", i);
46  }
47 }
std::vector< MaterialProperty< Real > * > _prop_dg
unsigned int _num_eta
order parameters
std::vector< const VariableValue * > _eta
MooseEnum _g_order
Polynomial order of the barrier function .
std::string _function_name
name of the function of eta (used to generate the material property names)
bool _well_only
zero out g contribution in the eta interval [0:1]
std::vector< MaterialProperty< Real > * > _prop_d2g
MaterialProperty< Real > & _prop_g
Barrier functions and their drivatives.

Member Function Documentation

void MultiBarrierFunctionMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 50 of file MultiBarrierFunctionMaterial.C.

51 {
52  Real g = 0.0;
53 
54  for (unsigned int i = 0; i < _num_eta; ++i)
55  {
56  const Real n = (*_eta[i])[_qp];
57 
58  if (_well_only && n >= 0.0 && n <= 1.0)
59  {
60  _prop_g[_qp] = 0.0;
61  (*_prop_dg[i])[_qp] = 0.0;
62  (*_prop_d2g[i])[_qp] = 0.0;
63  continue;
64  }
65 
66  switch (_g_order)
67  {
68  case 0: // SIMPLE
69  g += n * n * (1.0 - n) * (1.0 - n);
70  (*_prop_dg[i])[_qp] = 2.0 * n * (n - 1.0) * (2.0 * n - 1.0);
71  (*_prop_d2g[i])[_qp] = 12.0 * (n * n - n) + 2.0;
72  break;
73  }
74  }
75 
76  _prop_g[_qp] = g;
77 }
std::vector< MaterialProperty< Real > * > _prop_dg
unsigned int _num_eta
order parameters
std::vector< const VariableValue * > _eta
MooseEnum _g_order
Polynomial order of the barrier function .
bool _well_only
zero out g contribution in the eta interval [0:1]
std::vector< MaterialProperty< Real > * > _prop_d2g
MaterialProperty< Real > & _prop_g
Barrier functions and their drivatives.

Member Data Documentation

std::vector<const VariableValue *> MultiBarrierFunctionMaterial::_eta
protected
std::string MultiBarrierFunctionMaterial::_function_name
protected

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

Definition at line 32 of file MultiBarrierFunctionMaterial.h.

Referenced by MultiBarrierFunctionMaterial().

MooseEnum MultiBarrierFunctionMaterial::_g_order
protected

Polynomial order of the barrier function \( g(\eta) \).

Definition at line 35 of file MultiBarrierFunctionMaterial.h.

Referenced by computeQpProperties().

unsigned int MultiBarrierFunctionMaterial::_num_eta
protected

order parameters

Definition at line 41 of file MultiBarrierFunctionMaterial.h.

Referenced by computeQpProperties(), and MultiBarrierFunctionMaterial().

std::vector<MaterialProperty<Real> *> MultiBarrierFunctionMaterial::_prop_d2g
protected
std::vector<MaterialProperty<Real> *> MultiBarrierFunctionMaterial::_prop_dg
protected
MaterialProperty<Real>& MultiBarrierFunctionMaterial::_prop_g
protected

Barrier functions and their drivatives.

Definition at line 45 of file MultiBarrierFunctionMaterial.h.

Referenced by computeQpProperties().

bool MultiBarrierFunctionMaterial::_well_only
protected

zero out g contribution in the eta interval [0:1]

Definition at line 38 of file MultiBarrierFunctionMaterial.h.

Referenced by computeQpProperties().


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