20 "Computes the two normal curvatures kappa_1 and kappa_2 of a diffuse interface "
21 "from an order parameter eta.");
26 "If |grad(eta)| is less than this threshold at a point, curvatures are set to zero there.");
27 params.
addParam<std::string>(
"base_name",
"",
"Optional prefix for all material property names");
33 _eta(coupledValue(
"eta")),
34 _grad_eta(coupledGradient(
"eta")),
35 _second_eta(coupledSecond(
"eta")),
36 _grad_threshold(getParam<Real>(
"gradient_threshold")),
37 _kappa1(declareProperty<Real>(getParam<
std::string>(
"base_name") +
"kappa1")),
38 _kappa2(declareProperty<Real>(getParam<
std::string>(
"base_name") +
"kappa2")),
39 _kappa_mean(declareProperty<Real>(getParam<
std::string>(
"base_name") +
"kappa_mean"))
48 const Real g_mag = g.norm();
53 const RealVectorValue nhat = g / g_mag;
56 static const RealVectorValue ZHAT(0., 0., 1.);
57 static const RealVectorValue XHAT(1., 0., 0.);
59 RealVectorValue t1 = ZHAT.
cross(nhat);
60 const Real t1_mag = t1.norm();
66 const RealVectorValue t2 = nhat.
cross(t1);
73 for (
unsigned i = 0; i < 3; ++i)
74 for (
unsigned j = 0; j < 3; ++j)
75 Hn(i) +=
H(i, j) * nhat(j);
78 auto vHv = [&](
const RealVectorValue &
v) -> Real
81 for (
unsigned i = 0; i < 3; ++i)
82 for (
unsigned j = 0; j < 3; ++j)
83 val +=
v(i) *
H(i, j) *
v(j);
92 const Real nHn = nhat * Hn;
registerMooseObject("PhaseFieldApp", InterfaceNormalCurvatures)
Computes two normal curvatures of a diffuse interface defined by an order parameter eta using n = gra...
MaterialProperty< Real > & _kappa2
normal curvature along t_1
MaterialProperty< Real > & _kappa_mean
normal curvature along t_2
const VariableGradient & _grad_eta
const VariableSecond & _second_eta
MaterialProperty< Real > & _kappa1
threshold for grad(eta) (avoids /0)
const Real _grad_threshold
InterfaceNormalCurvatures(const InputParameters ¶ms)
static InputParameters validParams()
virtual void computeQpProperties() override
static InputParameters validParams()
TypeVector< typename CompareTypes< T, T2 >::supertype > cross(const TypeVector< T2 > &v) const