www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CoupledSusceptibilityTimeDerivative Class Reference

This calculates a modified coupled time derivative that multiplies the time derivative of a coupled variable by a function of the variables. More...

#include <CoupledSusceptibilityTimeDerivative.h>

Inheritance diagram for CoupledSusceptibilityTimeDerivative:
[legend]

Public Member Functions

 CoupledSusceptibilityTimeDerivative (const InputParameters &parameters)
 
virtual void initialSetup ()
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 

Protected Attributes

const MaterialProperty< Real > & _F
 The function multiplied by the coupled time derivative. More...
 
const MaterialProperty< Real > & _dFdu
 function derivative w.r.t. the kernel variable More...
 
std::vector< const MaterialProperty< Real > * > _dFdarg
 function derivatives w.r.t. coupled variables More...
 

Detailed Description

This calculates a modified coupled time derivative that multiplies the time derivative of a coupled variable by a function of the variables.

Definition at line 25 of file CoupledSusceptibilityTimeDerivative.h.

Constructor & Destructor Documentation

◆ CoupledSusceptibilityTimeDerivative()

CoupledSusceptibilityTimeDerivative::CoupledSusceptibilityTimeDerivative ( const InputParameters &  parameters)

Definition at line 27 of file CoupledSusceptibilityTimeDerivative.C.

29  : DerivativeMaterialInterface<JvarMapKernelInterface<CoupledTimeDerivative>>(parameters),
30  _F(getMaterialProperty<Real>("f_name")),
31  _dFdu(getMaterialPropertyDerivative<Real>("f_name", _var.name())),
32  _dFdarg(_coupled_moose_vars.size())
33 {
34  // fetch derivatives
35  for (unsigned int i = 0; i < _dFdarg.size(); ++i)
36  _dFdarg[i] = &getMaterialPropertyDerivative<Real>("f_name", _coupled_moose_vars[i]->name());
37 }

Member Function Documentation

◆ computeQpJacobian()

Real CoupledSusceptibilityTimeDerivative::computeQpJacobian ( )
protectedvirtual

Reimplemented in AntitrappingCurrent.

Definition at line 52 of file CoupledSusceptibilityTimeDerivative.C.

53 {
54  return CoupledTimeDerivative::computeQpResidual() * _dFdu[_qp] * _phi[_j][_qp];
55 }

◆ computeQpOffDiagJacobian()

Real CoupledSusceptibilityTimeDerivative::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented in AntitrappingCurrent.

Definition at line 58 of file CoupledSusceptibilityTimeDerivative.C.

59 {
60  // get the coupled variable jvar is referring to
61  const unsigned int cvar = mapJvarToCvar(jvar);
62 
63  if (jvar == _v_var)
64  return CoupledTimeDerivative::computeQpOffDiagJacobian(jvar) * _F[_qp] +
65  CoupledTimeDerivative::computeQpResidual() * _phi[_j][_qp] * (*_dFdarg[cvar])[_qp];
66 
67  return CoupledTimeDerivative::computeQpResidual() * _phi[_j][_qp] * (*_dFdarg[cvar])[_qp];
68 }

◆ computeQpResidual()

Real CoupledSusceptibilityTimeDerivative::computeQpResidual ( )
protectedvirtual

Reimplemented in AntitrappingCurrent.

Definition at line 46 of file CoupledSusceptibilityTimeDerivative.C.

47 {
48  return CoupledTimeDerivative::computeQpResidual() * _F[_qp];
49 }

◆ initialSetup()

void CoupledSusceptibilityTimeDerivative::initialSetup ( )
virtual

Definition at line 40 of file CoupledSusceptibilityTimeDerivative.C.

41 {
42  validateNonlinearCoupling<Real>("f_name");
43 }

Member Data Documentation

◆ _dFdarg

std::vector<const MaterialProperty<Real> *> CoupledSusceptibilityTimeDerivative::_dFdarg
protected

function derivatives w.r.t. coupled variables

Definition at line 44 of file CoupledSusceptibilityTimeDerivative.h.

Referenced by AntitrappingCurrent::computeQpOffDiagJacobian(), computeQpOffDiagJacobian(), and CoupledSusceptibilityTimeDerivative().

◆ _dFdu

const MaterialProperty<Real>& CoupledSusceptibilityTimeDerivative::_dFdu
protected

function derivative w.r.t. the kernel variable

Definition at line 41 of file CoupledSusceptibilityTimeDerivative.h.

Referenced by AntitrappingCurrent::computeQpJacobian(), and computeQpJacobian().

◆ _F

const MaterialProperty<Real>& CoupledSusceptibilityTimeDerivative::_F
protected

The documentation for this class was generated from the following files:
CoupledSusceptibilityTimeDerivative::_dFdarg
std::vector< const MaterialProperty< Real > * > _dFdarg
function derivatives w.r.t. coupled variables
Definition: CoupledSusceptibilityTimeDerivative.h:44
CoupledSusceptibilityTimeDerivative::_F
const MaterialProperty< Real > & _F
The function multiplied by the coupled time derivative.
Definition: CoupledSusceptibilityTimeDerivative.h:38
name
const std::string name
Definition: Setup.h:21
CoupledSusceptibilityTimeDerivative::_dFdu
const MaterialProperty< Real > & _dFdu
function derivative w.r.t. the kernel variable
Definition: CoupledSusceptibilityTimeDerivative.h:41