-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #235 from smpark7/leakage-postprocessor
Add neutron leakage postprocessors and allow for optional group constants
- Loading branch information
Showing
14 changed files
with
355 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
|
||
#include "SideIntegralVariablePostprocessor.h" | ||
|
||
/** | ||
* This postprocessor computes the neutron leakage rate of a given neutron group | ||
* along a boundary | ||
*/ | ||
class NeutronLeakage : public SideIntegralVariablePostprocessor | ||
{ | ||
public: | ||
NeutronLeakage(const InputParameters & parameters); | ||
|
||
static InputParameters validParams(); | ||
|
||
protected: | ||
Real computeQpIntegral() override; | ||
|
||
const MaterialProperty<std::vector<Real>> & _diffcoef; | ||
unsigned int _group; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
#include "SideIntegralPostprocessor.h" | ||
#include "ScalarTransportBase.h" | ||
|
||
/** | ||
* This postprocess computes the total neutron leakage rate along a boundary for all neutron | ||
* groups | ||
*/ | ||
class TotalNeutronLeakage : public SideIntegralPostprocessor, public ScalarTransportBase | ||
{ | ||
public: | ||
TotalNeutronLeakage(const InputParameters & parameters); | ||
|
||
static InputParameters validParams(); | ||
|
||
protected: | ||
Real computeQpIntegral() override; | ||
|
||
std::vector<MooseVariableFEBase *> _vars; | ||
const MaterialProperty<std::vector<Real>> & _diffcoef; | ||
unsigned int _num_groups; | ||
std::vector<const VariableValue *> _group_fluxes; | ||
std::vector<const VariableGradient *> _grad_group_fluxes; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "NeutronLeakage.h" | ||
|
||
registerMooseObject("MoltresApp", NeutronLeakage); | ||
|
||
InputParameters | ||
NeutronLeakage::validParams() | ||
{ | ||
InputParameters params = SideIntegralVariablePostprocessor::validParams(); | ||
params.addClassDescription("Postprocessor for computing neutron leakage along provided " | ||
"boundaries"); | ||
params.addRequiredParam<unsigned int>("group_number", | ||
"The group for which this postprocessor " | ||
"calculates leakage"); | ||
params.addCoupledVar("temperature", | ||
"The temperature used to interpolate the diffusion coefficient"); | ||
return params; | ||
} | ||
|
||
NeutronLeakage::NeutronLeakage(const InputParameters & parameters) | ||
: SideIntegralVariablePostprocessor(parameters), | ||
_diffcoef(getMaterialProperty<std::vector<Real>>("diffcoef")), | ||
_group(getParam<unsigned int>("group_number") - 1) | ||
{ | ||
addMooseVariableDependency(&mooseVariableField()); | ||
} | ||
|
||
Real | ||
NeutronLeakage::computeQpIntegral() | ||
{ | ||
return _u[_qp] / 4 - _normals[_qp] * _grad_u[_qp] * _diffcoef[_qp][_group] / 2; | ||
} |
Oops, something went wrong.