https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
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
39void
41{
42 validateNonlinearCoupling<Real>("order_parameter");
43}
44
45Real
50
51Real
57
58Real
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}
registerMooseObject("PhaseFieldApp", ChangedVariableTimeDerivative)
const std::string name
Definition Setup.h:21
This calculates the time derivative for a variable multiplied by a generalized susceptibility.
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
const MaterialProperty< Real > & _d2opdu2
2nd order parameter derivative
ChangedVariableTimeDerivative(const InputParameters &parameters)
const MaterialProperty< Real > & _dopdu
Order parameter derivative.
std::vector< const MaterialProperty< Real > * > _d2opdudarg
2nd order parameter derivative w.r.t. coupled variables
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)
virtual Real computeQpResidual() override
virtual Real computeQpJacobian() override
static InputParameters validParams()