Skip to content

Commit 93f49ee

Browse files
committed
• Clean up subchannel power mesh assumptions
Remove unused detailed pin mesh generator code and an unused tri assembly helper. Make quad and tri power IC/Aux objects require a pin mesh and apply q_prime only on pin nodes. Update added-heat calculations to source heat from pin nodes only, returning zero for no-pin meshes. Refresh related power object documentation to match the pin-only behavior. Refs idaholab#32847
1 parent bbb604b commit 93f49ee

17 files changed

Lines changed: 85 additions & 361 deletions

modules/subchannel/doc/content/source/auxkernels/SCMQuadPowerAux.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ This AuxKernel does the same thing as the [SCMQuadPowerIC](SCMQuadPowerIC.md) IC
1212

1313
!! Intentional comment to provide extra spacing
1414

15-
If the user has created a mesh for the pins, the axial heat rate `q_prime` will be assigned to the nodes of the pin mesh. If the user hasn't created a pin mesh the appropriate heat rate `q_prime` will be assigned to
16-
the nodes of the subchannel mesh.
15+
This AuxKernel requires a pin mesh. The axial heat rate `q_prime` is assigned only to the nodes of the pin mesh. If the subchannel mesh has no pin mesh, this object reports an error.
1716

1817
!syntax parameters /AuxKernels/SCMQuadPowerAux
1918

modules/subchannel/doc/content/source/auxkernels/SCMTriPowerAux.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ This AuxKernel does the same thing as the [SCMTriPowerIC](SCMTriPowerIC.md) IC k
1212

1313
!! Intentional comment to provide extra spacing
1414

15-
If the user has created a mesh for the pins, the axial heat rate `q_prime` will be assigned to the nodes of the pin mesh. If the user hasn't created a pin mesh the appropriate heat rate `q_prime` will be assigned to
16-
the nodes of the subchannel mesh.
15+
This AuxKernel requires a pin mesh. The axial heat rate `q_prime` is assigned only to the nodes of the pin mesh. If the subchannel mesh has no pin mesh, this object reports an error.
1716

1817
!syntax parameters /AuxKernels/SCMTriPowerAux
1918

modules/subchannel/doc/content/source/ics/SCMQuadPowerIC.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
!! Intentional comment to provide extra spacing
88

9-
This IC assigns the axial heat rate ([!param](/ICs/SCMQuadPowerIC/variable) = `q_prime`) on the subchannels or pins in the case of a problem with subchannels/pins in a square lattice arrangement.
9+
This IC assigns the axial heat rate ([!param](/ICs/SCMQuadPowerIC/variable) = `q_prime`) to the fuel pins in a square lattice arrangement.
1010

1111
The user must provide the total power of the subassembly [!param](/ICs/SCMQuadPowerIC/power), the axial shape of the power profile and the radial power distribution (power per pin). The axial power profile is given as a function over the -z direction, which integral over the length of the heated portion of the pin, is equal to the length of the heated portion of the pin. The radial power distribution is given as a column of numbers in a .txt file [!param](/ICs/SCMQuadPowerIC/filename) that has as many entries as the number of pins.
1212

@@ -24,8 +24,7 @@ The axial heat rate at a specific height is the product of the total power of th
2424

2525
!! Intentional comment to provide extra spacing
2626

27-
If the user has created a mesh for the pins, the axial heat rate will be assigned to the nodes of the pin mesh. If the user hasn't created a pin mesh the appropriate heat rate will be assigned to
28-
the nodes of the subchannel mesh. When the user has defined a fuel-pin mesh, the axial heat rate ([!param](/ICs/SCMTriPowerIC/variable) = `q_prime`) is the heat rate at the surface of the fuels pins and it is distributed equally to each neighboring subchannel.
27+
This IC requires a pin mesh. The axial heat rate ([!param](/ICs/SCMQuadPowerIC/variable) = `q_prime`) is assigned only to the nodes of the pin mesh. If the subchannel mesh has no pin mesh, this object reports an error. The subchannel solver distributes this pin heat to neighboring subchannels when computing the heat added to the coolant.
2928

3029
!syntax parameters /ICs/SCMQuadPowerIC
3130

modules/subchannel/doc/content/source/ics/SCMTriPowerIC.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
!! Intentional comment to provide extra spacing
88

9-
This IC assigns the axial heat rate ([!param](/ICs/SCMTriPowerIC/variable) = `q_prime`) on the subchannels or pins in the case of a problem with subchannels/pins in a triangular lattice arrangement.
9+
This IC assigns the axial heat rate ([!param](/ICs/SCMTriPowerIC/variable) = `q_prime`) to the fuel pins in a triangular lattice arrangement.
1010

1111
The user must provide the total power of the subassembly [!param](/ICs/SCMTriPowerIC/power), the axial shape of the power profile and the radial
1212
power distribution (power per pin). The axial power profile is given as a function, which integral over the length of the heated portion of the pin, is equal
@@ -26,8 +26,7 @@ The axial heat rate at a specific height is the product of the total power of th
2626

2727
!! Intentional comment to provide extra spacing
2828

29-
If the user has created a mesh for the pins, the axial hear rate will be assigned to the nodes of the pin mesh. If the user hasn't created a pin mesh the appropiate heat rate will be assigned to
30-
the nodes of the subchannel mesh. When the user has defined a fuel-pin mesh, the axial heat rate ([!param](/ICs/SCMTriPowerIC/variable) = `q_prime`) is the heat rate at the surface of the fuels pins and it is distributed equally to each neighboring subchannel.
29+
This IC requires a pin mesh. The axial heat rate ([!param](/ICs/SCMTriPowerIC/variable) = `q_prime`) is assigned only to the nodes of the pin mesh. If the subchannel mesh has no pin mesh, this object reports an error. The subchannel solver distributes this pin heat to neighboring subchannels when computing the heat added to the coolant.
3130

3231
!syntax parameters /ICs/SCMTriPowerIC
3332

modules/subchannel/doc/content/source/postprocessors/SCMPinPowerPostprocessor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
!! this comment introduces vertical space
88

9-
The user needs to specify a subchannel problem. Either a [QuadSubChannel1PhaseProblem.md] or a [TriSubChannel1PhaseProblem.md]. The postprocessor will calculate the total heat rate $[W]$ that goes into the coolant, based on the distribution of the aux variable q_prime $[W/m]$, on the fuel pins or the subchannels. It will integrate this variable over the heated section using an axial trapezoidal rule.
9+
The user needs to specify a subchannel problem. Either a [QuadSubChannel1PhaseProblem.md] or a [TriSubChannel1PhaseProblem.md]. The postprocessor will calculate the total heat rate $[W]$ that goes into the coolant, based on the distribution of the aux variable q_prime $[W/m]$ on the fuel pins. It will integrate this variable over the heated section using an axial trapezoidal rule.
1010

1111
## Example Input File Syntax
1212

modules/subchannel/include/auxkernels/SCMQuadPowerAux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class SCMQuadPowerAux : public AuxKernel
3434
unsigned int _numberoflines;
3535
/// The name of the radial power profile file
3636
std::string _filename;
37-
/// matrix that holds the values of the relative pin power
37+
/// Matrix that holds the relative pin power
3838
Eigen::MatrixXd _power_dis;
3939
const Function & _axial_heat_rate;
4040
/// Average linear heat rate over the whole pin [W/m]

modules/subchannel/include/ics/SCMQuadPowerIC.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class SCMQuadPowerIC : public QuadSubChannelBaseIC
3030
unsigned int _numberoflines;
3131
/// The name of the radial power profile file
3232
std::string _filename;
33-
/// matrix that holds the values of the relative pin power
33+
/// Matrix that holds the relative pin power
3434
Eigen::MatrixXd _power_dis;
3535
const Function & _axial_heat_rate;
3636
/// Average linear heat rate over the whole pin [W/m]

modules/subchannel/include/meshgenerators/DetailedPinMeshGeneratorBase.h

Lines changed: 0 additions & 48 deletions
This file was deleted.

modules/subchannel/include/meshgenerators/SCMDetailedTriAssemblyMeshGenerator.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class SCMDetailedTriAssemblyMeshGenerator : public MeshGenerator
2525
/// returns the type of the subchannel given the index
2626
EChannelType getSubchannelType(unsigned int index) const { return _subch_type[index]; }
2727
Point rotatePoint(Point b, Real theta);
28-
Point translatePoint(Point & b, Point & translation_vector);
2928
void generatePin(std::unique_ptr<MeshBase> & mesh_base, const Point & center);
3029
/// returns the position of pin given pin index
3130
Point getPinPosition(unsigned int i) { return _pin_position[i]; }

modules/subchannel/src/auxkernels/SCMQuadPowerAux.C

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ SCMQuadPowerAux::validParams()
2020
{
2121
InputParameters params = AuxKernel::validParams();
2222
params.addClassDescription(
23-
"Computes axial power rate (W/m) that goes into the subchannel cells "
24-
"or is assigned to the fuel pins, in a quadrilateral lattice arrangement");
23+
"Computes axial power rate (W/m) assigned to the fuel pins in a quadrilateral lattice "
24+
"arrangement");
2525
params.addRequiredParam<PostprocessorName>(
2626
"power", "The postprocessor or Real to use for the total power of the subassembly [W]");
2727
params.addRequiredParam<std::string>(
@@ -44,12 +44,14 @@ SCMQuadPowerAux::SCMQuadPowerAux(const InputParameters & parameters)
4444
if (processor_id() > 0)
4545
return;
4646

47-
auto nx = _quadMesh.getNx();
48-
auto ny = _quadMesh.getNy();
47+
if (!_quadMesh.pinMeshExist())
48+
mooseError(name(), ": This object requires a pin mesh.");
49+
50+
auto n_pins = _quadMesh.getNumOfPins();
4951
// Matrix sizing
50-
_power_dis.resize((ny - 1) * (nx - 1), 1);
52+
_power_dis.resize(n_pins, 1);
5153
_power_dis.setZero();
52-
_pin_power_correction.resize((ny - 1) * (nx - 1), 1);
54+
_pin_power_correction.resize(n_pins, 1);
5355
_pin_power_correction.setOnes();
5456

5557
Real vin;
@@ -65,8 +67,8 @@ SCMQuadPowerAux::SCMQuadPowerAux(const InputParameters & parameters)
6567
if (inFile.fail() && !inFile.eof())
6668
mooseError(name(), " non numerical input at line : ", _numberoflines);
6769

68-
if (_numberoflines != (ny - 1) * (nx - 1))
69-
mooseError(name(), " Radial profile file doesn't have correct size : ", (ny - 1) * (nx - 1));
70+
if (_numberoflines != n_pins)
71+
mooseError(name(), " Radial profile file doesn't have correct size : ", n_pins);
7072
inFile.close();
7173

7274
inFile.open(_filename);
@@ -86,9 +88,7 @@ SCMQuadPowerAux::initialSetup()
8688
if (processor_id() > 0)
8789
return;
8890

89-
auto nx = _quadMesh.getNx();
90-
auto ny = _quadMesh.getNy();
91-
auto n_pins = (nx - 1) * (ny - 1);
91+
auto n_pins = _quadMesh.getNumOfPins();
9292
auto nz = _quadMesh.getNumOfAxialCells();
9393
auto z_grid = _quadMesh.getZGrid();
9494
auto heated_length = _quadMesh.getHeatedLength();
@@ -169,31 +169,13 @@ SCMQuadPowerAux::computeValue()
169169
auto unheated_length_entry = _quadMesh.getHeatedLengthEntry();
170170
Point p1(0, 0, unheated_length_entry);
171171
Point P = p - p1;
172-
auto pin_mesh_exist = _quadMesh.pinMeshExist();
173172

174173
/// assign power to the nodes located within the heated section
175174
if (MooseUtils::absoluteFuzzyGreaterEqual(p(2), unheated_length_entry) &&
176175
MooseUtils::absoluteFuzzyLessEqual(p(2), unheated_length_entry + heated_length))
177176
{
178-
if (pin_mesh_exist)
179-
{
180-
// project axial heat rate on pins
181-
auto i_pin = _quadMesh.getPinIndexFromPoint(p);
182-
return _ref_qprime(i_pin) * _pin_power_correction(i_pin) * _axial_heat_rate.value(_t, P);
183-
}
184-
else
185-
{
186-
// project axial heat rate on subchannels
187-
auto i_ch = _quadMesh.getSubchannelIndexFromPoint(p);
188-
// if we are adjacent to the heated part of the fuel Pin
189-
auto heat_rate = 0.0;
190-
for (auto i_pin : _quadMesh.getChannelPins(i_ch))
191-
{
192-
heat_rate += 0.25 * _ref_qprime(i_pin) * _pin_power_correction(i_pin) *
193-
_axial_heat_rate.value(_t, P);
194-
}
195-
return heat_rate;
196-
}
177+
auto i_pin = _quadMesh.getPinIndexFromPoint(p);
178+
return _ref_qprime(i_pin) * _pin_power_correction(i_pin) * _axial_heat_rate.value(_t, P);
197179
}
198180
else
199181
return 0.0;

0 commit comments

Comments
 (0)