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 26 of file MultiBarrierFunctionMaterial.h.

Constructor & Destructor Documentation

◆ MultiBarrierFunctionMaterial()

MultiBarrierFunctionMaterial::MultiBarrierFunctionMaterial ( const InputParameters &  parameters)

Definition at line 33 of file MultiBarrierFunctionMaterial.C.

34  : DerivativeMaterialInterface<Material>(parameters),
35  _function_name(getParam<std::string>("function_name")),
36  _g_order(getParam<MooseEnum>("g_order")),
37  _well_only(getParam<bool>("well_only")),
38  _num_eta(coupledComponents("etas")),
39  _eta(_num_eta),
40  _prop_g(declareProperty<Real>(_function_name)),
43 {
44  // declare derivative properties, fetch eta values
45  for (unsigned int i = 0; i < _num_eta; ++i)
46  {
47  const VariableName & eta_name = getVar("etas", i)->name();
48  _prop_dg[i] = &declarePropertyDerivative<Real>(_function_name, eta_name);
49  _prop_d2g[i] = &declarePropertyDerivative<Real>(_function_name, eta_name, eta_name);
50  _eta[i] = &coupledValue("etas", i);
51  }
52 }
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

◆ computeQpProperties()

void MultiBarrierFunctionMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 55 of file MultiBarrierFunctionMaterial.C.

56 {
57  Real g = 0.0;
58 
59  for (unsigned int i = 0; i < _num_eta; ++i)
60  {
61  const Real n = (*_eta[i])[_qp];
62 
63  if (_well_only && n >= 0.0 && n <= 1.0)
64  {
65  _prop_g[_qp] = 0.0;
66  (*_prop_dg[i])[_qp] = 0.0;
67  (*_prop_d2g[i])[_qp] = 0.0;
68  continue;
69  }
70 
71  switch (_g_order)
72  {
73  case 0: // SIMPLE
74  g += n * n * (1.0 - n) * (1.0 - n);
75  (*_prop_dg[i])[_qp] = 2.0 * n * (n - 1.0) * (2.0 * n - 1.0);
76  (*_prop_d2g[i])[_qp] = 12.0 * (n * n - n) + 2.0;
77  break;
78  }
79  }
80 
81  _prop_g[_qp] = g;
82 }
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

◆ _eta

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

◆ _function_name

std::string MultiBarrierFunctionMaterial::_function_name
protected

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

Definition at line 35 of file MultiBarrierFunctionMaterial.h.

Referenced by MultiBarrierFunctionMaterial().

◆ _g_order

MooseEnum MultiBarrierFunctionMaterial::_g_order
protected

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

Definition at line 38 of file MultiBarrierFunctionMaterial.h.

Referenced by computeQpProperties().

◆ _num_eta

unsigned int MultiBarrierFunctionMaterial::_num_eta
protected

order parameters

Definition at line 44 of file MultiBarrierFunctionMaterial.h.

Referenced by computeQpProperties(), and MultiBarrierFunctionMaterial().

◆ _prop_d2g

std::vector<MaterialProperty<Real> *> MultiBarrierFunctionMaterial::_prop_d2g
protected

◆ _prop_dg

std::vector<MaterialProperty<Real> *> MultiBarrierFunctionMaterial::_prop_dg
protected

◆ _prop_g

MaterialProperty<Real>& MultiBarrierFunctionMaterial::_prop_g
protected

Barrier functions and their drivatives.

Definition at line 48 of file MultiBarrierFunctionMaterial.h.

Referenced by computeQpProperties().

◆ _well_only

bool MultiBarrierFunctionMaterial::_well_only
protected

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

Definition at line 41 of file MultiBarrierFunctionMaterial.h.

Referenced by computeQpProperties().


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