www.mooseframework.org
VolumetricFlowRate.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "VolumetricFlowRate.h"
11 #include <math.h>
12 
13 registerMooseObject("NavierStokesApp", VolumetricFlowRate);
14 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<SideIntegralPostprocessor>();
20  params.addClassDescription("Computes the volumetric flow rate through a boundary.");
21  params.addRequiredCoupledVar("vel_x", "The x velocity");
22  params.addCoupledVar("vel_y", 0, "The y velocity");
23  params.addCoupledVar("vel_z", 0, "The z velocity");
24  return params;
25 }
26 
27 VolumetricFlowRate::VolumetricFlowRate(const InputParameters & parameters)
28  : SideIntegralPostprocessor(parameters),
29  _vel_x(coupledValue("vel_x")),
30  _vel_y(coupledValue("vel_y")),
31  _vel_z(coupledValue("vel_z"))
32 {
33 }
34 
35 Real
37 {
38  return RealVectorValue(_vel_x[_qp], _vel_y[_qp], _vel_z[_qp]) * _normals[_qp];
39 }
VolumetricFlowRate::VolumetricFlowRate
VolumetricFlowRate(const InputParameters &parameters)
Definition: VolumetricFlowRate.C:27
VolumetricFlowRate::computeQpIntegral
virtual Real computeQpIntegral() override
Definition: VolumetricFlowRate.C:36
VolumetricFlowRate.h
VolumetricFlowRate::_vel_z
const VariableValue & _vel_z
Definition: VolumetricFlowRate.h:34
validParams< VolumetricFlowRate >
InputParameters validParams< VolumetricFlowRate >()
Definition: VolumetricFlowRate.C:17
VolumetricFlowRate::_vel_y
const VariableValue & _vel_y
Definition: VolumetricFlowRate.h:33
VolumetricFlowRate
This postprocessor computes the volumetric flow rate through a boundary.
Definition: VolumetricFlowRate.h:24
VolumetricFlowRate::_vel_x
const VariableValue & _vel_x
Definition: VolumetricFlowRate.h:32
registerMooseObject
registerMooseObject("NavierStokesApp", VolumetricFlowRate)