www.mooseframework.org
VolumetricFlowRate.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "VolumetricFlowRate.h"
16 #include <math.h>
17 
18 template <>
19 InputParameters
21 {
22  InputParameters params = validParams<SideIntegralPostprocessor>();
23  params.addClassDescription("Computes the volumetric flow rate through a boundary.");
24  params.addRequiredCoupledVar("vel_x", "The x velocity");
25  params.addCoupledVar("vel_y", 0, "The y velocity");
26  params.addCoupledVar("vel_z", 0, "The z velocity");
27  return params;
28 }
29 
30 VolumetricFlowRate::VolumetricFlowRate(const InputParameters & parameters)
31  : SideIntegralPostprocessor(parameters),
32  _vel_x(coupledValue("vel_x")),
33  _vel_y(coupledValue("vel_y")),
34  _vel_z(coupledValue("vel_z"))
35 {
36 }
37 
38 Real
40 {
41  return RealVectorValue(_vel_x[_qp], _vel_y[_qp], _vel_z[_qp]) * _normals[_qp];
42 }
const VariableValue & _vel_z
VolumetricFlowRate(const InputParameters &parameters)
const VariableValue & _vel_y
InputParameters validParams< VolumetricFlowRate >()
const VariableValue & _vel_x
virtual Real computeQpIntegral() override