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 _scm_problem(SCM::getConstProblem<SubChannel1PhaseProblem>(_fe_problem)),
31 _value(0)
32{
33}
34
35void
37{
38 const auto nz = _mesh.getNumOfAxialCells();
39 const auto n_channels = _mesh.getNumOfChannels();
40 auto power = 0.0;
41 for (unsigned int iz = 1; iz < nz + 1; iz++)
42 for (unsigned int i_ch = 0; i_ch < n_channels; i_ch++)
43 power += _scm_problem.getAddedHeatDuct(i_ch, iz);
44 _value = power;
45}
46
47void
49{
50 // The subchannel solution is only available on processor 0
52}
53
54Real
registerMooseObject("SubChannelApp", SCMDuctHeatRatePostprocessor)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
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)
const SubChannel1PhaseProblem & _scm_problem
subchannel problem that holds the solution
virtual Real getValue() const override
const SubChannelMesh & _mesh
geometric information
Base class for the 1-phase steady-state/transient subchannel solver.
Real getAddedHeatDuct(unsigned int i_ch, unsigned int iz) const
Return the added heat coming from the duct.
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.
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
const Parallel::Communicator & _communicator
MeshBase & mesh
Definition SCM.h:18