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

Enforce gradient continuity between two different variables across a subdomain boundary. More...

#include <InterfaceDiffusionFluxMatch.h>

Inheritance diagram for InterfaceDiffusionFluxMatch:
[legend]

Public Member Functions

 InterfaceDiffusionFluxMatch (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual (Moose::DGResidualType type) override
 
virtual Real computeQpJacobian (Moose::DGJacobianType type) override
 

Protected Attributes

const Real _D
 diffusion coefficient More...
 
const Real _D_neighbor
 neighbor diffusion coefficient More...
 

Detailed Description

Enforce gradient continuity between two different variables across a subdomain boundary.

Definition at line 24 of file InterfaceDiffusionFluxMatch.h.

Constructor & Destructor Documentation

◆ InterfaceDiffusionFluxMatch()

InterfaceDiffusionFluxMatch::InterfaceDiffusionFluxMatch ( const InputParameters &  parameters)

Definition at line 24 of file InterfaceDiffusionFluxMatch.C.

25  : InterfaceDiffusionBase(parameters)
26 {
27 }
InterfaceDiffusionBase(const InputParameters &parameters)

Member Function Documentation

◆ computeQpJacobian()

Real InterfaceDiffusionFluxMatch::computeQpJacobian ( Moose::DGJacobianType  type)
overrideprotectedvirtual

Definition at line 49 of file InterfaceDiffusionFluxMatch.C.

50 {
51  switch (type)
52  {
53  case Moose::ElementElement:
54  return _D * _grad_phi[_j][_qp] * _normals[_qp] * _test[_i][_qp];
55 
56  case Moose::NeighborNeighbor:
57  return -_D_neighbor * _grad_phi_neighbor[_j][_qp] * _normals[_qp] * _test_neighbor[_i][_qp];
58 
59  case Moose::ElementNeighbor:
60  return -_D_neighbor * _grad_phi_neighbor[_j][_qp] * _normals[_qp] * _test[_i][_qp];
61 
62  case Moose::NeighborElement:
63  return _D * _grad_phi[_j][_qp] * _normals[_qp] * _test_neighbor[_i][_qp];
64  }
65  mooseError("Internal error.");
66 }
const Real _D_neighbor
neighbor diffusion coefficient
const Real _D
diffusion coefficient

◆ computeQpResidual()

Real InterfaceDiffusionFluxMatch::computeQpResidual ( Moose::DGResidualType  type)
overrideprotectedvirtual

Definition at line 30 of file InterfaceDiffusionFluxMatch.C.

31 {
32  // equal gradients means difference is zero
33  Real res =
34  _D * _grad_u[_qp] * _normals[_qp] - _D_neighbor * _grad_neighbor_value[_qp] * _normals[_qp];
35 
36  switch (type)
37  {
38  case Moose::Element:
39  return res * _test[_i][_qp];
40 
41  case Moose::Neighbor:
42  return res * _test_neighbor[_i][_qp];
43  }
44 
45  mooseError("Internal error.");
46 }
const Real _D_neighbor
neighbor diffusion coefficient
const Real _D
diffusion coefficient

Member Data Documentation

◆ _D

const Real InterfaceDiffusionBase::_D
protectedinherited

◆ _D_neighbor

const Real InterfaceDiffusionBase::_D_neighbor
protectedinherited

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