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 15 of file PFParamsPolyFreeEnergy.h.

Constructor & Destructor Documentation

PFParamsPolyFreeEnergy::PFParamsPolyFreeEnergy ( const InputParameters &  parameters)

Definition at line 27 of file PFParamsPolyFreeEnergy.C.

28  : Material(parameters),
29  _c(coupledValue("c")),
30  _T(coupledValue("T")),
31  _M(declareProperty<Real>("M")),
32  _grad_M(declareProperty<RealGradient>("grad_M")),
33  _kappa(declareProperty<Real>("kappa")),
34  _c_eq(declareProperty<Real>("c_eq")),
35  _W(declareProperty<Real>("barr_height")),
36  _Qstar(declareProperty<Real>("Qstar")),
37  _D(declareProperty<Real>("D")),
38  _int_width(getParam<Real>("int_width")),
39  _length_scale(getParam<Real>("length_scale")),
40  _time_scale(getParam<Real>("time_scale")),
41  _order(getParam<MooseEnum>("polynomial_order")),
42  _D0(getParam<Real>("D0")),
43  _Em(getParam<Real>("Em")),
44  _Ef(getParam<Real>("Ef")),
45  _surface_energy(getParam<Real>("surface_energy")),
46  _JtoeV(6.24150974e18), // joule to eV conversion
47  _kb(8.617343e-5) // Boltzmann constant in eV/K
48 {
49 }
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

void PFParamsPolyFreeEnergy::computeQpProperties ( )
protectedvirtual

Definition at line 52 of file PFParamsPolyFreeEnergy.C.

53 {
54  // Convert mobility from m^2/s to the length and time scale
55  Real D0_c = _D0 * _time_scale / (_length_scale * _length_scale);
56 
57  Real kbT = _kb * _T[_qp];
58 
59  // Compute equilibrium concentration and diffusivity
60  _c_eq[_qp] = std::exp(-_Ef / kbT);
61  _D[_qp] = D0_c * std::exp(-_Em / kbT);
62 
63  // Compute free energy integral constant, such that int^1_0 f_loc = KN*sqrt(W)
64  Real KN = 0.0;
65 
66  switch (_order)
67  {
68  case 0: // Fourth oder
69  KN = 2.0 / 3.0;
70  break;
71  case 1: // Sixth order
72  KN = 3.0 / 16.0 * std::sqrt(3.0) +
73  9.0 / 64.0 * std::sqrt(2.0) * (std::log(-std::sqrt(2.0) + std::sqrt(3.0)) +
74  std::log(std::sqrt(2.0) + std::sqrt(3.0)));
75  break;
76  case 2: // Eigth order
77  KN = 0.835510425;
78  break;
79  default:
80  mooseError("Error in PFParamsPolyFreeEnergy: incorrect polynomial order");
81  }
82 
83  // Convert surface energy from J/m2 to eV/length_scale
84  Real surf_energy = _surface_energy * _JtoeV * _length_scale * _length_scale;
85 
86  // Set interfacial parameter and energy barrier
87  _kappa[_qp] = surf_energy * _int_width / KN;
88  _W[_qp] = surf_energy / (2.0 * _int_width * KN);
89 
90  Real Co = 0.0;
91  Real a = _c_eq[_qp];
92 
93  switch (_order)
94  {
95  case 0: // 4th order polynomial
96  Co = std::pow(2.0, 5.0) * (1.0 + 2.0 * a - 2.0 * a * a);
97  break;
98  case 1: // 6th order polynomial
99  Co = std::pow(2.0, 7.0) * (9.0 / 2.0 * a - 9.0 / 2.0 * a * a + 3.0 / 4.0);
100  break;
101  case 2: // 8th order polynomial
102  Co = std::pow(2.0, 9.0) * (15.0 / 4.0 * a - 15.0 / 4.0 * a * a + 3.0 / 8.0);
103  break;
104  default:
105  mooseError("Error in PFParamsPolyFreeEnergy: incorrect polynomial order");
106  }
107 
108  _M[_qp] = KN / Co * (_D[_qp] * _int_width / surf_energy);
109  _grad_M[_qp] = 0.0;
110 
111  _Qstar[_qp] = -4.0; // eV
112 }
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

const VariableValue& PFParamsPolyFreeEnergy::_c
protected

Variable values.

Definition at line 24 of file PFParamsPolyFreeEnergy.h.

MaterialProperty<Real>& PFParamsPolyFreeEnergy::_c_eq
protected

Definition at line 32 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& PFParamsPolyFreeEnergy::_D
protected

Definition at line 35 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

Real PFParamsPolyFreeEnergy::_D0
protected

Definition at line 42 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

Real PFParamsPolyFreeEnergy::_Ef
protected

Definition at line 44 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

Real PFParamsPolyFreeEnergy::_Em
protected

Definition at line 43 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

MaterialProperty<RealGradient>& PFParamsPolyFreeEnergy::_grad_M
protected

Definition at line 29 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

Real PFParamsPolyFreeEnergy::_int_width
protected

Input parameters.

Definition at line 38 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

const Real PFParamsPolyFreeEnergy::_JtoeV
protected

Definition at line 47 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& PFParamsPolyFreeEnergy::_kappa
protected

Definition at line 31 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

const Real PFParamsPolyFreeEnergy::_kb
protected

Definition at line 48 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

Real PFParamsPolyFreeEnergy::_length_scale
protected

Definition at line 39 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& PFParamsPolyFreeEnergy::_M
protected

Mateiral property declarations.

Definition at line 28 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

MooseEnum PFParamsPolyFreeEnergy::_order
protected

Definition at line 41 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& PFParamsPolyFreeEnergy::_Qstar
protected

Definition at line 34 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

Real PFParamsPolyFreeEnergy::_surface_energy
protected

Definition at line 45 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

const VariableValue& PFParamsPolyFreeEnergy::_T
protected

Definition at line 25 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

Real PFParamsPolyFreeEnergy::_time_scale
protected

Definition at line 40 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& PFParamsPolyFreeEnergy::_W
protected

Definition at line 33 of file PFParamsPolyFreeEnergy.h.

Referenced by computeQpProperties().


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