19 "Free energy contribution asymmetric across interfaces between arbitrary pairs of phases.");
20 params.
addParam<std::vector<MaterialPropertyName>>(
21 "hi_names",
"Switching Function Materials that provide h(eta_i)");
30 const std::vector<MaterialPropertyName> & hi_names =
31 getParam<std::vector<MaterialPropertyName>>(
"hi_names");
33 paramError(
"hi_names",
"The number of hi_names must be equal to the number of coupled etas");
35 for (
unsigned int i = 0; i <
_num_eta; ++i)
37 _h[i] = &getMaterialProperty<Real>(hi_names[i]);
38 _dh[i] = &getMaterialPropertyDerivative<Real>(hi_names[i],
_eta_names[i]);
50 for (
unsigned int i = 0; i <
_num_eta; ++i)
51 for (
unsigned int j = i + 1; j <
_num_eta; ++j)
54 const Real ni = (*
_eta[i])[_qp];
55 const Real nj = (*
_eta[j])[_qp];
60 const Real hi = (*
_h[i])[_qp];
61 const Real hj = (*
_h[j])[_qp];
62 const Real dhi = (*
_dh[i])[_qp];
63 const Real dhj = (*
_dh[j])[_qp];
64 const Real d2hi = (*
_d2h[i])[_qp];
65 const Real d2hj = (*
_d2h[j])[_qp];
68 Real
B, dBi, dBj, d2Bii, d2Bjj, d2Bij;
72 B = 16.0 * ni * ni * nj * nj;
73 dBi = 16.0 * 2.0 * ni * nj * nj;
74 dBj = 16.0 * 2.0 * ni * ni * nj;
75 d2Bii = 16.0 * 2.0 * nj * nj;
76 d2Bjj = 16.0 * 2.0 * ni * ni;
77 d2Bij = 16.0 * 4.0 * ni * nj;
93 _prop_g[_qp] += (Wij * hi + Wji * hj) *
B;
95 (*
_prop_dg[i])[_qp] += (Wij * hi + Wji * hj) * dBi + (Wij * dhi) *
B;
96 (*
_prop_dg[j])[_qp] += (Wij * hi + Wji * hj) * dBj + (Wji * dhj) *
B;
99 (Wij * hi + Wji * hj) * d2Bii + 2 * (Wij * dhi) * dBi + (Wij * d2hi) *
B;
101 (Wij * hi + Wji * hj) * d2Bjj + 2 * (Wji * dhj) * dBj + (Wji * d2hj) *
B;
104 (Wij * hi + Wji * hj) * (d2Bij) + (Wji * dhj) * dBi + (Wij * dhi) * dBj;
registerMooseObject("PhaseFieldApp", AsymmetricCrossTermBarrierFunctionMaterial)
void mooseError(Args &&... args)
AsymmetricCrossTermBarrierFunctionMaterial adds a free energy contribution on the interfaces between ...
static InputParameters validParams()
std::vector< const MaterialProperty< Real > * > _dh
AsymmetricCrossTermBarrierFunctionMaterial(const InputParameters ¶meters)
std::vector< const MaterialProperty< Real > * > _d2h
std::vector< const MaterialProperty< Real > * > _h
Switching functions and their drivatives.
virtual void computeQpProperties()
CrossTermBarrierFunctionBase is the base to a set of free energy penalties that set the phase interfa...
MaterialProperty< Real > & _prop_g
Barrier function and its derivatives.
unsigned int _num_eta
order parameters
std::vector< Real > _W_ij
barrier function height matrix
const std::vector< const VariableValue * > _eta
virtual void computeQpProperties()
std::vector< MaterialProperty< Real > * > _prop_dg
unsigned int _g_order
polynomial order of the switching function
std::vector< std::vector< MaterialProperty< Real > * > > _prop_d2g
static InputParameters validParams()
const std::vector< VariableName > _eta_names