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

CHSplitFlux computes flux as non-linear variable via residual = flux + mobility * gradient(chemical potential) Kernel is associated with a component (direction) that needs to be specified in the input file. More...

#include <CHSplitFlux.h>

Inheritance diagram for CHSplitFlux:
[legend]

Public Member Functions

 CHSplitFlux (const InputParameters &parameters)
 

Protected Member Functions

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

Protected Attributes

const unsigned int _component
 
const unsigned int _mu_var
 
const VariableGradient & _grad_mu
 
const MaterialProperty< RealTensorValue > & _mobility
 
const bool _has_coupled_c
 
const unsigned int _c_var
 
const MaterialProperty< RealTensorValue > * _dmobility_dc
 

Detailed Description

CHSplitFlux computes flux as non-linear variable via residual = flux + mobility * gradient(chemical potential) Kernel is associated with a component (direction) that needs to be specified in the input file.

Definition at line 24 of file CHSplitFlux.h.

Constructor & Destructor Documentation

CHSplitFlux::CHSplitFlux ( const InputParameters &  parameters)

Definition at line 22 of file CHSplitFlux.C.

23  : DerivativeMaterialInterface<Kernel>(parameters),
24  _component(getParam<unsigned int>("component")),
25  _mu_var(coupled("mu")),
26  _grad_mu(coupledGradient("mu")),
27  _mobility(getMaterialProperty<RealTensorValue>("mobility_name")),
28  _has_coupled_c(isCoupled("c")),
29  _c_var(_has_coupled_c ? coupled("c") : 0),
31  ? &getMaterialPropertyDerivative<RealTensorValue>("mobility_name",
32  getVar("c", 0)->name())
33  : NULL)
34 {
35 }
const MaterialProperty< RealTensorValue > * _dmobility_dc
Definition: CHSplitFlux.h:42
const unsigned int _component
Definition: CHSplitFlux.h:34
const VariableGradient & _grad_mu
Definition: CHSplitFlux.h:36
const bool _has_coupled_c
Definition: CHSplitFlux.h:39
const MaterialProperty< RealTensorValue > & _mobility
Definition: CHSplitFlux.h:37
const unsigned int _mu_var
Definition: CHSplitFlux.h:35
const unsigned int _c_var
Definition: CHSplitFlux.h:40

Member Function Documentation

Real CHSplitFlux::computeQpJacobian ( )
protectedvirtual

Definition at line 44 of file CHSplitFlux.C.

45 {
46  return _test[_i][_qp] * _phi[_j][_qp];
47 }
Real CHSplitFlux::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 50 of file CHSplitFlux.C.

51 {
52  if (jvar == _mu_var)
53  return _test[_i][_qp] * _mobility[_qp].row(_component) * _grad_phi[_j][_qp];
54  else if (_has_coupled_c && jvar == _c_var)
55  return _test[_i][_qp] * (*_dmobility_dc)[_qp].row(_component) * _grad_mu[_qp] * _phi[_j][_qp];
56  else
57  return 0.0;
58 }
const unsigned int _component
Definition: CHSplitFlux.h:34
const VariableGradient & _grad_mu
Definition: CHSplitFlux.h:36
const bool _has_coupled_c
Definition: CHSplitFlux.h:39
const MaterialProperty< RealTensorValue > & _mobility
Definition: CHSplitFlux.h:37
const unsigned int _mu_var
Definition: CHSplitFlux.h:35
const unsigned int _c_var
Definition: CHSplitFlux.h:40
Real CHSplitFlux::computeQpResidual ( )
protectedvirtual

Definition at line 38 of file CHSplitFlux.C.

39 {
40  return _test[_i][_qp] * (_u[_qp] + _mobility[_qp].row(_component) * _grad_mu[_qp]);
41 }
const unsigned int _component
Definition: CHSplitFlux.h:34
const VariableGradient & _grad_mu
Definition: CHSplitFlux.h:36
const MaterialProperty< RealTensorValue > & _mobility
Definition: CHSplitFlux.h:37

Member Data Documentation

const unsigned int CHSplitFlux::_c_var
protected

Definition at line 40 of file CHSplitFlux.h.

Referenced by computeQpOffDiagJacobian().

const unsigned int CHSplitFlux::_component
protected

Definition at line 34 of file CHSplitFlux.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

const MaterialProperty<RealTensorValue>* CHSplitFlux::_dmobility_dc
protected

Definition at line 42 of file CHSplitFlux.h.

const VariableGradient& CHSplitFlux::_grad_mu
protected

Definition at line 36 of file CHSplitFlux.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

const bool CHSplitFlux::_has_coupled_c
protected

Definition at line 39 of file CHSplitFlux.h.

Referenced by computeQpOffDiagJacobian().

const MaterialProperty<RealTensorValue>& CHSplitFlux::_mobility
protected

Definition at line 37 of file CHSplitFlux.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

const unsigned int CHSplitFlux::_mu_var
protected

Definition at line 35 of file CHSplitFlux.h.

Referenced by computeQpOffDiagJacobian().


The documentation for this class was generated from the following files: