11 #include "libmesh/quadrature.h" 12 #include "libmesh/utility.h" 21 "Includes switching and thermodynamic properties for the grand potential sintering model");
23 "etas",
"var_name_base",
"op_num",
"Array of order parameters that describe solid phase");
27 params.
addParam<MaterialPropertyName>(
28 "solid_energy_coefficient",
30 "Parabolic solid energy coefficient (energy/volume). Only used for parabolic energy.");
32 "void_energy_coefficient",
"Parabolic void energy coefficient (energy/volume)");
33 params.
addParam<
Real>(
"surface_energy", 19.7,
"Surface energy in units of problem (energy/area)");
35 "grainboundary_energy", 9.86,
"Grain boundary energy in units of problem (energy/area)");
36 params.
addParam<
Real>(
"int_width", 1,
"Interface width in units of problem (length)");
39 "Value between 0 and 1 that determines when the interface begins to switch " 40 "from surface to GB. Small values give less error while large values " 43 "equilibrium_vacancy_concentration",
44 "Name of material that determines the equilibrium vacancy concentration in the solid phase");
45 params.
addParam<
Real>(
"atomic_volume", 0.04092,
"Atomic volume of material");
46 MooseEnum solid_energy_model(
"PARABOLIC DILUTE IDEAL",
"PARABOLIC");
49 "Type of energy function to use for the solid phase.");
51 "mass_conservation",
false,
"imposing strict mass conservation formulation");
57 _neta(coupledComponents(
"etas")),
60 _w(coupledValue(
"chemical_potential")),
61 _w_name(coupledName(
"chemical_potential", 0)),
62 _phi(coupledValue(
"void_op")),
63 _phi_name(coupledName(
"void_op", 0)),
64 _cs_eq_name(getParam<MaterialPropertyName>(
"equilibrium_vacancy_concentration")),
65 _cs_eq(getMaterialProperty<
Real>(_cs_eq_name)),
68 _T(coupledValue(
"Temperature")),
69 _kv(getMaterialProperty<
Real>(
"void_energy_coefficient")),
70 _ks(getMaterialProperty<
Real>(
"solid_energy_coefficient")),
71 _hv(declareProperty<
Real>(
"hv")),
72 _dhv(declarePropertyDerivative<
Real>(
"hv", _phi_name)),
73 _d2hv(declarePropertyDerivative<
Real>(
"hv", _phi_name, _phi_name)),
74 _hs(declareProperty<
Real>(
"hs")),
75 _dhs(declarePropertyDerivative<
Real>(
"hs", _phi_name)),
76 _d2hs(declarePropertyDerivative<
Real>(
"hs", _phi_name, _phi_name)),
77 _chi(declareProperty<
Real>(
"chi")),
78 _dchidphi(declarePropertyDerivative<
Real>(
"chi", _phi_name)),
79 _dchidw(declarePropertyDerivative<
Real>(
"chi", _w_name)),
80 _d2chidphi2(declarePropertyDerivative<
Real>(
"chi", _phi_name, _phi_name)),
81 _d2chidw2(declarePropertyDerivative<
Real>(
"chi", _w_name, _w_name)),
82 _d2chidphidw(declarePropertyDerivative<
Real>(
"chi", _phi_name, _w_name)),
83 _rhov(declareProperty<
Real>(
"rhov")),
84 _drhovdw(declarePropertyDerivative<
Real>(
"rhov", _w_name)),
85 _rhos(declareProperty<
Real>(
"rhos")),
86 _drhosdw(declarePropertyDerivative<
Real>(
"rhos", _w_name)),
87 _d2rhosdw2(declarePropertyDerivative<
Real>(
"rhos", _w_name, _w_name)),
91 _omegav(declareProperty<
Real>(
"omegav")),
92 _domegavdw(declarePropertyDerivative<
Real>(
"omegav", _w_name)),
93 _d2omegavdw2(declarePropertyDerivative<
Real>(
"omegav", _w_name, _w_name)),
94 _omegas(declareProperty<
Real>(
"omegas")),
95 _domegasdw(declarePropertyDerivative<
Real>(
"omegas", _w_name)),
96 _d2omegasdw2(declarePropertyDerivative<
Real>(
"omegas", _w_name, _w_name)),
98 _d2omegasdwdeta(_neta),
99 _d2omegasdetadeta(_neta),
100 _mu(declareProperty<
Real>(
"mu")),
101 _dmu(declarePropertyDerivative<
Real>(
"mu", _phi_name)),
102 _d2mu(declarePropertyDerivative<
Real>(
"mu", _phi_name, _phi_name)),
103 _kappa(declareProperty<
Real>(
"kappa")),
104 _dkappa(declarePropertyDerivative<
Real>(
"kappa", _phi_name)),
105 _d2kappa(declarePropertyDerivative<
Real>(
"kappa", _phi_name, _phi_name)),
106 _gamma(declareProperty<
Real>(
"gamma")),
107 _hv_c_min(declareProperty<
Real>(
"hv_c_min")),
108 _dhv_c_mindphi(declarePropertyDerivative<
Real>(
"hv_c_min", _phi_name)),
109 _d2hv_c_mindphi2(declarePropertyDerivative<
Real>(
"hv_c_min", _phi_name, _phi_name)),
110 _hs_c_min(declareProperty<
Real>(
"hs_c_min")),
111 _dhs_c_mindphi(declarePropertyDerivative<
Real>(
"hs_c_min", _phi_name)),
112 _d2hs_c_mindphi2(declarePropertyDerivative<
Real>(
"hs_c_min", _phi_name, _phi_name)),
115 _hv_over_kVa(declareProperty<
Real>(
"hv_over_kVa")),
116 _dhv_over_kVadphi(declarePropertyDerivative<
Real>(
"hv_over_kVa", _phi_name)),
117 _d2hv_over_kVadphi2(declarePropertyDerivative<
Real>(
"hv_over_kVa", _phi_name, _phi_name)),
118 _hs_over_kVa(declareProperty<
Real>(
"hs_over_kVa")),
119 _dhs_over_kVadphi(declarePropertyDerivative<
Real>(
"hs_over_kVa", _phi_name)),
120 _d2hs_over_kVadphi2(declarePropertyDerivative<
Real>(
"hs_over_kVa", _phi_name, _phi_name)),
122 _sigma_s(getParam<
Real>(
"surface_energy")),
123 _sigma_gb(getParam<
Real>(
"grainboundary_energy")),
124 _int_width(getParam<
Real>(
"int_width")),
125 _switch(getParam<
Real>(
"surface_switch_value")),
126 _Va(getParam<
Real>(
"atomic_volume")),
127 _solid_energy(getParam<
MooseEnum>(
"solid_energy_model")),
128 _mu_s(6.0 * _sigma_s / _int_width),
129 _mu_gb(6.0 * _sigma_gb / _int_width),
130 _kappa_s(0.75 * _sigma_s * _int_width),
131 _kappa_gb(0.75 * _sigma_gb * _int_width),
133 _mass_conservation(getParam<bool>(
"mass_conservation"))
136 mooseError(
"GrandPotentialSinteringMaterial: surface_switch_value should be between 0 and 1");
139 mooseError(
"GrandPotentialSinteringMaterial: strict mass conservation is currently only " 140 "applicable to parabolic free energy");
142 for (
unsigned int i = 0; i <
_neta; ++i)
157 for (
unsigned int j = 0;
j <= i; ++
j)
199 f = phi * phi * phi * (10.0 + phi * (-15.0 + phi * 6.0));
200 df = 30.0 /
_switch * phi * phi * (phi - 1.0) * (phi - 1.0);
201 d2f = 60.0 * phi / (
_switch *
_switch) * (2.0 * phi - 1.0) * (phi - 1.0);
245 for (
unsigned int i = 0; i <
_neta; ++i)
252 for (
unsigned int j = i;
j <
_neta; ++
j)
272 for (
unsigned int i = 0; i <
_neta; ++i)
278 for (
unsigned int j = i;
j <
_neta; ++
j)
290 std::vector<Real> dEf;
291 std::vector<std::vector<Real>> d2Ef;
298 Real rhos0 = x0 / ((1.0 + x0) *
_Va);
301 x * (1.0 -
x) / (
_Va * Utility::pow<2>(
_kB *
_T[
_qp]) * Utility::pow<3>(1.0 +
x));
302 d3rhosdw3 =
x * (1 - 4.0 *
x +
x *
x) /
303 (
_Va * Utility::pow<3>(
_kB *
_T[
_qp]) * Utility::pow<4>(1.0 +
x));
308 for (
unsigned int i = 0; i <
_neta; ++i)
312 d2Ef[i].resize(
_neta);
320 for (
unsigned int j = i;
j <
_neta; ++
j)
332 (
x / Utility::pow<2>(1.0 +
x) - x0 / Utility::pow<2>(1.0 + x0));
const MaterialProperty< Real > & _kv
void energy coefficient
registerMooseObject("PhaseFieldApp", GrandPotentialSinteringMaterial)
MaterialProperty< Real > & _d2kappa
std::vector< VariableName > _eta_name
std::vector< const MaterialProperty< Real > * > _dcs_eq
const Real _kappa_gb
kappa value on grain boundaries
MaterialProperty< Real > & _drhovdw
MaterialProperty< Real > & _dhv_c_mindphi
VariableName coupledName(const std::string &var_name, unsigned int comp=0) const
MaterialProperty< Real > & _rhos
solid phase vacancy density
MaterialProperty< Real > & _d2mu
MaterialProperty< Real > & _kappa
gradient energy coefficient
MaterialProperty< Real > & _dhs
MaterialProperty< Real > & _d2hs_c_mindphi2
MaterialProperty< Real > & _chi
susceptibility
MaterialProperty< Real > & _d2chidw2
MaterialProperty< Real > & _dhs_over_kVadphi
MaterialProperty< Real > & _gamma
interface profile coefficient
std::vector< MaterialProperty< Real > * > _domegasdeta
const NonlinearVariableName _w_name
MaterialProperty< Real > & _dhv
MaterialProperty< Real > & _rhov
void phase vacancy density
const Real _mu_s
mu value on surfaces
MaterialProperty< Real > & _hv_over_kVa
MatReaction Force coefficient for mass conservation in conc and chempot coupling. ...
std::vector< std::vector< MaterialProperty< Real > * > > _d2rhos
MaterialProperty< Real > & _d2chidphidw
MaterialProperty< Real > & _d2hv
MaterialProperty< Real > & _d2rhosdw2
const VariableValue & _phi
void phase order parameter
MaterialProperty< Real > & _omegav
void phase potential density
std::vector< MaterialProperty< Real > * > _drhos
virtual const VariableValue & coupledValue(const std::string &var_name, unsigned int comp=0) const
MaterialProperty< Real > & _d2omegasdw2
MaterialProperty< Real > & _hs
solid phase switching function
const Real _switch
Parameter to determine accuracy of surface/GB phase switching function.
MaterialProperty< Real > & _mu
energy barrier coefficient
MaterialProperty< Real > & _d2hs_over_kVadphi2
MaterialProperty< Real > & _d2chidphi2
std::vector< MaterialProperty< Real > * > _d2omegasdwdeta
static InputParameters validParams()
GrandPotentialSinteringMaterial(const InputParameters ¶meters)
MaterialProperty< Real > & _d2omegavdw2
const std::vector< double > x
const Real _kB
Boltzmann constant.
Real f(Real x)
Test function for Brents method.
MaterialProperty< Real > & _d2hv_c_mindphi2
std::vector< const VariableValue * > _eta
solid phase order parameters
This material calculates necessary parameters for the grand potential sintering model.
const Real _Va
Atomic volume of species.
MaterialProperty< Real > & _domegavdw
std::vector< std::vector< const MaterialProperty< Real > * > > _d2cs_eq
static InputParameters validParams()
const Real _mu_gb
mu value on grain boundaries
MaterialProperty< Real > & _domegasdw
const VariableValue & _w
chemical potential
MaterialProperty< Real > & _dchidphi
const MaterialProperty< Real > & _ks
solid energy coefficient
MaterialProperty< Real > & _d2hs
std::vector< MaterialProperty< Real > * > _dhs_c_min
const VariableValue & _T
temperature
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< std::vector< MaterialProperty< Real > * > > _d2hs_c_min
const MaterialPropertyName _cs_eq_name
equilibrium vacancy concentration
MaterialProperty< Real > & _d2hv_over_kVadphi2
MaterialProperty< Real > & _omegas
solid phase potential density
virtual void computeQpProperties()
const Real _kappa_s
kappa value on surfaces
void mooseError(Args &&... args) const
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const MooseEnum _solid_energy
Type of energy function to use for the solid phase.
MaterialProperty< Real > & _dkappa
MaterialProperty< Real > & _hs_over_kVa
MaterialProperty< Real > & _dhs_c_mindphi
MaterialProperty< Real > & _drhosdw
MaterialProperty< Real > & _dmu
MaterialProperty< Real > & _dhv_over_kVadphi
const bool _mass_conservation
strict mass conservation flag
MaterialProperty< Real > & _dchidw
MaterialProperty< Real > & _hv_c_min
Body Force coefficient for mass conservation in conc and chempot coupling.
MaterialProperty< Real > & _hv
void phase switching function
const MaterialProperty< Real > & _cs_eq
MaterialProperty< Real > & _hs_c_min
const unsigned int _neta
number of solid phase order paramters
std::vector< MaterialProperty< Real > * > _d2rhosdwdeta
std::vector< std::vector< MaterialProperty< Real > * > > _d2omegasdetadeta