19 "Two phase material that combines two single phase materials using a switching function.");
22 params.
addRequiredParam<MaterialPropertyName>(
"fa_name",
"Phase A material (at eta=0)");
23 params.
addRequiredParam<MaterialPropertyName>(
"fb_name",
"Phase A material (at eta=1)");
24 params.
addParam<MaterialPropertyName>(
25 "h",
"h",
"Switching Function Material that provides h(eta)");
26 params.
addParam<MaterialPropertyName>(
"g",
"g",
"Barrier Function Material that provides g(eta)");
29 params.
addCoupledVar(
"coupled_variables",
"Vector of variable arguments of fa and fb");
31 "Vector of displacement gradient variables (see "
32 "Modules/PhaseField/DisplacementGradients "
39 params.
addParam<Real>(
"W", 0.0,
"Energy barrier for the phase transformation from A to B");
46 _eta(coupledValue(
"eta")),
47 _eta_name(coupledName(
"eta", 0)),
48 _eta_var(coupled(
"eta")),
49 _h(getMaterialProperty<Real>(
"h")),
50 _dh(getMaterialPropertyDerivative<Real>(
"h", _eta_name)),
51 _d2h(getMaterialPropertyDerivative<Real>(
"h", _eta_name, _eta_name)),
52 _d3h(getMaterialPropertyDerivative<Real>(
"h", _eta_name, _eta_name, _eta_name)),
53 _g(getMaterialProperty<Real>(
"g")),
54 _dg(getMaterialPropertyDerivative<Real>(
"g", _eta_name)),
55 _d2g(getMaterialPropertyDerivative<Real>(
"g", _eta_name, _eta_name)),
56 _d3g(getMaterialPropertyDerivative<Real>(
"g", _eta_name, _eta_name, _eta_name)),
57 _W(getParam<Real>(
"W")),
58 _prop_Fa(getMaterialProperty<Real>(
"fa_name")),
59 _prop_Fb(getMaterialProperty<Real>(
"fb_name"))
68 for (
unsigned int i = 0; i <
_nargs; ++i)
83 for (
unsigned int j = 0; j <
_nargs; ++j)
95 for (
unsigned int k = 0; k <
_nargs; ++k)
97 _prop_d3Fa[i][j][k] = &getMaterialPropertyDerivative<Real>(
99 _prop_d3Fb[i][j][k] = &getMaterialPropertyDerivative<Real>(
110 validateCoupling<Real>(
"fa_name");
111 validateCoupling<Real>(
"fb_name");
registerMooseObject("PhaseFieldApp", DerivativeTwoPhaseMaterial)
static InputParameters validParams()
DerivativeMaterial child class to evaluate a parsed function for the free energy and automatically pr...
DerivativeTwoPhaseMaterial(const InputParameters ¶meters)
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _prop_d3Fb
std::vector< const MaterialProperty< Real > * > _prop_dFa
Derivatives of Fa and Fb with respect to arg[i].
const MaterialProperty< Real > & _dg
const MaterialProperty< Real > & _dh
const MaterialProperty< Real > & _prop_Fa
Function value of the A and B phase.
virtual Real computeF() override
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2Fa
Second derivatives of Fa and Fb.
std::vector< std::vector< const MaterialProperty< Real > * > > _prop_d2Fb
const MaterialProperty< Real > & _d2h
virtual Real computeDF(unsigned int i_var) override
const MaterialProperty< Real > & _prop_Fb
Real _W
Phase transformatuion energy barrier.
std::vector< std::vector< std::vector< const MaterialProperty< Real > * > > > _prop_d3Fa
Third derivatives of Fa and Fb.
virtual Real computeD3F(unsigned int i_var, unsigned int j_var, unsigned int k_var) override
virtual void initialSetup() override
const MaterialProperty< Real > & _h
std::vector< const MaterialProperty< Real > * > _prop_dFb
static InputParameters validParams()
unsigned int _eta_var
libMesh variable number for eta
const MaterialProperty< Real > & _g
virtual Real computeD2F(unsigned int i_var, unsigned int j_var) override
const MaterialProperty< Real > & _d3g
const MaterialProperty< Real > & _d3h
const MaterialProperty< Real > & _d2g
std::vector< std::string > _arg_names
unsigned int argIndex(unsigned int i_var) const