https://mooseframework.inl.gov
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 registerMooseObjectRenamed("SubChannelApp",
15  BlockedMassFlowRateAux,
16  "06/30/2025 24:00",
18 
21 {
23  params.addClassDescription("Computes inlet mass flow rate BCs, from specified mass flux and "
24  "cross-sectional area and applies blocked inlet conditions");
25  params.addRequiredCoupledVar("area", "Cross sectional area [m^2]");
26  params.addRequiredParam<PostprocessorName>(
27  "unblocked_mass_flux", "Specified mass flux for unblocked subchannels [kg/s-m^2]");
28  params.addRequiredParam<PostprocessorName>(
29  "blocked_mass_flux", "Specified mass flux for blocked subchannels [kg/s-m^2]]");
30  params.addRequiredParam<std::vector<unsigned int>>("index_blockage",
31  "index of subchannels affected by blockage");
32  return params;
33 }
34 
36  : AuxKernel(parameters),
37  _subchannel_mesh(SCM::getConstMesh<SubChannelMesh>(_mesh)),
38  _unblocked_mass_flux(getPostprocessorValue("unblocked_mass_flux")),
39  _blocked_mass_flux(getPostprocessorValue("blocked_mass_flux")),
40  _area(coupledValue("area")),
41  _index_blockage(getParam<std::vector<unsigned int>>("index_blockage"))
42 {
43 }
44 
45 Real
47 {
49 
50  for (const auto & index : _index_blockage)
51  {
52  if (i == index)
53  return _blocked_mass_flux * _area[_qp];
54  }
55 
56  return _unblocked_mass_flux * _area[_qp];
57 }
virtual unsigned int getSubchannelIndexFromPoint(const Point &p) const =0
Return a subchannel index for a given physical point p
virtual Real computeValue() override
const PostprocessorValue & _blocked_mass_flux
Specified mass flux of blocked channels.
registerMooseObject("SubChannelApp", SCMBlockedMassFlowRateAux)
const Node *const & _current_node
const SubChannelMesh & _subchannel_mesh
Computes mass flow rate from specified uniform mass flux and cross-sectional area and applies inlet b...
registerMooseObjectRenamed("SubChannelApp", BlockedMassFlowRateAux, "06/30/2025 24:00", SCMBlockedMassFlowRateAux)
void addRequiredParam(const std::string &name, const std::string &doc_string)
const VariableValue & _area
Cross-sectional area.
const T & getConstMesh(const MooseMesh &mesh)
function to cast const mesh
Definition: SCM.h:21
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
const std::vector< unsigned int > _index_blockage
index of subchannels affected by blockage
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
SCMBlockedMassFlowRateAux(const InputParameters &parameters)
const PostprocessorValue & _unblocked_mass_flux
Specified mass flux of unblocked channels.
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Base class for subchannel meshes.
static InputParameters validParams()
void ErrorVector unsigned int
Definition: SCM.h:16