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

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

#include <AntitrappingCurrent.h>

Inheritance diagram for AntitrappingCurrent:
[legend]

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

const VariableGradient & _grad_v
 
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 and interface normal.

Definition at line 24 of file AntitrappingCurrent.h.

Constructor & Destructor Documentation

◆ AntitrappingCurrent()

AntitrappingCurrent::AntitrappingCurrent ( const InputParameters &  parameters)

Definition at line 24 of file AntitrappingCurrent.C.

25  : CoupledSusceptibilityTimeDerivative(parameters), _grad_v(coupledGradient("v"))
26 {
27 }

Member Function Documentation

◆ computeQpJacobian()

Real AntitrappingCurrent::computeQpJacobian ( )
protectedvirtual

Reimplemented from CoupledSusceptibilityTimeDerivative.

Definition at line 40 of file AntitrappingCurrent.C.

41 {
42  const Real norm_sq = _grad_v[_qp].norm_sq();
43  if (norm_sq < libMesh::TOLERANCE)
44  return 0.0;
45 
46  return _dFdu[_qp] * _v_dot[_qp] * _grad_v[_qp] * _grad_test[_i][_qp] * _phi[_j][_qp] /
47  std::sqrt(norm_sq);
48 }

◆ computeQpOffDiagJacobian()

Real AntitrappingCurrent::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Reimplemented from CoupledSusceptibilityTimeDerivative.

Definition at line 51 of file AntitrappingCurrent.C.

52 {
53  const Real norm_sq = _grad_v[_qp].norm_sq();
54  if (norm_sq < libMesh::TOLERANCE)
55  return 0.0;
56 
57  // get the coupled variable jvar is referring to
58  const unsigned int cvar = mapJvarToCvar(jvar);
59 
60  if (jvar == _v_var)
61  return (_F[_qp] * _dv_dot[_qp] * _grad_v[_qp] * _grad_test[_i][_qp] * _phi[_j][_qp] +
62  _F[_qp] * _v_dot[_qp] * _grad_test[_i][_qp] * _grad_phi[_j][_qp] -
63  _F[_qp] * _v_dot[_qp] * _grad_v[_qp] * _grad_test[_i][_qp] * _grad_v[_qp] *
64  _grad_phi[_j][_qp] / norm_sq +
65  _v_dot[_qp] * _grad_v[_qp] * _grad_test[_i][_qp] * _phi[_j][_qp] *
66  (*_dFdarg[cvar])[_qp]) /
67  std::sqrt(norm_sq);
68 
69  return _v_dot[_qp] * _grad_v[_qp] * _grad_test[_i][_qp] * _phi[_j][_qp] * (*_dFdarg[cvar])[_qp] /
70  std::sqrt(norm_sq);
71 }

◆ computeQpResidual()

Real AntitrappingCurrent::computeQpResidual ( )
protectedvirtual

Reimplemented from CoupledSusceptibilityTimeDerivative.

Definition at line 30 of file AntitrappingCurrent.C.

31 {
32  const Real norm_sq = _grad_v[_qp].norm_sq();
33  if (norm_sq < libMesh::TOLERANCE)
34  return 0.0;
35 
36  return _F[_qp] * _v_dot[_qp] * _grad_v[_qp] * _grad_test[_i][_qp] / std::sqrt(norm_sq);
37 }

◆ initialSetup()

void CoupledSusceptibilityTimeDerivative::initialSetup ( )
virtualinherited

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
protectedinherited

◆ _dFdu

const MaterialProperty<Real>& CoupledSusceptibilityTimeDerivative::_dFdu
protectedinherited

function derivative w.r.t. the kernel variable

Definition at line 41 of file CoupledSusceptibilityTimeDerivative.h.

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

◆ _F

const MaterialProperty<Real>& CoupledSusceptibilityTimeDerivative::_F
protectedinherited

◆ _grad_v

const VariableGradient& AntitrappingCurrent::_grad_v
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
AntitrappingCurrent::_grad_v
const VariableGradient & _grad_v
Definition: AntitrappingCurrent.h:34
CoupledSusceptibilityTimeDerivative::CoupledSusceptibilityTimeDerivative
CoupledSusceptibilityTimeDerivative(const InputParameters &parameters)
Definition: CoupledSusceptibilityTimeDerivative.C:27
CoupledSusceptibilityTimeDerivative::_dFdu
const MaterialProperty< Real > & _dFdu
function derivative w.r.t. the kernel variable
Definition: CoupledSusceptibilityTimeDerivative.h:41