forked from njoy/NJOY2016-manual
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodex.tex
271 lines (223 loc) · 9.71 KB
/
modex.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
\section{MODER}
\label{sMODER}
\hypertarget{sMODERhy}{The}
MODER\index{MODER|textbf} module is used to convert ENDF\index{ENDF},
PENDF\index{PENDF}, and GENDF\index{GENDF} tapes from the
NJOY blocked-binary mode\index{blocked binary} to formatted mode
(ASCII on modern computers), and {\it vice versa}. It can
also be used to copy data from one logical unit to another without
change of mode, or to make a new tape containing selected materials
from one or more ENDF, PENDF, or GENDF tapes. MODER handles
ENDF-4 through ENDF-6 formats, plus special-purpose formats developed
for NJOY, such as the
\hyperlink{sGROUPRhy}{GROUPR}\index{GROUPR} and
\hyperlink{sERRORRhy}{ERRORR}\index{ERRORR}
output formats.
This chapter describes the MODER module in NJOY2016.0.
\subsection{Code Description}
\label{ssMODER_description}
The main subroutine \cword{moder} is exported by the
module \cword{modem}\index{modules!modem@{\ty modem}}.
At the beginning of execution, MODER rewinds the output tape \cword{nout}.
Additionally, each time a new input tape \cword{nin} is specified,
that unit is rewound. MODER then processes \cword{nin} one file at a time,
either for all materials on \cword{nin}, or optionally (see following
section) for a single specified material. As each file is identified,
the main program calls a subroutine dedicated to that file. Each
subroutine makes the series of calls to \cword{contio}, \cword{listio},
etc., that is appropriate to that file.
If \cword{nin} and \cword{nout} are of opposite sign, then mode conversion
is performed automatically by the utility I/O subroutines. If
\cword{nin} and \cword{nout} have the same sign, then no mode conversion
is performed; runs of this type can be used simply to make an extra copy
of the input tape or to retrieve selected materials without mode change.
Only a little more than one page of scratch storage is needed, so there
are no limitations on which tapes can be processed.
\subsection{Input Instructions}
\label{ssMODER_inp}
As an aid to discussions of the user input to MODER, the input
instructions that appear as comment cards at the beginning of the
current version of this module are listed below. Since code changes
are possible, it is always advisable to consult the comment-card
instructions contained in the version of the code actually being
used before proceeding with an actual calculation.
\index{MODER!MODER input}
\index{input!MODER}
\newpage
\small
\begin{ccode}
!---input specifications (free format)---------------------------
!
! card 1 unit numbers
! nin input unit
! nout output unit
!
! a positive unit is coded (mode 3).
! a negative unit is blocked binary (njoy mode).
!
! note: abs(nin) ge 1 and le 19 is a flag to select various
! materials from one or more input tapes, with or
! without mode conversion. the kind of data to be
! processed is keyed to nin as follows:
! nin=1, for endf or pendf input and output,
! 2, for gendf input and output,
! 3, for errorr-format input and output.
!
! cards 2 and 3 for abs (nin) ge 1 and le 19 only.
!
! card 2
! tpid tapeid for nout. 66 characters allowed
! (delimited with ', ended with /)
! card 3
! nin input unit
! terminate moder by setting nin=0
! matd material on this tape to add to nout
!-------------------------------------------------------------------
\end{ccode}
\normalsize
\noindent
The contents of \cword{nin} and \cword{nout} are positive or negative
logical unit numbers, with absolute magnitudes normally in the
range 20-99, inclusive. Positive unit numbers refer to formatted tapes,
and negative unit numbers refer to blocked-binary tapes. No other
input is required to copy or convert the entire contents of the data
file on unit \cword{nin}, writing the results to unit \cword{nout}.
A positive value of \cword{nin} in the range 1-3 is used as a
trigger to specify that the data to be copied or converted are not
the contents of a single tape, but, instead, they are selected materials
from one or more input tapes. The type of data to be processed
(ENDF/PENDF {\it vs.} GENDF {\it vs.}
\hyperlink{sERRORRhy}{ERRORR}-format) is keyed to the value of
\cword{nin}, as detailed in the instructions above. If \cword{nin}
is in the range 1-3, and only in this case, additional input is
supplied to specify (on card 2) the tape-identification information
to be written on the first record of the output tape and to specify
(on card 3) both the \cword{mat}-numbers of the materials to be included and
the logical units where each of the desired materials are to
be found. Note that the slash terminating the Hollerith information
on card 2 is required. In the case of GENDF processing of a material
\cword{matd}, which is present on the specified input tape at a series of
temperatures, a single card 3
causes the retrieval of all temperatures.
Card 3 is repeated as many times as needed, and input is terminated
with a card containing 0/.
\subsection{Sample Input}
\label{ssMODER_sampleinp}
It is good practice to convert the mode of the ENDF/B tape before
proceding with any NJOY run. The time spent in MODER is normally
much less than the time saved by the subsequent modules. The required
input for this is extremely simple. In this first example, an ENDF-formatted
file, designated ``tape20" is copied to a binary-formatted file designated
``tape21". This file is subsequently used as input to
\hyperlink{sRECONRhy}{RECONR}.
\small
\begin{ccode}
moder
20 -21/
reconr
-21 -22/
...
\end{ccode}
\normalsize
For older versions of ENDF/B, the released ``tapes'' usually
contained multiple materials. In the following example we specify
that a single material, 1305, be extracted from ``tape20" and
written to ``tape21". Subsequent use of ``tape21" will be more
efficient since only the material of interest is on that tape.
\small
\begin{ccode}
moder
1 -21/
'B-10'/
20 1305/
0/
reconr
-21 -22/
...
\end{ccode}
\normalsize
The final example (taken from one of the standard sample problems)
shows the use of MODER to prepare a special multimaterial ENDF tape
for a covariance calculation involving the 5 primary fissionable isotopes.
Since, in this particular example problem, the resonance region is of
no interest, a copy of the ENDF serves as the PENDF for later modules.
Mount ENDF Tape 515, 516, and 555 on units 20, 21, and 22.
\small
\begin{ccode}
moder
1 -23/
'endf/b-v nubar covariance materials'/
20 1380/
20 1381/
21 1390/
22 1395/
22 1398/
20 1399/
0/
moder
-23 -24/
group
-23 -24 0 25/
...
\end{ccode}
\normalsize
\noindent
The second moder run copies the ENDF file to use as a PENDF file
for \hyperlink{sGROUPRhy}{GROUPR}.
\subsection{Error Messages}
\label{ssMODER_msg}
\begin{description}
\begin{singlespace}
\item[\cword{error in moder***endf materials must be in ascending order}] ~\par
This is a problem with the material ordering for the input tape.
\item[\cword{message from moder---mat nnnn not found on gendf tape}] ~\par
Check the \cword{matd} value on input card 3 and make sure that
the correct input tape was mounted.
\item[\cword{error in moder***this material is not a gendf material}] ~\par
Input file contains an illegal mixture of data,
namely, an initial GENDF
material, followed by the indicated non-GENDF \cword{mat}.
\item[\cword{error in moder***input is not an errorr output tape}] ~\par
User has requested \hyperlink{sERRORRhy}{ERRORR}-format
processing, but input data file is not a
\hyperlink{sERRORRhy}{ERRORR}-format tape.
\item[\cword{error in moder***input is not an endf or pendf tape}] ~\par
User has specified \cword{nin}=1 on card 1, thereby requesting selective
multitape ENDF or PENDF processing, but input data file on the unit
\cword{nin} specified on card 3 is not an ENDF/PENDF file.
\item[\cword{error in moder***input is not an endf tape}] ~\par
See comments above.
\item[\cword{error in moder***input is not a gendf tape}] ~\par
User has requested GENDF processing, but input data file is not a
GENDF tape.
\item[\cword{error in moder***conversion not coded for mf=nn}] ~\par
There is an illegal or unrecognizable \cword{mf} value on \cword{nin}.
\item[\cword{error in moder***should have found send card}] ~\par
MODER is lost. The listed data display the contents of the last card
read. Input data file may be bad.
\item[\cword{error in moder***illegal covariance mf=nn}] ~\par
ERRORR-format file is missing the required \cword{mf}=3.
ENDF and PENDF tapes must be \cword{mat} ordered.
\item[\cword{error in file2***illegal mt}] ~\par
Only the standard \cword{mt}=151 and the NJOY special values of \cword{mt}=152
and 153 are allowed in File 2.
\item[\cword{error in file5***illegal lf}] ~\par
The File 5 \cword{lf} value is outside the legal range 1-12.
\item[\cword{error in file6***illegal ltt}] ~\par
This message comes from the branch used for ENDF-5 format
or for thermal data generated by the
\hyperlink{sTHERMRhy}{THERMR} module.
Check the format of the File 6 sections.
\item[\cword{error in file6***illegal endf6 law}] ~\par
This message comes from the branch used for ENDF-6 tapes.
Check the values for the law parameter in the sections of File 6.
\item[\cword{error in file7***illegal mt=nnn}] ~\par
Only \cword{mt}=2 and \cword{mt}=4 are allowed in File 7 for the ENDF-6
format.
\item[\cword{error in file7***illegal value of lthr=n}] ~\par
Only values of 1 or 2 are allowed for \cword{lthr} in ENDF-6.
\item[\cword{error in file15***illegal lf}] ~\par
Only \cword{lf}=1 and the special lanl format \cword{lf}=2 are allowed
\end{singlespace}
\end{description}
\cleardoublepage