www.mooseframework.org
InterfaceDiffusionBoundaryTerm.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<InterfaceDiffusionBase>();
19  params.addClassDescription("Add weak form surface terms of the Diffusion equation for two "
20  "different variables across a subdomain boundary");
21  return params;
22 }
23 
25  : InterfaceDiffusionBase(parameters)
26 {
27 }
28 
29 Real
31 {
32  // add weak form surface terms for the diffusion equation
33  switch (type)
34  {
35  case Moose::Element:
36  return -_D * _grad_u[_qp] * _normals[_qp] * _test[_i][_qp];
37 
38  case Moose::Neighbor:
39  return -_D_neighbor * _grad_neighbor_value[_qp] * -_normals[_qp] * _test_neighbor[_i][_qp];
40  }
41 
42  mooseError("Internal error.");
43 }
44 
45 Real
47 {
48  switch (type)
49  {
50  case Moose::ElementElement:
51  return -_D * _grad_phi[_j][_qp] * _normals[_qp] * _test[_i][_qp];
52 
53  case Moose::NeighborNeighbor:
54  return -_D_neighbor * _grad_phi_neighbor[_j][_qp] * -_normals[_qp] * _test_neighbor[_i][_qp];
55 
56  case Moose::ElementNeighbor:
57  return 0.0;
58 
59  case Moose::NeighborElement:
60  return 0.0;
61  }
62 
63  mooseError("Internal error.");
64 }
InterfaceDiffusionBoundaryTerm::computeQpResidual
virtual Real computeQpResidual(Moose::DGResidualType type) override
Definition: InterfaceDiffusionBoundaryTerm.C:30
InterfaceDiffusionBase
Base class for Diffusion equation terms coupling two different variables across a subdomain boundary.
Definition: InterfaceDiffusionBase.h:23
InterfaceDiffusionBase::_D
const Real _D
diffusion coefficient
Definition: InterfaceDiffusionBase.h:30
InterfaceDiffusionBoundaryTerm::computeQpJacobian
virtual Real computeQpJacobian(Moose::DGJacobianType type) override
Definition: InterfaceDiffusionBoundaryTerm.C:46
validParams< InterfaceDiffusionBoundaryTerm >
InputParameters validParams< InterfaceDiffusionBoundaryTerm >()
Definition: InterfaceDiffusionBoundaryTerm.C:16
registerMooseObject
registerMooseObject("PhaseFieldApp", InterfaceDiffusionBoundaryTerm)
validParams< InterfaceDiffusionBase >
InputParameters validParams< InterfaceDiffusionBase >()
Definition: InterfaceDiffusionBase.C:14
InterfaceDiffusionBoundaryTerm::InterfaceDiffusionBoundaryTerm
InterfaceDiffusionBoundaryTerm(const InputParameters &parameters)
Definition: InterfaceDiffusionBoundaryTerm.C:24
InterfaceDiffusionBase::_D_neighbor
const Real _D_neighbor
neighbor diffusion coefficient
Definition: InterfaceDiffusionBase.h:33
InterfaceDiffusionBoundaryTerm.h
InterfaceDiffusionBoundaryTerm
Add weak form surface terms of the Diffusion equation for two different variables across a subdomain ...
Definition: InterfaceDiffusionBoundaryTerm.h:23