https://mooseframework.inl.gov
MomentumFluxIntegral.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 "MomentumFluxIntegral.h"
11 
12 registerMooseObject("ThermalHydraulicsApp", MomentumFluxIntegral);
13 
16 {
18  params.addClassDescription("Computes the integral of the momentum flux over a boundary");
19  params.addRequiredCoupledVar("arhouA", "Momentum equation variable");
20  params.addRequiredCoupledVar("vel", "Velocity");
21  params.addRequiredCoupledVar("p", "Pressure");
22  params.addRequiredCoupledVar("A", "Area");
23  params.addCoupledVar("alpha", 1.0, "Volume fraction (two-phase only)");
24  return params;
25 }
26 
28  : SideIntegralPostprocessor(parameters),
29  _arhouA(coupledValue("arhouA")),
30  _velocity(coupledValue("vel")),
31  _pressure(coupledValue("p")),
32  _area(coupledValue("A")),
33  _alpha(coupledValue("alpha"))
34 {
35 }
36 
37 void
39 {
40  const auto & pps = static_cast<const MomentumFluxIntegral &>(y);
41  _integral_value += pps._integral_value;
42 }
43 
44 Real
46 {
47  return _arhouA[_qp] * _velocity[_qp] + _alpha[_qp] * _pressure[_qp] * _area[_qp];
48 }
const VariableValue & _pressure
registerMooseObject("ThermalHydraulicsApp", MomentumFluxIntegral)
const VariableValue & _arhouA
static InputParameters validParams()
virtual Real computeQpIntegral() override
virtual void threadJoin(const UserObject &y) override
MomentumFluxIntegral(const InputParameters &parameters)
const std::vector< double > y
Computes the boundary integral of the momentum flux.
static InputParameters validParams()
const VariableValue & _alpha
void addCoupledVar(const std::string &name, const std::string &doc_string)
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)
const VariableValue & _area
const VariableValue & _velocity