https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CoupledSusceptibilityTimeDerivative.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("A modified coupled time derivative Kernel that multiplies the time "
19 "derivative of a coupled variable by a generalized susceptibility");
20 params.addRequiredParam<MaterialPropertyName>(
21 "f_name", "Susceptibility function F defined in a FunctionMaterial");
22 return params;
23}
24
26 const InputParameters & parameters)
28 _F(getMaterialProperty<Real>("f_name")),
29 _dFdu(getMaterialPropertyDerivative<Real>("f_name", _var.name())),
30 _dFdarg(_n_args)
31{
32 // fetch derivatives
33 for (unsigned int i = 0; i < _n_args; ++i)
34 _dFdarg[i] = &getMaterialPropertyDerivative<Real>("f_name", i);
35}
36
37void
39{
40 validateNonlinearCoupling<Real>("f_name");
41}
42
43Real
48
49Real
54
55Real
57{
58 // get the coupled variable jvar is referring to
59 const unsigned int cvar = mapJvarToCvar(jvar);
60
61 if (jvar == _v_var)
63 CoupledTimeDerivative::computeQpResidual() * _phi[_j][_qp] * (*_dFdarg[cvar])[_qp];
64
65 return CoupledTimeDerivative::computeQpResidual() * _phi[_j][_qp] * (*_dFdarg[cvar])[_qp];
66}
registerMooseObject("PhaseFieldApp", CoupledSusceptibilityTimeDerivative)
const std::string name
Definition Setup.h:21
This calculates a modified coupled time derivative that multiplies the time derivative of a coupled v...
CoupledSusceptibilityTimeDerivative(const InputParameters &parameters)
std::vector< const MaterialProperty< Real > * > _dFdarg
function derivatives w.r.t. coupled variables
const MaterialProperty< Real > & _F
The function multiplied by the coupled time derivative.
const MaterialProperty< Real > & _dFdu
function derivative w.r.t. the kernel variable
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
virtual Real computeQpResidual() override
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()