BNL-NUREG-50602
Preaccident modeling of an LMFBR plant for SSC-L

Section 6. CODE DESCRIPTION

6.1     CODING GUIDELINES

6.1.1     Applicable Coding Standards

. . . includes: . . .

6.1.2     Code Structure and Data management

SSC is a deliberately structured ensemble of modules each of which performs a well-defined set of tasks. A module is broken down into submodules such that each submodule performs a single task. Submodules are designed so that they may be easily replaced or exported from the code. As much as possible, all data linkage is maintained via labelled common blocks To assure agreement of data definitions, all nonexecutable statements defining variables in a given common are identical in every module using that common. (Exception is made for a number of well-defined data management routines.)

A variable-dimensioning (dynamic allocation) scheme is used throughout the program. Data transfer of dimensional arrays is accomplished by passing a large container array via labelled common. The starting locations and lengths of each individual array are also passed via labelled common. At the module and submodule level, equivalence statements are employed so that a naming convention for variables (discussed later) can be maintained for better understanding and readability. This particular scheme of variable dimensioning was selected because of its superior efficiency of data transfer and inherent characteristics for permitting a minimization of storage.

A symbolic naming scheme was adopted for SSC and ued throughout. This was done to avoid the problems caused by ambiguities and degeneracies prevalent in other large system codes. Symbolic names are restricted to six or fewer characters and are used for several different types of entities, specifically:

A summary of the SSC naming conventions is given in the following section.

6.1.3     Symbolic Naming Convention

The naming convention attempts to convey as much information as possible about an entity while maintaining the final label as mnemonic as possible. To this end, SSC names reserve two (and occasionally three) characters to identify general entity type and purpose, and leave four characters to be assigned mnemonically. Specifically, the symbolic naming convention for variables and names is as follows:


	- LOCAL VARIABLES  (including those shared via scratch COMMON):

		May not contain embedded digit:  i.e., digits only at end.
		First character should conform to Table 6-1, if applicable.

	- GLOBAL VARIABLES:

		1st character is a letter specifying the type of quantity.
			e.g., "P" for pressure.  	See Table 6-1.

		2nd character is a digit indicating module which alters the value
			(i.e. region of the reactor system).  	See Table 6-1.

		Remaining characters (up to four, at least one) are assigned
			mnemonically, with no embedded digits  (Digits are OK at end,
			or starting with third character:  P6ABC2, P67B5.)

	- ROUTINE NAMES:

		First two to four characters are mnemonically assigned,
			except that 2nd character may not be a digit.

		Next character is a digit indicating module (or region)
			(See Table 6-2.)

		Last character(s):  one or two letters,
			indicating overlay name.	(See Table 6-3.)

		Examples:  READ1R, VRFY7R, MAIN9S, FUEL5S, PBAL9S.

		
Table 6-1.
Initial Letters Used to Indicate Type of Quantity and Units
A Area m2
B Mass kg
C Material properties, constants (See Table 6-2)
D Density kg / m3
E Energy; enthalpy J; J/kg
F Fractions, factors --
G Mass flow rate per unit area kg / s m2
H Heat transfer coefficients W /m2K
P Pressure; power N / m2; W
Q Surface heat flux; catch-all W / m2; --
R Reactivity; angular measure δK / K; radians
S Time s
T Mass K (not C)
U Velocity m / s
V Volume m3
W Mass flow rate kg / s
X Distance (length or radius) m
Y Distance (width or diameter) m
Z Distance (height or axial) m
I, J, K Used for index values of dimensioned arrays (used in order).
L Control flags, counters, etc.
M Maximum compiled dimensions; other integer constraints.
N Actual dimensions used (e.g. nuimber of channels used).
2013 NOTES
  • This report was written in 1975.
  • The above choices were made specifically for a nuclear reactor simulation code.
    (Other applications would, of course, make different choices for letters, etc.)
  • This was the very first computer code required (by NRC) to use metric units, only.
  • Six character limitation was necessary for portability and standards compliance (ANSI FORTRAN Standards X3.9-1966 and draft proposed FORTRAN 77)


Table 6-2.
Initial Letters Used to Indicate Type of Quantity and Units
1 Primary loop (NOT including IHX or vessel).
2 Secondary loop, including IHX (but not steam generator).
3 Tertiary loop and steam generator 9but not turbine, condenser).
4 Turbine, condenser
5 Fuel (and blanket) rods.
6 Reactor core coolant volumes.
7 Reactor vessel, structure, etc.
8 - (unassigned)
9 Global or general quantities, not pertaining to a specific module or modules (nor regions).
NOTE: For entities pertaining to more than one region, the digit used is determined by whaichever module creates or alters it.
For material properties constants (first character is "C"), the digits have a sligntly different meaning:
1 Sodium 2 - (unassigned)
3 Water or steam 4 Reactor fuel blanket
5 Reactor fuel 6 Cladding of fuel rods
7 Steel, other structural materials 8 Reactor cover gas
Also, for material properties constants, the third character is meaningful; for example:
A Coefficient of thermal expansion
C Specific heat capacity K Thermal conductivity.
D Density N Dynamic viscosity.
E Emissivity P Pressure
H Enthalpy T Temperature


Table 6-3.
Final Letters Used for Routine Names
R Routines of the data reading and restart segment.
S Routines of the steady-state calculation segment.
T Routines of the transient time-stepping segment.
U Utiliuty routines used by more than one program segment.
F Functions other than those calculating material peoperties.
* The final letters of material properties functions generally correespond to those used for the third character for material propertyies constants (see Table 6-2).


6.2     FLOW CHART

The modularized structure of the SSC-L code lends itself to a natural subdivision. The code is divided into three disjoint processes as shown in Figure 6-1. These routines are the main driver programs of SSC and are called in succession by the controller routine, SSC-L. Each performs a unique set of tasks and is executed only once for any given case. It should be noted that this type of structure permits the use of system routines such as CDC's utility OVERLAY to make the most efficient use of field length. Each of the drivers along with its associated subroutines is flow charted in Figures 6-2 through 6-4. The naming convention discussed earlier (Section 6-3) is used in selecting program and subprogram names. Only a short description of these subroutines is included in the following.
MAIN9R
	This routine is the main driver for the input-initializing module.
	It calls the free-format card reader routines in a sequence specified by the user.
	The data verification, as well as a series of data-management routines,
	are also called by this routine.

REST9R
	This routine reads a program generated file for the reinitialization 
	of labelled commons in the event of a restart.

READ1R
	This routine processes free-format card input for the initialization 
	of the primary and secondary loop modules.

.
.
.

GENRD	This is a general purpose card reader routine as developed
	by the Los Alamos Scientific Laboratory and modified by current usage.

READ3R	This routine processes the free-format card input
	for the initialiation of the steam-generator module.

READ7R	...	in-vessel modules.

READ8R	... material property parameters.

VRFY1R - VRFY9R		These routines validate the data processed by the corresponding
	READ routines against the criteria established in the data dictionary.

CALC1R	This routine initializes the secondary and subsequnt loop structures where the
	user has chosen to default these values to those entered for the primary loop.

CALC7R	+++

CALC8R

CALC3R

TYPE5R	This reoutine loads the channel-dependent parameters
	for use in the slice-dependent in-vessel routines.

LIST9R and PRNT3R	These routines print all data initialized in the imput module.

SAVE9R	This routine generates an ordered file for reinitialization restart.

MASIN9S	This routine is the main driver for the steady-state calculations.

PBAL9S	This routine performs the global thermal balance for the whole plant.

IHX1S	+++

STGN3S	+++

PIPE3S	This routine performs the pipe model calculations.

HX3S	This routine performs the heat-exchanger model calculations.
	It determines the pressure drop in the inlet plenum of the heat exchanger,
	calls the routines which determine the enthalpy and pressure distributions in
	the heat transfer tube and calculates the pressure drop in the output plenum of
	the heat exchanger.  In addition, it determines the location of the DNB point and
	adjusts the total heat transfer area to produce the specified outlet conditions.

PUMP3S	This routine computes either the pump outlet pressure at the rated pump speed
	or the punp speed if pump outlet pressure is specified.

VOL3S

LOOP1S

PIPE1S

HYDR1S

CVAL1S

PUMP1S

PRES1S

RE1S

END 1S

LOOP22S

PIPE2S

SPH2S

EVAP2S

PUMP2S

TANK2S

PRES2S

RES2S

END2S	This subroutine sets the inlet temperature and mass flow rate
	boundary conditions for pipe (J+1) in the intermediate coolant loop.
	It particularly accounts for temperature rise across pump and mass flow
	rate division due to branch lines for coolant flow at the steam generator.

COOL6S	Driver module for coolant calculations.  It performs interpolation
	for fuel noding of temperature and heat transfer coefficients.

LPLN6S	Coolant lower plenum modul.  It initializes +++

CORE6S	+++

UPLN6S	+++

ZSYSTM	An IMSL routine [Ref 46] that determines a root 
	of a system of N simultaneous nonlinear equations 
	in N unknowns utilizing Brown's method.

SIMT6S	Contains seven equations for seven upper plenum temperatures,
	which are called by ZSYZTM, to obtain an iterative solution.

FUEL5S	Driver module for fuel heat conduction calculations.
	Treats a fuel slice as the basic computational element.
	Calls all major fuel computational modules and controls congruence.  {BAM}

PREX5S	This module initializes nodal distances XI for either
	equi-radial increments or equi-area increments of the fuel slice.  {BAM}

FRAD5S	This module calculates the average power generation 
	for all nodes in the slice.  {BAM}

ALFA5S	This module calculates the coefficient of thermal expansion 
	for each node in the slice of fuel.

XPAN5S	This module adjusts the radii due to thermal expansion 
	for each node in the fuel slice.

GRO5S	+++

TEMP5S	+++

GAMA5S	+++

STEM5S	+++

PUT5S	This module moves the calculated steady-state values for the slice 
	into storage locations.

MAIN9T	This is the driver routine for transient calculations,
	(The entire MAIN9T is being developed.)


				F L O W C H A R T


+++++