Exercise 2: Plotting Cross Sections





This exercise will make use of NJOY to linearize the hydrogen cross sections to be accurate within a specified tolerance. We will then plot up the results.

NJOY runs data through its various modules by using "tapes" to communicate between the modules (well, they are really files, except to the nostalgic). Therefore, NJOY input files give the module name to use, then the input and output units for that module, and then the characteristic input for that module. This is repeated for each module to be used, and then terminated with the module name "stop". Change to your NJOY working directory, and copy t511 to tape 20. Type in the following input file (but leave off the comments to the right of the slash symbol):

           reconr
           20 21
           'exercise 2'/    new tape ID title
           1301 1/          MAT
           .001/            tolerance
           '1-H-1'/         descriptive card for new tape
           0/
           plotr
           22/              output file
           /                default page style
           1/               new axes, new curve
           '1-H-1'/         title line 1
           /                no line 2 for titles
           4/               log-log
           1e-4 1/          x-axis range
           /                default label
           .01 10/          y-axis range
           /                default label
           5 21 1301 3 102/ data source for curve
           /                default curve style
           99/              finished
           viewr
           22 23/
           stop

This file says to run RECONR on MAT1301 with a reconstruction tolerance of .001 (.1%). Take the output on tape21 into PLOTR and extract the data for MAT1301, MF3, MT102 onto tape22. A title is provided for the graph, and special scales are specified for the axes. The default axis labels and line type will be used. Finally, a Postscript version of the graph is produced on tape23 using VIEWR.

Run the NJOY job with this input file. Use ghostview to look at the resulting graph. The curve is a straight line because of its 1/v shape and the log-log axes.

Now change the plot specifications

          from   4/              to     1/
                 1e-4 1/                0 1 .2/
                 /                      /
                 .1 10/                 0 1 .2/
                 /                      /

and run the job again. The plot will now show a visible 1/v shape on the linear-linear axes. Look at tape22 with your text editor to see what points were really used for the plot. Look at tape21 to see what the unionized and linearized energy grid looks like, and to see how the total cross section was reconstructed from the sum of its parts.

Some variations: try the entire energy range 1e-5 to 20e6 eV; plot elastic or total instead of capture; plot two curves at the same time (just repeat the lines from "new axes, new curve" through "default curve style" just before the "99", change the 1/ to 2/ to indicate a second curve, change the MT number on the data source card, and fix the scales to include both curves).


NEXT
INDEX


15 December 2012 T-2 Nuclear Information Service ryxm@lanl.gov