www.mooseframework.org
InterfaceDiffusionBoundaryTerm.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<InterfaceDiffusionBase>();
14  params.addClassDescription("Add weak form surface terms of the Diffusion equation for two "
15  "different variables across a subdomain boundary");
16  return params;
17 }
18 
20  : InterfaceDiffusionBase(parameters)
21 {
22 }
23 
24 Real
26 {
27  // add weak form surface terms for the diffusion equation
28  switch (type)
29  {
30  case Moose::Element:
31  return -_D * _grad_u[_qp] * _normals[_qp] * _test[_i][_qp];
32 
33  case Moose::Neighbor:
34  return -_D_neighbor * _grad_neighbor_value[_qp] * -_normals[_qp] * _test_neighbor[_i][_qp];
35  }
36 
37  mooseError("Internal error.");
38 }
39 
40 Real
42 {
43  switch (type)
44  {
45  case Moose::ElementElement:
46  return -_D * _grad_phi[_j][_qp] * _normals[_qp] * _test[_i][_qp];
47 
48  case Moose::NeighborNeighbor:
49  return -_D_neighbor * _grad_phi_neighbor[_j][_qp] * -_normals[_qp] * _test_neighbor[_i][_qp];
50 
51  case Moose::ElementNeighbor:
52  return 0.0;
53 
54  case Moose::NeighborElement:
55  return 0.0;
56  }
57 
58  mooseError("Internal error.");
59 }
virtual Real computeQpResidual(Moose::DGResidualType type) override
const Real _D_neighbor
neighbor diffusion coefficient
Base class for Diffusion equation terms coupling two different variables across a subdomain boundary...
InterfaceDiffusionBoundaryTerm(const InputParameters &parameters)
virtual Real computeQpJacobian(Moose::DGJacobianType type) override
InputParameters validParams< InterfaceDiffusionBase >()
const Real _D
diffusion coefficient
InputParameters validParams< InterfaceDiffusionBoundaryTerm >()