Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #include "PFCTradMaterial.h" 11 : 12 : registerMooseObject("PhaseFieldApp", PFCTradMaterial); 13 : 14 : InputParameters 15 47 : PFCTradMaterial::validParams() 16 : { 17 47 : InputParameters params = Material::validParams(); 18 47 : params.addClassDescription( 19 : "Polynomial coefficients for a phase field crystal correlation function"); 20 94 : MooseEnum order("FOURTH=4 EIGHTH=8"); 21 94 : params.addRequiredParam<MooseEnum>( 22 : "order", order, "This is the order of the polynomial used for correlation function"); 23 47 : return params; 24 47 : } 25 : 26 36 : PFCTradMaterial::PFCTradMaterial(const InputParameters & parameters) 27 : : Material(parameters), 28 36 : _order(getParam<MooseEnum>("order")), 29 36 : _M(declareProperty<Real>("M")), 30 36 : _a(declareProperty<Real>("a")), 31 36 : _b(declareProperty<Real>("b")), 32 36 : _C0(declareProperty<Real>("C0")), 33 36 : _C2(declareProperty<Real>("C2")), 34 36 : _C4(declareProperty<Real>("C4")), 35 36 : _C6(declareProperty<Real>("C6")), 36 72 : _C8(declareProperty<Real>("C8")) 37 : { 38 36 : } 39 : 40 : void 41 526900 : PFCTradMaterial::computeQpProperties() 42 : { 43 : const Real invSkm = 0.332; 44 : const Real u_s = 0.72; 45 : 46 526900 : _M[_qp] = 1.0; 47 526900 : _a[_qp] = 3.0 / (2.0 * u_s) * invSkm; 48 526900 : _b[_qp] = 4.0 / (30.0 * u_s * u_s) * invSkm; 49 : 50 526900 : switch (_order) 51 : { 52 526900 : case 4: 53 526900 : _C0[_qp] = -10.9153; 54 526900 : _C2[_qp] = 2.6; // Angstrom^2 55 526900 : _C4[_qp] = 0.1459; // Angstrom^4, would be negative but coefficient term is negative 56 526900 : break; 57 : 58 0 : case 8: 59 0 : _C0[_qp] = -49.0; 60 : // new parameter derived from Jaatinen's paper; using km = 2.985 A; updated 1/31/2015. 61 0 : _C2[_qp] = 20.00313; // Angstrom^2 62 0 : _C4[_qp] = 3.11883; // Angstrom^4, would be negative but coefficient term is negative 63 0 : _C6[_qp] = 0.22554; // Angstrom^6 64 0 : _C8[_qp] = 0.00643; // Angstrom^8, would be negative but coefficient term is negative 65 0 : break; 66 : 67 0 : default: 68 0 : mooseError("Unknown order value."); 69 : } 70 526900 : }