\subsection{The \moc{T16CPO:} module}\label{sect:t16cpo} The WIMS--AECL \moc{Tape16} file is a FORTRAN sequential binary file which is used to transfer the results of a WIMS--AECL calculation to other applications.\cite{Griffiths94} The explicit contents of this file may vary from application to application since the output of most records to this file is controlled by the user who can activate specific keywords in the WIMS--AECL input file. \vskip 0.08cm The standard \dds{cpo} data structure used by the code DONJON is generally generated by the cell code DRAGON. This data structure can be stored on a FORTRAN direct access binary file in the form of a hierarchical data base. There is also the possibility to keep the contents of this data structure in memory (with the same hierarchical structure) for faster access. The structure of the data base is in the form of a list of material directories which contain burnup sub-directories. Inside each of these burnup sub-directories the isotopic contents of a mixture is described and the multigroup cross sections associated with a specific isotope are stored in individual sub-directories. Note that in this database the macroscopic cross sections associated with a mixture are stored in a default isotopic sub-directory. \vskip 0.08cm The interface between the \moc{Tape16} file and the \dds{cpo} data structure should be written as a new module of the code DONJON in order to facilitate the access to the GANLIB utilities which manage the hierarchical data structures. This module will be called \moc{T16CPO:}. The transfer of information from a \moc{Tape16} format file to a \dds{cpo} data structure will require the following DONJON instructions: \vskip 0.08cm The \moc{T16CPO:} module specifications for creating or updating a \dds{cpo} data structure from a \moc{Tape16} file are: \begin{DataStructure}{Structure \moc{T16CPO:}} \moc{DONCPO} \moc{:=} \moc{T16CPO:} $[$ \moc{DONCPO} $]$ \moc{WIMS16} \moc{::} \dstr{desct16cpo} \moc{;} \\ \end{DataStructure} \noindent where \begin{ListeDeDescription}{mmmmmmmm} \item[\moc{DONCPO}] name of data structure where the output \dds{cpo} is stored. This can be a new data structure or an old data structure which will be updated. \item[\dstr{desct16cpo}] input specifications for the execution of the \moc{T16CPO:} module. \item[\moc{;}] end of record keyword. This keyword is used to delimit the part of the input data stream associated the current module. \end{ListeDeDescription} \noindent In the following dataset \begin{verbatim} MODULE T16CPO: ; SEQ_BINARY WIMS16 ; LINKED_LIST DONCPO ; DONCPO := T16CPO: WIMS16 :: ... ; \end{verbatim} means that that the module will read the sequential binary file \moc{WIMS16} file (in readonly mode) and create the \dds{cpo} data structure \moc{DONCPO} while the dataset \begin{verbatim} MODULE T16CPO: ; SEQ_BINARY WIMS16 ; LINKED_LIST DONCPO ; DONCPO := T16CPO: DONCPO WIMS16 :: ... ; \end{verbatim} means that the data structure \moc{DONCPO} will be updated. The input instructions (replaced by $\ldots$ here) should indicate what part of the information located on \moc{WIMS16} should be transferred to \moc{DONCPO} and in what order. \subsubsection{Input data for the \moc{T16CPO:} module} The input data structure \dstr{desct16cpo} will take the form: \begin{DataStructure}{Structure \dstr{desct16cpo}} $[$ \moc{EDIT} \dusa{iprint} $]$ \\ $[$ \moc{NMIX} \dusa{nmixt} $]$ \\ $[$ \moc{CONDG} \dusa{ngcond} (\dusa{igc}(i) , i=1,\dusa{ngcond} ) $]$ \\ $[$ \moc{LIST} $]$ \\ $[$ \moc{MIX} $[[$ \dusa{MIXNAM} $[$ $\{$ \moc{CELLAV} $|$ \moc{REGION} \dusa{noreg} $\}$ $]$ \\ \hskip 1.0cm $[$ \moc{RC} $[$ \dusa{nburn} $]$ \dusa{frstrec} $]$\\ \hskip 1.0cm $[[$ \dusa{NAMPER} \dusa{valref} \dusa{npert} (\dusa{valper}(i), \dusa{frstrec}(i) , i=1,\dusa{npert} ) $]]$ \\ \hskip 1.0cm $[$ \moc{MTMD} $[$ \dusa{valreft} \dusa{valrefd} $]$ \dusa{npert} (\dusa{valpert}(i), \dusa{valperd}(i), \dusa{frstrec}(i) , i=1,\dusa{npert} ) $]$ \\ \hskip 1.0cm $]]$ $]$ \\ \end{DataStructure} \noindent where \begin{ListeDeDescription}{mmmmmmmm} \item[\moc{EDIT}] optional keyword used to modify the print level \dusa{iprint}. \item[\dusa{iprint}] index used to control the printing in this module. It must be set to 0 if no printing on the output file is required while values $<$10 will print general information about each record requested on \moc{Tape16} as well as other generic information pertinent to the \moc{T16CPO:} module. Finally for values of \dusa{iprint}$\ge$10, additional information required for debugging will be printed. The default value is \dusa{iprint}=1. \item[\moc{NMIX}] optional keyword used to define the number of mixtures created on the \dds{cpo} data structure. \item[\dusa{nmixt}] the maximum number of mixtures created. The default value is \dusa{nmixt}=1. \item[\moc{CONDG}] optional keyword used to define the group structure for condensation. In the case where the \dds{cpo} is to be updated, the information following \moc{CONDG} must yield an energy group structure compatible with that already available on this data structure. If it is absent, the code will first try to use the \dds{cpo} group structure (if available). Then, it will try to use the editing group structure corresponding to \moc{NGREAC} on the following \moc{Tape16} record: \begin{quote} \verb*|REACTION |, \verb*|FLUX |, \verb|NEL| \end{quote} Finally, if everything else fails, it will select the main transport group structure corresponding to \moc{NGMTR} on the following \moc{Tape16} record: \begin{quote} \verb*+WIMS +, \verb*+CONSTANT +, \verb+NEL+ \end{quote} \item[\dusa{ngcond}] the number of condensed groups required. \item[\dusa{ilg}] the last group number associated with each condensed group. \item[\moc{LIST}] keyword to specify that the complete contents of \moc{Tape16} must be listed on the output file. \item[\moc{MIX}] keyword to specify that the remaining information will be associated with mixture properties definition. \item[\dusa{MIXNAM}] \texttt{character*6} name of the mixture to create or update on the \dds{cpo}. \item[\moc{CELLAV}] optional keyword to specify that cell averaged data will be taken from \moc{Tape16}. This is the default option. \item[\moc{REGION}] optional keyword to specify that regional data will be taken from \moc{Tape16}. The default option is \moc{CELLAV}. \item[\dusa{noreg}] region number associated with this material in \moc{Tape16}. \item[\moc{RC}] optional keyword to specify that the cross section taken from \moc{Tape16} are at reference value. This information must be defined at least once for each mixture. It must also precede the definition of perturbation parameters. \item[\dusa{nburn}] number of consecutive burnup steps associated with mixture. The default value is \dusa{nburn}=1. We will assume that the same number of burnup steps is also available for the nuclear properties associated with the perturbed local parameters. \item[\dusa{frstrec}] first \moc{Tape16} record number associated with this mixture. \item[\dusa{NAMPER}] \texttt{character*2} name of the perturbation. Each perturbation is associated with a single local parameter. The values permitted for \dusa{NAMPER} are the following: \begin{enumerate} \item \moc{FT} for fuel temperature \item \moc{MT} for moderator temperature \item \moc{MD} for moderator density \item \moc{MP} for moderator purity \item \moc{MB} for moderator boron \item \moc{CT} for coolant temperature \item \moc{CD} for coolant density \item \moc{CP} for coolant purity \item \moc{RT} for reflector temperature \item \moc{RD} for reflector density \item \moc{RP} for reflector purity \end{enumerate} Note that these keywords are identical to those used in the Proc16 program.\cite{Donnelly97a} Here the moderator, coolant and reflector can be D$_2$O, H$_2$O or any other mixture since DONJON is not aware of the compositions of these mixtures. In the case where many different \moc{Tape16} files contains the reference and the individual perturbation effects, one must first define the reference case before updating the \dds{cpo} using the \moc{Tape16} files containing the perturbations. \item[\dusa{valref}] reference value of the associated local parameter. \item[\dusa{npert}] number of local parameter perturbations. \item[\dusa{valper}] perturbed values of the local parameter. \item[\moc{MTMD}] \texttt{character*4} name of perturbation associated with combine temperature and density changes effects. Note that this keyword is equivalent to the \moc{MTS} keyword used in the Proc16 program.\cite{Donnelly97a} In principle, any combined perturbations effects could be built from the catenation of two individual perturbations given in \dusa{NAMPER}. \item[\dusa{valreft}] reference temperature. This is required if either the \moc{MT} or the \moc{MD} perturbation is not defined. \item[\dusa{valrefd}] reference density. This is required if either the \moc{MT} or the \moc{MD} perturbation is not defined. \item[\dusa{npert}] number of simultaneous perturbations in moderator temperature and density. \item[\dusa{valpert}] perturbed values of the moderator temperature. \item[\dusa{valperd}] perturbed value of the moderator density. \end{ListeDeDescription} The explicit name of the mixtures $\mathsf{MIXDIR}$ that will be stored on the main \dds{cpo} directory will correspond to a catenation of \dusa{MIXNAM} and a perturbation name and an index $i$ describing the perturbation order. It is created using the following FORTRAN instructions for the reference mixture: \begin{quote} \verb*|WRITE(|$\mathsf{MIXDIR}$\verb*|,'(A6,A6)')| \dusa{MIXNAM}, \verb*|'RC '| \end{quote} while for the $i^{\mathit{th}}$ perturbed state associated with \dusa{NAMPER}($J$) we will use: \begin{quote} \verb*|WRITE(|$\mathsf{MIXDIR}$\verb*|,'(A6,A2,A2,I2)')| \dusa{MIXNAM}, \dusa{NAMPER}($J$),\verb*|' '|, $i$ \end{quote} Finally, for the $i^{\mathit{th}}$ perturbed state associated with the \moc{MTMD} perturbation we will use: \begin{quote} \verb*|WRITE(|$\mathsf{MIXDIR}$\verb*|,'(A6,A4,I2)')| \dusa{MIXNAM}, \verb*|'MTMD'|, $i$ \end{quote} Typically if the \dstr{desct16cpo} structure takes the form: \begin{verbatim} EDIT 0 NMIX 2 MIX Candu RC 15 1 FT 900.0 2 1100.0 16 1300.0 46 Maple RC 70 RP 1.0 1 0.5 71 \end{verbatim} Then the first 15 cases stored on the \moc{Tape16} file will correspond to a reference CANDU fuel with burnup. The reference fuel temperature is 900.0 K. The next 15 cases are for a fuel temperature of 1100.0 K. Finally cases 46 to 60 are for a fuel temperature of 1300.0 K. The Maple mixture will have no burnup. The reference Maple cross sections correspond to case 70, while case 71 contains the effect on the Maple fuel mixture cross sections of a 50 \% reduction in reflector purity . As a result we will end up with a \dds{cpo} data structure which contains 5 mixtures called respectively \begin{quote} \verb*|Candu RC | \verb*|Candu FT 1| \verb*|Candu FT 2| \verb*|Maple RC | \verb*|Maple RP 1| \end{quote} The beginning of a new case on \moc{Tape16} will be identified by the presence of the record: \begin{quote} \verb*|CELLAV |,\verb*|MODERATOR| \end{quote} in a \moc{Tape16} file. Accordingly, the keyword \moc{CELLAV} should be used in the WIMS--AECL run creating this file. In addition, if the \moc{REGION} option is used in the \moc{T16CPO:} input data structure, then it should also be used in the WIMS--AECL run creating this file. \clearpage