https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SCMDuctHeatRatePostprocessor.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 "FEProblemBase.h"
12#include "MooseMesh.h"
13#include "SCM.h"
15
17
20{
22 params.addClassDescription("Calculates the heat flow that goes into the coolant through the duct "
23 "based on aux variable duct_heat_flux");
24 return params;
25}
26
28 : GeneralPostprocessor(parameters),
29 _mesh(SCM::getConstMesh<SubChannelMesh>(_fe_problem.mesh())),
30 _value(0)
31{
32}
33
34void
36{
37 const auto scm_problem = dynamic_cast<SubChannel1PhaseProblem *>(&_fe_problem);
38 const auto nz = _mesh.getNumOfAxialCells();
39 const auto n_channels = _mesh.getNumOfChannels();
40 if (!scm_problem)
41 mooseError("SCMDuctHeatRatePostprocessor can only be used within a subchannel 1phase problem.");
42 auto power = 0.0;
43 for (unsigned int iz = 1; iz < nz + 1; iz++)
44 for (unsigned int i_ch = 0; i_ch < n_channels; i_ch++)
45 power += scm_problem->getAddedHeatDuct(i_ch, iz);
46 _value = power;
47}
48
49Real
registerMooseObject("SubChannelApp", SCMDuctHeatRatePostprocessor)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
void mooseError(Args &&... args) const
Calculates the total heat flow $[W]$ that goes into the coolant through the duct based on the variabl...
Real _value
value we want to calculate
SCMDuctHeatRatePostprocessor(const InputParameters &params)
virtual Real getValue() const override
const SubChannelMesh & _mesh
geometric information
Base class for the 1-phase steady-state/transient subchannel solver.
Base class for subchannel meshes.
virtual unsigned int getNumOfChannels() const =0
Return the number of channels per layer.
virtual unsigned int getNumOfAxialCells() const
Return the number of axial cells.
FEProblemBase & _fe_problem
MeshBase & mesh
Definition SCM.h:17