https://mooseframework.inl.gov
Loading...
Searching...
No Matches
HHPFCRFF.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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 "HHPFCRFF.h"
11
12registerMooseObject("PhaseFieldApp", HHPFCRFF);
13
16{
18 params.addClassDescription("Reaction type kernel for the RFF phase fit crystal model");
19 params.addCoupledVar("coupled_var",
20 "The name of the coupled variable, if one is used in the kernel");
21 params.addRequiredParam<MaterialPropertyName>(
22 "prop_name", "Name of material property to be used in the kernel");
23 params.addRequiredParam<bool>(
24 "positive", "If the kernel is positive, this is true, if negative, it is false");
25 return params;
26}
27
29 : KernelValue(parameters),
30 _kernel_sign(getParam<bool>("positive") ? 1.0 : -1.0),
31 _prop(getMaterialProperty<Real>("prop_name")),
32 _has_coupled_var(isCoupled("coupled_var")),
33 _coupled_var(_has_coupled_var ? &coupledValue("coupled_var") : NULL),
34 _coupled_var_var(_has_coupled_var ? coupled("coupled_var") : 0)
35{
36}
37
38Real
40{
41 // Assign value of the variable, whether coupled or not
42 Real var;
44 var = (*_coupled_var)[_qp];
45 else
46 var = _u[_qp];
47
48 return _kernel_sign * _prop[_qp] * var;
49}
50
51Real
53{
55 return 0.0;
56
57 return _kernel_sign * _prop[_qp] * _phi[_j][_qp];
58}
59
60Real
62{
64 return _kernel_sign * _prop[_qp] * _phi[_j][_qp] * _test[_i][_qp];
65
66 return 0.0;
67}
registerMooseObject("PhaseFieldApp", HHPFCRFF)
TODO: This Kernel needs Documentation!!!
Definition HHPFCRFF.h:20
static InputParameters validParams()
Definition HHPFCRFF.C:15
HHPFCRFF(const InputParameters &parameters)
Definition HHPFCRFF.C:28
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition HHPFCRFF.C:61
virtual Real precomputeQpJacobian()
Definition HHPFCRFF.C:52
virtual Real precomputeQpResidual()
Definition HHPFCRFF.C:39
const unsigned int _coupled_var_var
Definition HHPFCRFF.h:37
const Real _kernel_sign
Definition HHPFCRFF.h:31
const bool _has_coupled_var
Definition HHPFCRFF.h:35
const MaterialProperty< Real > & _prop
Definition HHPFCRFF.h:33
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int _qp
unsigned int _j
unsigned int _i
static InputParameters validParams()
const VariablePhiValue & _phi
const VariableTestValue & _test
const VariableValue & _u