https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
41Real
43{
44 if (_dt == 0)
45 return 0;
46 else
47 return _test[_i][_qp] * _inv_co_sq[_qp] *
49}
50
51Real
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}
registerMooseObject("FsiApp", AcousticInertia)
static InputParameters validParams()
const VariableValue & _u_dotdot_factor
Real computeQpJacobian() override
AcousticInertia(const InputParameters &parameters)
const MaterialProperty< Real > & _inv_co_sq
const VariableValue & _u_dot_old
const VariableValue & _du_dotdot_du
Real computeQpResidual() override
const VariableValue & _du_dot_du
const VariableValue & _u_dot_factor
void addFEVariableCoupleableVectorTag(TagID tag)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
unsigned int _j
unsigned int _i
MooseVariable & _var
const VariablePhiValue & _phi
const VariableTestValue & _test
unsigned int number() const
TagID uDotDotFactorTag() const
TagID uDotFactorTag() const
SystemBase & _sys
const TimeIntegrator & getTimeIntegrator(const unsigned int var_num) const
static InputParameters validParams()
Real & _dt