www.mooseframework.org
SimpleSplitCHWRes.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "SimpleSplitCHWRes.h"
11 
12 registerMooseObject("PhaseFieldApp", SimpleSplitCHWRes);
13 
16 {
18  params.addClassDescription("Gradient energy for split Cahn-Hilliard equation with constant "
19  "Mobility for a coupled order parameter variable.");
20  params.addParam<MaterialPropertyName>(
21  "mob_name", "M", "The mobility used with the kernel, should be a constant value");
22  return params;
23 }
24 
26  : Kernel(parameters), _M(getMaterialProperty<Real>("mob_name"))
27 {
28 }
29 
30 Real
32 {
33  return _M[_qp] * _grad_u[_qp] * _grad_test[_i][_qp];
34 }
35 
36 Real
38 {
39  return _M[_qp] * _grad_phi[_j][_qp] * _grad_test[_i][_qp];
40 }
SimpleSplitCHWRes(const InputParameters &parameters)
const VariableGradient & _grad_u
static InputParameters validParams()
virtual Real computeQpResidual()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const VariablePhiGradient & _grad_phi
registerMooseObject("PhaseFieldApp", SimpleSplitCHWRes)
static InputParameters validParams()
unsigned int _i
unsigned int _j
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableTestGradient & _grad_test
virtual Real computeQpJacobian()
Simple case for SplitCHWRes kernel, only with constant Mobility.
void addClassDescription(const std::string &doc_string)
const MaterialProperty< Real > & _M
Mobility.
unsigned int _qp