https://mooseframework.inl.gov
AcousticInertia.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 
10 #include "AcousticInertia.h"
11 #include "SubProblem.h"
12 #include "TimeIntegrator.h"
13 #include "NonlinearSystemBase.h"
14 
16 
19 {
21  params.addClassDescription("Calculates the residual for the inertial force "
22  "which is the double time derivative of pressure.");
23  params.addParam<MaterialPropertyName>(
24  "inv_co_sq", "inv_co_sq", "Inverse of sqaure of the fluid's speed of sound.");
25  return params;
26 }
27 
29  : TimeKernel(parameters),
30  _inv_co_sq(getMaterialProperty<Real>("inv_co_sq")),
31  _u_dot_old(_var.uDotOld()),
32  _du_dot_du(_var.duDotDu()),
33  _du_dotdot_du(_var.duDotDotDu()),
34  _u_dot_factor(_var.vectorTagValue(_sys.getTimeIntegrator(_var.number()).uDotFactorTag())),
35  _u_dotdot_factor(_var.vectorTagValue(_sys.getTimeIntegrator(_var.number()).uDotDotFactorTag()))
36 {
39 }
40 
41 Real
43 {
44  if (_dt == 0)
45  return 0;
46  else
47  return _test[_i][_qp] * _inv_co_sq[_qp] *
49 }
50 
51 Real
53 {
54  if (_dt == 0)
55  return 0;
56  else
57  return _test[_i][_qp] * _inv_co_sq[_qp] * _du_dotdot_du[_qp] * _phi[_j][_qp] +
59 }
AcousticInertia(const InputParameters &parameters)
MooseVariable & _var
const MaterialProperty< Real > & _inv_co_sq
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
unsigned int number() const
const TimeIntegrator & getTimeIntegrator(const unsigned int var_num) const
const VariableValue & _du_dotdot_du
Real & _dt
SystemBase & _sys
const VariableTestValue & _test
void addFEVariableCoupleableVectorTag(TagID tag)
unsigned int _i
Real computeQpResidual() override
unsigned int _j
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue & _du_dot_du
registerMooseObject("FsiApp", AcousticInertia)
void addClassDescription(const std::string &doc_string)
const VariableValue & _u_dot_old
const VariableValue & _u_dotdot_factor
const VariableValue & _u_dot_factor
const VariablePhiValue & _phi
Real computeQpJacobian() override
static InputParameters validParams()
unsigned int _qp