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

Calculated properties for a single component phase field model using polynomial free energies. More...

#include <PFParamsPolyFreeEnergy.h>

Inheritance diagram for PFParamsPolyFreeEnergy:
[legend]

Public Member Functions

 PFParamsPolyFreeEnergy (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpProperties ()
 

Protected Attributes

const VariableValue & _c
 Variable values. More...
 
const VariableValue & _T
 
MaterialProperty< Real > & _M
 Mateiral property declarations. More...
 
MaterialProperty< RealGradient > & _grad_M
 
MaterialProperty< Real > & _kappa
 
MaterialProperty< Real > & _c_eq
 
MaterialProperty< Real > & _W
 
MaterialProperty< Real > & _Qstar
 
MaterialProperty< Real > & _D
 
Real _int_width
 Input parameters. More...
 
Real _length_scale
 
Real _time_scale
 
MooseEnum _order
 
Real _D0
 
Real _Em
 
Real _Ef
 
Real _surface_energy
 
const Real _JtoeV
 
const Real _kb
 

Detailed Description

Calculated properties for a single component phase field model using polynomial free energies.

Definition at line 23 of file PFParamsPolyFreeEnergy.h.

Constructor & Destructor Documentation

◆ PFParamsPolyFreeEnergy()

PFParamsPolyFreeEnergy::PFParamsPolyFreeEnergy ( const InputParameters &  parameters)

Definition at line 37 of file PFParamsPolyFreeEnergy.C.

38  : Material(parameters),
39  _c(coupledValue("c")),
40  _T(coupledValue("T")),
41  _M(declareProperty<Real>("M")),
42  _grad_M(declareProperty<RealGradient>("grad_M")),
43  _kappa(declareProperty<Real>("kappa")),
44  _c_eq(declareProperty<Real>("c_eq")),
45  _W(declareProperty<Real>("barr_height")),
46  _Qstar(declareProperty<Real>("Qstar")),
47  _D(declareProperty<Real>("D")),
48  _int_width(getParam<Real>("int_width")),
49  _length_scale(getParam<Real>("length_scale")),
50  _time_scale(getParam<Real>("time_scale")),
51  _order(getParam<MooseEnum>("polynomial_order")),
52  _D0(getParam<Real>("D0")),
53  _Em(getParam<Real>("Em")),
54  _Ef(getParam<Real>("Ef")),
55  _surface_energy(getParam<Real>("surface_energy")),
56  _JtoeV(6.24150974e18), // joule to eV conversion
57  _kb(8.617343e-5) // Boltzmann constant in eV/K
58 {
59 }
MaterialProperty< Real > & _Qstar
const VariableValue & _c
Variable values.
MaterialProperty< Real > & _c_eq
MaterialProperty< Real > & _D
MaterialProperty< Real > & _M
Mateiral property declarations.
MaterialProperty< RealGradient > & _grad_M
Real _int_width
Input parameters.
MaterialProperty< Real > & _W
const VariableValue & _T
MaterialProperty< Real > & _kappa

Member Function Documentation

◆ computeQpProperties()

void PFParamsPolyFreeEnergy::computeQpProperties ( )
protectedvirtual

Definition at line 62 of file PFParamsPolyFreeEnergy.C.

63 {
64  // Convert mobility from m^2/s to the length and time scale
65  Real D0_c = _D0 * _time_scale / (_length_scale * _length_scale);
66 
67  Real kbT = _kb * _T[_qp];
68 
69  // Compute equilibrium concentration and diffusivity
70  _c_eq[_qp] = std::exp(-_Ef / kbT);
71  _D[_qp] = D0_c * std::exp(-_Em / kbT);
72 
73  // Compute free energy integral constant, such that int^1_0 f_loc = KN*sqrt(W)
74  Real KN = 0.0;
75 
76  switch (_order)
77  {
78  case 0: // Fourth oder
79  KN = 2.0 / 3.0;
80  break;
81  case 1: // Sixth order
82  KN = 3.0 / 16.0 * std::sqrt(3.0) + 9.0 / 64.0 * std::sqrt(2.0) *
83  (std::log(-std::sqrt(2.0) + std::sqrt(3.0)) +
84  std::log(std::sqrt(2.0) + std::sqrt(3.0)));
85  break;
86  case 2: // Eigth order
87  KN = 0.835510425;
88  break;
89  default:
90  paramError("polynomial_order", "Incorrect polynomial order");
91  }
92 
93  // Convert surface energy from J/m2 to eV/length_scale
94  Real surf_energy = _surface_energy * _JtoeV * _length_scale * _length_scale;
95 
96  // Set interfacial parameter and energy barrier
97  _kappa[_qp] = surf_energy * _int_width / KN;
98  _W[_qp] = surf_energy / (2.0 * _int_width * KN);
99 
100  Real Co = 0.0;
101  Real a = _c_eq[_qp];
102 
103  switch (_order)
104  {
105  case 0: // 4th order polynomial
106  Co = std::pow(2.0, 5.0) * (1.0 + 2.0 * a - 2.0 * a * a);
107  break;
108  case 1: // 6th order polynomial
109  Co = std::pow(2.0, 7.0) * (9.0 / 2.0 * a - 9.0 / 2.0 * a * a + 3.0 / 4.0);
110  break;
111  case 2: // 8th order polynomial
112  Co = std::pow(2.0, 9.0) * (15.0 / 4.0 * a - 15.0 / 4.0 * a * a + 3.0 / 8.0);
113  break;
114  default:
115  mooseError("Error in PFParamsPolyFreeEnergy: incorrect polynomial order");
116  }
117 
118  _M[_qp] = KN / Co * (_D[_qp] * _int_width / surf_energy);
119  _grad_M[_qp] = 0.0;
120 
121  _Qstar[_qp] = -4.0; // eV
122 }
MaterialProperty< Real > & _Qstar
MaterialProperty< Real > & _c_eq
MaterialProperty< Real > & _D
MaterialProperty< Real > & _M
Mateiral property declarations.
MaterialProperty< RealGradient > & _grad_M
Real _int_width
Input parameters.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
MaterialProperty< Real > & _W
const VariableValue & _T
MaterialProperty< Real > & _kappa

Member Data Documentation

◆ _c

const VariableValue& PFParamsPolyFreeEnergy::_c
protected

Variable values.

Definition at line 32 of file PFParamsPolyFreeEnergy.h.

◆ _c_eq

MaterialProperty<Real>& PFParamsPolyFreeEnergy::_c_eq
protected

Definition at line 40 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _D

MaterialProperty<Real>& PFParamsPolyFreeEnergy::_D
protected

Definition at line 43 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _D0

Real PFParamsPolyFreeEnergy::_D0
protected

Definition at line 50 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _Ef

Real PFParamsPolyFreeEnergy::_Ef
protected

Definition at line 52 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _Em

Real PFParamsPolyFreeEnergy::_Em
protected

Definition at line 51 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _grad_M

MaterialProperty<RealGradient>& PFParamsPolyFreeEnergy::_grad_M
protected

Definition at line 37 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _int_width

Real PFParamsPolyFreeEnergy::_int_width
protected

Input parameters.

Definition at line 46 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _JtoeV

const Real PFParamsPolyFreeEnergy::_JtoeV
protected

Definition at line 55 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _kappa

MaterialProperty<Real>& PFParamsPolyFreeEnergy::_kappa
protected

Definition at line 39 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _kb

const Real PFParamsPolyFreeEnergy::_kb
protected

Definition at line 56 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _length_scale

Real PFParamsPolyFreeEnergy::_length_scale
protected

Definition at line 47 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _M

MaterialProperty<Real>& PFParamsPolyFreeEnergy::_M
protected

Mateiral property declarations.

Definition at line 36 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _order

MooseEnum PFParamsPolyFreeEnergy::_order
protected

Definition at line 49 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _Qstar

MaterialProperty<Real>& PFParamsPolyFreeEnergy::_Qstar
protected

Definition at line 42 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _surface_energy

Real PFParamsPolyFreeEnergy::_surface_energy
protected

Definition at line 53 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _T

const VariableValue& PFParamsPolyFreeEnergy::_T
protected

Definition at line 33 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _time_scale

Real PFParamsPolyFreeEnergy::_time_scale
protected

Definition at line 48 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

◆ _W

MaterialProperty<Real>& PFParamsPolyFreeEnergy::_W
protected

Definition at line 41 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().


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