https://mooseframework.inl.gov
Loading...
Searching...
No Matches
SCMPinPowerPostprocessor.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{
23 "Calculates the total heat rate that goes into the coolant from all the heated fuel-pins "
24 "based on aux variable q_prime");
25 return params;
26}
27
29 : GeneralPostprocessor(parameters),
30 _mesh(SCM::getConstMesh<SubChannelMesh>(_fe_problem.mesh())),
31 _scm_problem(SCM::getConstProblem<SubChannel1PhaseProblem>(_fe_problem)),
32 _value(0)
33{
34}
35
36void
38{
39 const auto nz = _mesh.getNumOfAxialCells();
40 const auto n_channels = _mesh.getNumOfChannels();
41 auto power = 0.0;
42 for (unsigned int iz = 1; iz < nz + 1; iz++)
43 for (unsigned int i_ch = 0; i_ch < n_channels; i_ch++)
44 power += _scm_problem.getAddedHeatPin(i_ch, iz);
45 _value = power;
46}
47
48void
50{
51 // The subchannel solution is only available on processor 0
53}
54
55Real
57{
58 return _value;
59}
registerMooseObject("SubChannelApp", SCMPinPowerPostprocessor)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
Calculates the total heat rate $[W]$ that goes into the coolant from all the heated fuel pins based o...
static InputParameters validParams()
SCMPinPowerPostprocessor(const InputParameters &params)
virtual void finalize() override
const SubChannelMesh & _mesh
geometric information
Real _value
value we want to calculate
const SubChannel1PhaseProblem & _scm_problem
subchannel problem that holds the solution
virtual Real getValue() const override
virtual void execute() override
Base class for the 1-phase steady-state/transient subchannel solver.
Real getAddedHeatPin(unsigned int i_ch, unsigned int iz) const
Return the added heat coming from the fuel pins.
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