https://mooseframework.inl.gov
StructureAcousticInterface.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 #include "MooseVariableFE.h"
12 
14 
17 {
19  params.addClassDescription("Enforces displacement and stress/pressure continuity "
20  "between the fluid and structural domains. Element "
21  "is always the structure and neighbor is always the"
22  " fluid.");
23  params.addParam<MaterialPropertyName>("D", "D", "Fluid density.");
24  params.addRequiredRangeCheckedParam<unsigned int>(
25  "component", "component < 3", "The desired component of displacement.");
26  return params;
27 }
28 
30  : InterfaceKernel(parameters),
31  _D(getMaterialProperty<Real>("D")),
32  _neighbor_dotdot(_neighbor_var.uDotDotNeighbor()),
33  _neighbor_dotdot_du(_neighbor_var.duDotDotDuNeighbor()),
34  _component(getParam<unsigned int>("component"))
35 {
36 }
37 
38 Real
40 {
41  switch (type)
42  {
43  case Moose::Element: // Element is fluid
45 
46  case Moose::Neighbor: // Neighbor is structure
47  return _test_neighbor[_i][_qp] * -_u[_qp] * _normals[_qp](_component);
48  }
49  return 0.0;
50 }
51 
52 Real
54 {
55  switch (type)
56  {
58  break;
60  break;
65  return _test_neighbor[_i][_qp] * -_phi[_j][_qp] * _normals[_qp](_component);
66  }
67  return 0.0;
68 }
NeighborElement
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const TemplateVariableValue & _u
const MooseArray< Point > & _normals
const TemplateVariablePhiValue & _phi
DGResidualType
ElementElement
ElementNeighbor
const std::string & type() const
virtual Real computeQpJacobian(Moose::DGJacobianType type) override
static InputParameters validParams()
const TemplateVariableTestValue & _test
DGJacobianType
const MaterialProperty< Real > & _D
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue & _neighbor_dotdot_du
void addClassDescription(const std::string &doc_string)
StructureAcousticInterface(const InputParameters &parameters)
virtual Real computeQpResidual(Moose::DGResidualType type) override
registerMooseObject("FsiApp", StructureAcousticInterface)
const TemplateVariableTestValue & _test_neighbor
void ErrorVector unsigned int
NeighborNeighbor
const TemplateVariablePhiValue & _phi_neighbor
static InputParameters validParams()
const VariableValue & _neighbor_dotdot