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 27 of file CHSplitFlux.h.

Constructor & Destructor Documentation

◆ CHSplitFlux()

CHSplitFlux::CHSplitFlux ( const InputParameters &  parameters)

Definition at line 27 of file CHSplitFlux.C.

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

Member Function Documentation

◆ computeQpJacobian()

Real CHSplitFlux::computeQpJacobian ( )
protectedvirtual

Definition at line 49 of file CHSplitFlux.C.

50 {
51  return _test[_i][_qp] * _phi[_j][_qp];
52 }

◆ computeQpOffDiagJacobian()

Real CHSplitFlux::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 55 of file CHSplitFlux.C.

56 {
57  if (jvar == _mu_var)
58  return _test[_i][_qp] * _mobility[_qp].row(_component) * _grad_phi[_j][_qp];
59  else if (_has_coupled_c && jvar == _c_var)
60  return _test[_i][_qp] * (*_dmobility_dc)[_qp].row(_component) * _grad_mu[_qp] * _phi[_j][_qp];
61  else
62  return 0.0;
63 }
const unsigned int _component
Definition: CHSplitFlux.h:37
const VariableGradient & _grad_mu
Definition: CHSplitFlux.h:39
const bool _has_coupled_c
Definition: CHSplitFlux.h:42
const MaterialProperty< RealTensorValue > & _mobility
Definition: CHSplitFlux.h:40
const unsigned int _mu_var
Definition: CHSplitFlux.h:38
const unsigned int _c_var
Definition: CHSplitFlux.h:43

◆ computeQpResidual()

Real CHSplitFlux::computeQpResidual ( )
protectedvirtual

Definition at line 43 of file CHSplitFlux.C.

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

Member Data Documentation

◆ _c_var

const unsigned int CHSplitFlux::_c_var
protected

Definition at line 43 of file CHSplitFlux.h.

Referenced by computeQpOffDiagJacobian().

◆ _component

const unsigned int CHSplitFlux::_component
protected

Definition at line 37 of file CHSplitFlux.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _dmobility_dc

const MaterialProperty<RealTensorValue>* CHSplitFlux::_dmobility_dc
protected

Definition at line 45 of file CHSplitFlux.h.

◆ _grad_mu

const VariableGradient& CHSplitFlux::_grad_mu
protected

Definition at line 39 of file CHSplitFlux.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _has_coupled_c

const bool CHSplitFlux::_has_coupled_c
protected

Definition at line 42 of file CHSplitFlux.h.

Referenced by computeQpOffDiagJacobian().

◆ _mobility

const MaterialProperty<RealTensorValue>& CHSplitFlux::_mobility
protected

Definition at line 40 of file CHSplitFlux.h.

Referenced by computeQpOffDiagJacobian(), and computeQpResidual().

◆ _mu_var

const unsigned int CHSplitFlux::_mu_var
protected

Definition at line 38 of file CHSplitFlux.h.

Referenced by computeQpOffDiagJacobian().


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