12.10. Detailed Flow Description
The logic of the voiding model coding is displayed in the flow diagrams of Figure 12.10.1. The flowchart is broken up into several sections: the main flow diagram, which outlines the structure of the driver subroutine TSBOIL, and several auxiliary diagrams which give more detail about larger subroutines called by TSBOIL. A brief description of the function of each subroutine used in the voiding model is provided in Table 12.10.1 immediately following Figure 12.10.1.
The flowchart may be easier to follow if it is studied in conjunction with a more detailed description of the coding logic. The driver subroutine TSBOIL is first called by TSTHRM once the prevoiding model has predicted that initiation of voiding in the channel is imminent. On this first call, TSBOIL uses subroutines CHIN and TSILLB to initialize variables needed in the voiding model calculation from information generated in the prevoiding model. Subroutine TSCSET is then called to update voiding-related variables to the current coolant time step. Temperatures and liquid-sodium material properties are extrapolated to the end of the time step in subroutine TSC2, which, together with MOMEN and TSC21, also solves the liquid slug momentum equation for a preliminary value of the liquid mass flow rate in the channel at the end of the time step. The code then branches to subroutine TSOV45. This subroutine completes the liquid slug calculations by calling TSC5 to compute the final value of the mass flow rate, TSC6 to determine the liquid sodium temperatures along the channel, and TSC7 to find the axial pressure distribution and saturation temperatures and to determine whether the exact time of voiding initiation has been calculated or whether it is necessary to iterate on the start of voiding. If iteration is necessary, the program adjusts the time step for a new estimate of the time of voiding initiation and returns to TSC2. This process is repeated until the time of the start of boiling has been found. At this point, TSOV45 calls TSC8, which uses TSCBUB, TSC85, and TSC86 to initialize the variables necessary to account properly in the voiding calculation for the presence of the newly formed bubble. Next, the increments in the heat fluxes and the heat-transfer coefficients and the temperatures of the structure, reflectors, plenum gas, and plenum cladding are computed through TSCA, TSCA1, and TSCA2. The new time-step size is set in TSC9, and the updated heat fluxes and heat-transfer coefficients are determined in TSCA. Before returning control to TSBOIL, TSOV45 checks to see if cladding motion has started, and, if it has, it calls TSCLD2. The coding then returns to TSBOIL. A check is made to see if the end of the primary-loop time step has been reached, and if it has, the PRIMAR-4 model is called through PRIMUP and the inlet and outlet temperatures are updated from TSCMP1. Tests are then made on error flogs and on whether the heat-transfer time step has been completed; if it has, a new heat-transfer time step is calculated in TSHTRV. If the appropriate debug flag is set, a printout of some of the voiding model variables is created by NODEPR; otherwise, the coolant time step is over, and control is returned to TSTHRM.
On subsequent calls to TSBOIL, the code branches immediately to TSCSET to update the appropriate variables. Subroutine TSC2 is then called, and then the film thicknesses on the cladding and structure in any voided regions, as well as some heat-transfer coefficient and heat-flux information, are computed using TSC3 and TSC31. The subroutine T4A3D is then called to perform the voiding model calculation. This subroutine first checks for any bubbles that are small enough to use the uniform-vapor-pressure model and calls TSC43A to compute the vapor temperatures and pressures in these bubbles. The pressure-gradient mode is applied by T4A3D to any remaining bubbles, with subroutine T41A3D used to set up the matrix Eq. (12.6-168) and T42A3D responsible for applying the Gaussian elimination procedure to solve the equation. Once the voiding calculation is completed, TSOV45 is called. This subroutine and the subroutines it calls perform the operations described above; in addition, TSC5 computes the liquid-vapor interface positions and TSC8, with the help of TSC82, TSC83, TSC84, TSC85, and TSC86, takes care of all liquid-slug and vapor-bubble accounting. Phenomena such as bubble formation and collapse; liquid-slug disappearance, expulsion, and reentry; and vapor-bubble combination are treated in these subroutines. Subroutine TSC9 not only computes a new time step but also performs a series of checks to see if the current time step should be cut back and the calculation redone; if this is the case, the step size is cut, the coding branches back to the middle of TSCSET for extrapolation to the end of the revised time step of the required variables, and the calculation is repeated. Otherwise, TSOV45 returns control to TSBOIL, and the remainder of the computation proceeds as above.
Routine |
Description |
---|---|
CHIN |
Calculates the ratio of the fuel pin outer perimeter to the coolant area. Called by TSBOIL. |
DTHFND |
Calculates new heat-transfer time step. Called by TSBOIL. |
MOMEN |
Computes the terms in the momentum equation for each segment of each liquid slug. Called by TSC2. |
NODEPR |
Gives printout of all temperatures. Called by TSBOIL. |
ORUNYO |
Updates data for PRIMAR-4. Called TSBOIL. |
TSBOIL |
Drives the two-phase calculation. Also, forms a new gas bubble, if necessary, when pin rupture occurs, and reduces the time step when approaching rupture. Called for TSTHRM each coolant time step. |
TSCA |
Comprises two independent sections. First section calls TSCA1 and TSCA2. Second section computes film heat-transfer coefficients and heat fluxes and sets cladding temperatures in the fuel pin for the next time step. Reduces the gas mass in a bubble when part of the bubble is cut off after blowing out the top of the subassembly. Called by TSOV45. |
TSCA1 |
Calculates increments to the integrated heat fluxes from the cladding to the coolant and from the structure to the coolant. Also calculates increments to the film heat-transfer coefficients and the average sodium density. Called by TSCA. |
TSCA2 |
Calculates temperatures of structure, reflectors, cladding in the plenum, and gas in the plenum. Also, calculates mass of gas in the plenum and in a bubble. Called by TSCA. |
TSCBUB |
Creates a new vapor bubble. Also, sets the initial gas mass in a bubble to zero. Called by TSC8 and TSC82. |
TSCC |
Calculates film motion (not currently used). Called by TSOV45. |
TSCLD1 |
Driver subroutine for cladding motion. Called by T4A3D. |
TSCLD2 |
Performs moving cladding velocity calculation. Called by TSO45. |
TSCMP1 |
Updates inlet and outlet pressures. Called by TSBOIL. |
TSCSET |
Initializes coolant variables and gas release variables each coolant time step. Called by TSBOIL. |
TSC2 |
Extrapolates coolant, cladding, and structure temperatures; computes density, thermal conductivity, heat capacity, and viscosity at the extrapolated time; and computes the change in coolant flow rate, neglecting the pressure change with time at the interfaces. Called by TSBOIL. |
TSC21 |
Computes the terms in the momentum equation for each fully liquid segment of each coolant slug. Called by MOMEN. |
TSC3 |
Computes coolant heat transfer coefficient and film thicknesses. Also calculates heat flow and gas source to uniform pressure bubbles. Adjusts condensation coefficient when gas is present. Called by TSBOIL. |
TSC31 |
Function used by TSC3 to calculate liquid film heat transfer coefficients in voided regions. |
TSC43A |
Calculates vapor temperatures and pressures in uniform pressure bubbles. Called by T4A3D. |
TSC5 |
Calculates liquid slug flow rates and liquid-vapor interface positions after the first bubble is formed. Called by TSOV45. |
TSC6 |
Calculates temperatures in liquid slugs. Called by TSOV45. |
TSC7 |
Computes pressure and saturation temperatures in liquid slugs and performs the iteration to specify the time at which boiling starts. Called by TSOV45. |
TSC8 |
Performs accounting for bubble collapse, bubble formation, liquid slug expulsion and reentry, and combination of bubbles upon disappearance of a liquid slug. Called by TSOV45. |
TSC82 |
Checks for formation of a new bubble (other than the first bubble formed in the subassembly). Called by TSC8. |
TSC83 |
Calculates liquid slug expulsion and reentry. Called by TSC8. |
TSC84 |
Calculates bubble collapse. Called by TSOV45. |
TSC85 |
Performs vapor bubble accounting. Called by TSC8, TSCBUB, and TSC84. |
TSC86 |
Performs liquid slug accounting. Called by TSC8, TSCBUB, and TSC84. |
TSC87 |
Keeps track of which bubble is in contact with the rupture if gas is being released. Called from TSC8. |
TSC9 |
Computes next coolant time step size. Also evaluates and resets the current time step if the step size is too large. Called by TSOV45. |
TSHTRV |
Transient state heat transfer. Called by TSBOIL. |
TSILLB |
Initializes cladding temperatures, velocities at interfaces, and interface positions. Called by TSBOIL only for the first coolant time step. |
TSOV45 |
Drives the calculation of the pressure, temperature, and flow rates in the liquid slugs and the bubble accounting. Also calculates the gas fraction in each bubble. Called by TSBOIL. |
T4A3D |
Separates pressure drop and uniform-pressure bubble calculations and initializes variables for calculation of vapor pressures and mass flow rates. Called by TSBOIL. |
T41A3D |
Sets up matrix for pressure-drop bubble calculations. Also, for the gas release model, calculates the gas source into pressure gradient bubbles and adjusts friction factors. Called by T4A3D. |
T42A3D |
Calculates solution of simultaneous equations by Gaussian elimination to solve for changes in pressures and mass flow rates in pressure-drop bubbles. Called by T4A3D. |