https://mooseframework.inl.gov
WaveHeightAuxKernel.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 "WaveHeightAuxKernel.h"
11 
13 
16 {
18  params.addClassDescription("Calculates the wave heights given pressures.");
19  params.addRequiredCoupledVar("pressure", "pressure variable");
20  params.addRequiredParam<Real>("density", "fluid density");
21  params.addRequiredParam<Real>("gravity", "acceleration due to gravity");
22  return params;
23 }
24 
26  : AuxKernel(parameters),
27  _pressure(coupledValue("pressure")),
28  _density(getParam<Real>("density")),
29  _gravity(getParam<Real>("gravity"))
30 {
31 }
32 
33 Real
35 {
36  // Vertical displacement = pressure/(density * gravity)
37  return _pressure[_qp] / (_density * _gravity);
38 }
registerMooseObject("FsiApp", WaveHeightAuxKernel)
void addRequiredParam(const std::string &name, const std::string &doc_string)
const Real _density
Density of the fluid domain.
const Real _gravity
Acceleration due to gravity.
static InputParameters validParams()
WaveHeightAuxKernel(const InputParameters &parameters)
const VariableValue & _pressure
Pressure input.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
virtual Real computeValue()
WaveHeightAuxKernel takes pressure in the fluid domain as input and converts it to a displacement in ...