26 params.
addClassDescription(
"Solver class for subchannels in a triangular lattice assembly and " 27 "bare/wire-wrapped fuel pins");
49 PetscErrorCode ierr =
cleanUp();
76 Real standard_area, wire_area, additional_area, wetted_perimeter, displaced_area;
88 std::acos(wire_lead_length /
89 std::sqrt(Utility::pow<2>(wire_lead_length) +
90 Utility::pow<2>(
libMesh::pi * (pin_diameter + wire_diameter))));
91 for (
unsigned int iz = 0; iz <
_n_cells + 1; iz++)
93 for (
unsigned int i_ch = 0; i_ch <
_n_channels; i_ch++)
99 Real rod_perimeter = 0.0;
106 (1.0 / 6.0) * 0.25 * M_PI * (*_Dpin_soln)(pin_node) * (*
_Dpin_soln)(pin_node);
107 rod_perimeter += (1.0 / 6.0) * M_PI * (*_Dpin_soln)(pin_node);
112 (1.0 / 4.0) * 0.25 * M_PI * (*_Dpin_soln)(pin_node) * (*
_Dpin_soln)(pin_node);
113 rod_perimeter += (1.0 / 4.0) * M_PI * (*_Dpin_soln)(pin_node);
119 standard_area = Utility::pow<2>(
pitch) * std::sqrt(3.0) / 4.0;
120 additional_area = 0.0;
121 displaced_area = 0.0;
122 wire_area =
libMesh::pi * Utility::pow<2>(wire_diameter) / 8.0 / std::cos(theta);
123 wetted_perimeter = rod_perimeter + 0.5 *
libMesh::pi * wire_diameter / std::cos(theta);
127 standard_area =
pitch * (pin_diameter / 2.0 + gap);
128 additional_area = 0.0;
129 displaced_area = (*_displacement_soln)(node)*
pitch;
130 wire_area =
libMesh::pi * Utility::pow<2>(wire_diameter) / 8.0 / std::cos(theta);
132 rod_perimeter + 0.5 *
libMesh::pi * wire_diameter / std::cos(theta) +
pitch;
136 standard_area = 1.0 / std::sqrt(3.0) * Utility::pow<2>(pin_diameter / 2.0 + gap);
137 additional_area = 0.0;
138 displaced_area = 1.0 / std::sqrt(3.0) *
139 (pin_diameter + 2.0 * gap + (*_displacement_soln)(node)) *
140 (*_displacement_soln)(node);
141 wire_area =
libMesh::pi / 24.0 * Utility::pow<2>(wire_diameter) / std::cos(theta);
143 rod_perimeter +
libMesh::pi * wire_diameter / std::cos(theta) / 6.0 +
144 2.0 / std::sqrt(3.0) * (pin_diameter / 2.0 + gap + (*_displacement_soln)(node));
148 auto subchannel_area =
149 standard_area + additional_area + displaced_area - rod_area - wire_area;
152 auto overlapping_pin_area = 0.0;
153 auto overlapping_wetted_perimeter = 0.0;
157 auto pin_1 = gap_pins.first;
158 auto pin_2 = gap_pins.second;
161 auto Diameter1 = (*_Dpin_soln)(pin_node_1);
162 auto Radius1 = Diameter1 / 2.0;
163 auto Diameter2 = (*_Dpin_soln)(pin_node_2);
164 auto Radius2 = Diameter2 / 2.0;
167 if (
pitch < (Radius1 + Radius2))
169 mooseWarning(
" The gap of index : '", i_gap,
" at axial cell ", iz,
" ' is blocked.");
171 (
pitch *
pitch + Radius1 * Radius1 - Radius2 * Radius2) / (2 *
pitch * Radius1);
173 (
pitch *
pitch + Radius2 * Radius2 - Radius1 * Radius1) / (2 *
pitch * Radius2);
174 auto angle1 = 2.0 * acos(cos1);
175 auto angle2 = 2.0 * acos(cos2);
177 overlapping_wetted_perimeter += 0.5 * angle1 * Radius1 + 0.5 * angle2 * Radius2;
179 overlapping_pin_area +=
180 0.5 * Radius1 * Radius1 * acos(cos1) + 0.5 * Radius2 * Radius2 * acos(cos2) -
181 0.25 *
sqrt((-
pitch + Radius1 + Radius2) * (
pitch + Radius1 - Radius2) *
182 (
pitch - Radius1 + Radius2) * (
pitch + Radius1 + Radius2));
185 subchannel_area += overlapping_pin_area;
186 wetted_perimeter += -overlapping_wetted_perimeter;
190 for (
const auto & i_blockage : index_blockage)
192 if (i_ch == i_blockage && (
Z >= z_blockage.front() &&
Z <= z_blockage.back()))
194 subchannel_area *= reduction_blockage[index];
203 for (
unsigned int iz = 0; iz <
_n_cells + 1; iz++)
205 for (
unsigned int i_gap = 0; i_gap <
_n_gaps; i_gap++)
208 auto pin_1 = gap_pins.first;
209 auto pin_2 = gap_pins.second;
215 auto displacement = 0.0;
223 displacement += (*_displacement_soln)(node);
227 displacement = displacement / counter;
230 0.5 * (flat_to_flat - (n_rings - 1) *
pitch * std::sqrt(3.0) -
246 for (
unsigned int iz = 1; iz <
_n_cells + 1; iz++)
248 for (
unsigned int i_ch = 0; i_ch <
_n_channels; i_ch++)
258 _aux->solution().close();
272 if (MooseUtils::absoluteFuzzyGreaterThan(z2, unheated_length_entry) &&
273 MooseUtils::absoluteFuzzyLessThan(z1, unheated_length_entry + heated_length))
293 double heat_rate_in = 0.0;
294 double heat_rate_out = 0.0;
299 heat_rate_out += factor * (*_q_prime_soln)(node_out);
300 heat_rate_in += factor * (*_q_prime_soln)(node_in);
302 return (heat_rate_in + heat_rate_out) * dz / 2.0;
316 width = 2.0 / std::sqrt(3.0) *
321 mooseError(
"Channel is not a perimetric subchannel ");
327 unsigned int last_node = (iblock + 1) *
_block_size;
328 unsigned int first_node = iblock *
_block_size + 1;
336 for (
unsigned int i_ch = 0; i_ch <
_n_channels; i_ch++)
343 name(),
" : Calculation of negative Enthalpy h_out = : ", h_out,
" Axial Level= : ", 0);
351 for (
unsigned int iz = first_node; iz < last_node + 1; iz++)
354 auto dz = z_grid[iz] - z_grid[iz - 1];
356 Real edge_flux_ave = 0.0;
359 for (
unsigned int i_ch = 0; i_ch <
_n_channels; i_ch++)
365 auto Si = (*_S_flow_soln)(node_in);
366 auto mdot_in = (*_mdot_soln)(node_in);
367 mdot_sum = mdot_sum + mdot_in;
368 si_sum = si_sum + Si;
371 edge_flux_ave = mdot_sum / si_sum;
373 for (
unsigned int i_ch = 0; i_ch <
_n_channels; i_ch++)
377 auto mdot_in = (*_mdot_soln)(node_in);
378 auto h_in = (*_h_soln)(node_in);
379 auto volume = dz * (*_S_flow_soln)(node_in);
380 auto mdot_out = (*_mdot_soln)(node_out);
383 Real sumWijPrimeDhij = 0.0;
384 Real sweep_enthalpy = 0.0;
393 unsigned int counter = 0;
399 unsigned int ii_ch = chans.first;
400 unsigned int jj_ch = chans.second;
407 if (
_Wij(i_gap, iz) > 0.0)
408 h_star = (*_h_soln)(node_in_i);
409 else if (
_Wij(i_gap, iz) < 0.0)
410 h_star = (*_h_soln)(node_in_j);
420 (wire_lead_length != 0) && (wire_diameter != 0))
428 if ((ii_ch == sweep_donor) || (jj_ch == sweep_donor))
431 (*_h_soln)(node_sweep_donor);
445 _WijPrime(i_gap, iz) * (2 * h_in - (*_h_soln)(node_in_j) - (*
_h_soln)(node_in_i));
462 dist_ij =
pitch / std::sqrt(3);
468 0.66 * (
pitch / pin_diameter) *
472 e_cond += 0.5 * (thcon_i + thcon_j) * Sij * shape_factor *
477 e_cond += -0.5 * (thcon_i + thcon_j) * Sij * shape_factor *
487 auto Si = (*_S_flow_soln)(node_in_i);
488 auto dist_ij = z_grid[iz] - z_grid[iz - 1];
490 e_cond += 0.5 * (thcon_i + thcon_j) * Si * ((*
_T_soln)(node_in_j) - (*
_T_soln)(node_in_i)) /
501 auto Si = (*_S_flow_soln)(node_in_i);
502 auto dist_ij = z_grid[iz + 1] - z_grid[iz];
503 e_cond += 0.5 * (thcon_i + thcon_j) * Si *
509 (mdot_in * h_in - sumWijh - sumWijPrimeDhij + added_enthalpy + e_cond + sweep_enthalpy +
515 " : Calculation of negative Enthalpy h_out = : ",
544 for (
unsigned int iz = first_node; iz < last_node + 1; iz++)
549 auto iz_ind = iz - first_node;
551 for (
unsigned int i_ch = 0; i_ch <
_n_channels; i_ch++)
555 auto S_in = (*_S_flow_soln)(node_in);
556 auto S_out = (*_S_flow_soln)(node_out);
558 auto volume = dz * S_interp;
560 PetscScalar Pe = 0.5;
564 auto w_perim_in = (*_w_perim_soln)(node_in);
565 auto w_perim_out = (*_w_perim_soln)(node_out);
576 auto Dh_i = 4.0 * S_interp / w_perim_interp;
577 Pe = mdot_loc * Dh_i *
cp / (
K * S_interp) * (mdot_loc / std::abs(mdot_loc));
582 if (iz == first_node)
584 PetscScalar value_vec_tt =
593 PetscInt col_tt = i_ch +
_n_channels * (iz_ind - 1);
595 LibmeshPetscCall(MatSetValues(
603 LibmeshPetscCall(MatSetValues(
607 PetscScalar rho_old_interp =
609 PetscScalar h_old_interp =
611 PetscScalar value_vec_tt =
_TR * rho_old_interp * h_old_interp *
volume /
_dt;
617 if (iz == first_node)
620 PetscScalar value_at =
alpha * (*_mdot_soln)(node_in) * (*
_h_soln)(node_in);
624 value_at =
alpha * (*_mdot_soln)(node_out) - (1 -
alpha) * (*_mdot_soln)(node_in);
626 LibmeshPetscCall(MatSetValues(
631 LibmeshPetscCall(MatSetValues(
634 else if (iz == last_node)
637 PetscScalar value_at = 1.0 * (*_mdot_soln)(node_out);
639 LibmeshPetscCall(MatSetValues(
642 value_at = -1.0 * (*_mdot_soln)(node_in);
644 LibmeshPetscCall(MatSetValues(
652 PetscScalar value_at = -
alpha * (*_mdot_soln)(node_in);
654 LibmeshPetscCall(MatSetValues(
657 value_at =
alpha * (*_mdot_soln)(node_out) - (1 -
alpha) * (*_mdot_soln)(node_in);
659 LibmeshPetscCall(MatSetValues(
664 LibmeshPetscCall(MatSetValues(
673 auto diff_center = K_center / (cp_center + 1e-15);
675 if (iz == first_node)
685 auto diff_bottom = K_bottom / (cp_bottom + 1e-15);
686 auto diff_top = K_top / (cp_top + 1e-15);
700 PetscScalar value_at = diff_up * S_up / dz_up + diff_down * S_down / dz_down;
701 LibmeshPetscCall(MatSetValues(
705 value_at = 1.0 * diff_down * S_down / dz_down * (*_h_soln)(node_bottom);
711 value_at = -diff_up * S_up / dz_up;
712 LibmeshPetscCall(MatSetValues(
715 else if (iz == last_node)
722 auto diff_bottom = K_bottom / (cp_bottom + 1e-15);
725 auto S_down = 0.5 * ((*_S_flow_soln)(node_center) + (*
_S_flow_soln)(node_bottom));
726 auto diff_down = 0.5 * (diff_center + diff_bottom);
731 PetscScalar value_at = diff_down * S_down / dz_down;
732 LibmeshPetscCall(MatSetValues(
737 value_at = -diff_down * S_down / dz_down;
738 LibmeshPetscCall(MatSetValues(
756 auto diff_bottom = K_bottom / (cp_bottom + 1e-15);
757 auto diff_top = K_top / (cp_top + 1e-15);
771 PetscScalar value_at = diff_up * S_up / dz_up + diff_down * S_down / dz_down;
772 LibmeshPetscCall(MatSetValues(
777 value_at = -diff_down * S_down / dz_down;
778 LibmeshPetscCall(MatSetValues(
783 value_at = -diff_up * S_up / dz_up;
784 LibmeshPetscCall(MatSetValues(
789 unsigned int counter = 0;
790 unsigned int cross_index = iz;
795 unsigned int ii_ch = chans.first;
796 unsigned int jj_ch = chans.second;
801 if (
_Wij(i_gap, cross_index) > 0.0)
803 if (iz == first_node)
805 h_star = (*_h_soln)(node_in_i);
806 PetscScalar value_vec_ct = -1.0 *
alpha *
808 _Wij(i_gap, cross_index) * h_star;
810 LibmeshPetscCall(VecSetValues(
816 _Wij(i_gap, cross_index);
818 PetscInt col_ct = ii_ch +
_n_channels * (iz_ind - 1);
819 LibmeshPetscCall(MatSetValues(
822 PetscScalar value_ct = (1.0 -
alpha) *
824 _Wij(i_gap, cross_index);
827 LibmeshPetscCall(MatSetValues(
830 else if (
_Wij(i_gap, cross_index) < 0.0)
832 if (iz == first_node)
834 h_star = (*_h_soln)(node_in_j);
835 PetscScalar value_vec_ct = -1.0 *
alpha *
837 _Wij(i_gap, cross_index) * h_star;
839 LibmeshPetscCall(VecSetValues(
845 _Wij(i_gap, cross_index);
847 PetscInt col_ct = jj_ch +
_n_channels * (iz_ind - 1);
848 LibmeshPetscCall(MatSetValues(
851 PetscScalar value_ct = (1.0 -
alpha) *
853 _Wij(i_gap, cross_index);
856 LibmeshPetscCall(MatSetValues(
861 if (iz == first_node)
863 PetscScalar value_vec_ct =
865 value_vec_ct +=
alpha * (*_h_soln)(node_in_j)*
_WijPrime(i_gap, cross_index);
866 value_vec_ct +=
alpha * (*_h_soln)(node_in_i)*
_WijPrime(i_gap, cross_index);
873 PetscScalar value_center_ct = 2.0 *
alpha *
_WijPrime(i_gap, cross_index);
875 PetscInt col_ct = i_ch +
_n_channels * (iz_ind - 1);
876 LibmeshPetscCall(MatSetValues(
879 PetscScalar value_left_ct = -1.0 *
alpha *
_WijPrime(i_gap, cross_index);
882 LibmeshPetscCall(MatSetValues(
885 PetscScalar value_right_ct = -1.0 *
alpha *
_WijPrime(i_gap, cross_index);
888 LibmeshPetscCall(MatSetValues(
891 PetscScalar value_center_ct = 2.0 * (1.0 -
alpha) *
_WijPrime(i_gap, cross_index);
894 LibmeshPetscCall(MatSetValues(
897 PetscScalar value_left_ct = -1.0 * (1.0 -
alpha) *
_WijPrime(i_gap, cross_index);
900 LibmeshPetscCall(MatSetValues(
903 PetscScalar value_right_ct = -1.0 * (1.0 -
alpha) *
_WijPrime(i_gap, cross_index);
906 LibmeshPetscCall(MatSetValues(
925 dist_ij =
pitch / std::sqrt(3);
933 auto A_i = K_i / cp_i;
934 auto A_j = K_j / cp_j;
935 auto harm_A = 2.0 * A_i * A_j / (A_i + A_j);
937 0.66 * (
pitch / pin_diameter) *
940 auto base_value = harm_A * shape_factor * Sij / dist_ij;
941 auto neg_base_value = -1.0 * base_value;
945 LibmeshPetscCall(MatSetValues(
950 LibmeshPetscCall(MatSetValues(
955 LibmeshPetscCall(MatSetValues(
960 LibmeshPetscCall(MatSetValues(
967 Real edge_flux_ave = 0.0;
970 for (
unsigned int i_ch = 0; i_ch <
_n_channels; i_ch++)
976 auto Si = (*_S_flow_soln)(node_in);
977 auto mdot_in = (*_mdot_soln)(node_in);
978 mdot_sum = mdot_sum + mdot_in;
979 si_sum = si_sum + Si;
982 edge_flux_ave = mdot_sum / si_sum;
984 PetscScalar sweep_enthalpy = 0.0;
986 (wire_diameter != 0.0) && (wire_lead_length != 0.0))
988 auto beta_in = std::numeric_limits<double>::quiet_NaN();
989 auto beta_out = std::numeric_limits<double>::quiet_NaN();
997 unsigned int ii_ch = chans.first;
998 unsigned int jj_ch = chans.second;
1004 if ((ii_ch == sweep_donor) || (jj_ch == sweep_donor))
1015 mooseAssert(!std::isnan(beta_in),
1016 "beta_in was not set. Check gap logic for i_ch = " + std::to_string(i_ch) +
1017 ", iz = " + std::to_string(iz));
1018 mooseAssert(!std::isnan(beta_out),
1019 "beta_out was not set. Check gap logic for i_ch = " + std::to_string(i_ch) +
1020 ", iz = " + std::to_string(iz));
1023 auto Sij = dz * gap;
1024 auto wsweep_in = edge_flux_ave * beta_in * Sij;
1025 auto wsweep_out = edge_flux_ave * beta_out * Sij;
1026 auto sweep_hin = (*_h_soln)(node_sweep_donor);
1027 auto sweep_hout = (*_h_soln)(node_in);
1028 sweep_enthalpy = (wsweep_in * sweep_hin - wsweep_out * sweep_hout);
1030 if (iz == first_node)
1033 PetscScalar value_hs = -sweep_enthalpy;
1040 PetscInt row_sh = i_ch +
_n_channels * (iz_ind - 1);
1041 PetscInt col_sh = i_ch +
_n_channels * (iz_ind - 1);
1042 LibmeshPetscCall(MatSetValues(
1044 PetscInt col_sh_l = sweep_donor +
_n_channels * (iz_ind - 1);
1045 PetscScalar neg_sweep_in = -1.0 * wsweep_in;
1047 LibmeshPetscCall(MatSetValues(
1055 PetscInt row_vec_ht = i_ch +
_n_channels * iz_ind;
1073 LibmeshPetscCall(MatAssemblyBegin(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1074 LibmeshPetscCall(MatAssemblyEnd(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1078 LibmeshPetscCall(MatAssemblyBegin(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1079 LibmeshPetscCall(MatAssemblyEnd(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1082 LibmeshPetscCall(MatAssemblyBegin(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1083 LibmeshPetscCall(MatAssemblyEnd(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1086 LibmeshPetscCall(MatAssemblyBegin(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1087 LibmeshPetscCall(MatAssemblyEnd(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1090 LibmeshPetscCall(MatAssemblyBegin(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1091 LibmeshPetscCall(MatAssemblyEnd(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1094 LibmeshPetscCall(MatAssemblyBegin(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1095 LibmeshPetscCall(MatAssemblyEnd(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1098 LibmeshPetscCall(MatAssemblyBegin(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1099 LibmeshPetscCall(MatAssemblyEnd(
_hc_sys_h_mat, MAT_FINAL_ASSEMBLY));
1101 _console <<
"Block: " << iblock <<
" - Enthalpy conservation matrix assembled" << std::endl;
PetscErrorCode solveAndPopulateEnthalpy(Mat A, Vec rhs, unsigned int first_node, unsigned int last_node, const char *ksp_prefix)
Solve a linear system (A * x = rhs) with a simple PCJACOBI KSP and populate the enthalpy solution int...
Vec _hc_radial_heat_conduction_rhs
const bool _pin_mesh_exist
Flag that informs if there is a pin mesh or not.
const Real & getWireDiameter() const
Return wire diameter.
virtual const std::pair< unsigned int, unsigned int > & getGapPins(unsigned int i_gap) const =0
Return a pair of pin indices for a given gap index.
virtual const Real & getPinDiameter() const
Return undeformed Pin diameter.
Mat _hc_radial_heat_conduction_mat
std::unique_ptr< SolutionHandle > _T_soln
std::unique_ptr< SolutionHandle > _h_soln
virtual const std::vector< unsigned int > & getPinChannels(unsigned int i_pin) const =0
Return a vector of channel indices for a given Pin index.
T & getMesh(MooseMesh &mesh)
function to cast mesh
Real _TR
Flag that activates or deactivates the transient parts of the equations we solve by multiplication...
void setGapWidth(unsigned int axial_index, unsigned int gap_index, Real gap_width)
Set the gap width for a given axial cell and gap index.
const PostprocessorValue & _P_out
Outlet pressure postprocessor value.
SubChannelMesh & _subchannel_mesh
TriSubChannelMesh & _tri_sch_mesh
virtual const std::vector< unsigned int > & getChannelPins(unsigned int i_chan) const =0
Return a vector of pin indices for a given channel index.
virtual const std::vector< Real > & getZGrid() const
Get axial location of layers.
static const std::string K
virtual const Real & getPitch() const
Return the undeformed pitch between 2 subchannels.
virtual EChannelType getSubchannelType(unsigned int index) const =0
Return the type of the subchannel for given subchannel index.
std::unique_ptr< SolutionHandle > _S_flow_soln
virtual void computeh(int iblock) override
Computes Enthalpy per channel for block iblock.
Vec _hc_time_derivative_rhs
static InputParameters validParams()
virtual Node * getPinNode(unsigned int i_pin, unsigned int iz) const =0
Get the pin mesh node for a given pin index and elevation index.
PetscErrorCode createPetscVector(Vec &v, PetscInt n)
Petsc Functions.
virtual Real computeAddedHeatPin(unsigned int i_ch, unsigned int iz) const override
Pure virtual: daughters provide different implementations.
static InputParameters validParams()
Mat _hc_sweep_enthalpy_mat
PetscScalar computeInterpolatedValue(PetscScalar topValue, PetscScalar botValue, PetscScalar Peclet=0.0)
virtual const std::vector< unsigned int > & getChannelGaps(unsigned int i_chan) const =0
Return a vector of gap indices for a given channel index.
Vec _hc_cross_derivative_rhs
const unsigned int & getNumOfRings() const
Return the number of fuel-pin rings, counting the center pin as the first ring.
Mat _hc_axial_heat_conduction_mat
Vec _hc_sweep_enthalpy_rhs
const Real & getDuctToPinGap() const
Return the the gap thickness between the duct and peripheral fuel pins.
std::unique_ptr< SolutionHandle > _rho_soln
static const std::string cp
Vec _hc_added_heat_rhs
Enthalpy conservation - source and sink.
std::vector< Real > _z_grid
axial location of nodes
const std::string & name() const
Triangular subchannel solver.
virtual const Real & getHeatedLength() const
Return heated length.
static const std::string pitch
PetscScalar computeInterpolationCoefficients(PetscScalar Peclet=0.0)
Functions that computes the interpolation scheme given the Peclet number.
std::shared_ptr< AuxiliarySystem > _aux
Mat _hc_cross_derivative_mat
Enthalpy conservation - cross flux derivative.
PetscErrorCode createPetscMatrix(Mat &M, PetscInt n, PetscInt m)
Real computeSweepFlowMixingParameter(unsigned int i_gap, unsigned int iz) const
Computes and validates the sweep-flow mixing parameter.
virtual Node * getChannelNode(unsigned int i_chan, unsigned int iz) const =0
Get the subchannel mesh node for a given channel index and elevation index.
const MooseEnum _interpolation_scheme
The interpolation method used in constructing the systems.
std::unique_ptr< SolutionHandle > _Dpin_soln
bool _deformation
Flag that activates the effect of deformation (pin/duct) based on the auxvalues for displacement...
virtual const std::vector< Real > & getReductionBlockage() const
Get area reduction of blocked subchannels.
Mesh class for triangular, edge and corner subchannels for hexagonal lattice fuel assemblies...
virtual unsigned int getNumOfAxialCells() const
Return the number of axial cells.
Base class for the 1-phase steady-state/transient subchannel solver.
std::unique_ptr< SolutionHandle > _mdot_soln
Solutions handles and link to TH tables properties.
virtual Real getGapWidth(unsigned int axial_index, unsigned int gap_index) const =0
Return gap width for a given gap index.
const Real & getFlatToFlat() const
Return flat to flat [m].
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual const std::vector< Real > & getZBlockage() const
Get axial location of blockage (in,out) [m].
libMesh::DenseMatrix< Real > & _Wij
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
static const std::string alpha
virtual const Real & getCrossflowSign(unsigned int i_chan, unsigned int i_local) const =0
Return a sign for the crossflow given a subchannel index and local neighbor index.
void detectDeformation()
Detects whether pin diameter or duct displacement fields require geometry recalculation.
Vec _hc_advective_derivative_rhs
Real getGapWidth(unsigned int axial_index, unsigned int gap_index) const override
Return gap width for a given gap index.
virtual Real getSubChannelPeripheralDuctWidth(unsigned int i_ch) const override
Function that computes the width of the duct cell that the peripheral subchannel i_ch sees...
virtual void initializeSolution() override
Function to initialize the solution & geometry fields.
void mooseWarning(Args &&... args) const
const bool _verbose_subchannel
Boolean to printout information related to subchannel solve.
void mooseError(Args &&... args) const
Mat _hc_advective_derivative_mat
Enthalpy conservation - advective (Eulerian) derivative;.
virtual const std::vector< unsigned int > & getIndexBlockage() const
Get index of blocked subchannels.
const bool _implicit_bool
Flag to define the usage of a implicit or explicit solution.
const std::pair< unsigned int, unsigned int > & getSweepFlowChans(unsigned int i_chan) const
const ConsoleStream _console
registerMooseObject("SubChannelApp", TriSubChannel1PhaseProblem)
Mat _hc_time_derivative_mat
Enthalpy Enthalpy conservation - time derivative.
libMesh::DenseMatrix< Real > _WijPrime
PetscFunctionReturn(LIBMESH_PETSC_SUCCESS)
Vec _hc_axial_heat_conduction_rhs
const Real & getWireLeadLength() const
Return the wire lead length.
virtual Real computeAddedHeatDuct(unsigned int i_ch, unsigned int iz) const
Non-pure: implemented in the base (or override in a child if needed)
TriSubChannel1PhaseProblem(const InputParameters ¶ms)
MooseUnits pow(const MooseUnits &, int)
virtual ~TriSubChannel1PhaseProblem()
std::unique_ptr< SolutionHandle > _P_soln
std::unique_ptr< SolutionHandle > _w_perim_soln
virtual const Real & getHeatedLengthEntry() const
Return unheated length at entry.
const SinglePhaseFluidProperties * _fp
Non-owning pointer to fluid properties user object.
Mat _hc_sys_h_mat
System matrices.
virtual const std::pair< unsigned int, unsigned int > & getGapChannels(unsigned int i_gap) const =0
Return a pair of subchannel indices for a given gap index.