https://mooseframework.inl.gov
PerpendicularElectricFieldInterface.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
16 {
18  params.addClassDescription(
19  "VectorInterfaceKernel that implements the condition $\\epsilon_1 \\vec{E}_{1}^{\\perp} - "
20  "\\epsilon_2 \\vec{E}_{2}^{\\perp} = \\sigma_f$");
21  params.addParam<Real>("free_charge", 0.0, "Free charge on the interface (default = 0).");
22  params.addParam<Real>(
23  "primary_epsilon", 1.0, "Permittivity on the primary side of the interface (default = 1.0).");
24  params.addParam<Real>("secondary_epsilon",
25  1.0,
26  "Permittivity on the secondary side of the interface (default = 1.0).");
27  return params;
28 }
29 
31  const InputParameters & parameters)
32  : VectorInterfaceKernel(parameters),
33 
34  _free_charge(getParam<Real>("free_charge")),
35  _primary_eps(getParam<Real>("primary_epsilon")),
36  _secondary_eps(getParam<Real>("secondary_epsilon"))
37 {
38 }
39 
40 Real
42 {
43  _u_perp = (_u[_qp] * _normals[_qp]) * _normals[_qp];
46 
47  Real res = 0;
48 
49  switch (type)
50  {
51  case Moose::Element:
52  res = _test[_i][_qp] *
54  break;
55 
56  case Moose::Neighbor:
57  res = _test_neighbor[_i][_qp] *
59  break;
60  }
61 
62  return res;
63 }
64 
65 Real
67 {
70 
71  Real jac = 0;
72 
73  switch (type)
74  {
76  jac = _test[_i][_qp] * _primary_eps * _phi_u_perp;
77  break;
78 
81  break;
82 
85  break;
86 
89  break;
90  }
91 
92  return jac;
93 }
NeighborElement
const TemplateVariableValue & _neighbor_value
Real _free_charge
Free charge on the interface (default = 0)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const TemplateVariableValue & _u
Real _primary_eps
Electrical permittivity on the primary side of the boundary.
RealVectorValue _u_perp
Perpendicular field component of the solution variable on the primary side of the boundary...
RealVectorValue _phi_u_perp
Perpendicular field component of the test function on the primary side of the boundary.
const MooseArray< Point > & _normals
virtual Real computeQpJacobian(Moose::DGJacobianType type) override
const TemplateVariablePhiValue & _phi
DGResidualType
registerMooseObject("ElectromagneticsApp", PerpendicularElectricFieldInterface)
ElementElement
RealVectorValue _free_charge_dot_n
Free charge dotted with interface normal.
RealVectorValue _secondary_perp
Perpendicular field component of the solution variable on the secondary side of the boundary...
RealVectorValue _phi_secondary_perp
Perpendicular field component of the test function on the secondary side of the boundary.
PerpendicularElectricFieldInterface(const InputParameters &parameters)
ElementNeighbor
const std::string & type() const
const TemplateVariableTestValue & _test
Real _secondary_eps
Electrical permittivity on the secondary side of the boundary.
DGJacobianType
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeQpResidual(Moose::DGResidualType type) override
void addClassDescription(const std::string &doc_string)
VectorInterfaceKernel that enforces the difference between the perpendicular vector field components ...
const TemplateVariableTestValue & _test_neighbor
NeighborNeighbor
const TemplateVariablePhiValue & _phi_neighbor
static InputParameters validParams()