https://mooseframework.inl.gov
ChangedVariableTimeDerivative.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 
11 
13 
16 {
18  params.addClassDescription(
19  "A modified time derivative Kernel that multiplies the time derivative by"
20  "the derivative of the nonlinear preconditioning function");
21  params.addRequiredParam<MaterialPropertyName>(
22  "order_parameter",
23  "Order parameter material defining the nonlinear preconditioning function");
24  params.addCoupledVar("args", "Vector of additional arguments for order_parameter");
25  return params;
26 }
27 
30  _dopdu(getMaterialPropertyDerivative<Real>("order_parameter", _var.name())),
31  _d2opdu2(getMaterialPropertyDerivative<Real>("order_parameter", _var.name(), _var.name())),
32  _d2opdudarg(_n_args)
33 {
34  // fetch derivatives
35  for (unsigned int i = 0; i < _n_args; ++i)
36  _d2opdudarg[i] = &getMaterialPropertyDerivative<Real>("order_parameter", _var.name(), i);
37 }
38 
39 void
41 {
42  validateNonlinearCoupling<Real>("order_parameter");
43 }
44 
45 Real
47 {
49 }
50 
51 Real
53 {
55  TimeDerivative::computeQpResidual() * _d2opdu2[_qp] * _phi[_j][_qp];
56 }
57 
58 Real
60 {
61  // get the coupled variable jvar is referring to
62  const unsigned int cvar = mapJvarToCvar(jvar);
63 
64  return TimeDerivative::computeQpResidual() * (*_d2opdudarg[cvar])[_qp] * _phi[_j][_qp];
65 }
const MaterialProperty< Real > & _d2opdu2
2nd order parameter derivative
ChangedVariableTimeDerivative(const InputParameters &parameters)
virtual Real computeQpResidual() override
const MaterialProperty< Real > & _dopdu
Order parameter derivative.
static InputParameters validParams()
void addRequiredParam(const std::string &name, const std::string &doc_string)
This calculates the time derivative for a variable multiplied by a generalized susceptibility.
virtual Real computeQpJacobian() override
const std::string name
Definition: Setup.h:20
void addCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseObject("PhaseFieldApp", ChangedVariableTimeDerivative)
void addClassDescription(const std::string &doc_string)
std::vector< const MaterialProperty< Real > * > _d2opdudarg
2nd order parameter derivative w.r.t. coupled variables
virtual Real computeQpOffDiagJacobian(unsigned int jvar)