https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SCMBlockedMassFlowRateAux.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
11#include "SCM.h"
12
14
17{
19 params.addClassDescription("Computes inlet mass flow rate BCs, from specified mass flux and "
20 "cross-sectional area and applies blocked inlet conditions");
21 params.addRequiredCoupledVar("area", "Cross sectional area [m^2]");
22 params.addRequiredParam<PostprocessorName>(
23 "unblocked_mass_flux", "Specified mass flux for unblocked subchannels [kg/s-m^2]");
24 params.addRequiredParam<PostprocessorName>(
25 "blocked_mass_flux", "Specified mass flux for blocked subchannels [kg/s-m^2]]");
26 params.addRequiredParam<std::vector<unsigned int>>("index_blockage",
27 "index of subchannels affected by blockage");
28 return params;
29}
30
32 : AuxKernel(parameters),
33 _subchannel_mesh(SCM::getConstMesh<SubChannelMesh>(_mesh)),
34 _unblocked_mass_flux(getPostprocessorValue("unblocked_mass_flux")),
35 _blocked_mass_flux(getPostprocessorValue("blocked_mass_flux")),
36 _area(coupledValue("area")),
37 _index_blockage(getParam<std::vector<unsigned int>>("index_blockage"))
38{
39}
40
41Real
43{
45
46 for (const auto & index : _index_blockage)
47 {
48 if (i == index)
50 }
51
53}
registerMooseObject("SubChannelApp", SCMBlockedMassFlowRateAux)
void ErrorVector unsigned int
const Node *const & _current_node
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
Computes mass flow rate from specified uniform mass flux and cross-sectional area and applies inlet b...
virtual Real computeValue() override
const std::vector< unsigned int > _index_blockage
index of subchannels affected by blockage
const VariableValue & _area
Cross-sectional area.
const PostprocessorValue & _blocked_mass_flux
Specified mass flux of blocked channels.
const SubChannelMesh & _subchannel_mesh
SCMBlockedMassFlowRateAux(const InputParameters &parameters)
static InputParameters validParams()
const PostprocessorValue & _unblocked_mass_flux
Specified mass flux of unblocked channels.
Base class for subchannel meshes.
virtual unsigned int getSubchannelIndexFromPoint(const Point &p) const =0
Return a subchannel index for a given physical point p
Definition SCM.h:17