Fispact-II Software Specification Document

268
CEM/130516/SD/2 Issue 9 September 2015 Culham Electromagnetics Fispact-II Software Specification Document James Eastwood Guy Morgan Culham Electromagnetics Ltd www.CulhamEM.co.uk

Transcript of Fispact-II Software Specification Document

CEM/130516/SD/2 Issue 9

September 2015

CulhamElectromagnetics

Fispact-IISoftware Specification Document

James EastwoodGuy Morgan

Culham Electromagnetics Ltd

www.CulhamEM.co.uk

CEM/130516/SD/2 Issue 9Fispact SSD

Culham Electromagnetics

Page 2 of 268

CEM/130516/SD/2 Issue 9

Fispact-IISoftware Specification Document

James EastwoodGuy Morgan

September 2015

Page 3 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Our Reference CEM/130516/SD/2

Customer CCFE

Customer Reference 3000177818

Copyright andReproduction

This document has been prepared by Culham Electromagneticsin connection with a contract to supply goods and/or servicesand is submitted only on the basis of strict confidentiality. Thecontents must not be disclosed to third parties other than inaccordance with the terms of the contract.

Contact Dr J W EastwoodCulham Electromagnetics LtdCulham Science CentreAbingdonOxfordshireOX14 3DBUnited Kingdom

Telephone: +44 (0)1865-408326Facsimile: +44 (0)1865-408301email: [email protected]

Culham Electromagnetics is the trading name of Culham Electromagnetics Limited.

Date of Issue: 30 September 2015 Issue number: 9

Authorization Name Signature Position

Prepared by Dr J W Eastwood Project Scientist

Approved by Dr J G Morgan Project Manager

Culham Electromagnetics

Page 4 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Distribution List

Copy No. Name Affiliation

1 J W Eastwood Culham Electromagnetics2 J G Morgan Culham Electromagnetics3 J-C Sublet CCFE

Culham Electromagnetics

Page 5 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Revision History

Revision Date Issued by Comment

0.0 25 March 2009 J W Eastwood Draft0.10 5 May 2009 J W Eastwood Discussion draft release1.00 2 June 2009 J W Eastwood Issue 12.00 21 September 2009 J W Eastwood Issue 23.00 1 December 2010 J W Eastwood Issue 3: Fispact-II alpha release4.00 10 May 2011 J W Eastwood Issue 4: Revision-1-00-beta release5.00 21 September 2011 J W Eastwood Issue 5: Revision-1-00 release6.00 23 March 2012 J W Eastwood Issue 6: Revision-2-00 release7.00 31 May 2013 J W Eastwood Issue 7: Revision-2-10 release8.00 30 June 2014 J W Eastwood Issue 8: Revision-2-20 release9.00 30 September 2015 J W Eastwood Issue 9: Revision-3-00 release

Name:RCSfile: sd2.tex,vRevision: 1.71Author: jimDate: 2015/09/23 11:48:48

Culham Electromagnetics

Page 6 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Contents

1 Introduction 111.1 Purpose of the Document . . . . . . . . . . . . . . . . . . . . . . . . . . 111.2 Definitions, Acronyms and Abbreviations . . . . . . . . . . . . . . . . . 111.3 Source Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121.4 Structure of the Document . . . . . . . . . . . . . . . . . . . . . . . . . 13

2 The Model 142.1 The Rate Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.2 Data Collapse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.3 Decay Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.4 Neutron Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.5 Fission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312.6 Sequential Charged Particle Reactions . . . . . . . . . . . . . . . . . . . 332.7 Gamma Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352.8 Proton Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352.9 Deuteron Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.10 Alpha Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.11 Gamma Radiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362.12 Iron Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392.13 Target Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402.14 The Sensitivity Equations . . . . . . . . . . . . . . . . . . . . . . . . . . 402.15 Monte-Carlo Sensitivity Estimation . . . . . . . . . . . . . . . . . . . . . 412.16 Pathways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452.17 Uncertainty Estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532.18 Method of Solution of Rate Equations . . . . . . . . . . . . . . . . . . . 55

3 EAF Data Library Formats 573.1 ENDF-6 Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573.2 ARB FLUX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 593.3 FLUXES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603.4 INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603.5 DECAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613.6 CROSSEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 653.7 PROB TAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663.8 CROSSUNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 743.9 HALFUNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763.10 ASSCFY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763.11 FISSYLD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763.12 STOP * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 783.13 XN * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793.14 SPEC * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793.15 ABSORP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 803.16 A2DATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 813.17 CLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

Culham Electromagnetics

Page 7 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

3.18 HAZARDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

4 ENDF Data Library Formats 81

4.1 xs endf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

4.2 dk endf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

4.3 fy endf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

4.4 sf endf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

5 Input and Output Files 97

5.1 FILES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

5.2 INPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

5.3 OUTPUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

5.4 GRAPH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

5.5 COLLAPX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

5.6 SUMMARYX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

5.7 ARRAYX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

5.8 TABx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

5.9 LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

5.10 xs endfb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

5.11 enbins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

6 Specific Requirements 104

6.1 Verification and Validation . . . . . . . . . . . . . . . . . . . . . . . . . 106

7 System Design 107

7.1 Principal Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

7.2 The Main Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

8 Infrastructure Modules 125

8.1 clock m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

8.2 date time m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

8.3 log m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

8.4 const kind m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

8.5 random m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

9 Data Modules 133

9.1 const math m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

9.2 const phys m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

9.3 decay type m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

9.4 energy bounds m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

9.5 reaction type m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

9.6 spectrum type m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

Culham Electromagnetics

Page 8 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

10 Physical Properties Modules 14410.1 decay m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14410.2 element m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15010.3 fission m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15210.4 flux m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15710.5 nuclide m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15910.6 ptable m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16410.7 reaction m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16610.8 regulatory m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17110.9 resonance m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17310.10scpr m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17410.11zai m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

11 Calculation Modules 17811.1 digraph m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17811.2 inventory m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18311.3 odesolve m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18611.4 path m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18811.5 pathstep m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19111.6 pathways m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19511.7 rateeq m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20011.8 sensitivity m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

12 I/O and Control Modules 20712.1 dominant m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20712.2 endf m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21012.3 endfmat m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21312.4 files m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21612.5 fischoose m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22112.6 fp ii m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22312.7 gamma dose m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22412.8 keyword m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22512.9 mfi m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23312.10output m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23612.11printlib m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23912.12pulse m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24012.13rundata m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24112.14token m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258

References 261

APPENDICES 265

A Traceability 265

Culham Electromagnetics

Page 9 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

List of Figures

1 The reaction/decay directed graph. . . . . . . . . . . . . . . . . . . . . . 152 Projection operator Ski . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Decay processes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Paths, loops and pathways. . . . . . . . . . . . . . . . . . . . . . . . . . 465 A path is a linear chain of nuclides. . . . . . . . . . . . . . . . . . . . . . 476 Projectile fluxes versus time. . . . . . . . . . . . . . . . . . . . . . . . . 507 The class diagram for objects used in storing the nuclear data. . . . . . 1098 The class diagram for objects used in solving the rate equation. . . . . . 1109 The class diagram for objects used in computing pathways. . . . . . . . 11110 The class diagram for objects used in producing output. . . . . . . . . . 11211 The class diagram for objects used in run control. . . . . . . . . . . . . . 11212 A graphical representation of a digraph node t item. . . . . . . . . . . . 179

List of Tables

1 Decay Types (MT=457) recognised by the code. . . . . . . . . . . . . . . 192 Decay Radiation Types (MT=457) recognised by the code. . . . . . . . . 203 Neutron induced reactions recognised by the code. . . . . . . . . . . . . 224 Additional mt numbers for Gas production, Dpa and Kerma assessment. 255 Additional mt numbers for reactions that are silently ignored. . . . . . . 256 CALENDF mt number. . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 The types of target geometry recognised by Fispact-II. . . . . . . . . . 298 Charged-particle-induced reactions included in the scpr calculations. . . 359 Maximum γ energies for various decay modes. . . . . . . . . . . . . . . . 3810 MF files read from ENDF tape files in directory xs endf by Fispact-II. 8311 Values of LRP recognised by Fispact-II and the responses of the code. . 8412 zai d and MT values of excluded reactions . . . . . . . . . . . . . . . . . 8813 MF = 10 file reaction daughters (zai d) to be ignored in Fispact-II. . . 9014 The nuclear library data processing options. . . . . . . . . . . . . . . . . 9915 Modules and the library files they process. . . . . . . . . . . . . . . . . . 11316 Energy groups known to the program. . . . . . . . . . . . . . . . . . . . 14017 Keywords recognised by the Fispact-II Release-3-20 code. . . . . . . . 22718 Cross Reference to URD requirements . . . . . . . . . . . . . . . . . . . 265

Culham Electromagnetics

Page 10 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Summary

This document contains the software specification requirements for Fispact-II,Release 3-00-00.

1 Introduction

This document contains the software specification requirements for Fispact-II, Re-lease 3.00. It is the reference document for the software development for the Mainte-nance and Update Work on EASY-II [1].

1.1 Purpose of the Document

This Software Specification Document (SSD) contains

• the software requirements phase. This is the problem analysis, where the devel-opers identify what the software is to do.

• the architectural design phase where the developers define the software in termsof its major components.

The issued copy of this document will provide the basis for the detailed design, codingand testing of the Fispact-II, Release 3-00 version of the software. It is an extensionof the SSD developed for earlier Fispact developments to incorporate the changes inrequirements specified by the customer in the ITT for Maintenance and Update Workon EASY-II [2].

1.2 Definitions, Acronyms and Abbreviations

The following Acronyms and abbreviations are used in this document:

the code the new version of Fispact being developed on this projectBFS Breadth-first searchCVS Concurrent Versions SystemEAF European Activation FileENDF Evaluated Nuclear Data File [3]Fispact the Fispact-2007 codeeof end of fileODE Ordinary Differential Equationrhs right-hand sidescpr sequential charge particle reaction

Culham Electromagnetics

Page 11 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

SQS Software Quality SystemTENDL TALYS-based Evaluated Nuclear Data LibraryUR User RequirementURD User Requirements DocumentV&V Verification and Validation

1.3 Source Documents

The source materials for this document are

1. the Fispact Phase 2 invitation to tender [4];

2. the Culham Electromagnetics proposal [5];

3. the Fispact Phase 3 invitation to tender [6];

4. the Culham Electromagnetics proposal [7];

5. the Fispact Phase 4 invitation to tender [8];

6. the Culham Electromagnetics proposal [9];

7. the CCFE amendment [10];

8. the Maintenance/Update Work on EASY-II invitation to tender [11]

9. the Culham Electromagnetics proposal [12]

10. the Maintenance and Update Work on EASY-II invitation to tender [2]

11. the Culham Electromagnetics proposal [1]

12. the Fispact-2007user manual [13];

13. the Fispact-II user manual [14, 15, 16, 17, 18];

14. the EASY-2007 overview [19];

15. the ENDF-6 format definitions [3, 20];

16. the LSODE manual [21];

17. standard Fortran 95 with enhanced data structures [22, 23];

18. Fispact programming conventions [24];

19. the Concurrent Versions System [25, 26, 27, 28];

20. Fispact CVS Repository plan [29];

21. the user requirements documents [30, 31].

Culham Electromagnetics

Page 12 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

1.4 Structure of the Document

Sections 2-6 of this document focus on the software requirements. Key aspects of thisare

1. the specification of the model equations and the way in which they are to besolved (Section 2);

2. the specification of the input and output interfaces (Section 3 on page 57 andSection 5 on page 97);

3. the summary of specific requirements that apply throughout the code (Section 6on page 104).

The second part of the document (Sections 7-12) outlines the top-level architecturaldesign of the software that the developers have devised to meet the software require-ments. Section 7 on page 107 uses pseudo-code to describe the main program and thetop-level objects it uses. The remaining sections present the planned modules thatencapsulate logically separate parts of the data and provide methods for manipulatingthose data. These are arranged by type:

1. Section 8 on page 125 contains infrastructure modules. These deal with cpu tim-ings, date and time stamping, error logging and explicit control of the precisionused in the code.

2. Section 9 on page 133 contains data modules that encapsulate data summarisedin Tables 1-8, energy group boundaries and general physical and mathematicalconstants.

3. Section 10 on page 144 describes the modules that manage the element andnuclide data that are read from the EAF or TENDL library files.

4. Section 11 on page 178 outlines the modules that are used to undertake theinventory, sensitivity and pathways calculations.

5. The final section on page 207 contains the I/O and control modules.

The Appendix on page 265 provides a cross-reference from User Requirements [30] tosections and pages of this document.

Culham Electromagnetics

Page 13 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

2 The Model

2.1 The Rate Equations

The Fispact-II code follows the evolution of the inventory of nuclides in a target ma-terial that is irradiated by a time-dependent projectile flux, where the projectiles maybe neutrons, protons, deuterons, α-particles or γ-rays. The material is homogeneous,infinite and infinitely dilute and the description of the evolution of the nuclide numbersis reduced to the stiff-ode set of rate equations:

dNi

dt=∑j

(λji + σjiφint(t))Nj (1)

where

Ni = number of nuclide i at time t

φint = projectile flux (cm−2s−1)

for j 6= i:

λji = decay constant of nuclide j producing i (s−1)

σji = reaction cross-section for reactions on j producing i (cm2)

for j = i:

−λjj = total decay constant of nuclide j (s−1)

−σjj = total cross-section for reactions on j (cm2)

The processes described by Equation (1) may be interpreted in terms of a directedgraph, with vertices corresponding to nuclides and edges giving the flow from parent todaughter nuclides via a decay process or an induced reaction. Figure 1 schematicallypresents a fragment of this graph. Graph theoretic methods are used to constructpathways (see Section 2.16 on page 45).

The total flow out from vertex j by decay is equal to the total flow into other verticesi:

λj = −λjj =∑i 6=j

λji (2)

Similarly, the balances of the flows by projectile-induced reactions give

σj = −σjj =∑i 6=j

σji (3)

To maintain correct accounting, decays or reactions leading to daughter nuclides notincluded in the set being considered are assigned to a fictitious ‘sink’ nuclide, andsecondary decay products are assigned to the appropriate gas nuclides.

Culham Electromagnetics

Page 14 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

iλj

Ni

σ ji’

N’j

’Ni

Njp

p

pdecay reaction

d

d

d

Figure 1: The flux from parent nuclide at vertex j to daughter nuclide at vertex ialong the directed edge ji is given by the sum of decay and reaction fluxes.

Reaction cross-sections depend on the projectile energy, and the source data for cross-sections give values for a set of energy groups. In the code, an effective cross-sectionis computed as an average cross-section weighted by projectile fluxes in each energygroup:

σji =∑k

σji (Ek)φn(Ek)∆Ek/∑k

φn(Ek)∆Ek (4)

where σji (Ek) is the cross-section at projectile energy group k, φn(Ek) is the projectileflux in energy group k, and the sums are over all energy groups k.

A consequence of the modelling assumptions underlying Fispact is that the imposedprojectile flux is not modified by the reactions and decays in the target material. Thenthe decay rates and cross-sections appearing in Equation (1) are all independent of thenuclide numbers Nj and the equation can be rewritten compactly as

dN

dt= AN (5)

where the matrix A is independent of the inventory N. In Fispact the projectile fluxis constant during each time interval, so that A is also piecewise-constant in time.

Furthermore, the matrix A is sparse. The INDEX file used in Fispact-2007 contains2231 distinct nuclides, so A has a size of 2232 × 2232, including the ‘sink’ nuclide.However, there are only approximately 120 000 non-zero elements in A. If actinides

Culham Electromagnetics

Page 15 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

are not relevant to a calculation, the fission reactions can be omitted and about 42 000elements of A remain non-zero. This number drops to less than 5 000 during coolingperiods when only decays are required. The rate equation matrix for the TENDL2011data is similarly sparse (3873 nuclides with 221,062 reactions leading to approximately120,000 non-zero elements). These properties of the system matrix are relevant to themethod of solution described in Section 2.18 below.

2.2 Data Collapse

The reaction data input to Fispact-II are the projectile flux spectrum, cross-sections,induced fission yields and covariances tabulated in energy groups, where in generalthe cross-section data are tabulated at much smaller energy intervals than the fissionyield or covariance data. These data are ‘collapsed’ using flux spectrum weighting intoenergy independent values for use in the inventory calculations.

Consider the collapsed cross-section X and its uncertainty ∆ that are used in Fispact-II. The input data for X are cross-sectionsXi and the projectile flux φi in energy groupsi ∈ [1, N ].

φi is the flux (cm−2s−1) in energy range Ei to Ei+1, and we use it to define the weightfor group i as

Wi = φi/N∑i=1

φi (6)

The collapsed cross-section (c.f., Eq. (4)) X is given by

X =N∑i=1

WiXi (7)

Covariances for cross-sections Xi and Yj grouped in energy bins i ∈ [1, NX ], j ∈ [1, NY ]are Cov(Xi, Yj). The collapsed covariance arising from these is given by

Cov(X, Y ) =NX∑i=1

NY∑j=1

WiWjCov(Xi, Yj) (8)

Cov(X, Y ) is not presently used in Fispact-II, but is planned to be used in future inthe monte-carlo sensitivity calculations. The case of interest at present is that wherereactions X and Y are the same, and then the collapsed variance is given by

var = Cov(X, X) =N∑

i,j=1

WiWjCov(Xi, Xj) (9)

For EAF data, the uncertainty is defined at the three standard deviation point:

∆ = 3√var/X (10)

Culham Electromagnetics

Page 16 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

and for the TENDL data, it is defined as

∆ =√var/X (11)

The covariance data are less complete than the cross-section data. Each covariancedata energy group contains several cross-section energy groups, and in some cases thedata in different energy groups are assumed to be uncorrelated.

The covariance data in the EAF and TENDL libraries that Fispact-II recognises arethe ENDF [20] NI-type data with LB=1, 5, 6 or 8. The projection operator Ski mapscross-section energy bins to covariance energy bins as illustrated in Figure 2.

Ski =

{1 bin i in bin k0 otherwise

(12)

k k+1

k

i i+1

i

covariance

cross−section

Figure 2: Projection operator Ski maps cross-section energy bins to covariance energybins. The shaded energy bins have Ski = 1, and all others have Ski = 0

Using Ski , the formula used to construct estimates of the covariance matrix from thelibrary data are as follows:

LB = 1 : Cov(Xi, Xj) =M∑k=1

Ski Skj FkXiXj (13)

LB = 5 : Cov(Xi, Yj) =M∑k=1

M∑k′=1

Ski Sk′j Fkk′XiYj (14)

LB = 6 : Cov(Xi, Yj) =M∑k=1

M ′∑k′=1

Ski Sk′j Fkk′XiYj (15)

LB = 8 : Cov(Xi, Xj) =M∑k=1

Ski Skj 1000Fk (Koning) (16)

(or =M∑k=1

Ski δij1000Fk) (17)

The LB=1 case (Equation (13) is the one that applies to the computation of ∆ for theEAF data. Covariances are described by a fraction for each k bin and the different kbins are assumed to be uncorrelated.

Culham Electromagnetics

Page 17 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

The LB = 5, 6, and 8 cases appear in the TENDL libraries. The LB = 5 data forX and Y referring to the same reaction are used to compute ∆, and are assumed tohave LS=1 (i.e., symmetrical case where Fk,k′ are stored in upper triangular matrixordering). The LB = 6 data give cross-correlations between collapsed cross-sections.These are read and may be used in sensitivity calculations. The LB = 8 data areproduced from the same source as the LB = 5 data for X = Y , with some of the cross-correlations discarded and use definitions different from those in the ENDF manual [20].Fispact-II reads and discards these data.

The rate equations work with the total collapsed reaction cross-sections on parentj producing daughter i, σji . The library data are for individual reactions, givingthe reaction cross-sections for reactions as a function of the energy of the incidentprojectile. Data for the individual reactions are collapsed using Eqs. (6)-(17) and thecontributions are summed to give the totals for each parent-daughter nuclide pair. Lete1 be the set of reaction labels r on edge 1 for collapsed reaction cross-section Xr thattransmutes parent p1 to daughter d1, and e2 be the set for reactions Y r′ that transmuteparent p2 to daughter d2, then the collapsed cross-sections used in the rate equationare

X =∑r∈e1

Xr : Y =∑r′∈e2

Y r′ (18)

The collapsed covariances are given by

cov(X, Y ) =∑r∈e1

∑r′∈e2

cov(Xr, Y r′) (19)

and the collapsed variances are

var = cov(X, X) =∑r∈e1

∑r′∈e1

cov(Xr, Xr′) (20)

When there are no covariance data between different reactions between p1 and d1, thenreactions are treated as uncorrelated and Eq. (20) reduces to

var =∑r∈e1

cov(Xr, Xr) (21)

2.3 Decay Modes

The code will allow 27 decay modes by which the parent nuclide j can decay to daughternuclide i. These are listed in Table 1. The index IRT is the index used in the code.The index RTYP is the ENDF-6 reaction type code used for reaction product code MT =457 [20, Sec. 8.3, page 8.5]. (The table also includes two unused IRT codes and anotherto indicate an unknown decay mode, so the maximum IRT is 26.) The decay constantλji appearing in Equation (1) is the sum of the decay constants for the transmutation ofnuclide j to i. In terms of the directed graph, the edge shown in Figure 1 correspondsto the combination of a subset of 17 possible decay edges from j to i.

Culham Electromagnetics

Page 18 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 1: Decay Types (MT=457) recognised by the code.

IRT RTYP Description ∆Z ∆A NSEC Secondaries

1 1 β− decay 1 0 02 2 β+ decay or electron capture −1 0 03 3 isomeric transition (IT) 0 0 04 4 α decay −2 −4 1 4He5 5 neutron emission 0 −1 06 6 spontaneous fission (SF) −999 −999 07 7 proton emission −1 −1 1 1H8 8 not used 0 0 09 9 not used 0 0 0

10 10 unknown 0 0 011 1.5 β− decay + neutron emission 1 −1 012 1.4 β− decay + α emission −1 −4 1 4He13 2.4 β+ decay + α emission −3 −4 1 4He14 2.7 β+ decay + proton emission −2 −1 1 1H15 3.4 IT followed by α emission −2 −4 1 4He16 1.1 double β− decay 2 0 017 1.6 β− decay followed by SF −999 −999 018 7.7 double proton emission −2 −2 2 1H 1H19 2.2 double β+ or electron capture −2 0 020 1.55 β− and double neutron emission 1 −2 021 1.555 β− and triple neutron emission 1 −3 022 1.5555 β− and quadruple neutron emission 1 −3 023 5.5 double neutron emission 0 −2 024 5.55 triple neutron emission 0 −3 025 2.77 β+ decay + double proton emission −3 −2 2 1H 1H26 2.777 β+ decay + triple proton emission −4 −3 3 1H 1H 1H27 2.6 β+ decay followed by SF −999 −999 0

Ni

α

iλj

decayNj

d

dp

p

Figure 3: Decay processes (e.g., α-decay) may produce secondary gas nuclides thatare included in the inventory calculation.

Culham Electromagnetics

Page 19 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 2: Decay Radiation Types (MT=457) recognised by the code.

STYP Radiation Type

0 γ gamma rays1 β− beta rays2 ec,(β+) electron capture and/or positron emission3 not known4 α alpha particles5 n neutrons6 SF spontaneous fission fragments7 p protons8 e− “discrete electrons”9 x X-rays and annihilation radiation

Some of the decay modes listed in Table 1 have secondary gas nuclides that are includedin the inventory calculation, and the number of these is NSEC and their names areincluded in the right hand column of the table. This is illustrated in Figure 3. Theprimary reaction leads to a secondary edge in the directed graph, and other productsfrom these decays are regarded as debris that is ignored. When there are gas nuclidesecondaries, then a secondary edge from nuclide j to the gas nuclide is associated withthe decay from j to i. There may be 0, 1, 2 or 3 secondaries associated with a decaytype; see Table 1 for details.

2.3.1 Heating

Heating from decay is computed using the average decay energies for light particles,electromagnetic radiation and heavy particles that are included in the data in theDECAY file.

2.3.2 Gamma spectrum

A 22- or 24-group histogram is generated by nearest grid point binning of the intensitiesof discrete gamma and X-ray lines (STYP= 0 or 9) contained the the data from theDECAY file.

2.3.3 Neutron yield

The spontaneous fission neutron yield (STYP=5) is accumulated using the decay yieldscontained in the DECAY file.

Culham Electromagnetics

Page 20 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

2.4 Neutron Activation

The main application of the code is to neutron activation calculations. In these thetransmutation of a nuclide j to another nuclide i (and in some cases additional secon-daries) may result from:

1. one of the decay processes listed in Table 1

2. one of the 90 neutron-induced reactions listed in Table 3

3. one of the 10 charged-particle-induced reactions listed in Table 8

Decay processes are described in Section 2.3 above. There are fivee special cases in thelist of neutron-induced reactions:

Total (MT=1 in Table 3). This is the total cross-section for all reaction channels;

Elastic scattering (MT=2 in Table 3). This special case is where the projectile elas-tically scatters from the target nuclide;

Non-elastic (MT=3 in Table 3). This is the sub-total of all non-elastic reactions;

Other reactions (MT=5 in Table 3). The set of reactions labelled as “other reactions”is a special case and is treated below in Section 2.4.1;

Fission (MT=18 in Table 3). The neutron-induced fission reaction is a special case,and is treated below in Section 2.5.

The charged-particle-induced reactions are treated as pseudo-neutron-induced reac-tions [32]; see Section 2.6 for details of these.

The total effective cross-section σji used in Equation (1) is obtained by summing thecontributions from the different reactions.

σji =∑mt

σji ((n, {sec})mt) +∑k 6=i

siσjk((n, {sii, . . .})mt)

+ σji (scpr) (22)

where σji ((n, {sec})mt) is the cross-section for the production of nuclide i from nuclidej through the neutron induced-reaction with code mt as summarised in Table 3; thesedata are tabulated in file CROSSEC. The second sum in Equation (22) is the productionof secondary gas nuclide i from the reaction producing nuclide k from j, where si isthe number of secondaries of nuclide i per reaction. The final term is the production ofnuclide i from j via sequential reactions where the neutrons produce a charged particleflux, and this flux in turn acts as the projectile to create nuclide i (see Section 2.6below).

Culham Electromagnetics

Page 21 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 3: Neutron induced reactions recognised by the code.

Projectile Products MT ∆Z ∆A NSEC Secondaries

n total 1 0 0 0n E 2 0 0 0n nonel 3 0 0 0n n 4 0 0 0n O 5 888 888 0n 2nd 11 −1 −3 1 2Hn 2n 16 0 −1 0n 3n 17 0 −2 0n F 18 999 999 0n nα 22 −2 −4 1 4Hen n3α 23 −6 −12 3 4He 4He 4Hen 2nα 24 −2 −5 1 4Hen 3nα 25 −2 −6 1 4Hen np 28 −1 −1 1 1Hn n2α 29 −4 −8 2 4He 4Hen 2n2α 30 −4 −9 2 4He 4Hen nd 32 −1 −2 1 2Hn nt 33 −1 −3 1 3Hn nh 34 −2 −3 1 3Hen nd2α 35 −5 −10 3 2H 4He 4Hen nt2α 36 −5 −11 3 3H 4He 4Hen 4n 37 0 −3 0n 2np 41 −1 −2 1 1Hn 3np 42 −1 −3 1 1Hn n2p 44 −2 −2 2 1H 1Hn npα 45 −3 −5 2 1H 4Hen γ 102 0 1 0n p 103 −1 0 1 1Hn d 104 −1 −1 1 2Hn t 105 −1 −2 1 3Hn h 106 −2 −2 1 3Hen α 107 −2 −3 1 4Hen 2α 108 −4 −7 2 4He 4Hen 3α 109 −6 −11 3 4He 4He 4Hen 2p 111 −2 −1 2 1H 1Hn pα 112 −3 −4 2 1H 4Hen t2α 113 −5 −10 3 3H 4He 4Hen d2α 114 −5 −9 3 2H 4He 4Hen pd 115 −2 −2 2 1H 2H

n pt 116 −2 −3 2 1H 3Hn dα 117 −3 −5 2 2H 4He

continued on next page

Culham Electromagnetics

Page 22 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

continued from previous page

Projectile Products MT ∆Z ∆A NSEC Secondaries

n 5n 152 0 −4 0n 6n 153 0 −5 0n 2nt 154 −1 −4 1 3Hn tα 155 −3 −6 2 3H 4Hen 4np 156 −1 −4 1 1Hn 3nd 157 −1 −4 1 2Hn ndα 158 −3 −6 2 2H 4Hen 2npα 159 −3 −6 2 1H 4Hen 7n 160 0 −6 0n 8n 161 0 −7 0n 5np 162 −1 −5 1 1Hn 6np 163 −1 −6 1 1Hn 7np 164 −1 −7 1 1Hn 4nα 165 −2 −7 1 4Hen 5nα 166 −2 −8 1 4Hen 6nα 167 −2 −9 1 4Hen 7nα 168 −2 −10 1 4Hen 4nd 169 −1 −5 1 2Hn 5nd 170 −1 −6 1 2Hn 6nd 171 −1 −7 1 2Hn 3nt 172 −1 −5 1 3Hn 4nt 173 −1 −6 1 3Hn 5nt 174 −1 −7 1 3Hn 6nt 175 −1 −8 1 3Hn 2nh 176 −2 −4 1 3Hen 3nh 177 −2 −5 1 3Hen 4nh 178 −2 −6 1 3Hen 3n2p 179 −2 −4 2 1H 1Hn 3n2α 180 −4 −10 2 4He 4Hen 3npα 181 −3 −7 2 1H 4Hen dt 182 −2 −4 2 2H 3Hn npd 183 −2 −3 2 1H 2Hn npt 184 −2 −4 2 1H 3Hn ndt 185 −2 −5 2 2H 3Hn nph 186 −3 −4 2 1H 3Hen ndh 187 −3 −5 2 2H 3Hen nth 188 −3 −6 2 3H 3Hen ntα 189 −3 −7 2 3H 4Hen 2n2p 190 −2 −3 2 1H 1Hn ph 191 −3 −3 2 1H 3He

n dh 192 −3 −4 2 2H 3Hen hα 193 −4 −6 2 3He 4He

continued on next page

Culham Electromagnetics

Page 23 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

continued from previous page

Projectile Products MT ∆Z ∆A NSEC Secondaries

n 4n2p 194 −2 −5 2 1H 1Hn 4n2α 195 −4 −11 2 4He 4Hen 4npα 196 −3 −8 2 1H 4Hen 3p 197 −3 −2 3 1H 1H 1Hn n3p 198 −3 −3 3 1H 1H 1Hn 3n2pα 199 −4 −8 3 1H 1H 4Hen 5n2p 200 −2 −6 2 1H 1H

2.4.1 Other reactions: Gas, heat and damage

The neutron induced cross-section set of Table 3 can be advantageously extended andcomplemented by a further set of reactions of technological importance in the designand assessment of nuclear power systems. These are listed in Table 4. For mt ={201–207}, the z denotes any projectile (γ, n, d, p, α) and X is a positive integer. Theremay be other products from the reaction but these are not displayed.

The NJOY-99 [33, 34] modules GASPR and HEATR can be used on a properly filledevaluation to generate gas production reactions, heat production cross-sections and ra-diation damage energy production. Heating is described by the Kerma (Kinetic EnergyRelease in Materials) coefficient and the damage caused by irradiation is described byDpa (displacements per atom). The resulting dataset can be defined in terms of an mtnumber, and may be read into Fispact-II and used in subsidiary calculations duringinventory runs to quantify the damage to materials caused by neutron irradiation.

2.4.2 Ignored reactions

The new ENDF style libraries of cross-section data may contain MT values not includedin Tables 3 and 4. Data for the MT numbers shown in Table 5 are silently ignored. Datafor any other MT encountered cause warning messages to be issued.

2.4.3 Self shielding of resonant channels using probability tables

The probability tables keyword in Fispact-II allows probability table data generatedby CALENDF [35, 36] to be used to model dilution effects in the computation of thecollapsed cross-sections. CALENDF provides data in five sets of macro-partial cross-sections: The CALENDF set mt numbers (cal-mt) are defined in Table 6. The sumof these macro-partial cross-sections gives the total cross-section in each energy groupover the resonance regions covered.

Culham Electromagnetics

Page 24 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 4: Additional mt numbers for Gas production, Dpa and Kerma assessment.

MT Description

201 (z,Xn) Total neutron production202 (z,Xγ) Total gamma production203 (z,Xp) Total proton production204 (z,Xd) Total deuteron production205 (z,Xt) Total triton production206 (z,Xh) Total helion (3He) production207 (z,Xα) Total alpha particle production

301 Kerma total (eV-barns)302 Kerma elastic303 Kerma non-elastic (all but mt=2)304 Kerma inelastic (mt={51-91})318 Kerma fission (mt=18 or mt= {19, 20, 21, 38})401 Kerma disappearance (mt={102-120})403 Kerma proton production (mt=103)407 Kerma α production (mt=107)442 Total photon (eV-barns)443 Total kinematic kerma (high limit)

444 Dpa total (eV-barns)445 Dpa elastic (mt=2)446 Dpa inelastic (mt={51-91})447 Dpa disappearance (mt={102-120})

Table 5: Additional mt numbers for reactions that are silently ignored.

MT Description

19 (n,f) First chance fission reaction20 (n,nf) Second chance fission reaction21 (n,2nf) Third chance fission reaction38 (n,3nf) Fourth chance fission reaction

46–101 (z,ni) Neutron production with residuals in excited states110 Unassigned

118–150 Various p, d, t, α reactions221 Unassigned

251–253 Various derived averages402 Kerma radiative capture

600–849 Various production partials851–859 Lumped reaction covariances875–891 Various production partials

Culham Electromagnetics

Page 25 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 6: CALENDF mt number.

cal-mt description mt in set

2 elastic scattering 2101 absorption (no outgoing neutron) 102 103 10718 fission total 184 inelastic scattering (emitting one neutron) 4 11

15 multiple neutron production (excluding fission) 5 16 17 37

The data provided by CALENDF are cross-section and probability values dependingon four parameters:

σ(x, n) ≡ σ(p, g, x, n) (23)

P (x, n) ≡ P (p, g, x, n) (24)

wherep = parent nuclide number,g = energy group number,x = macro-partial (or total) index,n = quadrature index,

In the expressions below, we suppress the explicit display of dependence of cross-sectionon the parent nuclide p and energy group g except in the formulae for dilution. Theinfinite dilution (d =∞) cross-section for a given parent, energy group and componentis

σ(x, d =∞) =1

Emax − Emin

∫ Emax

Emin

σ(E) dE =N∑n=1

P (x, n)σ(x, n) (25)

When a nuclide is a part of a homogenous mixture of nuclides, then the effective cross-sections in the resonance regions are reduced, and are parameterised using the dilutioncross-section d [37, 38, 39, 35]:

σ(x, d) =

∑Nn=1 P (x, n)σ(x, n)/(σt(n) + d)∑N

n=1 P (x, n)/(σt(n) + d)(26)

where the total cross-section is given by the sum of the macro-partials:

σt(n) =X∑x=1

σ(x, n) (27)

The total cross-section for nuclide p in energy group g at dilution d is given by

σtot(d) =X∑x=1

σ(x, dp) (28)

The probability table data from CALENDF are incomplete, and so are used in con-junction with the 616 energy group cross-section data in the EAF or TENDL libraries.

Culham Electromagnetics

Page 26 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

The dilution computed using the CALENDF data is applied either as scaling factorsto the EAF or TENDL data or as replacements over the energy ranges for which theprobability table data are available. In either case, either partial or total scaling maybe applied.

Scaling applied to EAF or TENDL data: Scaling is applied to the EAF orTENDL data in one of two ways, partial or total.

If the partial self-shielding scaling factor option is chosen, then the cross-section fornuclide p in energy group g and for mt value y belonging to the macro-partial group xis scaled according to

σnew(y, d) = σEAF (y)

(σ(x, d)

σ(x, d =∞)

)(29)

and for the total scaling factor

σnew(y, d) = σEAF (y)

(σtot(d)

σtot(d =∞)

)(30)

The dilution d(p, g) for a given nuclide p and energy group g is computed using aweighted sum over all the nuclides, q = 1, Q in the mixture. The fraction fq of themixture is nuclide q. Nuclides in the mixture may or may not be included in the list ofnuclides to which the self-shielding correction is to be applied. Nuclides to which self-shielding corrections are applied must be in the mixture list. The first approximationis given using the total cross-sections from the EAF or TENDL libraries:

d(0)(p, g) =Q∑q=1

p 6=q

fqσEAF−tot(q, g)

fp(31)

where

σEAF−tot(p, g) =Y∑y=1

σEAF (p, g, y) (32)

Over the energy range for which the probability table data are available for thosenuclides in the mixture for which self-shielding corrections are being applied, the ap-proximation given by Eq. (31) is iteratively refined using

S(i)(g) =Q∑q=1

fqσEAF−tot(q, g)

(σtot(q, g, d(i)(q, g))

σtot(q, g,∞)

)(33)

d(i+1)(p, g) =S(i)(g)

fp− σEAF−tot(p, g)

(σtot(p, g, d(i)(p, g))

σtot(p, g,∞)

)(34)

Culham Electromagnetics

Page 27 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Replacement of EAF or TENDL data: If there is only one reaction mt in theCALENDF macro-partial group, then the replacement formulae would be given byreplacing the σEAF values in the above equations by the infinite dilution cross-sectionsobtained from the CALENDF data. When there is more than one reaction in themacro-partial set, then the dilution effect has to be apportioned according to the EAFor TENDL reaction cross-sections.

If the partial self-shielding scaling factor option is chosen, then the cross-section fornuclide p in energy group g and for mt value y belonging to the macro-partial group xis given by

σnew(y, dp) = σ(x, dp)

(σEAF (y)∑

y′∈x σEAF (y′)

)(35)

and for the total scaling factor

σnew(y, dp) = σ(x,∞)

(σEAF (y)∑

y′∈x σEAF (y′)

)(σtot(dp)

σtot(∞)

)(36)

The initial values of the dilutions are given by Equations (31) and (32) and the iterativerefinements where CALENDF probability table data are available are given by

S(i)(g) =Q∑q=1

fqσtot(q, g, d(i)(q, g)) (37)

d(i+1)(p, g) =S(i)(g)

fp− σtot(p, g, d(i)

p ) (38)

The set of nuclides for which the self-shielding correction is calculated is specified by theSSFCHOOSE keyword. The set of nuclides included in the mixture for computingthe dilution cross-section is specified by either the MASS or FUEL keyword. Nuclidesincluded in the SSFCHOOSE keyword list that are not included in the in mixturewill cause a fatal error message to be issued by the program.

The values of dilution given by Equation (34) or (38) may be overridden using theSSFDILUTION keyword (see [16] for details).

Tables of the energies, cross-sections, dilutions and self shielding factors are printedfor each of the nuclides to which the self shielding correction is applied.

The final diagnostic table gives the collapsed cross-sections with (σnew(p, y))and with-out (σEAF (p, y)) the self-shielding correction. Also printed is the effective self-shieldingfactor for the collapsed cross-section:

ssf(p, y) =σnew(p, y)

σEAF (p, y)(39)

Culham Electromagnetics

Page 28 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

2.4.4 Self shielding of resonant channels, using the universal curve model

Starting from Release-2-10, Fispact-II provides a second method of accounting forself shielding in thick targets with a variety of geometries. This can be used as analternative to the probability table method described in the previous section; it is notpossible to use both descriptions of self shielding simultaneously.

In a series of papers [40, 41, 42], the authors Martinho, Goncalves and Salgado de-scribed a “universal sigmoid curve” model of self shielding to account for the reductionof the neutron flux by cross-section resonances in the context of neutron activationanalysis. They based their development on earlier experimental and theoretical workby Baumann [43].

The Martinho et al [40] model initially described the effect of a single resonance peakin a pure target consisting of a single nuclide. The self-shielding factor Gres is approx-imated as a simple function of a single dimensionless length parameter that dependson the physical size and shape of the target as well as the peak cross-section at theresonance and the resonance widths for elastic scattering and radiative capture.

The final form of the model [42] accommodates a group of isolated resonances of apure target, and the target geometry could be a foil, wire, sphere or cylinder of finiteheight.

This model has been generalised further and applied to the mixture of nuclides requiredfor a Fispact-II calculation.

The Fispact-II user invokes this model of self shielding by using the SSFGEOME-TRY keyword to define the type and dimensions of the target, as detailed in Table 7.

Table 7: The types of target geometry recognised by Fispact-II.

Identifier Type Dimension(s) Effective length (y)

1 foil thickness (t) y = 1.5t2 wire radius (r) y = 2r3 sphere radius (r) y = r4 cylinder radius (r), height (h) y = 1.65rh/(r + h)

In more detail, the initial form of the model [40] that accounts for the effect of asingle resonance in a pure target containing a single nuclide defines a dimensionlessparameter

z = Σtot(Eres)y

√ΓγΓ

(40)

that depends on the physical length y, the macroscopic cross-section Σtot(Eres) at theenergy Eres of the resonance peak, the resonance width Γγ for radiative capture and

Culham Electromagnetics

Page 29 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

the total resonance width Γ. Then the self-shielding factor is

Gres(z) =A1 −A2

1 + (z/z0)p+A2 (41)

where the parameters defining this “universal sigmoid curve” are

A1 = 1.000± 0.005 (42)

A2 = 0.060± 0.011 (43)

z0 = 2.70± 0.09 (44)

p = 0.82± 0.02 (45)

These parameters were determined empirically by Martinho et al [40] by fitting to aset of points generated by performing Monte-Carlo simulations with the MCNP codefor a variety of targets of different shapes, sizes and compositions. Six nuclides thatexhibit strong resonances were used individually, not as mixtures.

The model was then extended by Martinho et al [41], who defined an effective lengthy for cylinders of finite height, but a more significant extension was provided by Sal-gado et al [42], who defined an average 〈Gres〉 by assigning weights to each resonanceand forming an average of the individual Gres factors calculated for each resonanceindividually. The weight of resonance i is

wi =

(ΓγE2res

· gΓnΓ

)i

(46)

where

Γn is the neutron scattering width;

g is the statistical factor, (2J + 1)/(2(2I + 1));

J is the spin of the resonance state;

I is the spin of the target nucleus.

Then the effective self-shielding factor is

〈Gres〉 =

∑iwiGres(zi)∑

iwi(47)

where each zi is calculated from Eq. (40) using the effective length of the target, y andthe resonance parameters for resonance i.

This model has been generalised further in two ways to make it suitable for applicationin Fispact-II.

First, the average self-shielding factor is computed from the resonance parametersgiven in the resolved resonance range defined in the ENDF File 2 data for a subset of

Culham Electromagnetics

Page 30 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

the nuclides specified with the SSFFUEL or SSFMASS keywords. These resonancedata are described in Section 4.1. It is assumed that the resonances for the mixture ofnuclides are separated in energy sufficiently for them not to overlap significantly.

The cross-section at a resonance peak is not supplied in the ENDF data. The simpleexpression provided by Frohner [Eq. (186)][44] is used to supply this information.

Secondly, 〈Gres〉 is made energy dependent by taking averages separately for each en-ergy bin used for the group-wise cross-sections, including only those resonances withpeaks in the relevant energy bin. Then this array of energy-dependent self-shieldingfactors is applied to each energy-dependent cross-section before the cross-section col-lapse.

The principle underlying this model of self shielding is that the resonances perturbthe spectrum of the applied neutron flux. Consequently, the self shielding factorsshould modify the cross-sections for all reactions. However, the effect of self shieldingvaries from reaction to reaction because of the differing energy dependencies of thecross-sections.

2.5 Fission

2.5.1 EAF data

Projectile-induced fission yield data are available in three projectile energy ranges:

thermal under 200 keVfast between 200 keV and 5 MeVhigh over 5 MeV

The boundary energies are Ehf = 5 MeV and Eft = 200 keV. It is assumed that thereis a maximum of one fission yield fraction in each of these energy ranges for a givenprojectile, parent and daughter fragment.

The algorithm for infilling unknown values is:

• If yields for the thermal, fast and high energy projectiles, Yt, Yf and Yh areknown then these are used.

• If only one value Y is known, then set Yt = Yf = Yh = Y .

• If only Yt and Yh are known, set Yf = (Yt + Yh)/2, and if values for Yt or Yh areunknown, then set them to Yf .

A single fission yield factor for use in the inventory equations is obtained by collapsingthe available data in a manner similar to that used for cross-sections (Equation (4)).

Culham Electromagnetics

Page 31 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Fluxes in the thermal, fast and high energy groups are found by summing fluxes in thenarrower groups used for the cross-sections.

A simple nearest-grid-point algorithm for this is as follows. Let φi be the flux inthe cross-section energy group that lies between energies Ei and Ei+1 (data are indecreasing energy order, and 1 ≤ i < imax), then the group energy is Ei = (Ei +Ei+1)/2. Let ihf and ift be the largest i for which Ei ≥ Ehf and Ei ≥ Eft, respectively,then

φh =

ihf−1∑i=1

φ(Ei) (48)

φf =

ift−1∑i=ihf

φ(Ei) (49)

φt =imax∑i=ift

φ(Ei) (50)

φint = φh + φf + φt (51)

and the collapsed fission yield is given by

Y = (φhYh + φfYf + φtYt)/φint (52)

In terms of the description of the reaction network as a directed graph, each fissionreaction gives rise to many edges in the graph connecting the fissionable parent nuclideto all of its possible fission products. The effective reaction cross-section needed tocalculate the flow along each edge of the graph is simply the fission cross-sectionmultiplied by the appropriate fission yield.

To make up for the lack of data on fission for many actinides, a surrogate daughteralgorithm is used. This is in addition to the use of associated fission yield data (Sec-tion 3.10). The surrogate daughter algorithm replaces fission product daughters notknown to the program with similar nuclides that are known. The algorithm works asfollows:

• If the daughter fission product is in the list of nuclides known to the program,then assign the fission yield to that daughter.

• If the daughter is not listed, then assign its yield to the first nuclide encounteredin the list of nuclides with the same A, and the same or larger Z.

• If neither of the above cases is satisfied, then assign the yield to the ‘sink’ nuclide.

Culham Electromagnetics

Page 32 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

2.5.2 TENDL data

The fission yield data, like the covariance data, are on coarser energy grids than theflux and cross-sections. To collapse the fission yield, the weights are calculated using

Wk ==N∑i=1

Ski φi/N∑i=1

φi (53)

where there are k ∈ [1,K] fission yield energy groups. The yields are collapsed using

Y =K∑k=1

WkYk (54)

The variance of the collapsed fission yield is given by

var =K∑k=1

(WkFk)2 (55)

where Fk are the tabulated 1σ errors in the ENDF file. The fractional uncertainty is∆ =

√var/Y . In the present version of the Fispact-II the fission yield uncertainty

is not used.

2.6 Sequential Charged Particle Reactions

Sequential charged-particle reaction has been dropped from Fispact-II because of thelack of suitable data. The following shows the formulae that were derived and partiallyimplemented, and may be used in future enhancements if scpr is to be added..

A sequential charged particle reaction (scpr) is a two-step process in which chargedparticles x are created in primary neutron-induced reactions. These charged particlesbecome the projectiles in charged-particle-induced reactions.

The charged particles included in the scpr calculation in the code are the gas nuclidesx ∈ {p, d, t, h, α}.

The charged-particle-induced reactions included in the scpr calculation are summarisedin Table 8.

The formulation of scpr is given in References [32] and [13, App. 12]. Based on thatformulation, the computation of the scpr contribution to the effective cross-section(Equation (22)) comprises the following steps:

1. The cumulative charged-particle spectra CAn,x are computed from tables of nor-

malised charged-particle spectra

CAn,x(Eni , Exk) =

jmax∑j=k

fAn,x(Eni , Exj )∆Exj (56)

Culham Electromagnetics

Page 33 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

where

∆Exj is the tabulated energy step of the outgoing charged particle data (MeV)

fAn,x(Eni , Exj ) are the normalised energy spectra (in energy groups Exj ) for

outgoing charged particles x and for incoming neutron energy group Eni .These data are tabulated in the SPEC * files.

2. The total cross-section (in cm2) for the production of charged particle x from nu-clide A for neutrons in the energy group Eni is σA

n,x(Eni). This is computed from

the cross-section tables for the production of nuclide B from A, σAB((n, {sec})mt),

contained in the CROSSEC library.

The total cross-section is given by summing contributions where the primaryproduct B is x, and over all reactions where one or more of the secondaries arex:

σAn,x =

∑mt

(sx + 1)σAx ((n, {sxx, . . .})mt) +

∑B6=x

sxσAB((n, {sxx, . . .})mt)

(57)

where sx is the number of secondaries of type x in reaction mt.

3. The production rate QA(Exk) (in s−1) of charged particles x from nuclide A inenergy group Exk is given by

QA(Exk) =imax∑i=1

φn(Eni)σAn,x(Eni)C

An,x(Eni , Exk) (58)

where

φn(Eni) is the neutron flux in the ith neutron energy group (cm−2s−1).

4. The stopping range of charged particle x in energy group Exk , ∆Rx(Exk) (incm) is computed from a linear combination of stopping ranges in the constituentelements of the target:

∆Rx(Exk) =

∑i AiNi∆Rx,Zi(Exk)∑

i AiNi(59)

where the sum is over all nuclides i, Ai is the mass number, Zi is the atomicnumber and Ni is the number of target nuclides per unit volume. Tables ofstopping ranges ∆Rx,Z(Exk) for charged particle x ∈{p, d, t, h, α} for elementsZ are contained in the libraries STOP *.

5. The charged-particle flux in energy group Exk is computed from:

φx(Exk) = ∆Rx(Exk)∑A

NAQA(Exk) (60)

Culham Electromagnetics

Page 34 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 8: Charged-particle-induced reactions included in the scpr calculations.

Projectile Products MT ∆Z ∆A

p n 4 1 0p 2n 16 1 -1d n 4 1 1d 2n 16 1 0t n 4 1 2t 2n 16 1 1h n 4 2 2h 2n 16 2 1α n 4 2 3α 2n 16 2 2

6. The XN * data libraries contain tables of charged-particle-induced reaction cross-sections in energy groups {Exk ; k = 1, kmax} for the reactions listed in Table 8.If we denote the cross-sections by σA

B((x, {sec})mt;Exk) for the production ofnuclide B from A in a reaction of type mt induced by projectile x, then theeffective (pseudo) cross-section for the scpr reactions producing nuclide B fromnuclide A is:

σAB(scpr) =

1

φint

∑x,mt

kmax∑k=1

σAB((x, {sec})mt;Exk)φx(Exk) (61)

where φint is the energy-integrated neutron flux

φint =imax∑i=1

φn(Eni) (62)

2.7 Gamma Activation

The set of reactions allowed for gamma activation is identical to the set of 90 reactionsfor neutron activation. The table for these reactions can be obtained by replacing theprojectile n by γ, and decreasing all the values of ∆A by 1 in Table 3.

2.8 Proton Activation

The set of reactions allowed for proton activation is identical to the set of 90 reactionsfor neutron activation. The table for these reactions can be obtained by replacing theprojectile n by p, and increasing all the values of ∆Z by 1 in Table 3.

Culham Electromagnetics

Page 35 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

2.9 Deuteron Activation

The set of reactions allowed for deuteron activation is identical to the set of 90 reactionsfor neutron activation. The table for these reactions can be obtained by replacing theprojectile n by d, and increasing all the values of ∆Z by 1 and all the values of ∆A by1 in Table 3.

2.10 Alpha Activation

The set of reactions allowed for alpha particle activation is identical to the set of 90reactions for neutron activation. The table for these reactions can be obtained byreplacing the projectile n by α, and increasing all the values of ∆Z by 2 and all thevalues of ∆A by 3 in Table 3.

2.11 Gamma Radiation

In addition to the activity of irradiated materials, another measure of acceptabilityis the dose rate from emitted γ rays. Fispact-II uses two approximate estimates ofthe γ dose rate due to irradiation by neutrons: contact dose from the surface of asemi-infinite slab or dose at a given distance from a point source. For both measures,the contribution of high-energy β-particle bremsstrahlung to the total dose rate canbe significant, and this may be output. The formulae used for these are discussed inthe following sub-subsections.

2.11.1 Contact gamma-dose rate

Equation (63) shows the formula used to calculate the γ dose rate at the surface of asemi-infinite slab of material, it is taken from Jaeger [45]:

D = CB

2

Nγ∑i=1

µa(Ei)

µm(Ei)Sγ(Ei) (63)

whereD = surface γ dose rate (Sv h−1)Nγ = number of energy groups in the γ spectrum histogramEi = mean energy of the i-th energy groupµa = mass energy absorption coefficient (µen/ρ) of air (m2 kg−1)µm = mass energy attenuation coefficient (µ/ρ) of the material (m2 kg−1)B = build up factor (= 2)Sγ = rate of γ emission (MeV kg−1 s−1)C = 3.6× 109|e| converts (MeV kg−1 s−1) to (Sv h−1)

Culham Electromagnetics

Page 36 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

The EAF library file absorp (see Section 3.15) contains µ/ρ [cm2 g−1] for all elementsin increasing Z order, µ [m−1] and µen/ρ [cm2 g−1] for air and the mean energies ofthe 24-group structure.

The value of µm for the material is calculated from the elemental values µmj providedby the absorp data file using

µm =∑j

fjµmj (64)

where fj = (mass of element j)/(total mass).

The value of the emission rate Sγ is calculated using

Sγ(Ei) = IiA(t) (65)

where Ii is the intensity of energy group i (MeV) and A(t) is the specific activity ofmaterial at time t (Bq kg−1). If discrete spectral line data are available, then Ii isobtained by summing the contributions from spectral lines in energy group i read fromthe decay data files. If data are not available, then an approximate value may becomputed as described below in Section 2.11.3.

2.11.2 Gamma dose rate from point source

Equation (66) shows the standard formula (taken from Reference[45]) for calculationof the dose rate from a point source in air.

D = C

Nγ∑i=1

µa4πr2

e−µ(Ei)rmsSγ(Ei) (66)

where C, Nγ , µa, Sγ are as defined above for Equation (63), andms = mass of source (kg)r = distance from source (m)µ(Ei) = energy attenuation coefficient of air (m−1)

Both Equations (63) and (66) are approximations suitable for Fispact-II calculations,but it is noted that they may not be adequate for specific health physics problems.

2.11.3 Approximate gamma spectrum

Wherever possible decay data from JEFF-3.1 files [46] have been used to construct thedecay data library (decay – see Sections 3.5and 4.2) used with Fispact-II. Intensityin a spectrum energy group is computed from the sum of intensities of discrete spectrallines lying in the energy group. However, for 254 unstable nuclides the file containsonly the average γ energy - no data for the γ spectrum are available. Without the γ

Culham Electromagnetics

Page 37 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

spectrum Fispact-II is unable to calculate the γ dose rate contribution for these nu-clides. In order to check if any of these nuclides are likely to contribute significantly tothe total dose rate, the following method is used to calculate an approximate spectrum.

The maximum γ energies (Em) for decays assumed in the method are given in Table 9.

Table 9: Maximum γ energies for various decay modes.

Decay mode Emβ− 2〈β〉β+ 5 MeVα 0

Isomeric transition 〈γ〉

The intensity in the i-th group (Ii) is given by

Ii =a〈γ〉Em

(e−aηi−1 − e−aηi1− (1 + a)e−a

)(67)

where a = 14 (arbitrary constant)ηi = Ei/Em

Gamma doses for approximate spectra are found using the intensity from Equation (67)to find the emission rate (Equation (65)), and then using this rate in Equation (63)or (66) as appropriate.

2.11.4 Bremsstrahlung corrections

The contribution of high-energy β-particle bremsstrahlung to the total γ dose ratecan be significant in cases where the γ emission is small. Fispact-II uses a similarapproach to Jarvis [47] who considers γ emission from a mono-energetic electron.

The energy distribution of γ rays emitted by a mono-energetic electron in a matrix ofcharge Z is given by

dN =

{aZ

(E0−EE

)dE 0 ≤ E < E0

0 E ≥ E0

(68)

wheredN = number of γ-rays with energy E (keV)E0 = energy of electron (keV)a = 2.76× 10−6 (keV−1)

Integrating Equation (68) over the energy bins give the number of γ-rays associated

Culham Electromagnetics

Page 38 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

with that bin. There are three cases:

N(i) =

aZ[E0 log(Ei+1/Ei)− (Ei+1 − Ei)] E0 ≥ Ei+1

aZ[E0 log(E0/Ei)− (E0 − Ei)] Ei+1 > E0 > Ei0 E0 ≤ Ei

(69)

where Ei and Ei+1 are the lower and upper energy bounds of group i. The intensityfor group i is given by

Ii = N(i)(Ei + Ei+1)/2 (70)

The bremsstrahlung corrections to gamma doses are found using the intensity from thisequation to find the emission rate (Equation (65)), and then using this rate in Equa-tion (63) or (66) as appropriate. The above discussion is valid only for mono-energeticelectrons, but it is assumed that the same expressions are valid for the emission of βparticles which have a continuous energy distribution if the mean β energy is used forE0.

The value of Z used in Equation (69) is calculated from

Z =∑j

Zjfj (71)

where Zj = atomic number of the j-th element and fj = atomic fraction of the j-thelement (i.e., number of atoms of j / total number of atoms).

2.11.5 Bremsstrahlung candidates

Only a subset of all the nuclides in the decay library needs to be considered forbremsstrahlung production. Nuclides may make a contribution to the γ dose ratebecause of bremsstrahlung emission from energetic β particles.

The following criteria are applied by the code to the EAF decay library to give thenuclides that are Bremsstrahlung candidates:

• the nuclide is radioactive with a half-life ≥ 0.1 years or in the case of a short-livednuclide, the half-life of the parent ≥ 0.1 years;

• the nuclide is radioactive with a half-life ≤ 5.0× 1016 years;

• the nuclide has an average β-energy >average γ-energy;

• the nuclide has an average β-energy > 0.145 MeV.

2.12 Iron Matrix

It is sometimes of interest to examine the activation of small quantities of impuritiesin an iron matrix. The rate equations can be modified under the control of the IRON

Culham Electromagnetics

Page 39 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

keyword to omit all the induced reactions of iron isotopes so that the calculated inven-tories and dose rates refer only to the impurities. In effect, the iron is replaced with afictitious stable nuclide with no induced reactions.

2.13 Target Geometry

A basic assumption of the model described by Fispact-II is that the target is infiniteand infinitely dilute, see Section 2.1 above. The implications of this assumption arethat the results of a calculation are independent of the target geometry and size becausethe target does not affect the flux and spectrum of the incident projectile.

In some circumstances, this is not appropriate, particularly when a target nuclideexhibits large resonances. In such a case, some of the projectile flux becomes depleted.However, this depletion is negligible if the target is sufficiently thin.

To accommodate this effect, Fispact-II now includes a model of a thick target as wellas the representation of self shielding already implemented, see Sections 2.4.3 and 2.4.4above.

The depletion of the projectile flux is negligible if the target is sufficiently thin, so nospecial treatment is required for such targets.

The thick target model has been implemented in Release-2-10 of Fispact-II.

2.14 The Sensitivity Equations

Implemention of these sensitivity formulae is not included in the Fispact-II code. Seethe next section for the replacement Monte-Carlo approach that has been used instead.

The sensitivity equations [13, App. 5] are solved by extending the set of rate equationsas described in Appendix 5 of [13] before the equations are passed to the ode-solver.

There is one difference in the treatment. Here, the fission reactions are included in thereaction network in the same way as all the other reactions (see Section 2.5 above), sothere is no constant source term in the rate equations (1).

The linear rate equations for the set of augmented unknowns {Ni, ∂Nj/∂x} become

dN

dt= AN (72)

d

dt

(∂N

∂x

)= A

(∂N

∂x

)+

(∂A

∂x

)N (73)

This augmented system may be represented using a 2 × 2 block matrix with a zerooff-diagonal block, since Equation (72) has no term in ∂N/∂x.

Culham Electromagnetics

Page 40 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Strictly, the system matrix A is not constant, rather it has an indirect dependence onthe inventory N via the sequential charged particle reactions described in Section 2.6above. This indirect dependence would lead to an additional term in Equation (73)but it is a weak effect and the additional term will be ignored when the sensitivityequations are solved.

2.15 Monte-Carlo Sensitivity Estimation

Fispact-II will use a Monte-Carlo approach to sensitivity analysis. The standardinventory run gives baseline values {X0

i ; i = 1, I} and {Y 0j ; j = 1, J} respectively of

the independent and dependent variables. A series S of inventory calculations will beperformed with the set of I independent variables {Xs

i ; i = 1, I; s = 1, S} chosen fromdistributions with means 〈Xi〉 and standard deviations 〈∆Xi〉. These runs will producesets of J dependent variables {Y s

j ; j = 1, J ; s = 1, S}. In the present context, theindependent variables are cross-sections and their uncertainties or decay constants andtheir uncertainties, and the dependent variables are the number of atoms of nuclidesj or some related radiological quantity.

The implementation of this scheme will use the SENSITIVITY keyword to initiatethe collecting of data within the main inventory calculation. The keyword ZEROwill cause the series of S runs with different independent variables to be undertakento compute, process and output the set {Y s

j }. The default distribution is taken to belog-normal, but other options are possible. Any sequence of irradiation pulses, changesin cross-section, etc. that are possible with Fispact-II can be used in the sensitivitycalculations. The code performs the base calculation with full output, then repeats Stimes the sequence of steps with different sets {Xs

i }.

Sensitivity calculations provide both uncertainty and sensitivity output. Summaryuncertainty output of means Xi and Yj and standard deviations ∆Xi and ∆Yj aresent to the output file:

Xi =1

S

S∑s=1

Xsi (74)

∆Xi =

√√√√ 1

S − 1

S∑s=1

[(Xsi )2 − X2

i ] (75)

Yj =1

S

S∑s=1

Y sj (76)

∆Yj =

√√√√ 1

S − 1

S∑s=1

[(Y sj )2 − Y 2

j ] (77)

Differences (Xi − 〈Xi〉) and (∆Xi − 〈∆Xi〉 give a measure as to how well the sampleset matches the distribution, and as S increases these two differences should tend to

Culham Electromagnetics

Page 41 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

zero1. Similarly Yj should tend to the value of the base calculation, and ∆Yj gives theuncertainty in the dependent variable resulting from uncertainties in the independentvariables.

Sensitivity of dependent quantity Yj on independent variable Xi is assessed using thePearson product-moment correlation coefficient

rij =

∑sX

si Y

sj − SXiYj

(S − 1)∆Xi∆Yj(78)

The magnitude of rij is less than one, and one close to one indicate strong linearcorrelation. Values of rij close to +1 will be found for reactions or decays on principalpathways leading to nuclide j, and values close to −1 are expected for reactions ordecays acting as sinks on pathways.

The best-fit line relating Yj to Xi is given by

Yj − Yj∆Yj

= rij

(Xi − Xi

∆Xi

)(79)

To minimise the effects of roundoff in a one-pass calculation of sensitivity outputquantities, the calculation will be performed by accumulating differences from thebaseline values. We define

xsi = Xsi −X0

i ; ysj = Y sj − Y 0

j (80)

and calculate means and standard deviations using:

Xi =1

S

S∑s=1

xsi +X0i = xi +X0

i (81)

∆Xi =

√√√√ 1

S − 1

(S∑s=1

(xsi )2 − Sx2

i

)(82)

Yj =1

S

S∑s=1

ysj + Y 0j = yj + Y 0

j (83)

∆Yj =

√√√√ 1

S − 1

(S∑s=1

(ysj )2 − Sy2

j

)(84)

The Pearson correlation coefficient is given by

rij =1

(S − 1)∆Xi∆Yj

(S∑s=1

xsiysj − Sxiyj

)(85)

1This is not strictly true; the sample standard deviation will be systematically smaller than theinput value because of the truncation of the tails of the distributions for normal and log-normaldistributions.

Culham Electromagnetics

Page 42 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

2.15.1 Covariance data

The TENDL library contains MF = 33 and 40 , LB = 5 covariance data in differentenergy bins for a given reaction. These are collapsed to give the variances and standarddeviations used in uncertainty and sensitivity calculations. The library also containsMF = 33, LB = 6 covariance data for different reactions X1, X2, . . . for a given parent,i.e., p(n,X1)d1, p(n,X2)d2, . . . .

These covariance data cov(X1, X2) for X1, X2 are stored as fractional values fX1X2 andare tabulated in the same energy bins as used respectively for the LB = 5 covariancedata fX1X1 , fX2X2 for reactions X1, X2. They may be included in the sensitivitycalculations as follows:

Data Checking The TENDL data are incomplete, and are handled in limited preci-sion by the ENDF format. If we let k and l respectively label the energy bin fordata for reaction X1 and X2 then

1. if FX1X1kk < ε or FX2X2

ll < ε where ε is a tiny number, then set fX1X2kl = 0

2. The requirement that the correlation must have magnitude less that or equalto 1 implies

|r| =

∣∣∣∣∣∣ fX1X2kl√

fX1X1kk fX1X1

ll

∣∣∣∣∣∣ ≤ 1 (86)

Truncation errors introduced by the limited precision ASCII data transfervia ENDF data causes |r| = 1+δ > 1 in some instances. These are correctedby setting

fX1X2kl = fX1X2

kl /(1 + δ) (87)

Data collapse After data checking, the corrected data are used to compute collapsedcovariance cov(X1, X2) as described in Section 2.2.

Isomer covariances The MF = 3 covariances are the sum of the contributions fromall reactions between the pairs of parents and daughters. Covariance data aremapped to MF = 10 reactions by assuming that all isomeric daughters of a givenpair of reactions with rates X1, X2 have the same collapsed correlation function,corr(X1, X2).

Monte-Carlo Sampling The effect of non-negligible correlations on uncertaintiesmay be introduced into Monte-Carlo sensitivity calculations by choosing distri-butions of sample cross-sections to have the same variances and covariances asgiven by the TENDL data.

We denote the reaction vector X whose components Xi are the total collapsedreaction rate giving daughter di from parent p. The corresponding covariancematrix is C = cov(X, X). If we compute the orthogonal transformation matrix Sthat diagonalises C (D = STCS is diagonal) then we can compute the independent

Culham Electromagnetics

Page 43 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

set of input variables Y = SX and their variances (given by the diagonal elementsof D) for input to the Monte-Carlo calculations to create a set of runs withcovariances that correspond to C.

2.15.2 Probability density functions

As stated above, the default distribution for selecting the independent variables isassumed to be log-normal, but other plausible candidates distributions are normal,loguniform and uniform.

Lognormal: The probability density function is

f(x;µ, σ) =1

xσ√

2πexp(−(log(x)− µ)2

2σ2) (88)

where µ and σ are related to the mean x and standard deviation ∆x by

x = exp(µ+ σ2/2) (89)

∆x = x√

exp(σ2)− 1 (90)

Normal: The probability density function is

f(x;µ, σ) =1

σ√

2πexp(−(x− µ)2

2σ2) (91)

where µ is the mean and σ is the standard deviation.

Loguniform: The loguniform distribution is given by

f(x) =

{cx a < x ≤ b; a > 00 otherwise

(92)

f is a probability distribution function, with mean µ and variance σ2:

1 =

∫ b

af(x)dx (93)

µ =

∫ b

axf(x)dx (94)

σ2 =

∫ b

a(x− µ)2f(x)dx (95)

Substituting Equation (92) respectively into Equations (93)-(95) and then evaluatingthe integrals gives

1 = c log(b/a) (96)

µ = cd (97)

σ2 = µ(m− µ) (98)

Culham Electromagnetics

Page 44 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

where m = (a+ b)/2, d = (b− a). Equation (98) can be solved to give m in terms ofknown quantities:

m = µ+ σ2/µ (99)

Equation (96) may be written:

1

µ=

1

dlog

(1 + δ

1− δ

)(100)

=1

m(1 +

δ2

3+δ4

5+ · · ·) (101)

where δ = d/2m. Truncating Equation (101) at δ4 and solving the resulting equationfor d gives

d ' 2√

5m√6

{1 +36σ2

5

}1/2

− 1

1/2

(102)

Thus, given µ and σ, one can solve Equation (99) and (102) for m and d, and thencefind approximate values for a and b.

Uniform: The probability density function is given by

f(x) =

{1b−a a < x ≤ b; a > 0

0 otherwise(103)

2.16 Pathways

The reaction network illustrated in Figure 1 may be described either by the rateequations (Eq. (1)) or as the sum of paths and loops, which we refer to as pathways.If we exclude non-linear dependence of the sequential charged particle reactions, thenthe inventory of a given nuclide computed using the rate equations can equivalentlybe found by a linear superposition of contributions of flows along the pathways to thatnuclide.

Pathways are used in Fispact-II to aid interpretation. If we know the inventory atthe start and end of an irradiation (or cooling) period, then pathways analysis may beused to identify the most significant chains of reactions and decays in transmuting theinitial inventory to the dominant nuclides in the final inventory of the step.

Key aspects of pathways analysis are methods for searching directed graphs (or di-graphs) of the form illustrated in Figure 1 to identify routes from a parent to a chosendescendant, and the assembly and solution of rate equations for chosen subsets ofnuclides on the pathway to get the flow along the pathway.

In the directed graph, nuclides correspond to the vertices of the graph. A parentnuclide is connected to a daughter nuclide by a graph edge. Associated with the edge

Culham Electromagnetics

Page 45 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

is a flow rate given by the sum of the rates of all reactions and the decay that takethe parent to daughter. This flow rate is given by the off-diagonal elements of the rateequation matrix. The flow rate from parent j to daughter i is given by the element Ajiin row i and column j of matrix A of Equation (5).

We use the following definitions:

path A path is a chain of different nuclides connecting the source nuclide to the targetnuclide;

loop A loop is a closed chain of different nuclides connecting a nuclide to itself. Loopsformed by the cyclic permutation of the nuclides in the loop are considered tobe the same loop;

pathway A pathway is the combination of a single path with zero or more loops.

These are illustrated in Figure 4

1 2 3 4

1 2 3 4

5

path

loop

pathway

(a)

(b)

(c)

2 3 5 2

Figure 4: (a) A path is a linear chain of nuclides connected by edges, (b) a loop isa cyclic chain of nuclides and (c) a pathway is the combination of a single path withzero or more loops.

The full directed graph has one vertex per nuclide, and one edge for each off-diagonalterm in the rate equations. Fispact-2007 data have 2232 vertices (nuclides) andapproximately 120 000 edges (non-zero elements in A). If fission can be omitted thisreduces to about 42 000, and for a cooling period this drops to less than 5 000 (c.f.,Section 2.1). The brute-force approach to finding paths by examining all the pathsto descendants of a given source nuclide for these numbers of edges rapidly becomesimpracticable because of the combinatorial explosion of the number of alternatives tobe examined as path lengths increase. For this reason the new code uses a single visittree with edge weighting to prune the number of edges to be retained in the search forsignificant pathways.

Culham Electromagnetics

Page 46 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

The weights are computed using coefficients of the rate equation matrix A, and areused to eliminate paths and loops as follows:

• Each edge on a path has weight ≤ 1. If the product of the weights along a pathfall below the path threshold, then the path is discarded.

• Each edge on a loop has weight ≤ 1. The weight of the loop, Wl is the product ofthe edge weights around the loop. If Wl/(1−Wl) falls below the loop threshold,then the loop is discarded.

The retained paths are significant paths, and the retained loops are significant loops.Significant paths and significant loops are combined to give pathways. Loops are addedto paths according to the following criteria:

1. the loop has one or more nuclides in common with the path;

2. when the loop is added to the path, it does not create a second path to the target(this is to avoid double counting of paths);

3. when the loop is added to the path, the fractional increase in the target inventorydue to the path is greater than the loop floor.

The resulting pathway is discarded as not significant if the fraction of the target in-ventory due to the pathway (i.e., the path and its loops) is below the path floor.

2.16.1 Threshold Pruning Weights

This subsection presents the formulae used to weight path edges. Consider the linearchain of nuclides on the path illustrated in Figure 5. Starting with inventory Ns attime t = 0 at vertex 1, the path is considered ignorable if the inventory at the targetvertex, n is below the threshold εNt at time t = T . Only forward flows are considered,so that the evolution of the number of nuclides at vertex 1 is given by

1 2 3 4 5 n

Figure 5: A path is a linear chain of nuclides. Vertex 1 is the source nuclide and n isthe target nuclide.

dN1

dt= −α1N1 (104)

and the evolution at vertex i > 1 is given by

dNi

dt= −αiNi + βi−1Ni−1 (105)

Culham Electromagnetics

Page 47 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Coefficients αi give the total rate of decay of a nuclide, and βi is the fraction of thisdecay through transmutation to nuclide i + 1. On a path the coefficients have theproperty

αi ≥ βi > 0 (106)

It is assumed that the multiplicity factor if the daughter is a secondary is includedin these rate coefficients. The property given in Equation (106) implies that pathswith on-path or off-path loops will make smaller contributions to the final Nt than theloop-free path, and so only need considering if the primary path is not negligible.

Coefficients αi and βi are simply related to the elements of the rate equation matrix.If the edge from nuclide i in Figure 5 corresponds to the edge from nuclide k to l inthe rate equations, then βi = Akl and αi = −All −Akl .

Sufficient Condition 1

Theorem Given a pathway described by Equations (104) and (105) above, then asufficient condition for the pathway to be discarded at depth D is

(1− e−α1T )D−1∏i=1

βiαi

< εNt(T )

Ns(0)(107)

Proof The total number of nuclides created at vertex i+ 1 in time interval [0, T ] is

Fi+1 =

∫ T

0βiNidt (108)

Substituting for Ni using Equation (105) for i > 1 gives

Fi+1 =βiαi

(Fi −

∫ T

0

dNi

dt

)≤ βiαiFi (109)

since Ni(0) = 0 and Ni(T ) ≥ 0.

For i = 1,

F2 =

∫ T

0β1N1dt =

β1

α1Ns(0)(1− e−α1T ) (110)

The number of nuclides created at each vertex is monotonically decreasing with vertexnumber (from Equations (106) and (109)), and the number of nuclides ND at vertexD is bounded above by FD, where

FD ≤ Ns(0)(1− e−α1T )D−1∏i=1

βiαi

(111)

If the rhs of Equation (111) is less than the threshold εNt(T ) at the target nuclide itfollows that the pathway can be discarded.

Culham Electromagnetics

Page 48 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Sufficient Condition 2

Theorem Given a pathway described by Equations (104) and (105) above, then asufficient condition for the pathway to be discarded at depth D is

D−1∏i=1

βi(1− e−αiT )

αi< ε

Nt(T )

Ns(0)(112)

Proof The solution of Equation (105) can be written in terms of a particular integraland complementary function:

Ni(t) = e−αit(Ai +

∫ t

0eαit

′βi−1Ni−1(t′)dt′

)(113)

where for i > 1, the initial conditions give Ai = 0. Substituting Equation (113) intoEquation (108) and interchanging the order of integration gives

Fi+1 =

∫ T

0dt′∫ T

t′dt βiβi+1Ni−1(t′)e−αi(t−t

′) (114)

Integrating over t gives

Fi+1 =βiαi

(Fi − e−αiT

∫ T

0dt′ Ni−1(t′)βi−1e

αit′)

(115)

≤ βiαiFi(1− e−αiT ) (116)

where the final inequality was obtained by replacing the exponential in the integral byits lower bound (= 1) in Equation (115).

Sufficient condition 2 follows by repeating the argument used for sufficient condition1, with inequality (116) replacing inequality (111).

2.16.2 Multi-pulse Irradiation Threshold Weights

The pruning weights given in Section 2.16.1 are for the case where there is a constantprojectile flux, so that the coefficients αi and βi remain constant. A more generalirradiation scenario is when the projectile flux is pulsed. We consider the case wherethere is a total of J irradiation intervals, where interval j lasts from time Tj−1 to timeTj . Figure 6 schematically shows the projectile flux as a function of time. The total

depletion rate of nuclide i, αji , and the rate of production of nuclide i+ 1 from nuclide

i, βji during time interval j will similarly be constant, but will take different values indifferent time intervals.

Culham Electromagnetics

Page 49 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

α βi i

0 1 2 5 J−1T T T T T T T T

J3 4

Figure 6: The projectile fluxes (and hence the rate equation coefficients) are assumedto be constant for each time interval j.

For the pulsed projectile flux shown in Figure 6, the equations describing the evolutionfor time interval [Tj , Tj+1] of the inventory along the path illustrated in Figure 5 becomefor vertex 1

dN1

dt= −αj1N1 (117)

and for vertex i > 1dNi

dt= −αjiNi + βji−1Ni−1 (118)

where the initial conditions for time interval 1 are

N1(T0) = N1,0; Ni(T0) = 0 for i > 1 (119)

and initial conditions for subsequent time intervals are give by the final conditions ofthe previous time interval.

A cooling interval, with zero projectile flux, can be included in the analysis by allowingfor the possibility that αji and βji are both zero for some i and j. This occurs if nuclide

i is stable. However, during irradiation intervals, j′, the βj′

i (and hence αj′

i ) must benon-zero, otherwise the pathway would not exist.

Given a path described by Equations (117)-(119) above, then a sufficient condition forthe pathway to be discarded at depth D (> 0) is

FD+1(TJ) < εNt(T )

Ns(0)(120)

where the total fluxes satisfy initial conditions

Fi(T0) = 0; i > 1 (121)

and at the end of time interval j (> 0)

F2(Tj) =

F2(Tj−1); αj1 = 0

F2(Tj−1) +βj1

αj1N1,j−1[1− exp(−αj1∆Tj)]; αj1 > 0

(122)

Culham Electromagnetics

Page 50 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Fi+1(Tj) = Fi+1(Tj−1); αji = 0, i ≥ 2 (123)

Fi+1(Tj) ≤ Fi+1(Tj−1) +βjiαjiFi(Tj−1)[1− exp(−αji∆Tj)]; αji > 0, i ≥ 2(124)

where ∆Tj = Tj − Tj−1.

Proof The source nuclide (i = 1) inventory is given by Equation (117) with initialconditions for j = 1 given by Equation (119). Integrating Equation (117) over timeinterval j (Tj−1 ≤ t < Tj) gives

N1,j = N1,j−1 exp(−αj1∆Tj) (125)

The inventory of subsequent nuclides in the path (i > 1) is given by Equation (118).The integrated flux

Fi+1 =

∫βi(t)Ni(t) dt (126)

gives an upper bound on Ni+1. The value of this flux function changes over timeinterval j by

Fi+1(Tj)− Fi+1(Tj−1) =

∫ Tj

Tj−1

βjiNi dt (127)

which trivially yields Equation(123) when αji = βji = 0. Otherwise, the integral ofEquation (118) over time interval j is

Ni(t) = e−αji (t−Tj−1)

[Ni(Tj−1) +

∫ t

Tj−1

dt′ βji−1Ni−1(t′)eαji (t′−Tj−1)

](128)

Substituting Equation (128) into Equation (127), interchanging the order of integrationand integrating over t gives

Fi+1(Tj)− Fi+1(Tj−1) = (129)

βjiαji

Ni(Tj−1)︸ ︷︷ ︸≤Fi(Tj−1)

(1− e−αji∆Tj ) +

∫ Tj

Tj−1

dt′ βji−1Ni−1(t′)(1− eαji (t′−Tj−1)︸ ︷︷ ︸≥1

e−αji∆Tj )

Replacing the the factors with underbraces in Equation (129) by their extrema shownbelow the braces eliminates the integral and yields the inequality

Fi+1(Tj)− Fi+1(Tj−1) ≤ βjiαjiFi(Tj−1)[1− e−α

ji∆Tj ] (130)

which is Equation (124). Equations (120) and (122) follow by substituting N1,j−1 forF1(Tj−1) and setting N1,0 = 1.

Culham Electromagnetics

Page 51 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Computing multi-pulse weights

The multi-pulse pruning algorithm replaces the single weight Fi at nuclide i in thepath for the single irradiation phase case by a vector of J weights, {Fi(Tj); j ∈ [1, J ]}.This allows the value used to test for discarding the path at nuclide i+ 1, Fi+1(TJ), tobe computed using only values of weights at nuclide i. The initialisation step sets theweights for the source nuclide, and the next nuclide step computes the weights for thenext nuclide and tests whether to discard the path. This gives the following schemefor computing multi-pulse path weights:

Initialisation For the initial parent (i.e.,source) nuclide, set the inventory to unity

Fp(T1) = N1(T0) = 1 (131)

and compute the inventory for this nuclide at subsequent steps in the multipulseirradiation using Equation (125) with N1,j−1 written as Fp(Tj):

Fp(Tj+1) = Fp(Tj) exp[−αjp∆Tj ] : j ∈ [1, J − 1] (132)

Equation (132) and the discussion below use p to denote the parent nuclide andd to denote the daughter nuclide.

Daughter nuclide The flow vector for the daughter nuclide is given by

Fd(Tj) =

Fd(Tj−1); αjp = 0

Fd(Tj−1) +βjpd

αjpFp(Tj−1)[1− exp(−αjp∆Tj)]; αjp > 0

(133)

where j = 1, J and ∆Tj = Tj − Tj−1.

2.16.3 Algorithm

The calculation of pathways is controlled by pathways m. It uses the module path m(see Section 11.4) to compute pathways from a single source nuclide to multiple targetnuclides.

path m returns lists of paths and loops ordered in decreasing importance. It uses parentto daughter data ordering to simplify the extraction of adjacency information and ofreaction rates from the compact storage structure used to store the rate equationmatrix coefficients in the module rateeq m.

The computation of the significant paths and loops in path m uses a five step process(implemented in subroutine path init in module path m) designed to prune unneces-sary searches and thereby reduce computational effort:

Culham Electromagnetics

Page 52 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Step 1: build a BFS tree representation of the digraph that visits as parents onlyonce all significant nuclides that are descendants of the source nuclide (see sub-program create graph in module path m). Significant nuclides are ones that aredescendants of the source nuclide that may be reached by a path whose weightis above the path floor threshold.

Step 2: repeatedly search the BFS tree of Step 1 to find all graph edges that lie onpaths from the source nuclide to the target nuclide, or lie on loops that intersectthese paths (see subprograms create graph and search graph subtargets inmodule path m).

Step 3: build a ‘brute force’ BFS tree using those edges that survive step 2 and extractfrom this paths and loops that have one or more nuclides on one of the paths tothe targets (see paths loops save in path m.) A branch of the tree is terminatedwhen

• a loop is found

• the weight of the path is below path floor

• the length of the path reaches max depth

Building of the tree terminates when there are no more parent nuclides in thedigraph queue.

Step 4: prune loops, retaining only those loops where the loop weights are aboveloop floor and the combination of loops and path give a single candidate path-way whose weight bound is above path floor (see loops prune in path m).

Step 5: integrate the rate equation for candidate pathways to get the actual weightof the path, storing pathways above the path floor threshold in decreasingweight order, and discarding those pathways below the threshold (see subrou-tine target inventories in path m).

2.17 Uncertainty Estimates

The pathways analysis will be used to identify the pathways from the initial inventorynuclides to the (target) dominant nuclides at the end of the irradiation phase, togetherwith the number of atoms created at target nuclide t due to the reaction and decaychain along path p to that nuclide. These, together with uncertainties in the reactioncross-sections and decay half lives associated with the edges of the pathways will beused in Fispact-II to provide estimates of the uncertainties.

Given a set of target nuclides St, then the uncertainty in some radiological quantityQ, where

Q =∑t∈St

qt (134)

Culham Electromagnetics

Page 53 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

is given by ∆Q, where

(∆Q)2 =∑t∈St

(∆Nt

Nt

)2

q2t (135)

and Nt is the number of atoms of target nuclide t formed from the initial inventory,and ∆Nt is the error in Nt.

∆Nt will be computed from the pathways inventories and the fractional squared error∆2tp in the number of atoms of target nuclide t formed along pathway p to that target.

If we let the set of pathways to target t be Sp, then we may write

Sp = (∪a∈SsaSa) ∪ So (136)

where Sp is the set of pathways leading to target t, Sa is the subset of these pathwayswhere the pathway starts from the fission of actinide source nuclide a and So is the setof other pathways. Ssa is the subset of set Ss of source nuclides that are actinides. Thereason for the split in Eq. (136) is that the pathways arising from the fission of sourceactinide a are treated as correlated, and other pathways are treated as uncorrelated.The formula used to compute ∆Nt is

(∆Nt)2 =

∑p∈So

∆2tpN

2tp +

∑a∈ssa

∑p∈Sa|∆tp|Ntp

2

(137)

where Ntp is the number of atoms of target t formed along path p to that target. ∆2tp

is given by

∆2tp =

∑e∈Se

∑r∈Sr

[Rr(∆σr/σr)

Re

]2

+∑e∈De

[∆τeτe

]2

(138)

whereSe is the set of edges on pathway p;Sr is the set of reactions on edge e;Rr is the pulse averaged reaction rate of reaction r;Re is the total pulse averaged reaction rate on edge e;∆σr/σr is the fractional uncertainty in the cross-section for reaction r;De is the set of edges on pathway p where the parent nuclide is long-lived or wherethe parent is short-lived and the daughter nuclide is the target nuclide of the path. Ashort lived nuclide is one whose half life is less than the time interval of the irradiationpulse sequences;∆τe/τe is the fractional uncertainty in the half life of the parent nuclide on the edge.

The total reaction rate for the edge is the sum of the reaction rates for the parent-daughter nuclides on the edge:

Re =∑r∈Sr

Rr (139)

Let there be J time intervals in the irradiation phase, and let the time of intervalj ∈ [1, J ] be ∆tj and the flux amplitude be φj . In addition, assume that there are I

Culham Electromagnetics

Page 54 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

different collapsed cross-sections, with cross-section i ∈ [1, i] being the value used forpulses j = Ji . . . Ji+1 (J1 = 1 and JI+1 = J), then

Rr = (I∑i=1

σir

Ji+1∑j=Ji

φj∆tj)/TJ (140)

where

TJ =J∑j=1

∆tj (141)

In the case of fission reactions, σir is replaced by σirfr, where fr is the fission yield forthe reaction product corresponding to the daughter nuclide on the edge.

2.18 Method of Solution of Rate Equations

The rate equations (5), the variants with added sensitivity equations (72) and (73), andsubsets of the rate equations used for pathway calculations are all specific examples offirst-order systems of odes with the general form

dyidt

= Fi({yj}, t) (142)

with initial conditionsyi(t = 0) = yi,0 given (143)

These initial value problems can be solved to give {yi(t)} using the ode solver packageLSODE [21].

An advantage of using a solver package such as LSODE tailored specifically to dealwith stiff systems of equations is that it is not necessary to employ an equilibriumapproximation for nuclides that have short decay times or rapid reaction rates. Thesolver will experience no difficulty in automatically adjusting the abundances of suchnuclides to be close to the equilibrium values and no user intervention is required.

The specific variant of LSODE relevant to the present Fispact development is almostalways the double-precision version with efficient handling of sparse Jacobian matrices,called DLSODES. This software is presented as a set of Fortran 77 library routineswith an interface defined by the subroutine argument list of the top-level driver routine.The present development treats DLSODES as a “black box” and no modifications toits internal details will be made.

Some of the complexity of the interface to DLSODES arises because of the limitationsin Fortran 77 concerning fixed-size arrays which must be defined at compile time.These limitations can be overcome with the dynamic memory allocation features nowavailable in Fortran 95. The present development provides a Fortran 95 wrapper forthe old Fortran 77 code with a simplified interface and automatic circumvention ofDLSODES error reports caused only by inadequately-sized workspace arrays.

Culham Electromagnetics

Page 55 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Most of the details concerning the operation of DLSODES can be encapsulated ina way that is consistent with the object-oriented approach adopted for the presentdevelopment.

However, it is necessary to provide a description of the sparsity structure of the systemmatrix A in a specific manner tailored to the requirements of DLSODES. Also, theuser program needs to provide subprograms that give DLSODES values of the drivingfunction {Fi({yj}, t)} and its Jacobian Jij = ∂Fi/∂yj . The subroutine argument listsof these user-supplied routines are defined by the internal details of DLSODES andcannot be changed.

Exceptionally, some computing platforms may offer sufficient accuracy in single pre-cision and in such cases the SLSODES variant of the solver could be used. Anotherfeature of the interface for the solver developed for Fispact-II is that it automaticallytests the precision of the floating-point model being used by the computing platformand selects SLSODES rather than DLSODES if appropriate.

The use of sequential charged particle reactions (see Section 2.6 above) is compatiblewith the description of the rate equations by Equation (1), but now the system ma-trix A has an indirect dependence on the inventory N. In Fispact-2007 this indirectdependence was treated only approximately, with the scpr cross-sections being calcu-lated only at the beginning of each time (sub-)interval rather than being recalculatedat each timestep chosen by the solver. This approximation can be avoided when DL-SODES is used. The right-hand sides of the system of equations can be calculatedin full detail as demanded by the calls from DLSODES to the user-supplied routine.However, DLSODES can work with an approximate Jacobian matrix and the new codeignores the dependence of A on N when calculating the elements of the Jacobian. Ifthis approximation were not made, there would be a substantial in-fill of the sparseJacobian matrix with unimportant terms, with a detrimental impact on code runningtimes.

DLSODES calculates error estimates for each component of the solution vector, but ituses a single error criterion to control its internal iterations and choices of timestep.By default, this error criterion is based on a weighted root-mean-square average ofthe individual component error estimates. The weighting is a combination of absoluteand relative terms, allowing the possibility of a very small or zero component in thesolution. This is appropriate to Fispact-II, since inventories of interest can involve avast range of abundances from nuclide to nuclide, commonly with contrasts exceedinga ratio of 1020.

DLSODES supplies the individual component-by-component error estimates to its call-ing program. This information is used in the new code to flag nuclides with outlyingerror estimates.

This treatment of error estimation differs from that in Fispact-2007, with some con-sequences for the input file and the interpretation of the inventory output. See Sec-tion 12.13 below for more details.

Culham Electromagnetics

Page 56 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

3 EAF Data Library Formats

A mixture of different notations and file formats is used in the various data librariesread by the code. Some use the ENDF formats [20] described in the next subsection,some use modified ENDF formats and others use individual formats as described intheir subsections below. There is scope for rationalisation of the data formats used,but UR 2.3.1 [30] precludes this in the present project.

3.1 ENDF-6 Formats

An ENDF-6 “tape” library has major subdivisions MAT for each material. Each materialMAT is in turn subdivided into “files” MF. A file contains a set of sections MT, and eachof these sections contains records MR.

The hierarchical ENDF-6 definition is as follows, where [ ...,] denotes optional mul-tiple repeats:

Tape = TPID, MAT,[ MAT,] TEND

MAT = MF,[ MF,] MEND

MF = MT,[ MT,] FEND

MT = HEAD, MR,[ MR,] SEND

There are six types of record, MR, the first two of which have special cases:

TEXT – text record, with special case:

TPID – the first record in the tape, giving the tape number

The TEXT record can be read using the following Fortran� �type(endf_text) :: textread(lib,’(a66,i4,i2,i3,i5)’) text� �

where� �type :: endf_text

character(len=66) text !text stringinteger :: mat ! material number, =ntape for TPIDinteger :: mf ! file number, =0 for TPIDinteger :: mt ! section number, =0 for TPIDinteger :: ns ! sequence number

end type endf_text� �CONT – control record, with 6 special cases

DIR – CONT with first two fields blank

Culham Electromagnetics

Page 57 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

HEAD – head of section record

SEND – end of section record. It is defined as� �send(0.0, 0.0, 0, 0, 0, 0, mat, mf, 0, 99999)� �

FEND – end of file record. It is defined as� �fend(0.0, 0.0, 0, 0, 0, 0, mat, 0, 0, 0)� �

MEND – end of material record. It is defined as� �mend(0.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0)� �

TEND – end of tape record. It is defined as� �tend(0.0, 0.0, 0, 0, 0, 0, -1, 0, 0, 0)� �

The CONT record can be read using the following Fortran� �type(endf_cont) :: contread(lib,’(2e11.0,4i11,i4,i2,i3,i5)’) cont� �where� �type :: endf_cont

real :: c1 ! application dependent: ZA for HEAD, blank for DIRreal :: c2 ! application dependent: AWR for HEAD, blank for DIRinteger :: l1 ! application dependentinteger :: l2 ! application dependentinteger :: n1 ! application dependentinteger :: n2 ! application dependentinteger :: mat ! material numberinteger :: mf ! file numberinteger :: mt ! section numberinteger :: ns ! sequence number

end type endf_cont� �LIST – series of numbers.

The LIST record can be read using the following Fortran� �type(endf_list) :: listread(lib,’(2e11.0,4i11,i4,i2,i3,i5)’) list%contallocate(list%b(list%cont%n1))read(lib,’(6e11.0)’) (list%b(n), n=1,list%cont%n1)� �where� �type :: endf_list

type(endf_cont) :: cont ! control line of listreal, allocatable, dimension(:) :: b ! list of real values

end type endf_list� �

Culham Electromagnetics

Page 58 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

TAB1 – 1D tabulated function.

These records are used to tabulated one-dimensional functions y(x). The TAB1record can be read using the following Fortran� �type(endf_tab1) :: tab1read(lib,’(2e11.0,4i11,i4,i2,i3,i5)’) tab1%cont ! control lineallocate(tab1%nbt(tab1%cont%n1), tab1%int(tab1%cont%n1))allocate(tab1%x(tab1%cont%n2), tab1%y(tab1%cont%n2))read(lib,’(6e11.0)’) (tab1%nbt(n),tab1%int(n) n=1,tab1%cont%n1) !↘→interpolation tables

read(lib,’(6e11.0)’) (tab1%x(n),tab1%y(n) n=1,tab1%cont%n2) ! ↘

→ordinates and values� �where� �type :: endf_tab1type(endf_cont) :: cont ! control line of tableinteger, allocatable, dimension(:) :: nbt ! list of integer valuesinteger, allocatable, dimension(:) :: int ! list of integer valuesreal, allocatable, dimension(:) :: x ! list of real valuesreal, allocatable, dimension(:) :: y ! list of real valuesend type endf_tab1� �

TAB2 – 2D tabulated function.

This type of record is not used in the code and is not considered here.

INTG – integer record for correlation matrix storage.

This type of record is not used in the code and is not considered here.

3.2 ARB FLUX

The ARB FLUX file contains the neutron (or other projectile) fluxes in energy groupsthat differ from the chosen cross-section library (Section 3.6). The boundaries of theenergy groups appear first in the file, followed by the flux values. Energy boundariesand flux values may be stored one per line or six per line. A new line should be startedfor the first flux value. The file is completed by a line giving the wall loading and afinal comment line identifying the spectrum used.

The ARB FLUX file can be read using the following code:� �read(arb_flux ,*) (e_in(i_en),i_en=1,no_en+1)read(arb_flux ,*) (flux(i_en),i_en=1,no_en)read(arb_flux ,’(f5.3)’) wall_loadingread(arb_flux ,’(a)’) spectrum_identifier� �

Culham Electromagnetics

Page 59 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

3.3 FLUXES

The FLUXES file contains the neutron (or other projectile) fluxes in the same energygroups as used for the chosen cross-section library (Section 3.6). Flux values may bestored one per line or six per line, followed by a line giving the wall loading and a finalcomment line identifying the spectrum used.

The FLUXES file can be read using the following code:� �read(fluxes ,*) (flux(i_en),i_en=1,no_en)read(fluxes ,’(f5.3)’) wall_loadingread(fluxes ,’(a)’) spectrum_identifier� �3.4 INDEX

The INDEX file gives the master list of nuclides used in the inventory calculations, andcontains a record for each nuclide. The nuclides are listed in increasing order of ZAInumber, where

zai = 10× (1000× Z +A) + I (144)

Fispact-II inventory calculations include only those nuclides listed in the master list,and so reduced calculations may be performed by using a pruned master index.

TENDL uses a different format for the master list from that used in the older EAFlibraries, and Fispact-II recognises both. If a ‘-’ symbol is detected in the first line,the EAF format is used, otherwise the newer format is used.

3.4.1 EAF Data

The EAF INDEX file takes the form

1 H - 1 100102 H - 2 100203 H - 3 10030...

A nuclide record may be read using the following format:� �read(index ,’(i6,1x,a2,1x,i3,a1,1x,i7)’) nuclide_number , &

& element_name , atomic_mass , isomeric_state , zai� �The isomeric states I = 0, 1, 2 correspond to the character representations isomeric state= blank, m, n.

Culham Electromagnetics

Page 60 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

I is set to 3 for the repeats of the gas nuclides included at the end of the file. Theserepeat records are not used in the present version of the code, but are permitted inthe file to preserve backwards compatibility.

3.4.2 ENDF Data

The ENDF INDEX file takes the form

H001 1 10010H002 2 10020H003 3 10030

.

.

.

and may be read using the format� �read(index ,*) nuclide_name , nuclide_number , zai� �3.5 DECAY

The DECAY libraries are sources for the atomic weights, decay modes, decay constants,decay energies, spontaneous fission neutron yields, average decay energies and γ energyspectra for decays. Decay data must be provided for all nuclides listed in the INDEXfile.

DECAY is in ENDF-6 format[20], apart from

1. the TPID record at the head has been replaced by several EAF identifier textlines without [MAT, MF, MT, NS] data;

2. the number of text lines is specified by an integer in the first line of the file;

3. in the past, DECAY has been fragmented, so for backward compatibility the datareading software needs to be able to concatenate data from several (10 for EAF-2007) disk files containing fragments of the library. The software specificationbelow has been designed to define the reading of DECAY from a single file, or froma sequence of files having numerical extension .001, .002, etc.

The contents of the concatenated DECAY file takes the form:

library = EAF header, MAT, [ MAT, ] TEND (145)

Culham Electromagnetics

Page 61 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Each MAT contains two files, a descriptive text file (MF = 1) and a decay data file(MF = 8):

MAT = (MF = 1), (MF = 8), MEND (146)

The text file always has a section MT = 451 and optionally a section MT = 452 as well.The decay file has a single section, MT = 457, although these sections have subsectionsfor spectral data from radioactive nuclides. These subsections are concatenated with-out any special dividers. The exception to this is the case where zai = 260490 (thefictitious 49Fe used in Fispact-2007), where the MF = 8 text file is missing. A specialexception has to be added to the following pseudo-code to deal with this case.

The following pseudo-code fragment describes the reading of decay data from a singleor multiple disk file containing the decay data� �call files_open(decay) ! open first decay filecall endf_eaf_header ! read eaf identifier

do !loop over nuclides (MAT) and files (MF)

do ! loop concatenates fragmented filecall endf_cont(head ,status) !read head control recordif(status==0) exitcall files_open(decay) ! start next file if eof

end do

if(head%mf==1) thencall endf_skipto_fend !skip text file

else if (head%mf==8) thencall read_decayfile(head) ! read decay data

else if(head%mat==0 .and .head%mf==0 .and. head%mt==0) thencycle !cycle for next MAT on mend

else if(head%mat==-1 .and. head%mf==0 .and. head%mt==0) thenexit !exit on tend

elsecall log_error(error_fatal) ! die on unrecognised record

end if

end do� �head is defined above in Section 3.1, and status is the value of the iostatus identifierfor a read from DECAY. files open either opens the next decay file or invokes a fatalerror if the next file is not found.

The subprogram endf eaf header skips the EAF identifier text lines and is representedby the following pseudo-code� �integer :: i ! counterinteger :: lines ! countercharacter(len=68) text ! header textread(decay ,’(i6)’) linesdo i=1,lines

read(decay ,’(a)’) textend do� �

Culham Electromagnetics

Page 62 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

The subprogram read decayfile extracts the decay data for the current MAT (i.e., thecurrent nuclide). The relevant data passed to it by the CONT record head are

head%c1 ZA = 1000× Z +Ahead%c2 atomic weight (in neutron masses)head%l2 I isomeric statehead%n1 NST =0 for radioactive, 1 for stablehead%n2 NSP = number of spectra subsections

These data identify the parent nuclide, its atomic weight and whether it is stable. Ifit is not stable, then further data records are read to furnish the decay data. Thefollowing is pseudo-code for read decayfile.� �zai=nint(10*head%c1)+head%l2nuc=get_nuclide(zai) ! point to parent nuclideif(nuc==0) call endf_skipto_mend ! skip unwanted nuclidenuc%awr=nmass_to_amu*head%c2 ! store atomic weight (in AMU)nst=head%n1 ! stable or radioactive?nsp=head%n2 ! number of spectraif(nst==0) then

call read_radioactive(nuc,nsp) ! radioactive nuclide dataelse if(nst==1) then

call endf_skipto_mend ! stable nuclideelse

call log_error(error_fatal) ! die on unknown nst valueend if� �The subprogram read radioactive reads two LIST records containing the decay data,plus nsp subsections containing spectral data. The pseudo-code is� �call endf_list(list1) !! decay datacall endf_list(list2) !! decay datado i=1,nsp

call read_spectrum(nuc) !!spectral dataend do

call endf_skipto_mend� �3.5.1 Decay data

The decay data of relevance are

list1%head%c1 half-life τ1/2 (s)

list1%head%c2 ∆τ1/2 (s)

list1%head%n1 list length (6 or 34)list1%b(1) ELP or Eβ, average decay energy for light particles (eV)list1%b(3) EEM or Eγ , average decay energy for electromagnetic radiation (eV)list1%b(5) EHP or Eα, average decay energy for heavy particles (eV)list2%head%n1 list length (6× ndk)

Culham Electromagnetics

Page 63 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

list2%head%n2 number of decay modes ndklist2%b(6*i-5) RTYP (see Table 1)list2%b(6*i-4) Id daughter nuclide isomeric statelist2%b(6*i-1) branching fraction B

RTYP and Id identify the daughter nuclide, λ = log 2/τ1/2 gives the decay constant ofthe parent nuclide, and the production rate of the daughter from the parent by decaytype RTYP is given by λpd = Bλ.

3.5.2 Spectral data

The contents of spectral subsections of MF = 8, MT = 457 differ depending on thespectrum flag lcon

lcon =

0 discrete spectrum1 continuous spectrum2 discrete and continuous spectrum

(147)

Pseudo-code for read spectrum is� �call endf_list(list) !! spectrum type and scalingstyp = list%head%c2 ! decay radiation typelcon = list%head%l1 ! spectrum typener = list%head%n2 ! number of tabulated discrete energiesfd = list%b(1) ! discrete spectrum normalisation or neutron yieldfc = list%b(5) ! continuous spectrum normalisation

!discrete spectrumif(lcon/=1) then

do ier=1,ner !loop over discrete energiescall endf_list(list)

!add gamma or x-ray line to spectrumif(styp==0.or.styp==9) then

er = list%c1 ! discrete energy of radiation (eV)rtyp= list%b(1) ! reaction typeri = list%b(3) ! relative intensity of discrete radiationcall add_line(er,rtyp ,ri,nuc%gamma_energy)

end ifend do

!continuous spectrumif(lcon/=0) then

call endf_tab1(tab1) ! continuous spectrum datartyp=tab1%cont%c1 ! decay typelcov=tab1%head%l2 ! covariance data flag (0 for none)

!spontaneous fission neutron yieldif(styp==0.and.(rtyp==6.or.rtyp==1.6)) then

nuc%n_yield=nuc%n_yield+fcend if

Culham Electromagnetics

Page 64 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

end if

if(lcov\=0) thencall endf_list(list) ! covariance data

end ifend if

call endf_skipto_send� �The add line subroutine accumulates the 22 or 24 γ-group structures for the discretespectra. Continuous spectra will be ignored, as is done by Fispact-2007.

3.6 CROSSEC

The CROSSEC library contains a header text block TXB and one or more cross-sectiondata blocks XSB.

library = TXB, XSB [, XSB] (148)

TXB comprises a number of one-line text records TR. There are two special text records:the second (identifier) text record TRI and the end text record TRE.

TXB = TR, TRI [, TR], TRE (149)

The TRI record contains the EAF library identifier in columns 7-22, and the terminatorrecord contains a row of 79 # symbols.

The following code will read TXB� �character(len=16) :: text ! text stringcharacter(len=16) :: eaf_identifier ! library identifierread(crossec ,’(6x,a16)’) textread(crossec ,’(6x,a16)’) eaf_identifierdo

read(crossec ,’(6x,a16)’) textif(text==’################’) exit

end do� �For robustness, implementation of this code fragment will use the iostat specifier inthe read and take appropriate action when an eof is encountered.

Cross-section blocks take the form

XSB = HR, TR, TR, VR [, VR] (150)

The header record HR contains 3 integer values plus a descriptive text string. It maybe read by� �read(crossec ,’(i7,2i5)’) zai, mti, no_xs� �

Culham Electromagnetics

Page 65 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

where zai is the nuclide number for the parent (c.f. Equation (144)), mti is thecombination of the ENDF MT code and the isomeric state (Id = 0, 1 or 2) of thedaughter nuclide:

mti = MT× 10 + Id (151)

The two text records contain descriptive information not used by the code, and so canbe read in the manner used above for text. The VR may be read by� �real, dimension(gp_size) :: sigmasigma = 0.0read(crossec ,’(6e12.5)’) (sigma(k), k=1,no_xs)� �where gp size is the number of energy groups used in the cross-section library (cur-rently allowed values of gp size are in the set {69, 100, 172, 175, 211, 315, 351} for nactivation, and is equal to 211 for p or d activation).

Values of sigma are stored with the value for the most energetic group first, with energydecreasing as k increases. This allows the omission of blocks of zero cross-sections forthreshold reactions, so no xs may be less than gp size. The energy group boundaryvalues are provided separately from the crossec library (see [13, App. 1] for values).

If no xs = 1, then the reaction is omitted from the inventory calculation.

3.7 PROB TAB

Probability tables that allow the calculation of self-shielding corrections to neutron-induced reaction cross-sections have been generated by CALENDF and have beenincluded in the library data for Fispact-II. Details of how these data are used aregiven in Section 2.4.3 on page 24.

The probability table data are organised differently from the EAF library data. Theyare supplied as a directory of files with the data for each nuclide in a separate file.The filenames and the data in the files have some built-in redundancy that permitsFispact-II to perform consistency checks to ensure that the code user has not madea trivial input error, such as specifying the wrong number of energy groups.

3.7.1 Probability table directory

The PROB TAB stream in the FILES file is used to specify the name of the directorycontaining the probability table files. The name may optionally be terminated with atrailing ‘/’ character. The characters immediately preceding the terminating ‘/’ or theend of the directory name are read as digits specifying the temperature of the targetmaterial as an integral number of degrees Kelvin. This temperature is extracted fromthe directory name (after the addition of a trailing ‘/’, if necessary) by the code

Culham Electromagnetics

Page 66 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

� �! extract the temperaturedo i = 1, temp_length

char = self%dir_name(dir_len -i:dir_len -i)if (isanumber(char)) &

& self%temp(temp_length+1-i:temp_length+1-i) = charend do� �

3.7.2 Probability table files

The probability table directory contains files of data for a subset of the known nu-clides. Each file name is constructed from a concatenation of the nuclide name andthe temperature, separated by ‘-’ and followed by the filename extension ‘.tpe’. Thecode tests for the presence of a file for each nuclide and if the file is found it is openedin preparation for reading the probability table data for that nuclide. This is achievedwith the code� �

! construct the name of the probability table filenuc_name = zai_to_nuclide_name(zai,pt_form=.true.)filename = trim(nuc_name)// ’-’ // trim(adjustl(self%temp)) // ’.tpe’self%parent(nuc_no)%filename = filename

if (len_trim(self%dir_name)+len_trim(filename) > && files_max_fn_length) then

call log_value("directory name",trim(self%dir_name))call log_value("file name",trim(filename))call log_error(m_name ,s_name ,1,error_fatal , &

& "Full name of probability table file too long")end iffullname = trim(self%dir_name)// trim(filename)self%parent(nuc_no)%fullname = fullname

! check for fileinquire(file=fullname ,exist=file_found)if (file_found) then

open(unit=prob_tab ,file=fullname ,status=’old’, && action=’read’,iostat=status)

if (status /= 0) thenpt_node_open = .false.call log_value("full file name",trim(fullname))call log_error(m_name ,s_name ,2,error_fatal ,&

& ’Failed to open the probability table file’)end ifself%parent(nuc_no)%zai = zai

elseself%parent(nuc_no)%zai = 0

end if

self%parent(nuc_no)%file_read = .false.� �

Culham Electromagnetics

Page 67 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

3.7.3 Probability table data

Each file contains the data for a single nuclide organised as follows:

1. a two-line file header giving:

(a) the nuclide name,

(b) its ZA index,

(c) the material temperature (to 0.1 K), and

(d) the number of energy groups for which data are specified in the remainderof the file;

2. a one-line header for each energy group giving:

(a) the number of the group,

(b) the lower energy bound of the group (in eV),

(c) the upper energy bound of the group (in eV),

(d) the order of interpolation NOR used for the group,

(e) the number of macro-partial cross-sections NPAR for the group, and

(f) their CALENDF mt numbers (see Table 6 on page 26);

3. the data for the group, comprising NOR records giving:

(a) the probability,

(b) the coefficient for the total cross-section,

(c) NPAR coefficients for the partial cross-sections.

The reading of each file is controlled by the following code� �! file headercall read_file_headercall check_file_header

! loop over energy groupsdo igrp = 1, ngroups

! read a group headercall read_group_headercall check_group_header(igrp)

! allocate arrays and other initialisationcall init_group(igrp)

! read and store group datacall read_group_data

end do� �

Culham Electromagnetics

Page 68 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

The file header is read by subroutine read file header. This has been programmeddefensively to ensure that the header conforms to the expected format. It uses thefollowing code� �

!! Read the two-line probability table file header.subroutine read_file_header!localcharacter(len=*), parameter :: s_name=’read_file_header’integer(ki4) :: iline !! loop counter

do iline=1,2read(prob_tab ,’(a)’,iostat=readerr) buffer

select case(readerr)!----------------------------------------

case(1:) !read errorcall log_value("full file name",trim(self%fullname))call log_error(m_name ,s_name ,1,error_fatal , &

& "error in reading probability table file header")!----------------------------------------

case(0) !extract dataif (iline==1) then

read(buffer (29:31),’(i3)’,iostat=readerr) pt_zif (readerr /= 0) then

call log_value("full file name",trim(self%fullname))call log_value("input line sub-string",buffer (29:31))call log_error(m_name ,s_name ,2,error_fatal , &

& "error in reading Z from file header")end if

pt_name = buffer (33:34)

read(buffer (36:38),’(i3)’,iostat=readerr) pt_aif (readerr /= 0) then

call log_value("full file name",trim(self%fullname))call log_value("input line sub-string",buffer (36:38))call log_error(m_name ,s_name ,3,error_fatal , &

& "error in reading A from file header")end if

pt_ich = buffer (39:39)

elseread(buffer (6:10),’(i5)’,iostat=readerr) pt_zaif (readerr /= 0) then

call log_value("full file name",trim(self%fullname))call log_value("input line sub-string",buffer (6:10))call log_error(m_name ,s_name ,4,error_fatal , &

& "error in reading ZA from file header")end ifread(buffer (27:32),’(f6.1)’,iostat=readerr) pt_tempif (readerr /= 0) then

call log_value("full file name",trim(self%fullname))call log_value("input line sub-string",buffer (27:32))call log_error(m_name ,s_name ,5,error_fatal , &

& "error in reading temperature from file header")

Culham Electromagnetics

Page 69 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

end ifread(buffer (34:37),’(i4)’,iostat=readerr) ngroupsif (readerr /= 0) then

call log_value("full file name",trim(self%fullname))call log_value("input line sub-string",buffer (34:37))call log_error(m_name ,s_name ,6,error_fatal , &

& "error in reading number of groups from file ↘

→header")end if

end if!----------------------------------------

case(:-1) ! eofcall log_value("full file name",trim(self%fullname))call log_error(m_name ,s_name ,7,error_fatal , &

& "unexpected eof encountered in the probability table ↘

→file")!----------------------------------------

end selectend do

end subroutine read_file_header� �The data given in the file header are then checked for consistency by subroutinecheck file header using the following code� �

!! Check the probability table file header.subroutine check_file_header!localcharacter(len=*), parameter :: s_name=’check_file_header’character(len=temp_length) :: temp

! atomic numberif (pt_z /= zai_to_z(self%zai)) then

call log_value("full file name",trim(self%fullname))call log_error(m_name ,s_name ,1,error_fatal , &

& "inconsistent Z in the probability table file header")end if

! element nameif (pt_name /= zai_to_element_name(self%zai)) then

call log_value("full file name",trim(self%fullname))call log_error(m_name ,s_name ,2,error_fatal , &

& "inconsistent element name in the probability table file ↘

→header")end if

! atomic mass numberif (pt_a /= zai_to_a(self%zai)) then

call log_value("full file name",trim(self%fullname))call log_error(m_name ,s_name ,2,error_fatal , &

& "inconsistent A in the probability table file header")end if

! isomeric stateif (zai_char_to_i(pt_ich) /= zai_to_i(self%zai)) then

Culham Electromagnetics

Page 70 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call log_value("full file name",trim(self%fullname))call log_error(m_name ,s_name ,3,error_fatal , &

& "inconsistent I in the probability table file header")end if

! ZA combinationif (pt_za /= zai_to_za(self%zai)) then

call log_value("full file name",trim(self%fullname))call log_error(m_name ,s_name ,4,error_fatal , &

& "inconsistent ZA in the probability table file header")end if

! temperaturewrite(temp ,’(i0)’) nint(pt_temp)

if (adjustl(temp) /= adjustl(dir_temp)) thencall log_value("full file name",trim(self%fullname))call log_error(m_name ,s_name ,3,error_fatal , &

& "inconsistent temperature in the probability table file ↘

→header")end if

end subroutine check_file_header� �Then each group header is read by subroutine read group header using the code� �

!! Read a group header.subroutine read_group_header!localcharacter(len=*), parameter :: s_name=’read_group_header’

! the format needs changing if there are ever more than 9 mtsread(prob_tab ,’(4x,i4,5x,e11.6,1x,e11.6,5x,i2,3x,i3,6x,i1,4x,9(i4))’↘→, &

& iostat=readerr) igroup ,emin ,emax ,norder ,mommin ,npart ,mtif (readerr /= 0) then

call log_value("full file name",trim(self%fullname))call log_error(m_name ,s_name ,1,error_fatal , &

& "error in reading group header")end if

end subroutine read_group_header� �and is checked by subroutine check group header to confirm that the energy groupbounds are as expected. This ensures that the user has specified the correct choiceof EAF library cross-sections to permit the use of the probability tables. Subroutinecheck group header also performs other checks on the group header and it uses thecode� �

!! Check a group header.subroutine check_group_header(ichk)! argumentinteger(ki4) :: ichk !! local copy of current group counter

Culham Electromagnetics

Page 71 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

! localcharacter(len=*), parameter :: s_name=’check_group_header’integer(ki4) :: i !! loop counter

! expect a contiguous block of group numbers in sequenceif (ichk == 1) then

mingrp = igroupmaxgrp = mingrp+ngroups -1

else if (igroup /= mingrp+ichk -1) thencall log_value("full file name",trim(self%fullname))call log_value("group number",igroup)call log_error(m_name ,s_name ,1,error_fatal , &

& "unexpected group number")end if

! limits of energy groupif (abs(emin -real(energy_bounds%xs(igroup+1),kr8)) > &

& 30.0* epsilon (1.0)*(emin+real(energy_bounds%xs(igroup+1),kr8)↘→) .or. &

& abs(emax -real(energy_bounds%xs(igroup),kr8)) > && 30.0* epsilon (1.0)*(emax+real(energy_bounds%xs(igroup),kr8)))↘→ then

call log_value("full file name",trim(self%fullname))call log_value("group number",igroup)call log_value("min energy in file ",emin)call log_value("min energy in table",real(energy_bounds%xs(igroup↘→+1),kr8))

call log_value("max energy in file ",emax)call log_value("max energy in table",real(energy_bounds%xs(igroup↘→),kr8))

call log_value("epsilon",real(epsilon (1.0),kr8))call log_error(m_name ,s_name ,2,error_fatal , &

& "group energy bounds in file do not match pre-defined ↘

→table")end if

! order of approximationif (norder <= 0) then

call log_value("full file name",trim(self%fullname))call log_value("group number",igroup)call log_value("order",norder)call log_error(m_name ,s_name ,3,error_fatal , &

& "invalid order")end if

! number of partialsif (npart <= 0) then

call log_value("full file name",trim(self%fullname))call log_value("group number",igroup)call log_value("no. of partials",npart)call log_error(m_name ,s_name ,4,error_fatal , &

& "invalid number of partials")else if (npart > ptable_max_no_mt) then

call log_value("full file name",trim(self%fullname))call log_value("group number",igroup)call log_value("no. of partials",npart)

Culham Electromagnetics

Page 72 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call log_error(m_name ,s_name ,5,error_fatal , && "too many partials: increase parameter ptable_max_no_mt")

end if

! mt numbersdo i = 1, npart

if (mt(i) <= 0) thencall log_value("full file name",trim(self%fullname))call log_value("group number",igroup)call log_value("partial",i)call log_value("MT for partial",mt(i))call log_error(m_name ,s_name ,6,error_fatal , &

& "invalid MT number")end if

end do

end subroutine check_group_header� �The amount of data for the group is now known and the storage for those data isallocated by subroutine init group, which also prepares for reading the group data asfollows� �

!! Allocate arrays for group data, and other initialisation.subroutine init_group(iinit)! argumentinteger(ki4) :: iinit !! local copy of current group counter

! localcharacter(len=*), parameter :: s_name=’init_group’integer(ki4) :: ipart !! loop counterinteger(ki4) :: imt !! loop counter

if (iinit == 1) then! allocate array of energy groups in +self+allocate(self%group(mingrp:maxgrp),stat=status)call log_alloc_check(m_name ,s_name ,1,status)

end if

! allocate arrays for current groupallocate(self%group(igroup)%mt(npart), &

& self%group(igroup)%prob(norder), && self%group(igroup)%sigma_tot(norder), && self%group(igroup)%sigma_eaf_mp(npart),&& self%group(igroup)%sigma_d(npart),&& self%group(igroup)%sigma_inf(npart), && self%group(igroup)%sigma_part(npart ,norder), stat=status)

call log_alloc_check(m_name ,s_name ,2,status)

! initialise accumulatorsself%group(igroup)%sigma_tot=0.0_kr8self%group(igroup)%sigma_eaf_mp =0.0_kr8

! group parametersself%group(igroup)%norder = norderself%group(igroup)%no_partials = npart

Culham Electromagnetics

Page 73 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

self%group(igroup)%mt = mt(1:npart)self%group(igroup)%min_en = energy_bounds%xs(igroup+1)self%group(igroup)%max_en = energy_bounds%xs(igroup)

! record group partials directly in +ptable_t+ structuremax_npart = max(max_npart ,npart)do ipart = 1, npart

do imt = 1, ptable_max_no_mtif (mt(ipart) == cal_mts(imt)) exitif (cal_mts(imt) == 0) then

cal_mts(imt) = mt(ipart)exit

end ifend do

end do

end subroutine init_group� �Finally, the group data are read by subroutine read group data using the code� �

!! Read group data.subroutine read_group_data! localcharacter(len=*), parameter :: s_name=’read_group_data’integer(ki4) :: i !! loop counterinteger(ki4) :: j !! loop counter

! loop over records of filedo i = 1, self%group(igroup)%norder

read(prob_tab ,’(6e13.6)’) && self%group(igroup)%prob(i), && self%group(igroup)%sigma_tot(i), && (self%group(igroup)%sigma_part(j,i),j=1, &self%group(igroup)%no_partials)

end do

end subroutine read_group_data� �3.8 CROSSUNC

The CROSSUNC cross-section uncertainty file is formatted in a manner similar to theENDF-6 MF = 33 file format [20, Chap. 33]. It differs from the ENDF-6 specificationprimarily in that

1. the HEAD record for each section is preceded by a TEXT record with the same[MAT,MF,MT];

2. there are no sequence numbers NS;

3. the MT values are modified by the daughter isomeric state index Id;

Culham Electromagnetics

Page 74 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

4. the CROSSUNC file has no FEND, MEND or TEND records;

5. the SEND records do not have the NS=99999 field.

The format of the library islibrary = MT[, MT] (152)

so the Fortran read end-of-file status indicator is needed to detect the end of thelibrary.

After the initial TEXT record, each section takes the form of a special case of the MF =33 file section, in that each section has a single subsection, and that subsection has asingle sub-subsection of type NI, i.e., the sections take the form

MT = TEXT, HEAD, CONT, LIST, SEND (153)

The TEXT record contains a description of the parent nuclide and the reaction. Thethird character of the text record identifies the parent isomeric state, Ip; this characteris respectively −, *, # for Ip = 0, 1, 2. The relevant information in the section HEADrecord is

head%c1 ZA = 1000× Z +Ahead%c2 atomic weight (units different from DECAY)head%n2 number of NI subsections (=1)

The last element is only needed for error trapping.

The CONT record is the HEAD of the subsection, and contains

head%l2 mtihead%n1 number of NC sub-subsections (=0)head%n2 number of NI sub-subsections (=1)

The last two elements are only needed for error trapping. mti is a packed combinationof the reaction code mt and the daughter isomeric state Id

mti = mt+ 300Id (154)

Note that mti is also used in the MT field in columns 73-75. The final non-blankcharacter of the description in the TEXT record is * or # for Id = 1, 2 respectively.

The sub-subsection is a LIST record containing the (energy, variance) pairs for thecross-section. Relevant elements are

list1%head%l2 LB flag, = 1 herelist1%head%n2 number of (energy, variance) pairslist1%b(2*i-1) ith energylist1%b(2*i) ith variance

Culham Electromagnetics

Page 75 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

The LB flag [20, p. 33.9] is always 1 in the CROSSUNC file and may be used for errortrapping. The energy range should span 10−5 eV to 60 MeV for the EAF-2005 andEAF-2007 libraries, with an upper limit of 20 MeV for earlier libraries.

3.9 HALFUNC

This file will not be used in the new code.

3.10 ASSCFY

The ASSCFY file associates data for nuclides with known fission products with nuclideswith unknown products to provide approximate data for the unknown products. Thefile has a one-line comment header, the number of associations on line 2, followed by alist of associated nuclides and nuclides with fission-yield data. The following code willread the data� �read(asscfy ,’(a)’) descriptionread(asscfy ,*) no_assocdo i=1,no_assoc

read(asscfy ,’(a7,1x,i4,2x,i2,2x,a7)’) assoc_nuc_name(i), && assoc_nuc_index(i),fy_nuc_number(i), fy_nuc_name(i)

end do� �assoc_nuc_name name of associated nuclide (e.g., “NP-236M”)assoc_nuc_index index of associated nuclide in INDEX filefy_nuc_number index of nuclide in FISSYLD fileassoc_nuc_name name of nuclide in FISSYLD file

3.11 FISSYLD

The fission yield library FISSYLD provides the data required for the computation ofcross-sections for actinides.

The library is in ENDF format, containing file type 1 and file type 8 sections. Thecontent of the library takes the form:

library = TPID, MAT, [ MAT, ] TEND (155)

where the material data takes the form:

MAT = (MF = 1), (MF = 8), MEND (156)

The MF=1 file has a single section:

MF1 = (MT = 451), FEND (157)

Culham Electromagnetics

Page 76 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

and the MF=8 file has two sections, one for independent yield data (454) and one forcumulative yield data (459):

MF8 = (MT = 454), (MT = 459), FEND (158)

The HEAD and next CONT record of the MT=451 section of file MF=1 contain informationidentifying the parent nuclide and the ENDF version:

head%c1 ZA = 1000× Z +Ahead%c2 atomic weight (in neutron masses)cont%l2 I isomeric statecont%n2 ENDF format NFOR

The remainder of the MF=1 file can be skipped.

The MF=8 file contains two sections, both with the same structure; a HEAD controlrecord that gives the number of LIST records in the section, the LIST records, and aSEND record. The relevant data in the HEAD record are:

head%c1 ZA = 1000× Z +Ahead%c2 atomic weighthead%l1 le+ 1

le+1 is the number of lists in the section. If le = 0, there is no energy dependence, andthere is only one yield value for each fission product. If le > 0, yield values are givenat le+ 1 energies. The maximum le in the EAF data is 2, with yields for thermal, fastand high-energy projectile energy bins. The relevant data in each of the LIST recordsare:

list%head%c1 incident neutron energy (eV)list%head%n1 list length (= 4× nfp)list%head%n2 number of fission products (nfp)list%b(4*i_fp-3) ZA of fission productlist%b(4*i_fp-2) state of fission productlist%b(4*i_fp-1) fission yieldlist%b(4*i_fp) yield uncertainty

The following pseudo-code reads the fission yield data� �call files_open(fissyld) ! open fission yield filecall endf_tpid ! read endf TPID record

do !loop over nuclides (MAT) and files (MF)

call endf_cont(head) !read head control record

if(head%mf==1.and.head%mt==451) then! text recordcall endf_cont(cont)

Culham Electromagnetics

Page 77 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

zai=10*nint(head%c1) + cont%n1 ! zai of parentnfor=cont%n2 ! endf formatcall endf_skipto_fend ! skip rest of text file

else if (head%mf==8) then! fission yield datacall read_fissyld(head) ! read yield (mt=454 or 459)

else if(head%mat==-1.and.head%mf==0.and.head%mt==0) thenexit !exit on tend

elsecall log_error(error_fatal) ! die on unrecognised record

end if

end do� �Pseudo-code for read fissyld is� �if(head%mt==454) then! independent fission yields

lf=head%l1 ! number of listsdo ilist=1,lf

call endf_list(list) ! read fission yields for one energye1 = list%head%c1 ! projectile energynfp = list%head%n2 ! number of fission productsdo i_fp=1,nfp

zap(i_fp)=list%b(4*i_fp -3) ! ZA of fission productis(i_fp) =list%b(4*i_fp -2) ! state of fission productyi(i_fp) =list%b(4*i_fp -1) ! fission yielddyi(i_fp)=list%b(4*i_fp) ! yield uncertainty

end docall endf_skip_to_send ! (should be next record)

else if(head%mt==459) then! cumulative fission yields are skipped

call endf_skip_to_mendelse

call log_error(error_fatal) ! die on unrecognised recordend if� �3.12 STOP *

Early versions of the EAF libraries had data for 24 energy groups and the first 92elements only, but EAF-2005 and EAF-2007 have data for 60 charged-particle energygroups and the first 96 elements. Each table has a header from which za can beextracted.

The following code will extract the ∆Rx,Zi(Exk) tables needed for the scpr calculation:� �do i_el=1,no_el

read(stop_x ,’(i7)’) zairead(stop_x ,’(6e12.5)’) (stop_range(j_en ,i_el), j_en=1,no_en)

end do� �

Culham Electromagnetics

Page 78 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

3.13 XN *

The cross-section libraries used for scpr have a different format from the libraries(Section 3.6) for the primary (n, d, t) projectile-induced reactions.

There are no text header records. The libraries take the form

library = XSB[, XSB] (159)

Each cross-section block XSB comprises a header record HR, a single text record TR andrecords containing the cross-section values:

XSB = HR, TR, VR[, VR] (160)

HR contains 3 integer values plus a descriptive text string. It may be read by� �read(xn,’(i8,1x,i1,1x,i2)’) zai, iso_c , react_code� �where zai is the parent value (Equation (144)),

react code =

{11 for (x, n) (MT = 4)12 for (x, 2n) (MT = 16)

(161)

and iso c ∈ {0, 1, 2} for isomeric states of the daughter nuclide, or is set to 9 if thereare no isomers.

TR gives the source of the data. If there are no cross-section data for the particularreaction, then columns 21-27 contain the text string no data. TR may be read by� �read(xn,’(20x,a7)’) text� �The VR records containing values of sigma may be read by� �read(xn,’(6e12.5)’) (sigma(k), k=1,no_xs)� �Unlike the CROSSEC data, no xs is the same for all cross-sections, and is suppliedseparately from the data files. For EAF versions < 6, no xs = 24, otherwise no xs =60.

NOTE: Values of sigma in the XN * data libraries are stored in the opposite order fromthat used in CROSSEC; the lowest-energy sigma is stored first and the energy increaseswith increasing k.

3.14 SPEC *

This set of five files contains tables of fAn,x(Eni , Exj ), the normalised energy spectra

(in energy groups Exj ) for outgoing charged particles x for incoming neutron energygroup Eni ; these are needed in Eq.(56)

Culham Electromagnetics

Page 79 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

The data are arranged in blocks for each nuclide A in ZA order:

library = nuc [, nuc] (162)

Each nuclide block has a one-line header head containing the nuclide ZAI value andtext information, followed by sections for each incoming neutron energy eni

A = head, eni[, eni] (163)

Each neutron energy group eni has a one-line text header nehead followed by subsec-tions for each charged particle x ∈ {p, d, t, h, α}

eni = nehead, x[, x] (164)

The charged particle subsections have a header xhead containing the nuclide ZAI,reaction code (= 10 × MT) and the neutron energy Eni in MeV followed by a table offAn,x(Eni , Exj ) for increasing outgoing charged particle energies Exj .

The charged-particle energies are in uniform groups of width 1 MeV to an upper limit of60 MeV for EAF-2005 and EAF-2007, but an upper limit of 20 MeV for earlier versionsof the EAF libraries.

The neutron energy groups are not uniform. For EAF-2005 and EAF-2007 39 groupsare used. These are mapped from the 211-group or 175-group tables used for theneutron cross-sections. For earlier versions of the EAF libraries, 20 neutron energygroups are used for the charged-particle spectra and these are mapped only from the175-group neutron cross-section table. In all cases, the neutron energy groups are inorder of decreasing energy, for consistency with the neutron cross-section tables.

3.15 ABSORP

The ABSORP library contains tables of mass energy attenuation coefficients for elementsin increasing Z order, followed by a table of attenuation coefficients (AIRMU) and atable of energy absorption coefficients for air (AIRMUEN), and finally by a mean energygrid (MeV) in 24 groups in the range 5 keV–17 MeV for the data. Each table has aone-line text header from which the element name and atomic number, or the namesin parentheses above can be extracted.

The following code will read an element table:� �do i_el=1,no_el

read(absorp ,’(1x,a2,i4)’) element_name , atomic numberread(absorp ,’(6e9.2)’) (atten_coeff(j_en ,i_el),j_en=1,no_en)

end do� �and similar code headed by a read with ’(a)’ format reads the AIRMU, AIRMUEN andMeV tables. The code will use data with no el = 100 and no en = 24.

Culham Electromagnetics

Page 80 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

3.16 A2DATA

The A2DATA transport data file has a one-line text comment as a header, and then onerecord for each nuclide containing nuclide identification, a transport value (= −1 forstable nuclides) and a comment on the data. The relevant numbers are the nuclideindex i nuc, the ZAI number and the transport value a2data. A nuclide transportrecord may be read using the following format:� �read(a2data ,’(i6,9x,i7,e10.0)’) i_nuc , zai, a2value� �3.17 CLEAR

The CLEAR file has the same format as the A2DATA file. It has a one-line text commentas a header, and then one record for each nuclide containing nuclide identification, aclearance value (= −1 for stable nuclides) in Bq kg−1 and a comment on the origin ofthe data. The relevant numbers are the nuclide index i nuc, the ZAI number and theclearance value clearance. A nuclide clearance record may be read using the followingformat:� �read(clear ,’(i6,9x,i7,e10.0)’) i_nuc , zai, clearance� �3.18 HAZARDS

The HAZARDS file has a two-line comment header, the second record of which startswith the number of nuclides listed in the remainder of the file, then a record for eachunstable nuclide containing nuclide identification, hazard values for (1) ingestion and(2) inhalation (in Sv Bq−1)and a comment on the origin of the data. Unlike theCLEAR file, there is no nuclide index. Relevant data are the ZAI number and the twohazard values, hazard1 and hazard2. A nuclide hazards record may be read using thefollowing format:� �read(hazard ,’(7x,i7,3x,e8.1,8x,e8.1)’) zai, hazard1 , hazard2� �4 ENDF Data Library Formats

Additional data input formats have been added in Version 2 of Fispact-II for cross-sections, decay and fission yields. Data for each nuclide are stored in separate files,where each file follows the ENDF format [20]. These formats have been introduced forcross-section data, decay data and fission yield data. Fispact-II uses the mappings inthe FILES file to map the directories rather than the files for these cases (c.f., Section 5.1on page 97).

Culham Electromagnetics

Page 81 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

In all cases, the cross-section data, decay data and fission yield data files take the form

Tape = TPID, MAT,TEND

MAT = MF,[ MF,] MEND

MF = MT,[ MT,] FEND

MT = HEAD, MR,[ MR,] SEND

The material MAT is the one corresponding to the file name. The file MF, section MTand record MR and terminator (TEND, MEND, FEND and SEND) formats follow those givenin Reference [20], and the definitions of the contents of the format fields follow thosein Reference [20] except where differences are explicitly described in the followingsubsection.

Fispact-II will issue fatal error messages if these file structures are not followed.

4.1 xs endf

The xs endf directory contains a set of files, each one containing the group cross-sectionand cross-section covariance data for a single parent nuclide. The naming conventionfor the file containing the data for a particular nuclide is

Eennnig.asc

whereEe is the one or two character element name,nnn is the atomic number with or without leading zeroes,i is absent for a nuclide in the ground state,i is in set {m,n,o,p,q,r,s,t,u} for an isomeric state,g.asc is a suffix indicating group data in ascii format.

Thus, for example, H001g.asc, H1g.asc, Fe52g.asc and Fe052mg.asc would be validfile names. Fispact-II will issue fatal error messages if file names do not adhere tothese conventions, or if the names do not correspond to the material ZAI in the datafile.

The MF file types to be read in the cross-section data input are listed in Table 10. Allother MF file types are to be silently skipped.

An MF = 1 and an MF = 3 file type must be present in each material tape file. MF = 10may or may not be present. For neutron irradiation, the MF = 2 file may or may notbe present. Also for neutron irradiation, the MF = 33 and MF = 40 files respectivelygive covariance data corresponding to the MF = 3 and MF = 10 data. The MF = 40 filerequires that the corresponding MF = 10 data be present.

Culham Electromagnetics

Page 82 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 10: MF files read from ENDF tape files in directory xs endf by Fispact-II.

MF Description

1 General information2 Resonance parameters3 Cross-sections

10 Radionuclide cross-sections33 Covariances of cross-sections40 Covariances of radionuclide cross-sections

In cases where MF = 33 covariance data are available for the sum for daughters of agiven parent and MT, but MF = 40 covariance data for the individual MF = 10 reactionsare not present, then the fractional covariance data in MF = 33 for total MF = 3 reactionsare used for the individual reactions listed in the MF = 10 file.

MF = 3 entries giving the sum of MF = 10 reactions for a given MT are discarded (e.g.,sums of reactions from a parent to different isomeric states of a daughter and sums ofMT = 5 reactions).

File MF = 1 It is assumed that the MF are in increasing order. The first MF must be1, and it must contain the first section MT = 451 whose first three records are

[MAT, 1,451/ ZA, AWR, LRP, LFI, NLIB, NMOD] HEAD[MAT, 1,451/ ELIS, STA, LIS, LISO, 0, NFOR] CONT[MAT, 1,451/ AWI, EMAX, LREL, 0, NSUB, NVER] CONT

Fispact-II reads these and

• AWR, ZA, LISO and EMAX. ZA and LISO are used to construct ZAI;

• ZAI is checked for consistency with the file name Eennnig.asc;

• EMAX is checked for consistency with the upper energy of the energy group struc-ture and causes a fatal error message to be issued if EMAX is too large by morethan a small tolerance;

• AWR is checked against values for other MF values.

• The remainder of the MF=1 records are skipped until the next FEND record isencountered.

Exceptionally, the ZA may contain an A of zero, indicating data for an element withnatural isotopic abundances rather than an individual isotope. In such cases, Fispact-II issues a warning and substitutes the ZA from its ind nuc file, which was used toconstruct the ENDF library disc file name which Fispact-II is currently reading.

Culham Electromagnetics

Page 83 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

File MF = 2 The flag LRP in the MF = 1 file is used to indicate the presence andcontent of the MF = 2 file. The values of LRP recognised by Fispact-II and theresponses of the code are shown in Table 11.

Table 11: Values of LRP recognised by Fispact-II and the responses of the code.

LRP ENDF Description[20, pp. 51–52] Fispact Response

−1 No File 2 should be present Issue warning and skip to FEND0 File 2 does not contain resonance pa-

rametersSkip to FEND

1 Resonance parameters given (to beadded to File 3 cross-sections)

Read resolved resonance param-eters (but do not modify File 3cross-sections)

2 Resonance parameters given (not formodifying File 3 cross-sections)

Read resolved resonance parame-ters (do not modify File 3 cross-sections)

When the MF = 2 file defines resonance parameters it should contain a single sectionwith MT = 151 containing subsections for each energy range of each isotope in thematerial. The first two records of the section are

[MAT, 2,151/ ZA, AWR, 0, 0, NIS, 0] HEAD[MAT, 2,151/ ZAI, ABN, 0, LFW, NER, 0] CONT

Fispact-II reads these and

• checks that ZA and AWR are consistent with those read from File 1;

• checks that NIS = 1 and ABN = 1.0, to be consistent with a pure material con-taining a single isotope;

• stores LFW, the fission width flag and NER, the number of energy range subsections.

Fispact-II then enters a loop to read the energy-range subsections, which are eachintroduced by the record

[MAT, 2,151/ EL, EH, LRU, LRF, NRO, NAPS] CONT

where

• EL is the lower limit of the energy range;

• EH is the upper limit of the energy range;

• LRU is the flag indicating the type of resonance parameters, Fispact-II readsonly resolved resonance parameters (LRU = 1);

Culham Electromagnetics

Page 84 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

• LRF is the flag indicating the format of the representation, Fispact-II reads onlySingle- and Multi-level Breit-Wigner (LRF = 1 and 2 respectively), Reich-Moore(LRF = 3) and a subset of R-matrix Limited (LRF = 7);

• NRO is the flag indicating a possible energy-dependent scattering radius, Fispact-II reads an additional TAB1 record of energy-radius pairs if NRO = 1;

• NAPS is the flag controlling the use of the channel radius and the scattering radius,the interpretation of which depends on NRO, see [20, page 56] for details.

The remainder of an energy range subsection depends on the representation used forthe resonance parameters. For the single- and multi-level Breit-Wigner representationthe records are

[MAT, 2,151/ 0.0, 0.0, 0, 0, NR, NP/ Eint /AP(E)] TAB1[MAT, 2,151/ SPI, AP, 0, 0, NLS, 0] CONT[MAT, 2,151/ AWRI, QX, L, LRX, 6*NRS, NRS/

ER1, AJ1, GT1, GN1, GG1, GF1,ER2, AJ2, GT2, GN2, GG2, GF2,... ... ... ... ... ...ERNRS, AJNRS, GTNRS, GNNRS, GGNRS, GFNRS] LIST

while for the Reich-Moore representation the records are

[MAT, 2,151/ 0.0, 0.0, 0, 0, NR, NP/ Eint /AP(E)] TAB1[MAT, 2,151/ SPI, AP, LAD, 0, NLS, NLSC] CONT[MAT, 2,151/ AWRI, APL, L, 0, 6*NRS, NRS/

ER1, AJ1, GN1, GG1, GFA1, GFB1,ER2, AJ2, GN2, GG2, GFA2, GFB2,... ... ... ... ... ...ERNRS, AJNRS, GNNRS, GGNRS, GFANRS, GFBNRS] LIST

In each case the TAB1 record is present only if NRO = 1 and the LIST record is repeateduntil the NRS resonances for each of the NLS angular momentum values L have beengiven. The parameters characterising the resonance i are

• ERi, the energy of the resonance;

• |AJi|, its total angular momentum;

• GTi, the total width of the resonance;

• GNi, the neutron scattering width;

• GGi, the radiative capture width;

Culham Electromagnetics

Page 85 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

• GFi, the total fission width;

• GFAi, the first partial fission width;

• GFBi, the second partial fission width.

The other parameters are defined in [20, pp. 58–60], where more information is given.

The format for a R-matrix Limited (LRF = 7) subsection follows a different scheme.The sub-section begins with

[MAT, 2,151/ 0.0, 0.0, IFG, KRM, NJS, KRL] CONT

where the integers are

• IFG, a flag to indicate whether GAM is the channel width in eV (IFG = 0) or thereduced-width amplitude in eV1/2 (IFG = 1);

• KRM, a flag to indicate which formulae for the R-matrix are to be used;

• NJS, the number of spin groups;

• KRL, a flag to indicate non-relativistic (KRL = 0) or relativistic (KRL = 1) kine-matics.

This record is followed by a LIST record which gives details of all particle-pair descrip-tions:

[MAT, 2,151/ 0.0, 0.0, NPP, 0, 12*NPP, 2*NPP/MA1, MB1, ZA1, ZB1, IA1, IB1,Q1, PNT1, SHF1, MT1, PA1, PB1,MA2, MB2, ZA2, ZB2, IA2, IB2,Q2, PNT2, SHF2, MT2, PA2, PB2,... ... ... ... ... ...MANPP , MBNPP , ZANPP , ZBNPP , IANPP , IBNPP ,QNPP , PNTNPP ,SHFNPP ,MTNPP , PANPP , PBNPP ] LIST

The quantities used by Fispact-II for particle pair i are:

• MAi, the first particle mass (in neutron masses);

• ZAi, the ZA combination for the first particle mass;

• MTi, the MT for the reaction;

Culham Electromagnetics

Page 86 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Each particle pair constitutes a channel for the scattering interaction. The formatdoes not distinguish between input and output channels, which must be identified bythe user by examining the particle masses and the MT value. Fispact-II identifies theelastic scattering and (n,γ) channels.

The particle-pair LIST is followed by a pair of records for each of the NJS spin groups,as follows:

[MAT, 2,151/ AJ, PJ, KBK, KPS, 6*NCH, NCH/PPI1, L1, SCH1, BND1, APE1, APT1,PPI2, L2, SCH2, BND2, APE2, APT2,... ... ... ... ... ...PPINCH,LNCH, SCHNCH,BNDNCH,APENCH,APTNCH] LIST

and

[MAT, 2,151/ 0.0, 0.0, 0, NRS, 6*NX, NX/ER1, GAM1,1, GAM2,1, GAM3,1, GAM4,1, GAM5,1,GAM6,1, ... ... ... ... GAMNCH,1,ER2, GAM1,2, GAM2,2, GAM3,2, GAM4,2, GAM5,2,GAM6,2, ... ... ... ... GAMNCH,2,... ... ... ... ... ...ERNRS, GAM1,NRS,GAM2,NRS,GAM3,NRS,GAM4,NRS,GAM5,NRS,GAM6,NRS,... ... ... ... GAMNCH,NRS] LIST

In the second record of the pair the channels are identified by their indices PPI whichrefer to the channels’ positions in the earlier LIST of particle pairs.

If the flags KBK or KPS are non-zero, the format allows optional additional records tobe included. Fispact-II does not permit these optional extensions of the R-matrixLimited format and if non-zero flags are encountered, Fispact-II issues a warning andabandons the reading of File 2 data.

For each spin group Fispact-II stores the spin AJ and the number of channels NCH; itis not assumed that all channels listed previously occur for every spin group. Then foreach resonance i in the spin group Fispact-II stores the energy ERi and the channelwidths GAMj,i, for j = 1, . . . , NCH.

Fispact-II uses local storage to hold the R-matrix limited data in a hierarchicalstructure that matches the File 2 format just described. The R-matrix Limited dataare then re-ordered and stored in the same data structures used for the other choices ofLRF recognised by Fispact-II, so that common code can be used in the self-shieldingformulation, whatever the choice of format to specify the resonances.

Culham Electromagnetics

Page 87 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 12: The zai d and MT values for reaction cross-sections that are not includedin the rate equations.

zai d MF Reaction Type

-1 18 fission-2 5 other-3 – not known-4 3 nonelastic-5 1 total

-20 201-207 gas-30 301-443 kerma-40 444-447 dpa

File MF = 3 The MF = 3 file of an ENDF data tape contains MT sections for thedifferent reaction cross-sections of the parent nuclide. The structure of a section is

[MAT, 3, MT/ ZA, AWR, 0, 0, 0, 0] HEAD[MAT, 3, MT/ QM, QI, 0, LR, NR, NP/ Eint/σ(E)] TAB1[MAT, 3, MT/ 0.0, 0.0 0, 0, 0, 0] SEND

On encountering MF = 3, Fispact-II will issue a fatal error message if MF = 1 has notalready been read, otherwise it will read sections of the MF = 3 file and

• check that the ZA and AWR values match those of the MF = 1 file;

• read the energy boundary/cross-section table Eint/σ(E);

• issue a fatal error message if the energy boundary values read do not match thosespecified for the current run;

• discard the cross-sections if the MT value is on the ignored MT list (see Table 5 onpage 25);

• issue a fatal error if the MT is not known to the program (c.f., Tables 3-5);

• store the cross-section values for wanted MT values;

• compute the ZAI values, zai d for the reaction daughters.

For reactions with a well defined daughter, the value of zai d is computed from theZAI of the parent and the known ∆Z and ∆A of the reaction (c.f., Table 3). Reactionsthat are not to be included in the filling of the rate equation are given negative valuesof zai d as specified in Table 12.

The cross-sections are read by looping over the MF = 3 sections, extracting and storingthe cross-sections in an internal reaction linked list in preparation for collapse later.Checks are to be performed on the consistency of the allowed MF and MT, and of the

Culham Electromagnetics

Page 88 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

values of ZA and AWR with those read earlier. The loop is exited on the detection ofa FEND record. Note that loop over MF values will have read the first head record.Pseudocode for the extraction is� �! loop over sections of file 3f3sec:do

! check za and awr valuescall check_za_awr! read reaction cross-sectionscall endf_read_tab1(xs_endf)! store values in xs buffercall copy_xs_to_buffer! compute zai_dcall daughter_zai_3! save data with known and wanted mt valuesif(.not.reaction_type_mt_ignored(xs_new%mti)) then

! fail if mt value not known to fispact.if(reaction_type_mt_not_known(xs_new%mti)) then

call log_error(m_name ,s_name ,1,error_warning , && "unknown mt in file 3 data")

else! add cross-section to queuecall add_xs_to_queue(xs_new)

end ifend if! read sendcall read_send! read next record and check for fend or headif(endf_head_is_fend(xs_endf)) exit

end do f3sec� �The check za awr subprogram does the data integrity check that the ZA and AWR valuein the HEAD recod of the current section matches the values read in the MF = 1 file.

The endf read tab1 subprogram reads the cross-section data. It is assumed thatthe TAB1 record contain values of energies and cross-sections in increasing energyorder for all or part of the energy range tabulated for the group structure used.copy xs to buffer copies the data into an internal code buffer in decreasing energy or-der checking that the energies match the standard group values to within the maximumfractional error specified in the code.

Subprogram daughter zai 3 computes zai d, the ZAI value of the daughter nuclide,or sets it to a negative value for reactions that require special treatment in the rateequation solver. Table 12 lists the special cases. The negative zai d values are usedin the sorting of reactions into increasing zai d to ensure that dpa, kerma, gas pro-duction, etc. reactions appear at the start of the array of reactions for a given parent.Subprogram add xs to queue adds the cross-section data to a queue of data for thepresent parent nuclide, which for ENDF compliant data should be in increasing MTorder.

Subprogram reaction type mt ignored returns true for those MT values to be ignored

Culham Electromagnetics

Page 89 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 13: MF = 10 file reaction daughters (zai d) to be ignored in Fispact-II.

zai d Reaction daughter

0 gamma10 neutron

zai p incident projectile (elastic)

by Fispact-II. Table 5 lists these MT values. Subprogram reaction type mt not knownreturns true if the MT value is not listed in Table 3, 4 or 5.

File MF = 10 The MF = 10 cross-section data differs from the MF = 3 data in thatthere are multiple daughters (for isomeric states and for MT = 5 cases). To handle thisthe sections are divided into subsections. The sections are

[MAT,10, MT/ ZA, AWR, 0, 0, 0, 0] HEAD< NS subsections one for each value of LFS >[MAT,10, MT/ 0.0, 0.0 0, 0, 0, 0] SEND

with subsections

[MAT,10, MT/ QM, QI, IZAP, LFS, NR, NP] Eint/σ(E)] TAB1

On encountering MF = 10, Fispact-II will issue a fatal error message if MF = 1 hasnot already been read, otherwise it will read sections of the MF = 3 file and

• check that the ZA and AWR values match those of the MF = 1 file;

• read the NS subsections:

– read the energy boundary/cross-section table Eint/σ(E);

– issue a fatal error message if the energy boundary values read do not matchthose specified for the current run;

– discard the cross-section for daughters listed in Table 13;

– discard the cross-sections if the MT value is on the ignored MT list (see Table 5on page 25);

– issue a fatal error if the MT is not known to the program (c.f., Tables 3-5);

– store the cross-section values for wanted MT values;

– compute the ZAI values, zai d for the reaction daughters.

The value of ZA for a daughter nuclide is computed from the ZA of the parent and theknown ∆Z and ∆A of the reaction (c.f., Table 3). The isomeric state of the daughteris computed differently depending on which ENDF library is used:

Culham Electromagnetics

Page 90 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

1. For the legacy EAF2010 library that has been converted into ENDF format, theLFS value in the subsection gives the isomeric state.

2. In the TENDL libraries, the LFS value gives the excited state level, which is ingeneral greater than the isomeric state number and may take values up to 98 [20].Fispact-II uses the fact that in this library, daughter nuclides with the sameZA values are tabulated in increasing isomeric state, starting with the groundstate, then isomeric states m, n, o, p, q, r, s, t, u.

A fatal error is issued if there are more than 9 isomeric states. Reactions that are notto be included in the filling of the rate equation are given negative values of zai d asspecified in Table 12.

A more robust approach to determining the isomeric state that is planned for futureversions of the code is to cross-check the LFS value with the LIS value in the decaydata tapes and use the corresponding LISO value from the decay data to determine theisomeric state of the daughter.

For reactions with a well defined daughter, the value of zai d is computed from the ZAof the parent and the known ∆Z and ∆A of the reaction (c.f., Table 3). In Release-2-00 of Fispact-II, daughter nuclides with the same ZA values are assumed to betabulated in increasing isomeric state, starting with the ground state, then isomericstates m, n, o, p, q, r, s, t, u. More extensive checking of the identification of isomericstates will be included in a future release to increase the robustness of the code toany inconsistencies between the compilers of the cross-section and decay libraries. Afatal error is issued if there are more than 9 isomeric states. Reactions that are notto be included in the filling of the rate equation are given negative values of zai d asspecified in Table 12.

Pseudocode for the extraction is� �! loop over sections of file 10f10sec:do

! check za and awr valuescall check_za_awrlis=endf_cont%l1ns=endf_cont%n1f10subsec:do iss=1,ns

! read reaction cross-sectionscall endf_read_tab1(xs_endf)! store values in xs buffercall copy_xs_to_buffer! compute zai_dcall daughter_zai_10! add cross-section to queue, but exclude! neutron data(zai_d=10), gamma (za=0) and elastic (zai_d=zai_p)if(.not.excluded_zai_d(xs_new%zai_d)) call add_xs_to_queue(xs_new)

end do f10subsec! read sendcall read_send

Culham Electromagnetics

Page 91 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

! read next record and check for fend or headif(endf_head_is_fend(xs_endf)) exit

end do f10sec� �File MF = 33 The structure of a MF = 33 section is

[MAT,33, MT/ ZA, AWR, 0, MTL, 0, NL] HEAD< NL subsections >[MAT,33, MT/ 0.0, 0.0 0, 0, 0, 0] SEND

Each subsection describes a covariance matrix

[MAT,33, MT/ XMF1, XLFS1,MAT1, MT1, NC, NI] CONT< NC sub-subsections >< NI sub-subsections >

Fispact-II loops over these sections until it encounters FEND and

• checks that the ZA and AWR values match those of the MF = 1 file;

• reads the NL subsections, and in each one:

– skips over all NC sub-subsections;

– reads the NI sub-subsections and

∗ discards the data if MT 6= MT1;

∗ discards the data if MT is to be ignored;

∗ discards the data if MT is not known;

∗ discards the data if the collapsed cross-section is below the thresholdcross-section (10−12 barns);

∗ issues a fatal error message if the cross-section data has not been readfor this reaction;

∗ collapses the covariance data to give a cross-section uncertainty onlyfor cases LB = 1 or LB = 5 and LS = 1.

The NI-type sub-subsection for the LB = 1 case has the structure:

[MAT,33, MT/ 0.0, 0.0, LT, LB=1, NT, NP] {Ek, Fk} LIST

The list contains (Ek energy in eV, Fk factional uncertainty) pairs in increasing en-ergy order, and the final Fk value must be zero. Fispact-II processes these data asdescribed for the LB = 1 EAF data case in Section 2.2 of this document.

The LB = 5, LS = 1 the sub-subsection takes the form:

Culham Electromagnetics

Page 92 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

[MAT,33, MT/ 0.0, 0.0, LS, LB=5, NT, NE] {Ek}{Fk,k′} LIST

Ek are the energy bin boundaries in eV. The matrix elements Fk,k′ are the fractionalcovariances and are stored in upper triangular matrix form:

{Fk,k} ≡ F1,1, F1,2, . . . , F1,NE−1;F2,2, . . . , F2,NE−1;FNE−1,NE−1 (165)

These data are processed as described for the LB = 5 case in Section 2.2.

It is assumed that the LB = 5 data and the LB = 8 data are produced from the samesource data for the TENDL libraries, and so the latter data are ignored.

It is assumed that LB = 1 and LB = 5 data do not appear together in a given datalibrary.

File MF = 40 The MF = 40 file differs from the MF = 33 in that there is an extralevel of subsections. The structure of a MF = 40 section is

[MAT,40, MT/ ZA, AWR, LIS, 0, NS, 0] HEAD< NS subsections, one for each LFS >[MAT,40, MT/ 0.0, 0.0 0, 0, 0, 0] SEND

The subsections correspond to the MF = 33 sections

[MAT,40, MT/ QM, QI, 0, LFS, 0, NL] CONT< NL subsections >

Each sub-subsection describes a covariance matrix

[MAT,40, MT/ XMF1, XLFS1,MAT1, MT1, NC, NI] CONT< NC sub-sub-subsections >< NI sub-sub-subsections >

Fispact-II loops over the sections until it encounters FEND and

• checks that the ZA and AWR values match those of the MF = 1 file;

• reads the NS subsections, and in each one:

– reads the NL sub-subsections, and in each one:

∗ skips over all NC sub-sub-subsections;

∗ reads the NI sub-sub-subsections and

· discards the data if MT 6= MT1;

· discards the data if MT is to be ignored;

· discards the data if MT is not known;

Culham Electromagnetics

Page 93 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

· discards the data if the collapsed cross-section is below the thresholdcross-section (10−12 barns);

· issue a fatal error message if the cross-section data has not beenread for this reaction;

· collapses the covariance data to give a cross-section uncertainty onlyfor cases LB = 1 or LB = 5 and LS = 1.

The LB = 1 and LB = 5 data are treated in the same manner as described above forthe MF = 33 file data.

4.2 dk endf

The dk endf directory contains a set of files, each one containing the decay data fora single parent nuclide. The naming convention for the file containing the data for aparticular nuclide is

Eennni

whereEe is the one or two character element name,nnn is the atomic number with or without leading zeroes,i is absent for a nuclide in the ground state,i is in set {m,n,o,p,q,r,s,t,u} for an isomeric state,Thus, for example, H001 and Fe52m would be valid file names. Fispact-II will issuefatal error messages if file names do not adhere to these conventions, or if the namesdo not correspond to the material ZAI in the data file.

Each file is an ENDF data tape for a single nuclide:

TPID, MAT, TEND

There are two files per MAT:

MAT = (MF = 1), (MF = 8), MEND

The MF = 1 file contains sections:

(MT = 451),[MT,] FEND

and the MF = 8 file contains

(MT = 457), FEND

Fispact-II processes the dk endf data by

• looping through nuclides in the INDEX file

Culham Electromagnetics

Page 94 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

• if the decay file is found, then it

– opens the file

– reads and stores the decay data

• otherwise it issues an error message

The reading of the decay data for a given nuclide is almost the same as for EAF data(c.f., Section 3.5.1), although there is no need for the special treatment of a fictitious49Fe nuclide in Fispact-II.

Steps in reading decay file are

• read TPID

• read HEAD and die if not MF = 1, MT = 451

• read CONT, construct ZAI and die if it does not match filename

• skip to FEND

• read HEAD and die if not MF = 8, MT = 457

• check ZAI and die if it does not match MF = 1 value

• read decay data as specified in reference[20, Sec. 8.4]

• read FEND

• read MEND

• read TEND

4.3 fy endf

The fy endf directory contains a set of files, each one containing induced fission yielddata for a single parent nuclide. The naming convention for the file containing thedata for a particular nuclide is

Eennni or Eennni-p FY.tendl

whereEe is the one or two character element name,nnn is the atomic number with or without leading zeroes,i is absent for a nuclide in the ground state,i is in set {m,n,o,p,q,r,s,t,u} for an isomeric state,Fispact-II will issue fatal error messages if file names do not adhere to these conven-tions, or if the names do not correspond to the material ZAI in the data file.

Each file is an ENDF data tape for a single nuclide:

Culham Electromagnetics

Page 95 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

TPID, MAT, TEND

There are two files per MAT:

MAT = (MF = 1), (MF = 8), MEND

The MF = 1 file contains sections:

(MT = 451),[MT,] FEND

and the MF = 8 file contains

(MT = 454), FEND

The processing of the MT = 454 data for the new format data files differs primarily inthat there may be many more energy groups than are encountered in the EAF data(c.f., Section 3.11) and that fission associations are not used.

Steps in reading induced fission yield file are

• read TPID

• read HEAD and die if not MF = 1, MT = 451

• read CONT, construct ZAI and die if it does not match filename

• skip to FEND

• read HEAD

• die if not MF = 8, MT = 454

• save number of yield values (LE + 1)

• check ZAI and die if it does not match MF = 1 value

• loop over yield values

– read array of yield data

– store daughter ZAI, yield and yield uncertainty

• skip to SEND

• skip MT = 459 data

• read FEND

• read MEND

• read TEND

From Version 3.00 of the code, a user option has been added to read the cumulativeyields (MT=459) instead of the immediate yield (MT=451 yield data.

Culham Electromagnetics

Page 96 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

4.4 sf endf

The sf endf directory contains a set of files, each one containing spontaneous fissionyield data for a single parent nuclide. These data are stored in the fission t objectin the same manner as the induced fission yield data.

5 Input and Output Files

5.1 FILES

add xs endf, etc description

The FILES file differs from that used in Fispact-2007 in that

1. stream names (e.g., crossec) as well as, or instead of, stream numbers may beused to associate the I/O streams in the code with disk files (to avoid ambiguity,we use the name collapxi for input and collapxo for the output use of COLLAPX– see Section 12.4 for a complete list of the available stream names);

2. the DECAY data can be in a single file, or in a sequence of files if the given filename has suffix .001;

3. the SPEC * files can be specified as before, or only the first one of a sequence offiles, or only a single file can be specified as per DECAY;

4. the TABx output streams may be associated with other disk file names;

5. the stream number (6) used in earlier versions of the code has been changed to38 to avoid problems with different Fortran compilers treating stdout and stderrdifferently;

6. the HALFUNC and SUMMARYX files are no longer used.

One mapping of a stream number or name to a file name may be given per line of theFILES file. Blank lines are ignored. Comment lines may be included by starting themwith a #.

To allow for changing projectile spectra, multiple instances of FLUXES, COLLAPXI andCOLLAPXO files may be included in FILES. These will be used in the sequence specifiedby data in the INPUT file.

Any mappings of stream numbers or names to files that are not used in a particularrun are silently ignored without disrupting the reading of the remainder of the FILESfile.

Culham Electromagnetics

Page 97 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

5.2 INPUT

The INPUT file defines the sequence of events that take place in the execution of anumerical experiment, and the file’s contents must be ordered to reflect this sequence.The following summarises the ordering assumed in the code:

Library processing This stage assembles the physical properties of the materials:decay, radiation and cross-section data. The reduced cross-sections are notstrictly physical properties, as they are generated using the irradiation spec-trum. They will change if the spectrum changes, and so must be allowed to beredefined later in the calculations.

Property modification If the numerical experiment requires variation of propertiesfrom those given by the standard libraries, then this must be done after thestandard library processing.

Initialisation Initial conditions are required before activation calculations can beundertaken, and include

1. physical initial conditions (target definition);

2. numerical and housekeeping parameters;

3. output selections;

4. additional input selections.

Many of these have default settings, and some will require resetting in the courseof a numerical experiment.

Run steps The remainder of the INPUT file contains sets of keywords that define thesequence of irradiation and cooling steps, and the diagnostic measurements andoutputs associated with these steps.

Comments can be placed anywhere in the INPUT file except within a string introducedby ‘*’ and terminated by a newline character. Comments are introduced by ‘¡¡’ andterminated by ’¿¿’, and may span several lines of the INPUT file. Comments may notbe nested.

5.2.1 Library processing

This falls naturally into two parts:

1. processing of cross-section library data (GETXS);

2. processing of decay data libraries (GETDECAY).

Culham Electromagnetics

Page 98 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 14: The nuclear library data processing options.

case cross-sections decay keywordslibrary processed library processed GETXS GETDECAY

1 T F T F 1 12 F T T F 0 13 T F F T 1 04 F T F T 0 0

The code saves the processed data for re-use in subsequent numerical experiments, andthe four possible cases are summarised in Table 14. The keywords defined in Table 14show a simple scheme where the GETDECAY 1 keyword invokes the processing ofthe decay data libraries to give a summary file, and the GETXS 1 keyword invokesthe processing of the cross-section libraries to produce a condensed cross-section file.The old counterparts read the processed data from the ARRAYX and COLLAPX files re-spectively. For compatibility with Fispact-2007, the four cases are invoked by thefollowing keywords in the order given:

case 1 (GETXS 1 n2coll and GETDECAY 1)� �COLLAPSE n2collENFA

* titleTAPA (or LINA)� �case 2 (GETXS 0 and GETDECAY 1)� �ENFA

* titleTAPA (or LINA)� �case 3 (GETXS 1 n2coll and GETDECAY 0)� �COLLAPSE n2collENFA

* titleARRAY� �or� �AINPUTCOLLAPSE n2coll� �case 4 (GETXS 0 and GETDECAY 0)� �AINPUT� �

Culham Electromagnetics

Page 99 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

NOTE: The definition of the files COLLAPX and ARRAYX are different from those used inFispact-2007 in order to enable this simplified scheme to work.

The following keywords modify the procedures invoked when the GETXS 1 selectoris true:

GRPCONVERTNOERRORNOFISSSEQUENTIALSEQNUMBERPROJECTILE

and the following modify the procedures used when the GETDECAY 1 selector istrue:

LIBVERSIONSPEK

These keywords, if needed, should be included before the COLLAPSE or ENFAaction keywords to which they apply However, this is not essential as we have imple-mented multiple passes of INPUT to check for the presence of these modifiers before theinitialisation is undertaken.

The regulatory data require that the keywords

ATWOCLEARHAZARDS

be read before the regulatory data initialisation.

5.2.2 Property modification

The following keywords modify the basis of the calculation by changing physical prop-erties:

FISYIELDOVER

5.2.3 Initialisation

The initialisation of the target inventory is specified using the keywords

DENSITY

Culham Electromagnetics

Page 100 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

FUELIRONMASS

and initial settings of the output depend on keywords

MONITORPRINTLIB

The keywords

ERRORSENSITIVITYNOFISSUSEFISSION

affect the initialisation of the inventory rate equations.

The old keywords for setting numerical parameters for the inventory and pathwaysintegration of the rate equations

CONVLEVEL

are replaced by the new keywords

TOLERANCEUSEFISSION

These respectively set the tolerances for the stiff ode solver and whether to includeactinides in the self-consistent evolution of the inventory.

5.2.4 Run steps

The remaining keywords are used to invoke actions or modify parameters for thoseactions in the run step (see Section 7).

A full list of the keywords and their status in the Release-2-00-02 code is given inSection 12.8, which maintains a master index of the keywords and their properties.

The keywords and their arguments are extracted from the input file as a stream oftokens under control of the token m module, see Section 12.14. The processing of thetoken stream and the actions arising from the keywords is managed by the rundata mmodule, see Section 12.13.

Keywords can be placed in a loop construct to simplify the processing of pulsed irradi-ation steps. In Fispact-II the loops can be nested to an arbitrarily deep level, limited

Culham Electromagnetics

Page 101 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

only by processor resources.

5.3 OUTPUT

The existing Fispact-2007 output formats will be reproduced to the greatest extentpossible with Fortran 95, with the one exception that error logging, monitoring andtiming information will be sent to a separate LOG file.

5.4 GRAPH

The existing Fispact-2007 output formats will be reproduced to the greatest extentpossible with Fortran 95. In addition, a new GRAPH option has been implemented toproduce output in the form of a gnuplot data file and an associated gnuplot commandfile for converting the data file into a postscript file.

5.5 COLLAPX

This file differs from the one in Fispact-2007 in that it now includes condensed cross-section data used in the production of rate factors (Equation (58) on page 34) for scprcalculations and is written in binary form. The criterion used for the division of datais that the COLLAPX file contains nuclide data that are collapsed using projectile fluxes,and the ARRAYX file contains nuclide data that are independent of the projectile fluxes.

5.6 SUMMARYX

This file serves no useful purpose in the new code, and so is dropped.

5.7 ARRAYX

The contents of this file differ from those for Fispact-2007 in that it contains decayand fission library derived data only, with the cross-section library derived data beingheld in COLLAPX. Fission yield data are stored as functions of energy and are collapsedseparately from the collapse process used for cross-section data.

5.8 TABx

These can still be given the default names as in FIPSPACT, but now can be associatedwith other file names by including them in a consistent fashion in the FILES file.

Culham Electromagnetics

Page 102 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

5.9 LOG

This is a new file added to the code to collect data from the error logging and cputimings modules.

5.10 xs endfb

The TENDL nuclear data libraries are large they contain many gigabytes of data. Ifa sequence of Fispact-II runs uses the same incident particle spectrum, then the timefor a single collapse run may be spread over many runs by using a preliminary collapserun. However, if the sequence of runs uses different flux spectra in each run, thenthe computational time for the collapses becomes significant, particularly if data areaccessed across a network. To speed up calculations in these cases, three capabilitieshave been added to Fispact-II. The first, described in this section, is to preprocessthe ENDF libraries and store only those data by Fispact-II in a single compressedbinary file. The second is to store the cross-sections versus energy in Fispact-II andthen perform a number of collapses without re-reading the ENDF data. The thirdapproach to speedup is to use a reduced master index to exclude nuclides that do notcontribute significantly to the activations being studied.

Data on the xs endf stream are read by the module endfmat m (c.f., Section 12.3 onpage 213) and relevant quantities are stored in the endfmat t object for the nuclide.Data on the xs endfb stream are generated by using the endfmat store subroutineto write data for all nuclides in the INDEX to a single file. This file is then read usingthe endfmat retrieve subprogram to populate the endfmat t self object rather thanusing endfmat read to read the data from the ASCII ENDF data files on the xs endfstream.

5.11 enbins

Prior to Version 3.1 of Fispact-II the energy bounds for energy groups were providedby internal tables in the energy bounds m module (see Section 9.4), and the appropriatetable was selected for both EAF and ENDF data libraries by specifying the number ofenergy groups on the GETXS input file keyword.

From Version 3.1, the energy bounds may be specified using separate data files.

The format of these files is

line 1: descriptor character string

line2: integer number n of energy bins

Culham Electromagnetics

Page 103 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

remaining lines: list of n+1 energy bin boundaries in decreasing energy order wherevalues are space or comma separated, and values are in eV.

To use energy bin files rather than the inbuilt energy tables, use� �GETXS 1 1� �in the input file. The second argument 1 indicates that energy bin boundaries arespecifed by a file linked to the enbins stream by a directive in the files file. Forexample� �enbins ../../ ENDFdata/TENDL2014data/ebins_162� �New energy bin selections can be introduced into the code by supplying an enbins fileand the corresponding cross-section and fission yield files.

6 Specific Requirements

The detailed design documentation in the code shall explicitly give the units assumedfor physical quantities.

Listed below are requirements on the nature of the code that were included in theURD [31] and are reproduced here for completeness. Note that some of the require-ments have been revised for the Fispact-II code.

1. Fispact-II (‘the code’) shall encompass the functionality of Fispact-2007, butmay give slightly different results because of improved approximations used inthe calculation.

2. The detailed design documentation of the code shall be included in the programsource.

3. The Software Quality System, comprising the code, its documentation, build filesand test data shall all be stored in a CVS repository as described in [5, 29].

4. Release versions of the code shall have a CVS tag to define the Version number ofthe form FISPACT-MM-mm-bb, where MM is the major release number, mm isthe minor release number and bb is the bug fix number, e.g. FISPACT-2-00-00.

5. The execution time for the code shall be comparable to that attained by Fispact-2007 for the same computer and input data.

6. The code shall be developed and tested in the manner and on the timescaleproposed in [12].

Culham Electromagnetics

Page 104 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

7. The code shall read the European Activation File (EAF-2007 [48, 49, 50] andEAF-2010 [51, 52, 53]) data sets for cross-section, decay, fission, and radiologicalquantities.

8. The code shall read the new ENDF-format data:

(a) the TENDL 162-group data for cross-sections and fission yields for alpha,deuteron, gamma and proton irradiation;

(b) the TENDL 709-group data for cross-sections and fission yields for neutronirradiation;

(c) the CALENDF-format probability table data that are consistent with the709-group TENDL, TENDL and TENDL neutron data;

(d) the ENDFB.VII-I cross-section, fission yield and decay data;

(e) the JEFF3.2 cross-section data;

(f) the JENDL-4 cross-section, fission yield nd decay data;

(g) the decay-2012 library of mixed JEFF3.1.1 and ENDF/B-VI decay data;

(h) the jeff311 library of JEFF3.1.1 decay data;

(i) the endfb71 library of ENDF/B-VII decay data.

9. The code shall be written using a defensive programming style to make it easyto maintain, adapt and extend. A summary of the style to be used is given inReference [24].

10. The code shall be written in Fortran 95 [22, 23] with extensions to handlecommand-line arguments.

11. The code shall be, as far as is possible, written in an operating system andcompiler independent form.

12. The code shall use dynamical memory allocation for all its major arrays.

13. The code shall use the stiff-ODE solver DLSODES or SLSODES from netlib [54]to compute the evolution of nuclide populations.

14. The code is to be used in ‘batch’ mode, with input from and output to fileswithout user interaction during execution.

15. The code may be run with 0, 1 or 2 arguments:

No arguments The code searches in turn for the files files, Files and FILESin the present working directory (pwd) and uses the first one it finds tospecify all the I/O files used for the run. If none of the required files isfound then the run terminates with a fatal error.

One argument The code uses the argument as a file root for the I/O files notspecified in the files file files, Files or FILES, and uses the files file for theremaining file specifications.

Culham Electromagnetics

Page 105 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Two arguments The first argument is the file root name, and the second argu-ment is the name of the files file, both of which should be in the pwd unlessa full pathname is given for the FILES file.

16. The code shall run on Unix, Linux, Windows XP, Windows Vista and Windows7.

6.1 Verification and Validation

Testing of the code will be carried out to ensure conformance with specified require-ments in the URD. The testing activities include:

Unit tests These are carried out as required throughout the coding phase of eachmodule, and their scheduling is the responsibility of the software developer. Rou-tine debugging activities are not recorded, but significant tests will be recordedas tests in the repository, or if more appropriate, as paper records in the projectfile.

Integration tests These are recorded as tests in the repository, or alternatively aspaper records in the project file.

System tests These are recorded as for integration tests, but with any actions arisingbeing reported in the monthly progress statements.

Installation tests These are a subset of system tests used to demonstrate the correctinstallation of the software on the customer’s computer(s).

Acceptance tests The software will be accepted by the customer if this set of runs,as specified in the URD, is successfully performed by the customer with theassistance of Culham Electromagnetics, if required.

The installation tests are that:

1. the code will compile correctly on Windows, Mac-OS AND Linux machines usingthe Intel Fortran and gcc Fortran compilers;

2. the code will satisfactorily reproduce the regression test runs provided in thefispQA2007, fispQA2010 and fispQA test directories.

Note that Culham Electromagnetics will provide complete customer transparency bydelivering the Software Quality System containing the code, build files, test data anddocumentation in a CVS archive.

Culham Electromagnetics

Page 106 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

7 System Design

The calculation undertaken by the code follows the sequence of actions defined in theINPUT file. The main steps are:

1. initialise

2. input library data

3. set initial conditions

4. follow and diagnose inventory evolution in the timestep loop

5. close down

The design approach adopted is to treat modules as objects, with their associated de-rived data types as the data objects and the public procedures as methods for manip-ulating the objects [24]. The defaults of implicit none and private in each moduleare used to aid encapsulation and data-hiding.

The top-level control module rundata m is the event manager that reads the INPUT file.It stores settings in the rundata data object, and returns an action selection switchnext action to select actions to be taken by procedures in other modules. It uses thetoken m module to perform syntax checking on the INPUT file.

The preliminary actions that must precede any inventory, sensitivity, uncertainty orpathways calculation are:

1. input element data from EAF libraries;

2. input cross-section data either by collapsing data from the EAF or TENDLlibraries or by reading previously collapsed data;

3. input decay data either by condensing data from the EAF or TENDL librariesor by reading previously condensed data;

4. input regulatory data needed for post-processing inventory output;

5. specify the initial inventory of the target material.

The main runstep loop then resets values and performs the sequence of actions speci-fied by the action keywords in the INPUT file. The following pseudo-code expands thisin terms of the public procedures of the principal object modules. Further explanationof the pseudocode is given below, and descriptions of the modules are given below inSections 8-12 and in the detailed design document [55].

Culham Electromagnetics

Page 107 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

The coding conventions used throughout the code help the understanding of the fol-lowing code example. All module names have a suffix m, and the principal data typeassociated with the module has the same name as the module but with a suffix t.The self object of the module is of this type. So, for example, the module responsiblefor the nuclide data is nuclide m and its self object has type nuclide t. All publicsubroutines and functions that operate on nuclide t objects belong to the modulenuclide t and have their names beginning with nuclide . An additional conventionis that the constructor subroutine has suffix init and the destructor has suffix delete.The calls to nuclide init and nuclide delete with argument nuclide, where nuclideis of type nuclide t in the above code listing are instances of this.

The same rules apply for other modules; date time init and date time delete withargument timestamp, endf init and endf delete, and so forth.

7.1 Principal Modules

This subsection outlines the principal modules of Fispact-II. More details of the publicobjects and methods of these modules is given in Sections 8–11, and more details onthe private data and subprograms are presented in the Detailed Design Document [55].

Figure 7 shows the relationship of the objects used in managing the physical data inthe program. The nuclide object describes all the material, with a nuclide node t ob-ject for each nuclide. Each of these objects is a parent nuclide attached to whichare the decay, reaction,resonance and fission objects that describe the transmuta-tion of the parent (c.f., Figures 1 and 3). The subprograms in the top-level mod-ule nuclide m use subprograms in reaction m, decay m, and fission m respectivelyto provide values of collapsed cross-sections, decay constants, and fission yields. TheENDF cross-section and uncertainty data libraries are read by endfmat m and arestored in the endfmat t object. If probability table data are to be used to provideself-shielding factor adjustments to cross-sections, then nuclide m also uses ptable m.The universal sigmoid curve approximation of self-shielding uses resonance m. Themodule reaction m uses flux m to provide projectile spectra. Modules element m,reaction type m, decay type m and zai m provide reference data and tools needed toprocess the EAF or TENDL library data. The manner in which nuclide m processesthe data depends on control values provided by the rundata m module. The token mand keyword m modules are used by rundata m to check the syntax of the INPUT fileand provide it with a valid input token stream. Note that the nuclide node object inthe diagram is not a separate entity, but is contained in the nuclide m module.

Table 15 shows the library and input files processed by the modules shown in Figure 7.The prototype for the main program of the code, described in Section 7.2 below,shows how the subprograms from the modules are used to load the library data intothe program.

Figure 8 shows the relationship between the objects used in assembling and solving

Culham Electromagnetics

Page 108 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

decay_m

+ decay_t :

+ decay_mode_t :

+ decay_init()

+ decay_read()

+ decay_close()

+ decay_copy()

+ decay_store()

+ decay_retrieve()

+ decay_delete()

+ decay_stable_nuc()

+ decay_is_gamma_spectrum()

+ decay_approx_gamma_spectrum()

+ decay_gamma_spectrum()

+ decay_half_life()

+ decay_lambda()

+ decay_half_unc()

+ decay_en_beta()

+ decay_en_gamma()

+ decay_en_alpha()

+ decay_sf_n_yield()

+ decay_modes()

+ decay_mode_irt()

+ decay_mode_zai()

+ decay_mode_br_frac()

+ decay_mode()

fission_m

+ f ission_t :

+ part_fy_t :

+ yield_t :

+ f ission_init()

+ f ission_read()

+ f ission_close()

+ f ission_collapse_init()

+ f ission_collapse()

+ f ission_collapse_delete()

+ f ission_read_assoc_head()

+ f ission_store()

+ f ission_retrieve()

+ f ission_delete()

+ f ission_yield_zai()

+ f ission_yield_nuc_no()

+ f ission_read_assoc()

+ f ission_yield_pcnt()

+ f ission_yield_no()

+ f ission_yield_frac()

reaction_m

+ reaction_t :

+ reaction_init()

+ reaction_read()

+ reaction_close()

+ reaction_collapse()

+ reaction_copy()

+ reaction_store()

+ reaction_retrieve()

+ reaction_delete()

+ reaction_mt()

+ reaction_is_f ission()

+ reaction_nuc_no_d()

+ reaction_zai_d()

+ reaction_sigma()

+ reaction_sigma_unc()

nuclide_m

+ nuclide_t :

+ nuclide_init()

+ nuclide_react()

+ nuclide_decay()

+ nuclide_f issyld()

+ nuclide_fy_print()

+ nuclide_regulatory()

+ nuclide_set_inventory()

+ nuclide_get_inventory()

+ nuclide_delete()

+ nuclide_nonzero_inventory()

+ nuclide_index()

+ nuclide_no_f issyld_sets()

+ nuclide_f issyl_nuc_no()

regulatory_m

+ regulatory_t :

+ regulatory_init()

+ regulatory_init_hazard()

+ regulatory_close()

+ regulatory_copy()

+ regulatory_delete()

+ regulatory_read()

+ regulatory_read_hazard()

flux_m

+ f lux_t :

+ f lux_init()

+ f lux_fractions()

+ f lux_from_w all_loading()

+ f lux_store()

+ f lux_retrieve()

+ f lux_delete()

element_m

- element_t :

+ element_init()

+ element_read_doses()

+ element_delete()

+ element_name()

+ element_z()

+ element_std_atw t()

+ element_std_density()

+ element_no_isotopes()

+ element_isotope_abundance()

+ element_isotope_a()

+ element_isotope_zai()

+ element_gamma_absorption()

rundata_m

+ rundata_t :

+ rundata_init()

+ rundata_read()

+ rundata_delete()

zai_m

+ zai_t :

+ ...()

reaction_type_m

- rd_t :

+ ...()

decay_type_m

- dd_t :

+ ...()

nuclide_node

- nuclide_node_t :

+ nuclide_is_initial()

keyword_m

+ keyw ord_t :

+ keyw ord_init()

+ keyw ord_delete()

ptable_m

- ptable_t :

+ ptable_int()

+ ptable_use()

+ ptabel_ssf()

+ ptabel_get_ssf()

+ ptabel_max_size()

+ ptabel_mix_nucno()

+ ptabel_apply_size()

+ ptable_apply_nucno()

+ ptable_sigma_tot()

+ ptable_eaf_partial()

+ ptable_delete()

resonance_m

+ resonance_t :

token_m

+ token_t :

+ token_init()

+ token_delete()

endfmat_m

+ endfmat_t :

1

0..1

1

0..N_n

1

1

1

1

1

0..N_r1

1..N_a

Diagram: class diagram Page 1

Figure 7: A class diagram showing the principal objects used in storing the nu-clear data. All material data are stored in the nuclide t object. This contains onenuclide node t object for each nuclide (1 . . . N n), plus the 0-indexed ‘sink’ nuclide.Each nuclide has a decay t object describing its decay, a reaction t object for eachof its possible (0 . . . N r) reactions, a resonance t object for its resolved resonanceparameters (if any are available) and if it is an actinide, a fission t object (c.f., Fig-ures 1 and 3). For more details of the objects see the descriptions in Sections 9–12.

Culham Electromagnetics

Page 109 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

the rate equations to obtain the evolution of the inventory. The top level object israteeq m. The subprogram rateeq init allocates and fills the rate equation matrixusing the physical data that have been collected in the nuclide object and is ac-cessed using subprograms from the nuclide m, decay m, reaction m and fission mmodules and the lists of decay and reaction types catalogued in the decay type t andreaction type t objects. INPUT options that affect the operation of rateeq m are fedin via the rundata t object.

Submatrices for candidate paths identified by the pathways m module subprogramsare extracted from the full inventory rateeq t objects using rateeq path init. Thevalues of the rate equation matrices’ elements are changed to account for changingflux amplitudes using rateeq set rates and for changing collapsed cross-sections us-ing rateeq new induced xs. These changed values may be transferred to a pathwaysrateeq t object using rateeq path matrix update. rateeq delete deallocates a rateequation object.

The set of stiff odes assembled by rateeq m is solved using odesolve m. The odesolve mmodule provides an object-style Fortran 95 wrapper for the Fortran 77 stiff ode solverpackage LSODE [21].

fission_m

rateeq_m+ rateeq_t : + rateeq_init()+ rateeq_set_rates()+ rateeq_step()+ rateeq_new_induced_xs()+ rateeq_path_init()+ rateeq_path_matrix_update()+ rateeq_delete()

reaction_type_m

zai_m

rundata_m

decay_type_m

odesolve_m+ odesolve_t : + odesolve_init()+ odesolve_step()+ odesolve_delete()

decay_m

LSODES

inventory_m

reaction_m

nuclide_m

Diagram: rate equation class diagram Page 1Figure 8: A class diagram showing the principal objects used in assembling andsolving the rate equations.

Dominant nuclides, as measured by some radiological quantity, can be identified fromthe solution of the rate equations. The pathways m module analyses the rate equationmatrices to identify the sequence of reactions and decays that form the significantpaths and loops in transmuting the initial inventory into the dominant nuclides (see

Culham Electromagnetics

Page 110 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

pathstep_m

fischoose_m path_m

digraph_m odesolve_m

rateeq_m

pathways_m+ pathways_t : + pathways_init()+ pathways_output()+ pathways_routes()+ pathways_path()+ pathways_delete()

Diagram: class diagram Page 1Figure 9: A class diagram showing the principal objects used in identifying, computinginventories and outputting pathways.

Culham Electromagnetics

Page 111 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

fp_II_m

+ fp_II_banner()+ fp_II_version()+ fp_II_text()

reaction_m

fission_m

element_m

nuclide_m

dominant_m

output_m

+ output_init()+ output_dominant_init()+ output_printlib()+ output_collapx()+ output_inventory()+ output_pathways_init()+ output_pathways()+ output_summary()+ output_partition()+ output_graphs()+ output_over()+ output_close()+ output_delete()

decay_m

regulatory_m

gamma_dose_m+ gamma_dose : + gamma_dose_init()+ gamma_dose()+ gamma_dose_bremss_correction()+ gamma_dose_total()+ gamma_dose_total_approx()+ gamma_dose_delete()

energy_bounds_m

decay_type_m

reaction_type_m

flux_m

rundata_m

zai_m

inventory_m

printlib_m

+ printlib_write()+ printlib_convert_time_units()

Diagram: output Page 1Figure 10: A class diagram showing the principal objects used in output.

zai_m

files_menergy_bounds_m

token_m

rundata_m+ rundata_t : + rundata_init()+ rundata_read()+ rundata_monitor()+ rundata_no_inventory()+ rundata_delete()

element_m

flux_m

keyword_m

Diagram: rundata Page 1Figure 11: A class diagram showing the principal objects used in controlling thesequence of actions in a run of Fispact-II.

Culham Electromagnetics

Page 112 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 15: Modules and the library files they process.

Modules Library files

nuclide m INDEX, COLLAPX, ARRAYXreaction m CROSSEC, CROSSUNCendfmat m XS ENDF, XS ENDFBptable m PROB TABflux m FLUXES, ARB FLUXdecay m DECAY, DK ENDFfission m FISSYLD, ASSCFY, FY ENDFregulatory m A2DATA, CLEAR, HAZARDSelement m ABSORPscpr m XN *, STOP *, SPEC *rundata m INPUT

Section 2.16). Figure 9 shows the relationship between the modules involved in thiscalculation.

The pathstep m module stores the time history of pulse flux amplitudes, time intervalsand changes in cross-sections and in rate equation elements that are needed to computepathway inventories at the end of the irradiation phase. It then uses rateeq m toconstruct submatrices and integrate the inventory along the pathways requested bypathways m.

The principal module for pathways calculations is pathways m. This uses path m tocompute all significant paths and loops from a given source nuclide to a set of targetnuclides. path m in turn uses digraph m to store the breadth-first search trees used todescribe the directed graphs, and pathstep m to compute inventories along pathways.

The fischoose m module is used to prune fission paths from the list of significantpathways as specified by the FISCHOOSE keyword.

pathways m uses pathstep m directly to compute inventories along paths specified bythe PATH keyword in the INPUT file.

The computation and output formatting of data derived from the inventory is con-trolled by the output m module. Output data objects are private to the module. Fig-ure 10 shows the relationship of output m with other modules. The enquiry functionsbelonging to the seven modules at the left of the diagram (element m – regulatory m)give access to element, nuclear and regulatory data and to the current inventory. Thefour modules at the top right provide data on the energy bins, decay and reactiontypes, projectile type and flux spectrum. rundata m selects the output choices andzai m provides the mapping between nuclide numbers, ZAI number and nuclide names.

output m uses four subsidiary modules. fp ii m provides banners and header texts,gamma dose m computes the various gamma dose outputs for the current inventory,

Culham Electromagnetics

Page 113 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

dominant m provides tables of dominant nuclides and printlib m provides tabular sum-maries of the nuclear data obtained from the EAF or TENDL libraries and the FLUXESdata.

The rundata m module uses the seven modules around it in the class diagram shownin Figure 11 in reading, checking and converting the data read from the INPUT file.

7.2 The Main Program

The way in which the modules outlined in the previous section are used by the mainprogram fispact is presented in this section by illustrating and describing sections ofcode of the main program.

7.2.1 Declarations

The use statements (not listed) at the head of the program will invoke data modulesthat provide information on precision, physical and mathematical constants, and giveaccess to the public data and procedures from the modules used by the main program.This is followed by the declaration of variables:� �program fispact

!! use statements

! Local variablescharacter(len=*), parameter :: m_name=’fispact’ !! module namecharacter(len=*), parameter :: s_name=’main’ !! subprogram name

integer(ki4), parameter :: no_of_clocks=20_ki4 !! number of clocks

type(date_time_t) :: timestamp !! timestamp of runtype(rundata_t) :: rundata !! run control datatype(nuclide_t) :: nuclide !! nuclide properties datatype(inventory_t) :: inventory !! nuclide inventory datatype(rateeq_t) :: rateeq_irrad !! rate equation data for irradiationtype(rateeq_t) :: rateeq_cool !! rate equation data for coolingtype(dominant_t):: dominant !! dominant nuclide datatype(pathstep_t):: pathstep !! history of irradiation/cooling ↘

→stepstype(pathways_t):: pathways_irrad !! pathways data for irradiationtype(pathways_t):: pathways_route !! pathways data for ROUTES ↘

→calculationtype(pathways_t):: pathways_path !! pathways data for PATH calculationtype(sensitivity_t):: sensitivity !! sensitivity analysis datatype(flux_t) :: flux !! flux data

character(len=132) :: fileroot !! root of input/output filenamescharacter(len=132) :: init_runlog !! name of initial run log filecharacter(len=132) :: name_of_files !! name of the FILES file to be used

Culham Electromagnetics

Page 114 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

integer(ki4) :: next_action !! next action in irradiation sequencelogical, parameter :: store_crossec_terms=.true. !! store crossec terms ↘

→in rateeq matrixreal(kr8) :: new_flux_amp� �

The three parameters are settings for error logging and cpu timings. The next twelveitems are objects used in the code. The date time t objects are used to add a uniquetime and date stamp to the output from a run of the code. The rundata and nuclideobjects respectively contain the data that describe the control of the run and thephysical data. The inventory object contains the initial number and current numberof each nuclide known to the run. Two rateeq t objects are defined, one for irradiationsteps and one for cooling steps. The reason for this is to exploit the extra sparsity ofthe rate equation matrices when only decay terms are nonzero. The pathstep t andpathways t objects are used to describe pathways, the sensitivity t object is usedfor the Monte-Carlo sensitivity analysis and the flux object describes the spectrum ofthe irradiating flux.

7.2.2 The Prologue

The following extract of the listing shows the structure of the prologue phase, i.e., theinitialisation phase.� �

!=====================================================================! THE PROLOGUE!---------------------------------------------------------------------! 1.0 infrastructure initialisation

! 1.1 set timestampcall date_time_init(timestamp)

! 1.2 read command line argumentscall read_args

! 1.3 initialise error and information logcall log_init(init_runlog ,fileroot ,timestamp ,error_warning)call log_value(’FILES file’,trim(name_of_files))call log_value(’fileroot ’,trim(fileroot))

! 1.4 initialise cpu timerscall clock_init(no_of_clocks)call clock_start(1,’fispact run time’)

!---------------------------------------------------------------------!! 2.0 Input file initialisation

! 2.1 initialise files and store queues of filenamescall files_init(trim(fileroot),trim(name_of_files))

! 2.2 write summary of files queues to logcall files_log_queue

Culham Electromagnetics

Page 115 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

! 2.3 reset log output stream to file if necessarycall reset_log_name

! 2.4 initialise endf file readercall endf_init

!---------------------------------------------------------------------!! 3.0 Element and nuclide object initialisation

! 3.1 initialise element datacall element_init

! 3.2 initialise nuclide typecall nuclide_init(nuclide)

!---------------------------------------------------------------------!! 4.0 run data object and output initialisation

! 4.1 initialise run data from INPUT filecall rundata_init(rundata ,nuclide%zai_lib)

! 4.2 initialise timers for action loopcall clock_start(2,’rateeq_init_flux’)call clock_stop(2)call clock_start(3,’rateeq_irrad_step’)call clock_stop(3)call clock_start(4,’rateeq_cool_step’)call clock_stop(4)call clock_start(5,’output_inventory_step’)call clock_stop(5)call clock_start(6,’pathways_step’)call clock_stop(6)call clock_start(7,’sensitivity_step’)call clock_stop(7)� �

Part 1 of the prologue initialises the infrastructure objects date time (c.f., Section 8.2),log (c.f., Section 8.3) and clock (c.f., Section 8.1). All data for single object moduleslog m and clock m are private and so these do not have self arguments associated withthem. Subprogram read args reads the command line arguments to get the filerootfor the run and the name of the FILES file (name of files).

Part 2 initialises the reading of the input files. The files init subprogram uses thefileroot to generate linked filenames for the run and load names of the library files inthe name of files file into an internal queue. If the second command line argumentgiving the FILES file name is missing, then the program will first look for a file named‘files’ in the present working directory. If that is not present it looks for ‘Files’and then ‘FILES’. If none of these is present it issues a fatal error message. The call tosubprogram reset log name provides backwards compatibility, in that it uses the logfile named in FILES for logging for the rest of the run. The call to endf init allocatesits buffers (c.f., Section 12.2 on page 210) in readiness for reading the library files.

Culham Electromagnetics

Page 116 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Part 3 completes the preliminary data loading. call element init loads the list ofelements and their properties (atomic number, name, standard atomic weight anddensity, and abundances and atomic mass of naturally occurring isotopes), into theprivate element object. All data in element m are private, and are accessed by therest of the program using enquiry functions (see Section 10.2 for details). The callto nuclide init reads the list of nuclides from INDEX (c.f., Section 3.4) and allocatesone subsidiary object of type nuclide node t for each nuclide, plus a ‘sink’ nuclide(nuclide%parent(0)) for daughter nuclides that may be produced but are not includedin the inventory.

Part 4 calls call rundata init which opens the INPUT file and uses token init toanalyse the input stream into tokens which define keywords and their arguments.Keywords define settings to control the run and set actions to be performed.

7.2.3 The Action Loop

Execution then enters the action loop which gives effect to the commands obtainedfrom the INPUT file.� �

!=====================================================================! THE ACTION LOOP!---------------------------------------------------------------------runstep:do

!------------------------------------------------------------------! 5.0 get the next action from the INPUT queuecall rundata_read(rundata ,flux ,next_action)

select case(next_action)!---------------------------------------------------------------! 6.0 Initial Output!---------------------------------------------------------------! 6.1 Initial file preparation and output

case(run_initial_output)! set overwrite or replace for output filescall files_set_clobber(rundata_clobber(rundata))! open printer output filecall files_open(output)! initialise OUTPUT banner headingcall output_init(rundata ,timestamp)!------------------------------------------! 6.2 write run labelling information

case(run_labelling)call write_runlabelling!---------------------------------------------------------------!! 7.0 Phase 1: Library Data Preparation Phase!---------------------------------------------------------------! 7.1 load nuclear cross-section data

case(run_nuclide_react)call rundata_monitor(rundata ," load cross -sections")call nuclide_react(nuclide ,rundata ,flux ,timestamp)

Culham Electromagnetics

Page 117 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

!------------------------------------------! 7.2 load nuclide decay data

case(run_nuclide_decay)call rundata_monitor(rundata ," load decay data")call nuclide_decay(nuclide ,rundata ,timestamp)!------------------------------------------! 7.3 collapse fission yield

case(run_collapse_fissyld)call rundata_monitor(rundata ," collapse fission yields")call nuclide_collapse_fissyld(nuclide ,flux)!------------------------------------------! 7.4 load transport data

case(run_nuclide_a2data)call rundata_monitor(rundata ," load a2 data")call nuclide_a2data(nuclide)!------------------------------------------! 7.5 load clearance data

case(run_nuclide_clearance)call rundata_monitor(rundata ," load clearance data")call nuclide_clearance(nuclide)!------------------------------------------! 7.6 load ingestion and inhalation hazards data

case(run_nuclide_hazards)call rundata_monitor(rundata ," load hazards data")call nuclide_hazards(nuclide)!------------------------------------------! 7.7 Flux group convert without collapse of cross-sections

case(run_group_convert)call rundata_monitor(rundata ," run flux convert")!initialise energy boundscall energy_bounds_init(rundata_no_bins(rundata))! delete old fluxes if presentcall flux_delete(flux)! initialise fluxes from fluxes filecall flux_init(flux ,rundata_arb_flux(rundata), &

& rundata_no_bins(rundata))!---------------------------------------------------------------!! 8.0 Phase 2 : set initial conditions and periodic!! output settings!---------------------------------------------------------------! 8.1 initialise inventory

case(run_initial_values)call rundata_monitor(rundata ," load initial values")call inventory_init(inventory ,nuclide ,rundata)!------------------------------------------! 8.2 initialise rate equation matrix for irradiation

case(run_rateeq_irrad)call rundata_monitor(rundata , &

& " fill rate equation matrix for irradiation")call rateeq_init(rateeq_irrad ,inventory ,nuclide ,rundata , &

& store_crossec_terms)!------------------------------------------! 8.3 initialise rate equation matrix for cooling

case(run_rateeq_cool)call rundata_monitor(rundata , &

& " fill rate equation matrix for cooling")

Culham Electromagnetics

Page 118 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call rateeq_init(rateeq_cool ,inventory ,nuclide ,rundata , && .not.store_crossec_terms)

!------------------------------------------! 8.4 initialise recording of sequence of steps in! irradiation phase

case(run_pathstep_init)call rundata_monitor(rundata ," start pathstep recording")call pathstep_init(pathstep ,rundata ,rateeq_cool)!------------------------------------------! 8.5 allocate arrays for dominant nuclide analysis output

case(run_dominant_init)call rundata_monitor(rundata ," initialise dominant analysis")call dominant_init(dominant ,inventory ,rundata)!------------------------------------------! 8.6 read absorption data for use in gamma dose calculations

case(run_read_doses)! initialise element absorption datacall element_read_doses!------------------------------------------! 8.7 print library summary data

case(run_printlib)call rundata_monitor(rundata ," run printlib")call output_printlib(nuclide ,rundata ,flux)!------------------------------------------! 8.8 overwrite cross-section or decay data! using OVER key args.

case(run_over)call rundata_monitor(rundata ," run overwrite cross -section")call nuclide_over(nuclide ,rundata)!------------------------------------------! 8.9 enable gas, kerma and dpa output if data are available

case(run_gas_kerma_dpa)call rundata_monitor(rundata ," test for gas, kerma and dpa data")call output_gas_kerma_dpa(nuclide)!---------------------------------------------------------------!! 9.0 Phase 3 : The Inventory Calculation!---------------------------------------------------------------! 9.1 initialise irradiation step rateeq

case(run_irrad_init)call rundata_monitor(rundata ," run irradiation init")! initialisecall clock_restart(2)call rateeq_set_rates(rateeq_irrad ,rundata_flux_amp(rundata))call clock_stop(2)!------------------------------------------! 9.2 do irradiation step

case(run_irrad_step)call rundata_monitor(rundata ," run irradiation step")! stepcall clock_restart(3)call rateeq_step(rateeq_irrad ,inventory ,nuclide ,↘→rundata_time_interval(rundata))

call clock_stop(3)!------------------------------------------! 9.3 do cooling step

case(run_cooling_step)

Culham Electromagnetics

Page 119 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call rundata_monitor(rundata ," run cooling step")! stepcall clock_restart(4)call rateeq_step(rateeq_cool ,inventory ,nuclide , &

& rundata_time_interval(rundata))call clock_stop(4)!------------------------------------------! 9.4 reset cross-section selectors to default for use! with time dependent cross sections

case(run_reset_xs)call rundata_monitor(rundata ," run reset cross -section")call rundata_reset_xs(rundata)!------------------------------------------! 9.5 update the rate equation matrix for new cross section! data

case(run_update_rateeq)call rundata_monitor(rundata ," run update rate equation matrix")call rateeq_new_induced_xs(rateeq_irrad ,nuclide)!------------------------------------------! 9.6 Save the rateeq_irrad object and the current! cross section data if needed by pathways analysis

case(run_add_rateeq)call rundata_monitor(rundata ," run add rateeq for pathways")call pathstep_add_rateeq(pathstep ,nuclide ,rateeq_irrad)!------------------------------------------! 9.7 do output for current time interval

case(run_output_inventory)call rundata_monitor(rundata ," run output inventory")! write inventory to outputcall clock_restart(5)call output_inventory(inventory ,nuclide ,rundata ,dominant)call clock_stop(5)!------------------------------------------! 9.8 do final summary output

case(run_output_summary)call rundata_monitor(rundata ," run output summary")! write summary to outputcall output_graphs(dominant ,nuclide ,rundata)call output_summary(inventory)!------------------------------------------! 9.9 pathways analysis initialisation

case(run_pathways_init)call rundata_monitor(rundata ," run pathways initialisation")! compute pathways at end of irradiation. The source! inventory the input inventory, and the target! inventory is the topxx dominant nuclides. The! calculation is triggered by keyword ZERO in INPUTcall clock_restart(6)call output_pathways_init(pathways_irrad ,pathstep ,inventory , && dominant ,nuclide ,rateeq_cool ,rundata)call clock_stop(6)!------------------------------------------! 9.10 pathways step recording

case(run_add_pathstep)call rundata_monitor(rundata ," run add pathstep")! save time interval and flux amplitude for steps

Culham Electromagnetics

Page 120 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

! to be used later in pathways, route and path! analyses.call pathstep_add_step(pathstep ,rundata)!------------------------------------------! 9.11 pathways uncertainty analysis

case(run_pathways_anal)call rundata_monitor(rundata ," run pathways uncertainty")call clock_restart(6)! write uncertainties and pathways to output. The! uncertainties are calculated using pathway numbers! for the irradiation phase.call output_pathways( &

& pathways_irrad ,pathstep ,inventory ,dominant ,nuclide ,rundata)call clock_stop(6)!------------------------------------------! 9.12 partition inventory

case(run_partition)call rundata_monitor(rundata ," run partition")! partition inventorycall inventory_partition(inventory ,rundata ,nuclide)!------------------------------------------! 9.13 pathways for ROUTE specified nuclides

case(run_routes)call rundata_monitor(rundata ," run routes")call pathways_routes(pathways_route ,inventory ,nuclide , &

& pathstep ,rundata)!------------------------------------------! 9.14 pathways for PATH specified nuclides

case(run_path)call rundata_monitor(rundata , " run path")call pathways_paths(pathways_path ,inventory ,nuclide , &

& pathstep ,rundata)!------------------------------------------! 9.15 run sensitivity analysis

case(run_sensitivity)call rundata_monitor(rundata ," run sensitivity")call clock_restart(7)!initialise sensitivity calculationcall sensitivity_init(sensitivity ,dominant ,nuclide ,inventory ,↘→rundata ,timestamp)

! generate mc samplescall sensitivity_mcruns(sensitivity ,nuclide ,pathstep ,inventory)!write summary sensitivity data to outputcall sensitivity_output(sensitivity ,nuclide ,pathstep)call clock_stop(7)!------------------------------------------! 9.16 convert input power level to flux amplitude

case(run_power_to_fluxamp)call rundata_monitor(rundata ," run power to flux amp")new_flux_amp=inventory_power_to_flux_amp(inventory ,nuclide ,rundata↘→)

call rundata_reset_flux_amp(rundata ,new_flux_amp)!---------------------------------------------------------------!! 10.0 Closedown!---------------------------------------------------------------! 10.1 end of main calculation

Culham Electromagnetics

Page 121 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

case(run_closedown)call rundata_monitor(rundata ," run closedown")exit!------------------------------------------! 10.2 undefined action - FATAL error closedown

case defaultcall rundata_monitor(rundata ," FATAL - Unrecognised next_action")call log_value(’next_action’,next_action)call log_error(m_name ,s_name ,1,error_fatal , &

& ’Unrecognised next_action’)

!------------------------------------------end select

end do runstep!---------------------------------------------------------------------! END OF THE ACTION LOOP!=====================================================================� �

Part 5 initialises each pass of the action loop with a call to rundata read which obtainsthe next action, either from the private queue of pending actions stored in rundata mor by reading tokens obtained from the INPUT file and stored in the private queue intoken m. The select case statement then switches control to the appropriate sectionto deal with the current action.

Part 6 deals with the setting arising from the CLOBBER keyword, opens the OUTPUTfile and generates the initial output.

Part 7 deals with Phase 1 of a calculation: the library data preparation phase. If EAFformat libraries are to be used, then the keyword LIBVERSION must be specifiedwith argument 0. This phase loads the nuclear cross-section, decay and regulatorydata. call nuclide react loads the cross-section data. If the GETXS 1 keywordis read from INPUT, it causes the cross-section data for the nuclides to be read fromCROSSEC and CROSSUNC (c.f., Sections 3.6 and 3.8). Alternatively, if a TENDL libraryis to be read, as indicated by the LIBVERSION keyword with argument 1, thecross-section data are obtained from the individual files in the XS ENDF directory. Theprojectile flux data are read from either FLUXES (Section 3.3) or ARB FLUX (Section 3.2).

If the GETXS 0 keyword is used then previously collapsed cross-section data are readfrom COLLAPXI. The task of reading and collapsing the cross-section data is delegatedto the reaction m module. Cross-section data for parent nuclides not included in thenuclides index are ignored. Daughters of reactions not in the index are assigned to thesink nuclide.

call nuclide decay causes the decay and fission data to be loaded. If the GETDE-CAY 1 keyword is used in INPUT, then decay data are obtained from the EAF DECAYfiles or the DK ENDF directory of files. Reading of the decay data is delegated to thedecay m module. Reading of the fission data is delegated to the fission m module.Fission yields are read from FISSYLD and are associated with their parent nuclide.

Culham Electromagnetics

Page 122 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Yields for actinides without fission yield data are approximated by associating yieldsfrom one nuclide with another surrogate parent. This association is read from ASSCFY.Alternatively, the fission yield data are obtained from the individual nuclide files inthe TENDL directory FY ENDF. If the GETDECAY 0 keyword is used, decay andfission data are read from ARRAYX.

The reading of transport, clearance and hazards and data are delegated to the regulatory mmodule by call nuclide a2data, call nuclide clearance and call nuclide hazards.

Part 8 deals with actions for Phase 2 of a calculation: settings for the initial conditionsand periodic output. call inventory init loads the initial inventory as specified bythe FUEL, MASS, IRON and DENSITY keywords and call rateeq init sets upthe rate equations for irradiation and cooling steps. call pathstep init initialisesthe recording of the sequence of steps in the irradiation phase if this information isrequired for subsequent pathways analysis. Element absorption data are initialisesby call element read doses. A summary of the library data is produced by calloutput printlib, if required. Cross-sections are modified by call nuclide over ifthe OVER keyword has been used. The output of diagnostic information is initialisedby call output gas kerma dpa.

Part 9 deals with Phase 3 of a calculation: the inventory calculation. call rateeq set ratesensures that the rate equation matrix for irradiation steps is consistent with the cur-rent projectile flux amplitude. The calls to rateeq step perform the time integrationsfor irradiation and cooling steps. Time-dependent cross-section data are handled byrundata reset xs and rateeq new induced xs and a new rate equation object is storedfor pathways analysis by call pathstep add rateeq, if necessary. Details of each timeinterval are stored by call pathstep add step. An inventory can be partitioned, ifrequested, by call inventory partition. Output for the current time interval isgenerated by call output inventory.

At the end of the irradiation phase summary output is generated by call output summary.Pathways analysis is handled by output pathways init, output pathways, pathways routes,pathways paths and the Monte-Carlo sensitivity analysis is handled by sensitivity init,sensitivity mcruns and sensitivity output.

At the end of Part 9 (somewhat out of place!) is the conversion of a specified inputpower to and input flux amplitude to facilitate reactor calculations. Note that thsicase relies on the presence of the appropriate kermas cross-section data and at presentonly works for TENDL data.

Finally, in Part 10, the end of a calculation is signalled by the run closedown action,which causes an exit from the action loop.

Culham Electromagnetics

Page 123 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

7.2.4 The Epilogue

The final part of the calculation is to report timings to the log file and to deallocatestorage used by the various modules by calling their delete methods.� �

!---------------------------------------------------------------------! 10.3 deallocate storage (not strictly necessary, but good practice)! and write final summary data

call rundata_monitor(rundata ," deallocate and closedown")

! deallocate pathstepcall pathstep_delete(pathstep)

! deallocate rateeqcall rateeq_delete(rateeq_irrad)call rateeq_delete(rateeq_cool)

! deallocate pathwayscall pathways_delete(pathways_irrad)call pathways_delete(pathways_route)

! deallocate sensitivitycall sensitivity_delete(sensitivity)

!deallocate dominant nuclide tablescall dominant_delete(dominant)

call rundata_delete(rundata)call endf_deletecall element_deletecall flux_delete(flux)call nuclide_delete(nuclide)

! infrastructure modulescall clock_stop(1)call clock_output(1)

! write run stats to stdoutcall files_opened_list(output)call files_opened_list(runlog)call log_run_summary(clock_time(1))

call clock_summarycall log_closecall clock_delete

! add timestamp to end of output filewrite(output ,’(/,5x,"Run timestamp:",a)’) date_time_long(timestamp)write(output ,’(/,5x,"Current time: ",a)’) date_time_long_now()

call date_time_delete(timestamp)call output_close(rundata)call output_delete

Culham Electromagnetics

Page 124 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call files_delete� �The code details included in the initial issue of this document have been superseded bythe detailed design document[55] and the code listing. The module descriptions in thefollowing sections are restricted to the description of public data, public type, publicsubprograms and public functions. Unless the modules are to be modified, these areall that is required to use them.

By default, implicit none and private are used in all modules, so only those itemsexplicitly declared as public are visible outside their own module. All data are privatein some modules (e.g., element m), in which cases access to data from other modulesis possible only via enquiry functions. Others use public self objects whose contentsare private (e.g., reaction m, rateeq m), where again enquiry functions are providedto give access to private data in self.

For details of private data and procedures, see the Detailed Design Document [55] andthe source listing.

8 Infrastructure Modules

8.1 clock m

8.1.1 Summary

The clock m module provides a number of ‘stopwatches’ for measuring the cpu usageof different segments of the code. The number of stopwatches available is set by thesubroutine clock init. There are no public data, but the module provides a set ofpublic subprograms to initialise and start, stop and restart each stopwatch, and toreport the measured cpu times to the output file and the log file (see log m).

8.1.2 Arguments

integer, intent(in) :: clocknoThe stopwatch number (in the range [1,noclocks]).

integer, intent(in) :: noclocksThe total number of cpu stopwatches available in the program.

character(len=*), intent(in) :: clocknameThe description of the stopwatch used in the output file and the log file.

Culham Electromagnetics

Page 125 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

8.1.3 Public subroutines

call clock deleteThis deallocates the memory used for the stopwatches.

call clock init(noclocks)This sets up noclocks cpu timers for use in the code and must be called beforeany other clock m subprograms are called.

call clock log(clockno)This writes the clock description and the current time on the stopwatch clocknoto the log file, or writes the clock number and a warning if it cannot find theclock.

call clock output(clockno)This writes the clock description and the current time on the stopwatch clocknoto the output file, or writes the clock number and a warning to the log file if itcannot find the clock.

call clock restart(clockno)This restarts the stopwatch clockno and adds to the previously recorded time.

call clock start(clockno,clockname)This initialises cpu time to zero and starts the stopwatch clockno. If clockno isgreater than noclocks a fatal error message is issued.

call clock stop(clockno)This stops the stopwatch clockno.

call clock summaryThis writes the description and time for all stopwatches that have been used tothe log.

8.1.4 Public function

clock time(clockno)This real function returns the current time on stopwatch clockno.

8.1.5 Dependencies

This module depends on const kind m, files m and log m.

Culham Electromagnetics

Page 126 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

8.2 date time m

8.2.1 Summary

The date time m module provides a single date and time to identify a run of the codeusing the Fortran 90 intrinsic date and time. It provides date and time stamps inshort and long forms through enquiry functions.

The timestamp is set by the call to date time init.

8.2.2 Public types and data

Only the string lengths of the short and long forms of the date and time stamps aremade available to the calling program through the public parameters.� �

! public parametersinteger, public, parameter :: date_time_len_short = 15integer, public, parameter :: date_time_len_long = 32

! public types!! Containing structure for run time strings.type, public :: date_time_t

privateend type date_time_t� �

8.2.3 Arguments

The timestamp is stored in the self object used as the first argument to the subroutineand function calls.

type(date time t) :: selfThe timestamp object.

integer, intent(in) :: unit nameFortran unit number for unformatted reads and writes of the timestamp.

8.2.4 Public subroutines

The public subroutines are the creator, destructor, storage and retrieval routines:

call date time delete(self)This clears the current date and time in self.

Culham Electromagnetics

Page 127 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call date time init(self)This stores the current date and time in self.

call date time retrieve(self,unit name)Read the timestamp from binary stream unit name.

call date time store(self,unit name)Write the timestamp to binary stream unit name.

8.2.5 Public functions

date time long(self)This returns a character string of length date time len long containing the dateand time stored in self.

date time long now()This returns a character string of length date time len long containing the dateand time at the point at which this function is called.

date time short(self)This returns a character string of length date time len short containing thedate and time stored in self.

date time short now()This returns a character string of length date time len short containing thedate and time at the point at which this function is called.

8.2.6 Dependencies

This module depends on const kind m and uses the Fortran intrinsic subroutine date and time.

8.3 log m

8.3.1 Summary

The log m module manages error logging and run termination on error conditions. Themodule

1. opens the log file;

2. reports the calling point, error level and a one-line error message;

3. writes selected messages to the log;

4. closes the run down on a fatal error or repeated (more than 10) serious errors.

Culham Electromagnetics

Page 128 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

8.3.2 Public types and data

The following quantities are provided to allow the calls to the logging functions to bemore comprehensible in the calling program. Their names are self-explanatory.� �

! public variablesinteger(ki4), public, parameter :: error_fatal=0integer(ki4), public, parameter :: error_serious=1integer(ki4), public, parameter :: error_warning=2integer(ki4), public, parameter :: error_info=3integer(ki4), public, parameter :: error_debug=4integer(ki4), public, parameter :: log_info=5logical, public, save :: log_no_log� �

8.3.3 Arguments

The following quantities are input to log m subprograms:

character(len=*), intent(in) :: errormessageThe error message. For long messages errormessage2 and errormessage3 mayalso be used.

character(len=*), intent(in), optional :: errormessage2The second line of a long message.

character(len=*), intent(in), optional :: errormessage3The third line of a long message.

character(len=*), intent(in) :: filenameThe name of the file to which the log is written.

character(len=*), intent(in) :: filerootThe name of the root for filenames for the run.

integer(ki4), intent(in) :: levelThis is used to change the maximum error severity that is logged.

character(len=*), intent(in) :: modnameError messages are labelled by the module name, the subprogram name and thepoint in the subprogram from which the error message was issued. modname isthe module name.

logical, intent(in), optional :: no logThis is used to prevent the creation of the log file and to suppress all log output.

integer, intent(in) :: pointThe calling point.

Culham Electromagnetics

Page 129 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

integer(ki4), intent(in) :: reportlevelThis determines the maximum error severity that is logged, ranging from error fatal(log only fatal error) to log info (log all messages from error fatal to log info).A reportlevel outside this range is set to the nearest in-range value.

real(kr8), intent(in) :: runtimeThe cpu time in seconds.

integer(ki4), intent(in) :: severityThe severity of the error. It may take values from error fatal to log info.

integer(ki4), intent(in) :: statusThe status flag returned by a Fortran 95 allocate command (status flag = 0 forsuccessful allocation).

character(len=*), intent(in) :: subnameThe subprogram name.

type(date time t), intent(in) :: timestampThe timestamp for the head of the log output.

character(len=*), intent(in), optional :: unitsThe units of the value being logged.

integer(ki4)|real(kr4)|real(kr8)|logical|character(len=*), && intent(in) :: valueThe value of the variable being logged.

character(len=*), intent(in) :: varnameThe variable name.

8.3.4 Public subroutines

call log alloc check(modname,subname,point,status)Check if an allocation is successful; write an error message to the log file andclose down the run if it is not.

call log closeWrite a summary of the number of errors and warnings logged and close downthe log file.

call log error(modname,subname,point,severity,errormessage && [,errormessage2,errormessage3])Write an error message to the log file, and close down the run if the error is fatal.For long error messages, second and third optional error messages may be added.

call log init(filename,fileroot,timestamp,reportlevel,no log)Initialise logging and open the logging output file, unless suppressed with a trueoptional argument no log.

Culham Electromagnetics

Page 130 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call log level reset(level)Change the reporting level to level.

call log run summary(runtime)Write a summary of the number of errors and warnings logged and the cpu timeto the standard output (usually the user’s terminal).

call log value(varname,value[,units])Write the name, value and optionally the units of the variable to the log file.value may be real(kr4), real(kr8), integer(ki4), logical or character(len=*).

8.3.5 Public functions

log level(level)Return True if level is more severe than the current reporting level. If so, andif the calling point is different from the previous one, write a message to the logfile noting that the call has been made.

log serious count()This integer(ki4) function returns the number of serious errors recorded sincethe start of the run.

8.3.6 Dependencies

This module depends on const kind m and date time m.

8.4 const kind m

This module provides data for the explicit control of the precision of real and integervariables.

8.4.1 Public types and data� �!! 4 byte integer kindinteger, parameter, public :: ki4 = selected_int_kind(9)

!! 8 byte integer kindinteger, parameter, public :: ki8 = selected_int_kind (18)

!! 4 byte real kindinteger, parameter, public :: kr4 = selected_real_kind(6)

!! 8 byte real kindinteger, parameter, public :: kr8 = selected_real_kind (15)

Culham Electromagnetics

Page 131 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

!! default integer kindinteger, parameter, public :: kidef = kind(1)

!! default real kindinteger, parameter, public :: krdef = kind(1.0)

!! default double precision kindinteger, parameter, public :: kddef = kind(1.0d0)� �8.5 random m

8.5.1 Summary

This module provides random numbers with various probability distributions.

8.5.2 Public types and data� �! public typestype, public :: random_t

privateend type random_t� �

There are no public data.

8.5.3 Arguments

type(random t), intent(inout) :: selfThe random object.

integer(ki4), dimension(:), intent(in), optional :: seedThe pseudo-random sequence seed.

real(kr8), intent(in) :: meanThe mean of the distribution.

real(kr8), intent(in) :: std devThe standard deviation of the distribution.

real(kr8), intent(in) :: lbLower bound for non-zero f (in standard deviations of underlying normal distri-bution).

real(kr8), intent(in) :: ubUpper bound for non-zero f (in standard deviations of underlying normal distri-bution).

Culham Electromagnetics

Page 132 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

8.5.4 Public subroutine

call random init(self,seed)Initialise the pseudo-random number sequence.

8.5.5 Public functions

random lognormal(self,mean,std dev,lb,ub)This real(kr8) function returns a random number from a lognormal distribution.

random loguniform(self,mean,std dev)This real(kr8) function returns random number from a loguniform distribution.

random normal(self,mean,std dev,lb,ub)This real(kr8) function returns a random number from a normal distributionusing the Box-Muller algorithm.

random uniform(self,mean,std dev)This real(kr8) function returns a random number from a uniform distribution.

8.5.6 Dependencies

This module depends on modules const kind m, const math m and log m.

9 Data Modules

9.1 const math m

This data module contains parameters giving mathematical constants.

9.1.1 Public types and data� �!! pireal(kr8), parameter, public :: pi=3.141592653589793238 _kr8� �9.1.2 Dependencies

This module depends on const kind m.

Culham Electromagnetics

Page 133 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

9.2 const phys m

This data module contains parameters giving useful physical constants and unit con-version factors. ENDF preferred values are used when specified in [20, App. H].

9.2.1 Public data� �!! speed of lightreal(kr8), parameter, public :: clight =2.99792458e+8_kr8!! mass conversion from neutron mass to amureal(kr8), parameter, public :: nmass_to_amu =1.00866491578 _kr8!! energy conversion from eV to MeVreal(kr8), parameter, public :: ev_to_mev =0.000001_kr8!! energy conversion from MeV to eVreal(kr8), parameter, public :: mev_to_ev =1000000.0 _kr8!! barn to cmˆ2real(kr8), parameter, public :: barn_to_cm2 =1.0e-24_kr8!! cm to mreal(kr8), parameter, public :: m_to_cm =100.0_kr8!! cmˆ2 gˆ{-1} to mˆ2 kgˆ{-1}real(kr8), parameter, public :: cm2perg_to_m2perkg =0.1_kr8!! picosecond in secondsreal(kr8), parameter, public :: ps_in_secs =1.0e-12_kr8!! nanosecond in secondsreal(kr8), parameter, public :: ns_in_secs =1.0e-09_kr8!! microsecond in secondsreal(kr8), parameter, public :: us_in_secs =1.0e-06_kr8!! millisecond in secondsreal(kr8), parameter, public :: ms_in_secs =0.001_kr8!! one minute in secondsreal(kr8), parameter, public :: min_in_secs =60.0_kr8!! one hour in secondsreal(kr8), parameter, public :: hour_in_secs =3600.0_kr8!! one day in secondsreal(kr8), parameter, public :: day_in_secs =86400.0_kr8!! one month (30 days) in secondsreal(kr8), parameter,public :: month_in_secs =2.592e+06_kr8!! one year in seconds (365.25 days)real(kr8), parameter, public :: year_in_secs =3.15576e+07_kr8!! one century in secondsreal(kr8), parameter, public :: century_in_secs =3.15576e+09_kr8!! Avogadro’s constant (molˆ{-1}) (ENDF preferred value)real(kr8), parameter, public :: avogadro_constant =6.022141990e+23_kr8!! Planck’s constant in eVs (ENDF preferred value)real(kr8), parameter, public :: hbar =6.58211889e-16_kr8!! Atomic mass unit in eV/cˆ2 (ENDF preferred value)real(kr8), parameter, public :: amu_to_ev =9.31494013e+08_kr8!! Coefficient for peak cross-section calculationreal(kr8), parameter, public :: coeff_xs_pk =2.0_kr8*pi*hbar*hbar*clight* &

& clight*m_to_cm*m_to_cm/(barn_to_cm2*nmass_to_amu*amu_to_ev)!! kg to gmreal(kr8), parameter, public :: kg_to_g =1000.0_kr8!! kW to W

Culham Electromagnetics

Page 134 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

real(kr8), parameter, public :: kw_to_w =1000.0_kr8!! g to kgreal(kr8), parameter, public :: g_to_kg=1.0e-03_kr8!! eV to kJ (ENDF preferred value)real(kr8), parameter, public :: ev_to_kj =1.602176462e-22_kr8!! kJ to MeVreal(kr8), parameter, public :: kj_to_mev=ev_to_mev/ev_to_kj!! amu to kgreal(kr8), parameter, public :: amu_to_kg=g_to_kg/avogadro_constant!! curies to becquerelreal(kr8), parameter, public :: ci_to_bq=3.7e+10_kr8!! becquerel to curiesreal(kr8), parameter, public :: bq_to_ci=1.0_kr8/ci_to_bq!! terabecquerel to becquerelreal(kr8), parameter, public :: tbq_to_bq=1.0e+12_kr8!! MeV per kg per sec to Sv per hourreal(kr8), parameter, public :: mevperkgpersec_to_svperhr =5.767560e-10!! Seiverts to Remsreal(kr8), parameter, public :: sv_to_rem =100.0_kr8!! maximum half life in seconds of stable nucleus (to avoid overflow)real(kr8), parameter, public :: end_of_time =0.5_kr8*ps_in_secs*huge(1.0↘→_kr8)

!! fraction to parts per millionreal(kr8), parameter, public :: frac_to_ppm =1.0e+6_kr8!! dpa efficiency factorreal(kr8), parameter, public :: dpa_efficiency_factor =0.8_kr8!! convert to 3 sigma factorreal(kr8), parameter, public :: convert_to_3_sigma_factor =9.0_kr8!! EAF version of EAF2010 library typeinteger(ki4),parameter, public :: eaf_eaf2010=7_ki4!! endf version of TENDL library typeinteger(ki4),parameter, public :: endf_tendl=8_ki4!! endf version of EAF2012 library typeinteger(ki4),parameter, public :: endf_eaf2010=9_ki4!! endf compliant version of libraryinteger(ki4),parameter, public :: endf_compliant=10_ki4!! threshold for ignoring collapse cross-sectionsreal(kr4), parameter, public :: xs_threshold =1.0E-12 !! ignore xs below ↘

→10ˆ(-12) Barns� �

9.2.2 Dependencies

This module depends on const kind m.

Culham Electromagnetics

Page 135 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

9.3 decay type m

9.3.1 Summary

The decay type m module encapsulates the data summarised in Table 1. It providesfunction calls to return Table 1 entry details for a given irt number.

9.3.2 Public types and data

The decay type data of Table 1 are held in a private data object in this module.The only public data are those listed below. These descriptive names are providedfor use elsewhere in the program in conjunction with functions decay type mode anddecay type activity.� �

! public variablesinteger(ki4), public, parameter :: decay_type_other=0integer(ki4), public, parameter :: decay_type_betaminus=1integer(ki4), public, parameter :: decay_type_betaplus=2integer(ki4), public, parameter :: decay_type_it=3integer(ki4), public, parameter :: decay_type_alpha=1integer(ki4), public, parameter :: decay_type_beta=2integer(ki4), public, parameter :: decay_type_gamma=3integer(ki4), public, parameter :: decay_type_alpha_beta=4integer(ki4), public, parameter :: decay_type_alpha_gamma=5� �

9.3.3 Arguments

integer(ki4), intent(in) :: irtThe integer internal decay code used throughout the program for indexing decaytypes.

integer(ki4), intent(out) :: nsecThe number of secondaries produced in a decay.

real(kr8), intent(in) :: rtypThe ENDF decay code [20] as given in column 2 of Table 1 and as found in theEAF or TENDL library decay data files.

integer(ki4), dimension(3), intent(out) :: zaiThe ZAI indices of the secondaries.

9.3.4 Public subroutines

The public subroutines are the creator and an enquiry routine. The creator does notallocate storage, so a destructor is not necessary.

Culham Electromagnetics

Page 136 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call decay type initFill the private decay type tables.

call decay type secondaries(irt,nsec,zai)Return the number of secondaries and the ZAI of the secondaries for a giveninput irt.

9.3.5 Public functions

decay type activity(irt)This integer(ki4) function returns the decay type activity group that the decaywith index irt belongs to. The possible values are:decay type alpha α decaydecay type beta β− and β+ decaydecay type gamma isomeric transitionsdecay type alpha beta α and β− or β+ decaydecay type alpha gamma α decay and isomeric transitionsdecay type other decays not involving any of the above

decay type delta a(irt)This integer(ki4) function returns the ∆A for the decay with index irt, wherethe difference is between the parent A and the daughter product A.

decay type delta z(irt)This integer(ki4) function returns the ∆Z for the decay with index irt, wherethe difference is between the parent Z and the daughter product Z.

decay type description(irt)This character(len=40) function returns a long description of the decay type(e.g., irt=11 returns ’beta- decay + neutron emission’).

decay type irt(rtyp)This integer(ki4) function returns the irt index corresponding to the givenrtyp index.

decay type mode(irt)This integer(ki4) function returns the decay type group that the decay withindex irt belongs to. The possible values are:decay type betaminus β− decaydecay type betaplus β+ decaydecay type it isomeric transitionsdecay type other decays not involving any of the above

decay type rtyp(irt)This real(kr4) function returns the rtyp index2 corresponding to the given irtindex.

Culham Electromagnetics

Page 137 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

decay type short name(irt)This character(len=6) function returns a short description of the decay type(e.g., irt=20 returns ’(b-2n)’).

9.3.6 Dependencies

This module depends on const kind m and log m.

9.4 energy bounds m

9.4.1 Summary

The energy bounds m module provides the bounds of the energy groups that are usedfor:

1. the projectile flux and cross-section data;

2. the energy groups that are used for the charged-particle fluxes in scpr;

3. the gamma spectrum using either 22- or 24-energy groups.

Allowed selections of the number of energy groups depend on the values of the argu-ments of the GETXS, COLLAPSE, SEQUENTIAL, PROJECTILE and GROUPkeywords in the INPUT file.

9.4.2 Public types and data

The energy bounds of the energy bins used for the library cross-section data, thesequential charged particle cross-section data and for the gamma energy groups arestored in the derived data type energy bounds t� �!public typetype, public :: energy_bounds_t

real(kr8), dimension(:), pointer :: xs !! cross-section energy boundscharacter(len=10) :: assumed_spectrum !! assumed neutron spectrumreal(kr8), dimension(:), pointer :: scpr !! scpr cross-section energy↘→ bounds

real(kr8), dimension(:), pointer :: gamma !! gamma energy boundsreal(kr8), dimension(23) :: gamma_22 !! 22 group gamma energy boundsreal(kr8), dimension(25) :: gamma_24 !! 24 group gamma energy bounds

end type energy_bounds_t

! public variablesinteger(ki4), public, parameter :: energy_bounds_max_dim =709 !! max xs ↘

→group size

Culham Electromagnetics

Page 138 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

type(energy_bounds_t), public, save :: energy_bounds� �9.4.3 Arguments

integer(ki4), dimension(3), intent(in) :: binsThe numbers of cross-section, scpr and arbitrary flux energy groups.

integer(ki4), intent(in) :: n2collThe number of cross-section energy groups to be checked for validity.

integer(ki4), intent(in) :: ngrpThe number of cross-section energy groups to be checked for validity of use withprobability table data.

9.4.4 Public subroutine

call energy bounds init(bins)This points energy bounds%xs and energy bounds%scpr to the appropriate inter-nal tables of energy bin numbers, and sets the label energy bounds%assumed spectrumto the corresponding value. If bins(1) is not one of the allowed values (see Ta-ble 16) then a fatal error message is issued.

9.4.5 Public functions

energy bounds allowed no(n2coll)This logical function is true if n2coll is one of the allowed numbers of energybins for the cross-sections.

energy bounds pt allowed(ngrp)This logical function is true if ngrp is one of the allowed numbers of energybins for the cross-sections permitted for use with the probability tables.

energy bounds pt offset()This integer(ki4) function returns an indexing offset to be used with the prob-ability table data when the cross-sections are provided in 689 and 709 groups.

9.4.6 Dependencies

This module depends on const kind m and log m.

Culham Electromagnetics

Page 139 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 16: Energy group sizes known to the program and the associated assumedspectrum names.

no xs Assumed spectrum

66 WIMS69 WIMS

100 GAM-II142 CCFE-142162 CCFE-162172 XMAS175 VITAMIN-J211 VITAMIN-J+315 TRIPOLI351 TRIPOLI+616 RED-616689 CCFE-689709 CCFE-709

9.5 reaction type m

9.5.1 Summary

The reaction type m module encapsulates the data summarised in Table 3, and equiv-alent data for projectiles (proton, deuteron, α and γ) different from neutrons. Itprovides enquiry functions to return Table 3 entry details for a given mt number.

9.5.2 Public types and data

The only public data are the character variables listed below, together with one integerparameter:� �

! public variablescharacter(len=1), public, save :: reaction_type_projectile_name !! name ↘

→of projectilecharacter(len=8), public, save :: reaction_type_proj_lcname !! lc name ↘

→of projectilecharacter(len=8), public, save :: reaction_type_proj_ucname !! uc name ↘

→of projectilecharacter(len=16), public, save :: reaction_type_proj_title !! title ↘

→name of projectileinteger(ki4), public, parameter :: reaction_type_diagnostic_mt_size =22 !↘→! number of diagnostic mt known� �

Culham Electromagnetics

Page 140 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

9.5.3 Arguments

integer(ki4) :: mtThe ENDF reaction code used to identify the reaction type listed in Table 3.

integer(ki4), dimension(:), intent(out), allocatable :: && mt arrayAn array containing a list of all the defined mt numbers.

integer(ki4), intent(out) :: no secThe number of secondaries produced in the reaction.

integer(ki4), intent(in) :: projectileThe irradiating projectile. It takes the value 1 for neutrons, 2 for deuterons, 3for protons, 4 for alpha particles and 5 for gamma rays.

integer(ki4), dimension(3), intent(out) :: zai secThe ZAI indices of the secondaries produced by the reaction.

9.5.4 Public subroutines

call reaction type init(projectile)This sets up the appropriate ∆Z and ∆A for neutron, proton, deuteron, α or γprojectiles. It must be called before any of the other reaction type subprogramsare used.

call reaction type mt list(mt array)This returns an array containing a list of all the mt values defined in the module.

call reaction type secondaries(mt,no sec,zai sec)This returns the number of secondaries and an array of the ZAI indices of thesecondaries for the reaction with the given mt.

9.5.5 Public functions

reaction type cal mt(mt)This integer(ki4) function returns the CALENDF macro-partial mt for thereaction described by argument mt (c.f., Table 3). If the mt is not in one ofthe defined macro-partial sets, then zero is returned. The macro-partial sets aredefined in Table 6 on page 26.

reaction type delta a(mt)This integer(ki4) function returns the ∆A for the reaction (c.f., Table 3).

reaction type delta z(mt)This integer(ki4) function returns the ∆Z for the reaction (c.f., Table 3).

Culham Electromagnetics

Page 141 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

reaction type details(mt)This character(len=7) function returns a character string containing the shortdescription of the reaction, e.g. ’n,2n2a’.

reaction type diag index(mt)This integer(ki4) function returns the local index of a diagnostic reaction withthe given mt, otherwise if the reaction is not recognised as a diagnostic reactionit returns zero.

reaction type dpa(mt)This logical function returns a flag indicating if the data with the given mt referto dpa.

reaction type fission(mt)This logical function returns a flag indicating if the data with the given mt referto a fission reaction.

reaction type gas(mt)This logical function returns a flag indicating if the data with the given mt referto gas production totals.

reaction type kerma(mt)This logical function returns a flag indicating if the data with the given mt referto kerma.

reaction type mt ignored(mt)This logical function returns a flag indicating if the reaction with the given mtis to be silently ignored by the code.

reaction type mt not known(mt)This logical function returns a flag indicating if the given mt is not known tothis module.

reaction type nonelastic(mt)This logical function returns a flag indicating if the data with the given mt referto the total non-elastic cross-section.

reaction type other(mt)This logical function returns a flag indicating if the data with the given mt referto an ‘other’ reaction that is not specified explicitly with a different mt.

reaction type total(mt)This logical function returns a flag indicating if the data with the given mt referto the total cross-section.

9.5.6 Dependencies

This module depends on const kind m and log m.

Culham Electromagnetics

Page 142 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

9.6 spectrum type m

9.6.1 Summary

The spectrum type m module encapsulates the data summarised in Table 2, and hasno public data. The two public functions return character strings containing a shortor long description of the spectrum of type styp.

9.6.2 Public types and data

There are no public types or data.

9.6.3 Argument

integer(ki4), intent(in) :: stypThe spectrum type number. See Table 2 for details.

9.6.4 Public subroutine

The only public subroutine is the creator. The creator does not allocate storage, so adestructor is not necessary.

call spectrum type initInitialise the private table of decay radiation types stored in this module.

9.6.5 Public functions

spectrum type long(styp)This character(len=41) function returns a character string containing the longform of the description (e.g., styp = 4 returns ’alpha particles’ plus trailingblanks).

spectrum type short(styp)This character(len=9) function returns a character string containing the shortform of the description (e.g., styp = 4 returns ’alpha’ plus trailing blanks).

9.6.6 Dependencies

This module depends on const kind m and log m.

Culham Electromagnetics

Page 143 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

10 Physical Properties Modules

10.1 decay m

10.1.1 Summary

The decay m module extracts decay rates, decay channels, decay heating (Eβ, Eγ , Eα),gamma emission (in 22 and 24 groups), and spontaneous fission neutron yields fromEAF or TENDL library files. For runs using previously condensed library data, it re-trieves this information from the ARRAYX binary file. The decay data for a single nuclideare stored in the decay t object which contains a sub-object of type decay mode t.

The module provides

1. half-life and its uncertainty;

2. decay channels with branching ratios, decay types and daughter nuclides;

3. decay heating, gamma spectra and SF neutrons.

The module

1. allocates and fills self data for each nuclide;

2. extracts the above data from FISSYLD;

3. processes discrete gamma spectrum data.

10.1.2 Public types and data� �!public typestype, public :: decay_mode_t

integer(ki4) :: zai_d ! daughter zaiinteger(ki4) :: irt_index ! decay irt indexreal(kr4) :: br_frac ! branching fraction

end type decay_mode_t

type, public :: decay_line_tinteger(ki4) :: irt ! decay type indexreal(kr8) :: energy ! line energy (eV)real(kr8) :: energy_unc ! line energy uncertainty (eV)real(kr8) :: intensity ! line intensity (eV)real(kr8) :: intensity_unc ! line intensity uncertainty(eV)

end type decay_line_t

type, public :: decay_spectrum_tinteger(ki4) :: styp ! spectrum type

Culham Electromagnetics

Page 144 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

real(kr8) :: fd ! line normalisationreal(kr8) :: dfd ! line normalisation uncertaintyreal(kr8) :: erav ! average decay energy of radiation (eV)real(kr8) :: derav ! uncertainty in erav (eV)type(decay_line_t), allocatable, dimension(:) :: line

end type decay_spectrum_t

type, public :: decay_tprivate

end type decay_t� �There are no public data.

10.1.3 Arguments

real(kr8), intent(out) :: atomic weightThe atomic weight in amu of the parent nuclide.

character(len=16), intent(out) :: decay labelDECAY file header information.

logical, intent(in) :: dk splitThe flag indicating whether the decay data are split into separate files for eachnuclide (the TENDL-format library), or collected together into a small numberof files (the EAF-format library).

logical, intent(in) :: get spekSet to true if approximate gamma spectra are required.

character(len=*), intent(inout) :: hsubThe first library identifier string from the ENDF decay file.

integer(ki4), intent(in) :: line noThe index of a decay line in a given spectrum.

integer(ki4), intent(in) :: mode noThe mode number of a decay channel.

real(kr8), intent(in) :: new half lifeHalf life in seconds.

real(kr8), intent(in) :: new half uncHalf life uncertainty in seconds.

type(decay t) :: selfA decay self type.

type(decay t), intent(in) :: sourceA decay self type.

Culham Electromagnetics

Page 145 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

integer(ki4), intent(in) :: spectrum noThe index of a decay spectrum.

integer(ki4), intent(out) :: stat decayThe status flag for reads from the DECAY file.

logical, intent(in) :: store spectrumSet to true if spectral lines are to be saved.

logical, intent(in), optional :: use len 22This flag determines whether a 22-bin spectrum should be used instead of thedefault 24.

integer(ki4), intent(in) :: zai pThe ZAI index of the parent nuclide.

10.1.4 Public subroutines

call decay closeClose the DECAY input file or release the DK ENDF directory.

call decay copy(self,source)Copy the decay object source to decay object self, allocating subsidiary com-ponents of self as required.

call decay delete(self)Deallocate self.

call decay init(get spek,store spectrum,dk split,decay label)Initialise the reading of the decay data and return the header from the EAFdecay library file, or a message indicating that separate TENDL files are beingread.

call decay over half life(self,new half life)Overwrite the value of the decay half life stored in the decay t self object usingthe new value new half life.

call decay over half unc(self,new half unc)Overwrite the value of the decay half life uncertainty stored in the decay t selfobject using the new value new half unc.

call decay read(self,zai p,atomic weight,stat decay)Read the decay data for the parent nuclide specified by input index zai p andstore them in the self object. Return the parent nuclide atomic weight inatomic weight and the DECAY file read status in stat decay.

call decay read endf(self,zai p,atomic weight,hsub)Read the decay data for the parent nuclide specified by input index zai p and

Culham Electromagnetics

Page 146 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

store them in the self object. Return the parent nuclide atomic weight inatomic weight and the first library identifier string in hsub. The data for eachnuclide are provided in separate files and it is assumed that the data are ENDFcompliant, starting with a TPID and finishing with a TEND. There is a singlematerial, with one MF=1 section and one MF=8 section.

call decay retrieve(self)Read the decay self object from the ARRAYX file.

call decay store(self)Write the decay self object to the ARRAYX file.

10.1.5 Public functions

decay approx gamma spectrum(self)This logical function returns true if the gamma spectrum data in the selfobject have been synthesised using the approximate formula.

decay en alpha(self)This real(kr8) function returns the heavy-particle heating for the decay of thenuclide (Eα in eV).

decay en beta(self)This real(kr8) function returns the light-particle heating for the decay of thenuclide (Eβ in eV).

decay en gamma(self)This real(kr8) function returns the electromagnetic heating for the decay of thenuclide (Eγ in eV).

decay gamma spectrum(self,[use len 22])This real(kr8), dimension(24) function returns an array of gamma spectrumvalues. If the optional argument use len 22 is true, the function returns the22-energy-bin spectrum (padded with zeros), rather than the 24-bin default.

decay half life(self)This real(kr8) function returns the decay half-life of the nuclide in seconds, orthe large number end of time for a stable nuclide.

decay half unc(self)This real(kr8) function returns the decay half-life uncertainty of the nuclide.

decay is gamma spectrum(self)Thislogical function returns true if the decay self object has gamma spectrumdata.

decay lambda(self)This real(kr8) function returns the decay constant of the nuclide in s−1.

Culham Electromagnetics

Page 147 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

decay line energy(self,spectrum no,line no)This real(kr8) function returns the energy (in eV) of line number line no ofspectrum number spectrum no of self.

decay line energy unc(self,spectrum no,line no)This real(kr8) function returns the uncertainty in the energy (in eV) of linenumber line no of spectrum number spectrum no of self.

decay line intensity(self,spectrum no,line no)This real(kr8) function returns the intensity (in eV) of line number line no ofspectrum number spectrum no of self.

decay line intensity unc(self,spectrum no,line no)This real(kr8) function returns the uncertainty in the intensity (in eV) of linenumber line no of spectrum number spectrum no of self.

decay line irt(self,spectrum no,line no)This integer(ki4) function returns the irt index of line number line no ofspectrum number spectrum no of self.

decay lis(self)This integer(ki4) function returns the ENDF parameter LIS for the parentnuclide of decay self.

decay mode(self,mode no)This function returns a type(decay mode t) object containing the daughter ZAI,the irt index and the branching fraction for decay mode no for the nuclide.

decay mode br frac(self,mode no)This real(kr8) function returns the branching fraction for decay mode no for thenuclide.

decay mode irt(self,mode no)This integer(ki4) function returns the decay mode irt index for the decaychannel mode no for the nuclide.

decay mode is sf(self,mode no)This logical function returns true if decay mode mode no of self is spontaneousfission.

decay mode zai(self,mode no)This integer(ki4) function returns the ZAI index of the daughter nuclide forthe decay channel mode no for the nuclide. For fission the value 0 is returned.

decay modes(self)This integer(ki4) function returns the number of decay modes for the nuclide.

decay par(self)This integer(ki4) function returns the parity of the parent nuclide of decayself.

Culham Electromagnetics

Page 148 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

decay sf n yield(self)This real(kr8) function returns the spontaneous-fission neutron yield for thedecay of the nuclide.

decay spectra(self)This integer(ki4) function returns the total number of different spectrum typesfor self.

decay spectrum derav(self,spectrum no)This real(kr8) function returns the uncertainty in the average energy (in eV)of the radiation produced in spectrum number spectrum no of self.

decay spectrum erav(self,spectrum no)This real(kr8) function returns the average energy (in eV) of the radiationproduced in spectrum number spectrum no of self.

decay spectrum lines(self,spectrum no)This integer(ki4) function returns the total number of spectral lines for spec-trum number spectrum no of self.

decay spectrum norm(self,spectrum no)This real(kr8) function returns the normalisation factor for spectrum numberspectrum no of self.

decay spectrum norm unc(self,spectrum no)This real(kr8) function returns the uncertainty in the normalisation factor forspectrum number spectrum no of self.

decay spectrum type(self,spectrum no)This integer(ki4) function returns spectrum type of the spectrum of self withindex spectrum no. See Table 2 for the list of spectrum types.

decay spi(self)This real(kr4) function returns the spin of the parent nuclide of decay self.

decay stable nuc(self)This logical function returns true if the nuclide is stable, otherwise it returnsfalse.

10.1.6 Dependencies

This module depends on modules const kind m, const phys m, decay type m, endf m,energy bounds m, files m, log m, zai m and the DECAY or DK ENDF input files.

Culham Electromagnetics

Page 149 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

10.2 element m

10.2.1 Summary

The element m module manages the element data. The sources of these data are inter-nal tables and EAF or TENDL library files. Data are stored in the private element tobject and are accessed by enquiry functions.

10.2.2 Public types and data

The public data give the sizes of internal tables:� �! public variables

integer(ki4), public, parameter :: element_no_atten=24!! number of attenuation values per element

integer(ki4), public, parameter :: element_max_z =111!! number of elements tabulated

integer(ki4), public, parameter :: el_atten_max_z =100!! maximum number of elements with attenuation data� �

10.2.3 Arguments

character(len=*), intent(in) :: atten nameThe name of an absorption dataset.

integer(ki4), intent(in) :: isotopeThe local index number of an isotope.

character(len=*), intent(in) :: nameThe element name.

logical, optional, intent(in) :: softA flag indicating whether a function should return with an error code or terminatethe run with a fatal error.

integer(ki4), intent(in) :: zThe atomic number.

10.2.4 Public subroutines

The public subroutines are the creator, destructor and a data acquisition routine:

call element deleteDeallocate the element tables.

Culham Electromagnetics

Page 150 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call element initAllocate and initialise the element property tables.

call element read dosesRead and store the attenuation data from the ABSORP data stream (see files m).

10.2.5 Public functions

element at disp energy(z)This real(kr8) function returns the atomic displacement energy (in eV) of thegiven element.

element gamma absorption(z)This real(kr8), dimension(24) function returns an array of the 24 mass energyabsorption coefficients (m2 kg−1) corresponding to the 24 γ energy bins. Notethat data are available only for 1 ≤ z ≤ 100.

element gamma absorption named(atten name)This real(kr8), dimension(24) function returns an array of coefficients cor-responding to the name atten name. If the name is that of an element (e.g.,‘Fe’), it gives the same array as element gamma absorption(z) called with thecorresponding z. Other valid names and the data returned are:

’airmu’ energy attenuation coefficient of air (m−1)’airmuen’ mass energy absorption coefficient of air (m2 kg−1)’mev’ mean energy of gamma energy bins (MeV)

element isotope a(z,isotope)This integer(ki4) function returns the atomic mass number, A of the isotopeof the element given by z.

element isotope abundance(z,isotope)This real(kr8) function returns the natural abundance of the isotope of theelement given by z.

element isotope i(z,isotope)This integer(ki4) function returns the isomeric state, i of the isotope of theelement given by z.

element isotope zai(z,isotope)This integer(ki4) function returns the ZAI index of the isotope of the elementgiven by z.

element name(z)This character(len=2) function returns the name of the element, where (1 ≤ z≤ 111). For example, argument z=18 would return ’Ar’.

Culham Electromagnetics

Page 151 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

element no isotopes(z)This integer(ki4) function returns the number of isotopes of the given elementthat have non-negligible natural abundances.

element std atwt(z)This real(kr8) function returns the standard atomic weight in amu for naturallyoccurring abundances of the given element.

element std density(z)This real(kr8) function returns the standard density in g cm−3 for naturallyoccurring abundances of the given element.

element z(name,soft)This integer(ki4) function returns the Z given the two-character element name.Note that this function is not case conscious, so arguments ’AR’, ’ar’, ’aR’, and’Ar’ would all return 18. Only the first non-blank character of name and thefollowing character are significant. Unrecognised names produce a return codeof −1 if the soft flag is present and true, otherwise the function issues a fatalerror message.

10.2.6 Dependencies

This module depends on modules const kind m, const phys m, files m, log m, and thedata files ABSORP for the gamma absorption data and STOP * for the stopping-rangedata (which are not accessed by Fispact-II).

10.3 fission m

10.3.1 Summary

The fission m module extracts spontaneous and induced fission yields from EAF orTENDL library files and provides

1. induced fission yields;

2. associations when fission yields are not known.

It achieves this by

1. extracting induced fission yields from FISSYLD;

2. summing weighted energy-dependent data to get single values for yields, usingFLUXES data;

Culham Electromagnetics

Page 152 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

3. extracting associations from ASSCFY.

The resulting fission yield sets are stored in the fission t self objects of this module.These objects are linked to their true parent nuclides or to associated parent nuclidesby using pointers from the self type of the nuclide m module.

Spontaneous fission has irt = 6 or 17, induced fission has mt = 18. It is assumedfor present that all data in FISSYLD are projectile-induced fission yield data in 1, 2 or3 energy bins (thermal, fast or high energy). Spontaneous fission yield data are notpresent in FISSYLD.

If any fission products are not in the set of nuclides included in INDEX, then thesedaughters are set to neighbouring nuclides of the same mass, or failing that, to thesink nuclide.

10.3.2 Public types and data

The fission self type is fission t. This uses subsidiary derived data types part fy tand yield t.� �

!public typetype, public :: yield_t

privateend type yield_t

type, public :: part_fy_treal(kr8) :: energy !! projectile energytype(yield_t), allocatable, dimension(:) :: induced

end type part_fy_t

type, public :: fission_tinteger(ki4) :: index !! index of nuclide in fissyld fileinteger(ki4) :: zai_p !! zai of true parentlogical :: indep_yield=.false. !! T to use indep, F for cumulativetype(yield_t), allocatable, dimension(:) :: spontaneoustype(yield_t), allocatable, dimension(:) :: inducedtype(part_fy_t), dimension(part_fy_dim) :: part

end type fission_t� �The public data in fission m are the energy boundaries between high energy and fastprojectiles, and between fast and thermal projectiles.� �

! public variablesreal(kr8), public, parameter :: fission_en_high_fast = 5.0E+6

!! hf energy boundary in eVreal(kr8), public, parameter :: fission_en_fast_thermal = 2.0E+5

!! ft energy boundary in eV� �

Culham Electromagnetics

Page 153 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

10.3.3 Arguments

type(flux t), intent(inout) :: fluxProjectile flux data.

integer(ki4), intent(out) :: fy indexThe local index of an actinide in the ASSCFY file that has fission yield data.

logical, intent(in) :: fy newThe flag indicating whether the fission object is new or not.

logical, intent(in) :: fy splitThe flag indicating whether the fission yield data are split into separate files foreach nuclide (the TENDL-format library), or collected together into a single file(the EAF-format library).

integer, intent(in) :: fy unitThe unit from which fission yield data are read.

integer(ki4),intent(in) :: ifpThe index of a requested fission product in self.

logical, intent(in) :: indep fyThe flag indicating whether independent (T) fission yields, MT=454, (T) orcumulative fission yields, MT=459, (F) should be used.

integer(ki4), intent(out) :: no assocThe total number of entries in the ASSCFY file.

integer(ki4), intent(out) :: nuc indexThe nuclide number of an actinide in the ASSCFY file.

integer(ki4), intent(in) :: nuc maxThe maximum nuclide number of nuclides known to the program.

integer(ki4), intent(in) :: nuc no dThe nuclide number of a possible fission product to be checked.

logical, intent(in) :: read sfThe flag indicating whether spontaneous fission data should be read.

type(fission t) :: selfThe self type for fission.

integer(ki4),intent(inout) :: stat fissyldThe read status flag for reading from the FISSYLD file.

integer(ki4) :: zaiThe ZAI of a daughter nuclide.

Culham Electromagnetics

Page 154 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

integer(ki4), intent(inout) :: zai fThe ZAI of a parent nuclide, derived from the filename.

integer(ki4) :: zai fThe ZAI of a parent nuclide, from the filename.

type(zai t), intent(inout) :: zai libAll nuclide ZAI given in the INDEX file.

10.3.4 Public subroutines

call fission closeClose the fission yield (FISSYLD and FY ENDF) and association (ASSCFY) files.

call fission collapse(self,zai lib,flux)Collapse the fission yield data. Fission yield data are available in three projectileenergy bands: thermal, fast and high energy. Different nuclides have data avail-able in one, two or all three of these bands, and the spectrum-weighted averagesare computed differently in the three cases. If data are available in only oneenergy band, then these are used for the collapsed data. If they are available intwo of the three bands, either interpolation or extrapolation is used to infill themissing value, otherwise all three available values are used (see Section 2.5).

call fission collapse deleteDelete the workspace array used in computing the collapsed fission yields.

call fission collapse init(nuc max)Allocate a private workspace array with index range 0:nuc max for use in com-puting the collapsed fission yields.

call fission delete(self)Deallocate the fission self object.

call fission init(fy split,read sf)Open and read the headers of the EAF fission yield data file, or obtain thedirectory name for TENDL-format files, and open the association file.

call fission read(self,fy unit,zai lib,zai f,stat fissyld, && indep fy,fy new)Read the fission yield data from the ENDF-6 data file FISSYLD for the nextnuclide with parent ZAI index zai f (derived from the filename) from the set ofknown ZAI stored in zai lib.

call fission read assoc head(no assoc)Read the headers of the ASSCFY file and return the number of associationsno assoc in the file.

call fission retrieve flagRead the flag indicating EAF or TENDL data from the ARRAYX file.

Culham Electromagnetics

Page 155 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call fission retrieve(self)Read the fission self object from the ARRAYX file.

call fission store flagWrite the flag indicating EAF or TENDL data to the ARRAYX file.

call fission store(self)Write the fission self object to the ARRAYX file.

10.3.5 Public functions

fission daughter(self,nuc no d)This logical function returns true if the input nuclide number is that of one ofthe daughters of this fission.

fission read assoc(nuc index,fy index)This logical function reads a fission association and returns a flag. It readsand returns values of the nuclide index nuc index and the index of the asso-ciated fission yield data fy index. The function value is false unless an eof isencountered.

fission sfyld frac(self,ifp)This real(kr8) function returns the fractional yield for the spontaneous fissionproduct with index ifp.

fission sfyld no(self)This integer(ki4) function returns the number of spontaneous fission productsfor self.

fission sfyld nuc no(self,ifp)This integer(ki4) function returns the nuclide number for the induced fissionproduct with index ifp.

fission sfyld zai(self,ifp)This integer(ki4) function returns the ZAI for the spontaneous fission productwith index ifp.

fission tendl()This logical function returns true if the new-style fission yield data are beingused.

fission yield frac(self,ifp)This real(kr8) function returns the fractional yield for the induced fission prod-uct with index ifp.

fission yield no(self)This integer(ki4) function returns the number of induced fission products forself.

Culham Electromagnetics

Page 156 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

fission yield nuc no(self,ifp)This integer(ki4) function returns the nuclide number for the induced fissionproduct with index ifp.

fission yield pcnt(self,zai)This real(kr8) function returns the percentage induced fission yield for thedaughter with index zai.

fission yield zai(self,ifp)This integer(ki4) function returns the ZAI for the induced fission product withindex ifp.

10.3.6 Dependencies

This module depends on modules const kind m, const phys m, endf m, files m, flux m,log m, zai m, and library input files ASSCFY, FISSYLD and FY ENDF.

10.4 flux m

10.4.1 Summary

The flux m module manages the reading and storing of the projectile flux either fromthe FLUXES file or the ARB FLUX file. In the latter case it also writes a FLUXES file.

10.4.2 Public types and data� �!public typestype, public :: flux_t

real(kr8), dimension(:), allocatable :: values ! array of fluxesreal(kr8), dimension(:), allocatable :: frac_unc ! array of

fractional uncertaintiesreal(kr8) :: wall_loadingcharacter(len=100) :: spectrum_identifierreal(kr8) :: thermal_fractionreal(kr8) :: fast_fractionreal(kr8) :: high_fractioninteger(ki4) :: i_hf ! index of high-fast energy borderinteger(ki4) :: i_ft ! index of fast-thermal energy border

end type flux_t� �There are no public data.

Culham Electromagnetics

Page 157 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

10.4.3 Arguments

integer(ki4), intent(in), dimension(3) :: binsThe numbers of cross-section, scpr and arbitrary flux energy bins.

real(kr8), dimension(:), intent(in) :: e inInput energy bin boundaries.

real(kr8), intent(in) :: en ftThe fast-thermal energy boundary (in eV).

real(kr8), intent(in) :: en hfThe high-fast energy boundary (in eV).

real(kr8), dimension(:), intent(in) :: energiesEnergy points at which fission yields are specified in the TENDL library.

real(kr8), dimension(:), intent(in) :: f inInput projectile fluxes.

real(kr8), dimension(:), intent(inout) :: fractionsFractions of the total projectile flux in bins around the energy values given inenergies.

logical, intent(in) :: grpconvertFlag to indicate conversion from arb flux to fluxes.

type(flux t) :: selfThe flux self type.

real(kr8), intent(in) :: wall loadingThe wall loading (in MW m−2).

10.4.4 Public subroutines

call flux delete(self)Deallocate the flux self object.

call flux fractions(self,en ft,en hf)Compute the flux fractions for use in fission yield collapse. Cross-sections andthe energy bounds are in order of decreasing energy.

call flux fractions endf(self,energies,fractions)Compute flux fractions for fission yield collapse. A set of energy points is inputin the energies array, and fractions for the flux in bins around these energy pointsare returned in the fractions array for use by the calling routine in collapsing thefission yields. Note that cross sections are in order of decreasing energy, but theinput energies are in increasing energy order.

Culham Electromagnetics

Page 158 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call flux init(self,grpconvert,bins)Read in the flux data. If grpconvert is true, then bins(3) groups are readfrom the file ARB FLUX and are converted to bins(1) standard energy groups andwritten to file FLUXES.

call flux mfi init(self,f in,e in)Initialise a +flux t+ data structure for use with the +mfi+ multi-flux interface,obtaining the energy group boundaries and the flux spectrum from the inputarguments.

call flux retrieve(self)Read the fluxes from the COLLAPX file.

call flux store(self)Write the fluxes to the COLLAPX file.

10.4.5 Public function

flux from wall loading(self,wall loading)This real(kr8) function converts the wall loading given in units of MW m−2

into a flux in units of projectiles cm−2 s−1.

10.4.6 Dependencies

This module depends on modules const kind m, energy bounds m, files m, log m, andon files ARB FLUX and FLUXES.

10.5 nuclide m

10.5.1 Summary

The purpose of this module is to manage the nuclide data. It extracts, with the helpof subsidiary modules, data from the various input files and stores the reduced dataneeded by the code in the nuclide object. It provides procedures for extracting datafrom nuclide for use elsewhere.

The self object of this module contains all the nuclide, reaction and decay data usedin the inventory calculations.

10.5.2 Public types and data

The self object is of type nuclide t and contains a full description of the nuclearphysics data used. It points to an array of subsidiary nuclide node t entities, one

Culham Electromagnetics

Page 159 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

for each parent nuclide included in the calculation. Each of the parent nodes may inturn have a number of reactions and decays leading to daughter nuclides, and actinidesin addition have fission reactions leading to many fission products. At high energies,other reactions (mt=5) may also be described in terms of a range of products, ratherthan having a single, principal daughter nuclide and secondary products.� �

type, public :: nuclide_tlogical :: fission_data =.false.logical :: save_lines =.false.integer(ki4) :: lib_type=endf_tendl !! eafversiontype(nuclide_node_t), allocatable, dimension(:) :: parent

type(zai_t) :: zai_lib !! known zai in library datacharacter(len=32) :: decay_label=’ ’ !! EAF label of decay filecharacter(len=32) :: reaction_label=’ ’ !! EAF label of cross-section↘→ file

character(len=32) :: flux_label=’ ’ !! spectrum identifiertype(date_time_t) :: decay_timestamp !! timestamp of decay runtype(date_time_t) :: reaction_timestamp !! timestamp of collapse↘→ run

end type nuclide_t� �Each element of parent contains a parent nuclide and the outgoing digraph edges(reactions, fissions, decays) connected to it. zai lib is an addressing object and theremaining variables are labelling information for the sources of the nuclide data used.� �

type, public :: nuclide_node_tinteger(ki4) :: zaiinteger(ki4) :: indexreal(kr8) :: atomic_weight =0.0_kr8type(reaction_t), allocatable, dimension(:) :: reactiontype(resonance_data_t) :: rrr_datatype(fission_t), pointer :: fission => null()type(decay_t) :: decaytype(regulatory_t) :: regulatory

!!$ type(scpr_t), pointer :: scpr=> null()end type nuclide_node_t� �

A parent is a nuclide node t object. It describes a nuclide in terms of its ZAI in-dex, the index (index) number given in the input INDEX file and its atomic weight(atomic weight) in amu. It also contains an array of objects (reaction) that de-scribe the reactions it may undergo, and objects that describe its resolved resonances(rrr data), decay (decay) and fission (fission).

10.5.3 Arguments

type(flux t), intent(inout) :: fluxThe projectile flux object.

logical, intent(in) :: fy indep

Culham Electromagnetics

Page 160 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

The flag indicating whether independent fission yields, MT=454, (T) or cumu-lative fission yields, MT=459, (F) should be used.

logical, intent(in) :: fy splitThe flag indicating whether the fission yield data are split into separate files foreach nuclide (the TENDL-format library), or collected together into a single file(the EAF-format library).

integer(ki4),intent(in) :: no fissA fission yield dataset number.

integer(ki4), intent(in) :: nuc noA nuclide number.

integer(ki4), optional, intent(in) :: partA deallocation selector.

logical, intent(in) :: read sfThe flag indicating whether spontaneous fission data should be read.

type(rundata t), intent(inout) :: rundataThe run control data object.

type(nuclide t) :: selfThe nuclide self object.

type(date time t), intent(in) :: timestampThe timestamp object.

logical, optional, intent(in) :: totalsIf present and true, this flag modifies the behaviour of the function nuclide min reac.

10.5.4 Public subroutines

call nuclide a2data(self)This reads transport data from A2DATA.

call nuclide clearance(self)This reads clearance data from CLEAR.

call nuclide collapse fissyld(self,flux)Collapse fission yield for all nuclides with fission yield data. The fission yielddata are available in three projectile energy bands: thermal, fast and high energy.Different nuclides have data available in one, two or all three of these bands, andthe spectrum-weighted averages are computed differently in the three cases. Ifdata are available in only one energy band, then these are used for the collapseddata. If they are available in two of the three bands, either interpolation orextrapolation is used to infill the missing values, otherwise all three availablevalues are used. Use is made of fission collapse in module fission m.

Culham Electromagnetics

Page 161 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call nuclide collapse xs(self,flux)Collapse cross-sections using stored full cross-sections preserved in +reaction m+.

call nuclide decay(self,rundata,timestamp)nuclide decay manages the allocation, data input and reduction of the decaydata into self, given inputs of rundata, flux and timestamp.

Depending on data in rundata, the decay data are either read from previouslyprocessed data in the ARRAYX file, or from the EAF or TENDL data libraries.In the latter case, work is delegated to procedures of subsidiary object moduledecay m and uses one or more input files DECAY or DK ENDF for the decay data.

call nuclide delete(self[,part)]This deallocates part or all of the storage allocated for self. If optional argumentpart = 1, then cross-section data storage is deallocated, if part = 2, the decayand fission data are deallocated, otherwise all self storage is deallocated.

call nuclide fissyld(self,fy split,fy indep,read sf)nuclide fissyld reads data from the ASSCFY and FISSYLD or FY ENDF libraryfiles and stores them in self. The flux object is input to provide data for thecollapse of the fission yield data.

call nuclide fy print(self)This provides a diagnostic print of fission yields and is used only in unit tests.

call nuclide hazards(self)This reads ingestion and inhalation hazards data from HAZARDS.

call nuclide init(self)This allocates and initialises self%parent for nuclides included in the contentsof the INDEX file read on stream ind nuc.

The INDEX file contains the definitive list of nuclides included in the inventorycalculation. Parent nuclides appearing in the library files that are not in theINDEX list are ignored. Daughter nuclides not included in INDEX are replaced bythe sink nuclide.

call nuclide over(self,rundata)Overwrite values of and errors in collapsed cross-sections and half lives obtainedfrom the EAF or TENDL libraries as specified by the OVER keyword. Theoverwriting only affects values for the present run. Changes are not stored inthe collapsed data. The reactions and reaction uncertainties for a given parent-daughter combination are all scaled by the same factor to give the new specifiedσ and (δσ/σ).

call nuclide react(self,rundata,flux,timestamp)nuclide react manages the allocation, data input and the reduction of the cross-section data into self, given inputs of rundata, flux and timestamp.

Depending on data in rundata, the collapsed cross-sections are either read frompreviously processed data in the COLLAPX file, or from the EAF or TENDL data

Culham Electromagnetics

Page 162 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

libraries. In the latter case, work is delegated to procedures of subsidiary objectmodules reaction m, scpr m, and flux m, and uses input files FLUXES, CROSSEC,and (if required) ARB FLUX, CROSSUNC and SPEC *.

The COLLAPX file contains reduced cross-sections, projectile-induced fission yields,fluxes and if required cross-section uncertainties and charged-particle productionrates (see Equation (58)).

10.5.5 Public functions

nuclide appm(self)This logical function returns true if the gas totals cross-sections are available.

nuclide dpa(self)This logical function returns true if dpa cross-sections are available.

nuclide fissyld nuc no(no fiss)This integer(ki4) function returns the nuclide number of the parent nuclide ofthe known fission yield data set number no fiss.

nuclide index(self,nuc no)This integer(ki4) function returns the index number of a nuclide as given inthe input INDEX file corresponding to entry number nuc no in the array of parentnuclides in self.

nuclide is actinide(self,nuc no)This logical function returns true if nuclide nuc no has a fission reaction.

nuclide kerma(self)This logical function returns true if kerma cross-sections are available.

nuclide max nuc no(self)This integer(ki4) function returns the maximum index number in the array ofparent nuclides in self, i.e. the total number of different nuclides.

nuclide max reac(self)This integer(ki4) function returns the total number of different reactions,summed over all parent nuclides in self.

nuclide min reac(self,nuc no,totals)This integer(ki4) function returns the index of the first reaction after the kermaand dpa entries, or the totals entries if the flag totals is present and true.

nuclide no fissyld sets()This integer(ki4) function returns the number of known fission yield data setsread from FISSYLD.

Culham Electromagnetics

Page 163 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

10.5.6 Dependencies

This module depends on the infrastructure modules const kind m, const math m, const phys m,date time m and log m; the data modules decay type m, energy bounds m, reaction type m,resonance m and spectrum type m; the I/O and control modules endf m, endfmat m,files m and rundata m; and the physical property modules decay m, element m, fission m,flux m, ptable m, reaction m, regulatory m and zai m.

10.6 ptable m

10.6.1 Summary

This module manages the probability data. It extracts data from the various input filesand stores the data needed by the code in the self object of type ptable t. It providesfunctions for extracting data from the ptable t data structure for use elsewhere in thecode. In particular, it computes the self-shielding factors for selected nuclides.

10.6.2 Public types and data

The ptable t object stores all the probability table data.� �type, public :: ptable_t

privateend type ptable_t� �

There are no public data.

10.6.3 Arguments

integer(ki4), intent(in) :: cal mtA CALENDF macro-partial group mt number.

type(zai t), intent(in) :: known zaiThe full list of known nuclides.

integer(ki4), intent(in) :: iIndex of a nuclide in the mixture list.

integer(ki4), intent(in) :: mix noThe index of a nuclide in the mixture list.

integer(ki4), intent(in) :: no xs binsThe number of cross-section bins.

Culham Electromagnetics

Page 164 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

integer(ki4), intent(in) :: nuc noThe parent nuclide number.

type(rundata t), intent(inout) :: rundataThe run control data.

type(ptable t), intent(inout) :: selfThe probability table object.

real(kr4), dimension(:), intent(in) :: sigmaA cross-section contributing to a CALENDF macro-partial cross-section.

real(kr4), dimension(:), intent(in) :: sigma totThe total cross-section.

real(kr4), intent(inout), dimension(:) :: ssfThe self-shielding factor for each energy bin.

logical, intent(out) :: ssfknownTrue if ssf data are known.

10.6.4 Public subroutines

call ptable delete(self)Deallocate self and end use of current directory name.

call ptable eaf partial(self,nuc no,cal mt,sigma)Store the macro-partial cross-section input from EAF or TENDL data in self.

call ptable get ssf(self,nuc no,cal mt,ssf,ssfknown)Return the self-shielding array for scaling cross-sections. If ssf data are not knownor ssf’s are all unity, set ssfknown flag to false.

call ptable init(self,known zai,rundata)Allocate storage, read the probability table and mixture data and write theinitialisation summary.

call ptable sigma tot(self,mix no,sigma tot)Store the total cross-section input from EAF or TENDL data in self.

call ptable ssf(self)Compute self-shielding factors for nuclides in the application list.

10.6.5 Public functions

ptable apply nucno(self,i)This integer(ki4) function returns the nuclide number for the given nuclide inthe application list.

Culham Electromagnetics

Page 165 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

ptable apply size(self)This integer(ki4) function returns the size of the self-shielding application list.

ptable mix nucno(self,i)This integer(ki4) function returns the nuclide number for the given nuclide inthe mixture array.

ptable mix size(self)This integer(ki4) function returns the size of the mixture array.

ptable use(self)This logical function returns true if probability table data are to be used.

10.6.6 Dependencies

This module depends on modules const kind m, energy bounds m, files m, log m,rundata m and zai m.

10.7 reaction m

10.7.1 Summary

The reaction m module manages the reading of the CROSSEC and CROSSUNC data files(or the files in the XS ENDF directory) and the FLUX (or ARB FLUX) data files and the col-lapsing of the cross-section and uncertainty data into the array of reaction t objectsbelonging to each of the parent nuclides in the self object of module nuclide m.

Data are read a nuclide at a time. All reaction and uncertainty data for the currentparent nuclide are read into internal queues (implemented as FIFO linked lists). Thedata are then collapsed to produce single cross-section and uncertainty values for eachreaction, and these are stored in the reaction t object, together with the reactioncode mt and the ZAI of the daughter nuclide.

The module provides

1. projectile fluxes, using flux m;

2. collapsed cross-sections;

3. collapsed cross-section uncertainties;

4. sequential charged particle production rates.

where items (3) and (4) are options selected by rundata.

The module extracts

Culham Electromagnetics

Page 166 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

1. projectile fluxes from the ARB FLUX or FLUXES file;

2. cross-section data from the CROSSEC file or XS ENDF files;

3. resolved resonance parameters from the XS ENDF files;

4. cross-section covariance data from the XS ENDF files;

5. uncertainty data from the CROSSUNC file or XS ENDF files;

6. charged particle spectrum data from the SPEC * files.

10.7.2 Public types and data

The self object is of type reaction t:� �!public typetype, public :: reaction_t

privateend type reaction_t� �

There are no public data.

10.7.3 Arguments

type(endfmat t), intent(in) :: endfmatThe ENDF data object.

logical, intent(out) :: eof xsTrue if eof is encountered.

type(flux t), intent(in) :: fluxThe projectile flux object.

logical, intent(in) :: full xsTrue if full, energy-dependent cross-section values are to be saved.

logical, intent(in) :: get scprTrue if sequential charged particle reaction data are to be read.

logical, intent(in) :: get uncTrue if uncertainty data are to be read.

integer(ki4), intent(in) :: mtThe MT code of a reaction.

integer(ki4), intent(in) :: ncovThe array index of a covariance entry for the given reaction.

Culham Electromagnetics

Page 167 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

integer(ki4), intent(out) :: no reacThe total number of reactions read for the current nuclide.

character(len=32) :: reaction labelEAF label of cross-section file.

real(kr8), intent(in) ::scale factorMultiplying factor.

type(reaction t) :: selfA reaction t self object.

type(reaction t), intent(in), dimension(:) :: sourceAn array of reaction t self objects.

real(kr4), intent(in), dimension(:) :: ssfAn array of self-shielding scaling factors.

real(kr4), intent(out), dimension(:) :: xsAn array of cross-sections in decreasing energy bin order.

logical, intent(in) :: xs endf inTrue if library cross-section data are in TENDL format.

integer(ki4), intent(in) :: zaiThe ZAI of the parent from the nuclide index.

type(zai t), intent(in) :: zai libAll nuclide ZAI given in the INDEX file.

integer(ki4), intent(out) :: zai pThe ZAI of the parent of the last cross-section read.

10.7.4 Public subroutines

call reaction clear sigma en(self)Deallocate the internal array of energy-dependent cross-sections for each elementof the array self, and reallocate it at zero length.

call reaction clear xs saveClear the internal flag for saving energy-dependent cross-sections.

call reaction closeClose the cross-section and uncertainty data files, or release the directory ofTENDL-format files.

call reaction collapse(self,zai lib,zai)Pop the collapsed cross-section data from the reaction queue into the array ofreaction objects for the current parent nuclide.

Culham Electromagnetics

Page 168 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call reaction collapse xs(self,flux)Collapse the cross-sections for reactions of the current parent nuclide, using thestored +sigma en+ energy-dependent cross-sections.

call reaction copy(self, source)Copy the array of self objects source into the array self.

call reaction delete(self)Deallocate the array of self objects self.

call reaction init(get unc,get scpr,full xs,reaction label, && xs endf in)If xs endf in is true, prepare to open individual nuclide files in the XS ENDFdirectory, otherwise open the CROSSEC data file and read and return the headinglabel reaction label; also, if get unc is true open the CROSSUNC file. If get scpris true open the scpr files. Initialise the cross-section queue.

call reaction next xs(zai p,eof xs)Read the next cross-section record into the cross-section record buffer. If re-quired, also read the next cross-section uncertainty record into the cross-sectionrecord buffer.

call reaction over sigma(self,scale factor)Scale the collapsed cross-section for reaction self by multiplying it by scale factor.

call reaction over sigma unc(self,scale factor)Scale the collapsed cross-section uncertainty for reaction self by multiplying itby scale factor.

call reaction read(flux,zai,zai p,no reac,eof xs)Read and collapse the reaction data for parent zai into the reaction queue, andwhen all the reactions for the current parent have been read, return the numberof reactions no reac ready to allocate the reaction array for the current parentnuclide.

call reaction retrieve(self)Binary read the array self from input stream collapxi.

call reaction sigma en(self,xs)Return the array xs of energy-dependent cross-sections for self.

call reaction ssf(self,flux,ssf)Scale the cross-sections by the self-shielding factors ssf and compute and storethe new collapsed cross-section in self.

call reaction store(self)Binary write the array self to output stream collapxo.

Culham Electromagnetics

Page 169 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call reaction store endf(self)Transfer the collapsed cross-sections and uncertainties from the local queue tothe array of self objects for the current parent, optionally store the full, energy-dependent cross-section as well and then deallocate the queue storage.

10.7.5 Public functions

reaction cov frac(self,ncov)This integer(ki4) function returns the fractional covariance for covariance num-ber ncov of reaction self.

reaction cov index(self,ncov)This integer(ki4) function returns the index in the reaction t array for thesecond reaction for covariance number ncov of reaction self.

reaction cov mt(self,ncov)This integer(ki4) function returns the mt for the second reaction for covariancenumber ncov of reaction self.

reaction cov zaid(self,ncov)This integer(ki4) function returns the ZAI of the daughter for the secondreaction for covariance number ncov of reaction self.

reaction index(self,mt)This integer(ki4) function returns the local array subscript in the array selffor the reaction with the given mt, or zero if the reaction is not found.

reaction is diagnostic(self)This logical function returns true if reaction self is intended for diagnosticoutput and is not to be included in the rate equation matrix (MT is 1, 3 or greaterthan 200), otherwise it returns false.

reaction is elastic(self)This logical function returns true if reaction self is elastic scattering (MT=2),otherwise it returns false.

reaction is fission(self)This logical function returns true if reaction self is fission, otherwise it returnsfalse.

reaction is other(self)This logical function returns true if reaction self is the total otherwise un-specified (mt=5), otherwise it returns false.

reaction mt(self)This integer(ki4) function returns the mt index for reaction self.

Culham Electromagnetics

Page 170 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

reaction no cov(self)This integer(ki4) function returns the number of covariance entries for reactionself.

reaction nuc no d(self)This integer(ki4) function returns the daughter nuclide number for reactionself.

reaction sigma(self)This real(kr4) function returns the value of the cross-section (in barns) forreaction self.

reaction sigma unc(self)This real(kr4) function returns the value of the fractional uncertainty in thecross-section for reaction self.

reaction zai d(self)This integer(ki4) function returns the ZAI index of the daughter nuclide forreaction self.

10.7.6 Dependencies

This module depends on modules const kind m, const phys m, endf m, endf mat m,energy bounds m, files m, flux m, log m, reaction type m, resonance m, zai m; inputfiles ARB FLUX, CROSSEC, CROSSUNC, FLUXES; and the directory XS ENDF.

10.8 regulatory m

10.8.1 Summary

The regulatory m module provides regulatory data. It reads in the transport data,clearance data and hazards data required by the program, and stores these data in itsself object.

10.8.2 Public types and data� �!public typetype, public :: regulatory_t

real(kr4) :: transport=0.0_kr4real(kr4) :: clearance=-1.0_kr4real(kr4),dimension(2) :: hazard =(/0.0_kr4 ,0.0_kr4/)

end type regulatory_t� �There are no public data.

Culham Electromagnetics

Page 171 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

10.8.3 Arguments

real(kr4), dimension(2), intent(out) :: hazardThe inhalation and ingestion hazard values.

integer(ki4), intent(out) :: nuc indexThe nuclide index.

real(kr4), intent(out) :: reg valueThe transport or clearance regulatory data value.

type(regulatory t), intent(out) :: selfThe regulatory self type.

type(regulatory t), intent(in) :: sourceThe regulatory self type.

integer(ki4), intent(in) :: unitFile unit. It take values a2data or clear.

integer(ki4), intent(out) :: zaiThe nuclide ZAI.

10.8.4 Public subroutines

call regulatory close(unit)Close the regulatory data file.

call regulatory copy(self,source)Copy source to self.

call regulatory init(unit)Open the regulatory data file unit a2data or clear and skip the heading line.

call regulatory init hazardOpen the regulatory data file unit hazards and skip the first two lines.

10.8.5 Public functions

regulatory read(unit,nuc index,zai,reg value)This logical function reads the next line of the regulatory file (a2data or clear),and returns the value true if eof is encountered. If its value is false it returns thenext values of nuc index, zai and reg value in its arguments.

regulatory read hazard(zai,hazard)This logical function reads the next line of the regulatory file hazards, andreturns the value true if eof is encountered. If its value is false it returns the nextvalues of zai and hazard in its arguments.

Culham Electromagnetics

Page 172 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

10.8.6 Dependencies

This module depends on modules const kind m, files m and log m, and on input filesA2DATA, CLEAR and HAZARDS.

10.9 resonance m

10.9.1 Summary

The resonance m module calculates resonance-related quantities required for use inthe Salgado et al [42] universal sigmoid curve model of self shielding.

Resonance parameters are obtained from ENDF-format File 2 data from the TENDLlibrary files by calling +endfmat m+ subroutines.

The data for a selection of nuclides are stored in a resonance t self object which storesresonance weights and nuclide number densities needed in the universal curve model.

10.9.2 Public types and data

The self object is of type resonance t:� �! public typetype, public :: resonance_t

privateend type resonance_t� �

There are no public data.

10.9.3 Arguments

type(endfmat t), intent(inout) :: endfmatThe ENDF data object for the current nuclide.

integer(ki4), intent(in) :: nuc maxThe total number of nuclides.

integer(ki4), intent(in) :: nuc noThe nuclide number of the current nuclide.

type(rundata t), intent(inout) :: rundataThe run data object.

type(resonance t) :: selfA resolved resonance data self object.

Culham Electromagnetics

Page 173 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

real(kr4), dimension(:), intent(inout) :: ssfThe array of energy-dependent self-shielding factors.

10.9.4 Public subroutines

call resonance accumulate(self,endfmat,nuc no)Accumulate contributions to energy-dependent self-shielding factors by addingweights and products of weights and self-shielding factors for individual reso-nances to the appropriate energy bins.

call resonance calc ssf(self)Fill the array of energy-dependent self-shielding factors, using the results of +res-onance accumulate+.

call resonance delete(self)Deallocate all allocatable components of self and reset the +ssf known+ flag.

call resonance init(self,rundata,nuc max)Initialise the self object by allocating arrays, obtaining data from +rundata m+and calculating selected nuclide number densities from the initial inventory andthe target geometry.

call resonance ssf(self)Return the array of energy-dependent self-shielding factors.

10.9.5 Public functions

There are no public functions.

10.9.6 Dependencies

This module depends on modules const kind m, const math m, endfmat m, log m andrundata m

10.10 scpr m

This subsection is a place-holder for the scpr m module.

The implemention of sequential charged-particle reactions is regarded as a low prior-ity and so completion of their implementation is not planned to be included in theFispact-II code.

Culham Electromagnetics

Page 174 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

10.11 zai m

10.11.1 Summary

The zai m module contains a collection of functions for handling ZAI codes and re-lated data. Different self type objects allow mappings between the ZAI number anddifferent subsets of the nuclide data.

All the encoding and decoding of the ZAI key in the program is performed by functionsin this module. If a different encoding is needed (e.g., to increase the maximum allowednumber of isomeric states beyond 9) then this can be implemented by changing themultipliers in this module.

10.11.2 Public types and data� �!public typestype, public :: zai_t

privateend type zai_t� �

There are no public data.

10.11.3 Arguments

integer(ki4), intent(in) :: aThe atomic mass number.

logical, optional, intent(in) :: extendedFlag for extended gnuplot format.

integer(ki4), intent(in) :: iThe isomeric state.

character(len=1), intent(in) :: iso nameThe single-character label of the isomeric state.

character(len=*), intent(in) :: nuc nameThe nuclide name in the form ‘Te129m’.

integer(ki4), intent(in) :: nuc noThe nuclide number.

integer(ki4), dimension(0:), intent(in) :: nuc zaiThe array of known nuclide ZAI. The 0 entry is the ‘sink’ nuclide.

logical, optional, intent(in) :: pt formFlag for format used in probability tables.

Culham Electromagnetics

Page 175 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

type(zai t) :: selfThe ZAI self type.

integer(ki4), intent(in) :: zThe atomic number.

integer(ki4), intent(in) :: zaThe encoded combination of atomic number and atomic mass number.

integer(ki4), intent(in) :: zaiThe ZAI index.

10.11.4 Public subroutines

The public subroutines are the creator and destructor:

call zai delete(self)Deallocate self.

call zai init(self,nuc zai)Allocate and load the array of nuclide ZAI nuc zai into self for mapping theZAI numbers to nuclide numbers. The 0 element of the array is used for the sinknuclide, and the ZAI of the sink nuclide is set to zero.

10.11.5 Public functions

zai char to i(iso name)This integer(ki4) function returns the isomeric state I corresponding to charac-ter representations. To handle cases met in the EAF data the following mappingsare used:

I Characters

0 ’ ’,’-’1 ’m’, ’M’, ’*’2 ’n’, ’N’, ’#’3 ’o’4 ’p’5 ’q’6 ’r’7 ’s’8 ’t’9 ’u’-1 otherwise

Culham Electromagnetics

Page 176 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

zai encode(z,a,i)This integer(ki4) function returns the ZAI for given nuclide z, a, and i.

zai from nuclide name(nuc name)This integer(ki4) function returns the nuclide ZAI for the given nuclide name.The nuclide name takes the form ’ElAAAI’, e.g., Te129M, TI49. The elementname and isomeric state letter may be in any mixture of upper and lower case.

zai from nuc no(self,nuc no)This integer(ki4) function returns the ZAI index of nuclide number nuc no inself.

zai identifier to nuc no(self,nuc name)This integer(ki4) function returns the nuclide number from either the characterform of the nuclide name or the material number as a character string. It is usedin parsing the FUEL keyword input.

zai set size(self)This integer(ki4) function returns the number of nuclides (including the sinknuclide) in the subset known to self.

zai surrogate(self,zai)This integer(ki4) function returns the ZAI of the surrogate nuclide correspond-ing to the given zai. The surrogate has the same A as the input, the same orlarger Z and the I for the first such instance where such A and Z are found. Ifsuch a nuclide is not in the list of nuclides, then ZAI= −1 is returned.

zai to a(zai)This integer(ki4) function returns the atomic mass number A correspondingto zai.

zai to element name(zai)This character(len=2) function returns the element name corresponding to zai.The name has upper case first letter and lower case second, e.g., ’Fe’.

zai to i(zai)This integer(ki4) function returns the isomeric state corresponding to zai.

zai to i char(zai)This character(len=1) function returns the isomeric state corresponding to zai.It returns characters ’ ’, ’m’ and ’n’ for I = 0, 1, 2, respectively. For I = 3-9,it returns the letters displayed in the above table, and for other I it returns ’?’.

zai to nuc no(self,zai)This integer(ki4) function returns the nuclide number (local index number inself) for the given zai.

zai to nuclide name(zai,extended)This character(len=9) function returns the nuclide name (e.g., Te129m) cor-responding to the input zai. Character cases are as shown in the example. If

Culham Electromagnetics

Page 177 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

the optional argument extended is present and true, the output becomes, e.g.,ˆ{129m}Te.

zai to z(zai)This integer(ki4) function returns the atomic number Z corresponding to zai.

zai to za(zai)This integer(ki4) function returns the ZA index corresponding to zai.

zai za i encode(za,i)This integer(ki4) function returns the ZAI for given nuclide za combinationand i.

10.11.6 Dependencies

This module depends on const kind m, element m and log m.

11 Calculation Modules

11.1 digraph m

11.1.1 Summary

The digraph m module manages the storage and manipulation of the directed graphsused in computing pathways.

The directed graphs used to describe the transmutation of a source nuclide to one ormore target nuclides through a number of intermediate nuclides are represented bybreadth first search (BFS) trees. This module handles the creation, searching anddestruction of a tree, keeping all details of the linked lists and pointers used for thetree representation hidden from the parent path object.

The implementation of the BFS trees in digraph m uses a queue of digraph node titems. These items are defined as follows:� �type, private :: digraph_node_t !! the breadth first graph

integer(ki4) :: nuc_no !! vertex nuc nointeger(ki4) :: index_d !! daughter rateeq matrix column indexinteger(ki4) :: depth !! depth in graph (handy but not necessary)real(kr8) :: weight !! digraph weight using multipulse formulaereal(kr8), dimension(:), allocatable :: flow !! multipulse flow ↘

→boundstype(digraph_node_t), pointer :: parent=>null()type(digraph_node_t), pointer :: next=>null()

end type digraph_node_t� �

Culham Electromagnetics

Page 178 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

A graphical representation of an item of this derived data type is shown in Figure 12.

parent nextnuc_no index_d depth weight flow

Figure 12: A graphical representation of a digraph node t item.

The tree representation of a graph is stored in the self object for the digraph m module:� �type, public :: digraph_t

private! masking arrays for digraph searchinglogical, dimension(:), allocatable :: visitedlogical, dimension(:), allocatable :: subtargetlogical, dimension(:), allocatable :: missed_subtarget! pointers for digraph storagetype(digraph_node_t), pointer :: graph_head=>null()type(digraph_node_t), pointer :: graph_tail=>null()type(digraph_node_t), pointer :: graph_root=>null()type(digraph_node_t), pointer :: graph_path_dau=>null()

end type digraph_t� �The nodes of the tree are stored as a queue of digraph node t objects with backpointers to the parent node. The graph root pointer points at the source nuclidedigraph node t at the root of the tree. The head of the queue is the graph headpointer that points at the current parent nuclide, and the tail of the queue is thegraph tail pointer that points to the current daughter nuclide. The graph path daupointer points at the first daughter of the current parent nuclide.

The first stage of finding pathways is to build a single (parent) visit tree and identifyall nuclides that lie on paths from the source to a target nuclide. Once a nuclide hasbeen visited as a parent, its self%visited flag is set to true. Any nuclide on a pathfrom the source to a target nuclide, or on a path from the source nuclide to any nuclideon a path to a target nuclide is flagged as a subtarget. The self%missed subtargetflag is set to true if a nuclide is identified as lying on a path to a subtarget after it hasbeen visisted as a parent. This flag is used in iterating on the single visit tree to findall the edges of the graph lying on paths from the source nuclide to any of the targetnuclides.

11.1.2 Public types and data

All breadth first search tree data describing the digraph are held privately in thedigraph t self object:� �

!public typestype, public :: digraph_t

privateend type digraph_t� �

Culham Electromagnetics

Page 179 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Data in the self object are accessed via the public subroutines and functions describedbelow. There are no public data accessible directly.

11.1.3 Arguments

integer(ki4), intent(inout) :: depthDepth of the daughter nuclide in the tree. (The tree root has depth = 0.)

real(kr8), dimension(:), optional, intent(inout) :: flowFlow bounds used for pruning the tree.

integer(ki4), dimension(:), intent(out) :: index dAn array of daughter nuclide numbers for nuclides on a path

integer(ki4), intent(in) :: index dThe daughter nuclide column index number in the compactly stored matrix ofrate equation coefficients held in the rateeq self object.

integer(ki4), intent(out) :: index pThe parent nuclide column index number in the compactly stored matrix of rateequation coefficients held in the rateeq self object.

integer(ki4), intent(out) :: no edgesThe number of edges on a path.

integer(ki4), intent(in) :: nuc noA nuclide number.

integer(ki4), intent(in) :: nuc no dA daughter nuclide number.

integer(ki4), dimension(:), intent(out) :: nuc no pAn array of nuclide numbers of parents for nuclides on a path.

integer(ki4), dimension(:), intent(in) :: nuc no tThe nuclide numbers of the target nuclides.

integer(ki4), intent(in) :: nuclide minThe minimum nuclide number in the digraph data.

integer(ki4), intent(in) :: nuclide maxThe maximum nuclide number in the digraph data.

type(digraph t) , intent(inout) :: selfThe directed graph self object.

integer(ki4), intent(in) :: targetThe nuclide number of the target nuclide of a path.

real(kr8), intent(inout) :: weightThe weight associated with the current parent-daughter edge.

Culham Electromagnetics

Page 180 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

11.1.4 Public subroutines

call digraph add daughter(self,nuc no d,index d,weight,depth, && flow)Add a new daughter vertex to the digraph tree. This is achieved by allocatinga new digraph node t object and copying the values nuc no d, index d, weight,depth and flow (if present) into it, adding it to the tail of the digraph tree queueand setting its parent pointer to graph head.

call digraph add subtargets(self,nuc no p)Update the subtarget and missed subtarget flags for the array of nuclides ona path.

call digraph delete(self)Deallocate the digraph flags and tree.

call digraph delete tree(self)Deallocate all nodes on the digraph tree and nullify the graph head and graph tailpointers.

call digraph init(self,nuclide min,nuclide max,nuc no t)Initialise the digraph flags and pointers in preparation for creating a new digraphtree. The visited, subtarget and missed subtarget logical arrays are allocatedfor the range of nuclide numbers nuclide min to nuclide max and are set to false.The subtarget flags for the target nuclide numbers given in array nuc no t are setto true and the digraph tree pointers (graph head, graph tail and graph root)are nullified.

call digraph init count(self,target)Initialise the digraph pointers and target flags for the counting of paths to thetarget nuclide number.

call digraph init flags(self)Set the digraph search flags.

call digraph init search(self)Reset the digraph tree pointers for the next target search.

call digraph init tree(self)Nullify the digraph tree pointers.

call digraph loop path(self,nuc no,no edges,nuc no p,index d)Test if the vertex with nuclide number nuc no closes a loop, and if so return alist of edges on the loop.

call digraph mark daughter(self)Set the pointer graph path dau to the current graph tail to mark the positionwhere the first daughter of the current parent nuclide (graph head) is added tothe queue.

Culham Electromagnetics

Page 181 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call digraph mark target(self,nuc no)Set the subtarget flag to true for the vertex with nuclide number nuc no.

call digraph mark visited(self,nuc no)Set the visited flag to true for the parent vertex with nuclide number nuc no.

call digraph target path(self,nuc no,no edges,nuc no p,index d)Test if the vertex with nuclide number nuc no is a subtarget, and if so return thenumber of nuclides on the path, no edges, the parent nuclide numbers in arraynuc no p and daughter rate equation matrix column indexes in array index d.The last entry at index no edges is a pseudo-edge with its parent nuclide numberset to the target nuclide number and the daughter index set to zero.

11.1.5 Public functions

digraph count(self)This integer(ki4) function returns the total number of vertices on the digraphtree.

digraph new daughter(self,nuc no d)This logical function returns true if the daughter with nuclide number nuc no dhas not already been added to the current parent nuclide.

digraph next parent(self,nuc no p,index p,weight,depth,flow)This logical function returns false if there are no more parent nuclides in thequeue. If there are parent nuclides in the queue, it returns true, and returns thenuc no p, index p, weight, depth and (if present and allocated) flow values forthat parent.

digraph no loop in path(self,nuc no)This logical function returns true if there are no loops in the path to the vertexwith nuclide number nuc no.

digraph no missed targets(self)This logical function returns true if none of the missed subtarget flags is true.

digraph target count(self)This integer(ki4) function returns the total number of targets and subtargets.

digraph target is(self,nuc no)This logical function returns true if the vertex with nuclide number nuc no isflagged as a subtarget.

digraph visited(self,nuc no)This logical function returns true if the vertex with nuclide number nuc no hasbeen visited as a parent.

Culham Electromagnetics

Page 182 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

11.1.6 Dependencies

This module depends on modules const kind m, const phys m and log m.

11.2 inventory m

11.2.1 Summary

The purpose of this module is to store the initial and current inventories of all thenuclides. It provides procedures to manipulate the inventories and enquiry functionsto return the inventories and derived quantities.

11.2.2 Public types and data� �!public typestype, public :: inventory_t

privateend type inventory_t� �

There are no public data.

11.2.3 Arguments

logical, dimension(0:), optional, intent(in) :: convergedAn array of convergence flags for each nuclide. The 0 entry is the ‘sink’ nuclideconvergence flag.

real(kr8), dimension(0:), intent(inout) :: inventoryAn array of the current numbers of nuclides. The 0 entry is the ‘sink’ nuclideinventory.

integer(ki4), intent(in) :: no nucThe number of nuclides.

logical, optional, intent(in) :: no resetA flag controlling whether or not an inventory copy is reset to the initial condi-tions of the inventory being copied.

integer(ki4), intent(in) :: nuc noA nuclide number.

type(nuclide t), intent(inout) :: nuclideThe physical data for all the nuclides known to the code.

Culham Electromagnetics

Page 183 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

type(rundata t), intent(inout) :: rundataThe run control data.

type(inventory t), intent(inout) :: selfThe inventory self object.

type(inventory t), intent(inout) :: selfcopyA copy of the inventory self object reset to the initial conditions.

integer(ki4), intent(in) :: zaiThe ZAI index of the nuclide whose appm (atoms parts per million) value is tobe returned.

11.2.4 Public subroutines

call inventory copy init(self,selfcopy,no reset)Copy the inventory self to selfcopy and set the copy to the same initial con-ditions (unless no reset is true).

call inventory delete(self)Deallocate storage.

call inventory get(self,inventory)Store the input inventory from the inventory array in self.

call inventory init(self,nuclide,rundata)Initialise the inventory storage arrays and save the initial inventory.

call inventory mfi init(self,no nuc)Initialise an inventory t object for use with the multi-particle interface.

call inventory partition(self,rundata,nuclide)Reduce the numbers of atoms of elements by fractions specified by the PARTI-TION keyword.

call inventory put(self,inventory)Copy the current inventory from self to the output array inventory.

11.2.5 Public functions

inventory appm(self,nuclide,zai)This real(kr8) function returns the appm for the nuclide corresponding to thezai value.

inventory atoms(self,nuc no)This real(kr8) function returns the number of atoms of the given nuclide nuc no,provided it is above the MIND parameter, otherwise returns zero.

Culham Electromagnetics

Page 184 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

inventory atoms full(self,nuc no)This real(kr8) function returns the number of atoms of the given nuclide nuc no.

inventory atoms iv(self,nuc no)This real(kr8) function returns the initial number of atoms of the given nuclidenuc no.

inventory converged(self,nuc no)This logical function returns the convergence flag for nuclide nuc no.

inventory fission burnup(self,nuclide)This real(kr8) function returns the percentage of fissionable nuclides burnt upso far.

inventory initial actinides(self)This logical function returns true if the initial inventory contains actinides.

inventory initial density(self)This real(kr8) function returns the initial density of the inventory in g cm−3.

inventory initial mass(self)This real(kr8) function returns the initial mass of the inventory in kg.

inventory is initial(self,nuc no)This logical function returns true if there is a non-zero initial inventory for thegiven nuclide nuc no, otherwise it returns false.

inventory no fissionable(self,nuclide)This real(kr8) function returns the current number of fissionable nuclides.

inventory no isotopes(self)This integer(ki4) function returns the number of different nuclides in the in-ventory.

inventory no of fissions(self,nuclide)This real(kr8) function returns the total number of fissions.

inventory power to flux amp(self,nuclide,rundata)This real(kr8) function returns the flux amplitude corresponding to the powerlevel set by the POWER keyword.

inventory nonzero(self)This logical function returns true if there is a non-zero total initial inventory,otherwise it returns false.

11.2.6 Dependencies

This module depends on modules const kind m, const phys m, element m, files m,log m, nuclide m, reaction m, reaction type m, rundata m and zai m.

Culham Electromagnetics

Page 185 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

11.3 odesolve m

11.3.1 Summary

The odesolve m module provides a Fortran 95 interface to the public-domain Fortran77 stiff-ode solver LSODES [21] from Lawrence Livermore Laboratory.

The module provides single- and double-precision interface blocks for

1. the allocation and initialisation of workspace;

2. the calling of LSODES;

3. the deallocation of workspace.

The Fortran 77 code is written to use default real or double precision variables. Theodesolve m module compares these types with the real kinds used in Fispact-IIand automatically chooses whether to use the single- or double-precision version ofLSODES.

The Fortran 77 code overlays some real and integer workspace so the relative lengthsof reals and integers are significant. The odesolve m module automatically identifiesthe ratio of these lengths and passes it to LSODES, so that no user intervention is nowrequired, in contrast to the supplied version of LSODES.

11.3.2 Public types and data� �!public typestype, public :: odesolve_t

privateend type odesolve_t� �

There are no public data.

11.3.3 Arguments

real(kr8), intent(in) :: atol inThe absolute tolerance.

logical, intent(in) :: changedThe flag for an initial call or changed object.

logical, dimension(:), intent(out) :: convergedOutput convergence flags.

Culham Electromagnetics

Page 186 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

real(kr8), intent(in) :: delta tThe timestep.

external frhs dbleA subroutine to evaluate the right-hand sides of the system of equations indouble-precision arithmetic.

external frhs snglA subroutine to evaluate the right-hand sides of the system of equations in single-precision arithmetic.

integer(ki4), dimension(neq in+1), intent(in) :: ia inThe sparsity pointers (see the documentation in the LSODES source).

integer(ki4), intent(in) :: idAn identifier to allow context switches.

integer(ki4), dimension(nnz in), intent(in) :: ja inThe sparsity indices (see the documentation in the LSODES source).

external jac dbleA subroutine to evaluate the jacobian of the right-hand sides of the system ofequations in double-precision arithmetic.

external jac snglA subroutine to evaluate the jacobian of the right-hand sides of the system ofequations in single-precision arithmetic.

integer(ki4), intent(in) :: neq inThe number of equations.

integer(ki4), intent(in) :: nnz inThe number of non-zeros in the Jacobian.

real(kr8), intent(in) :: rtol inThe relative tolerance.

type(odesolve t) :: selfThe odesolve self type.

real(kr8), dimension(:), intent(inout) :: yThe solution vector.

11.3.4 Public subroutines

call odesolve conv(self,converged)This subroutine returns an array of convergence flags for the elements of thesolution vector so that outlying error estimates can be identified.

Culham Electromagnetics

Page 187 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call odesolve delete(self)Deallocate self.

call odesolve init(self,neq in,nnz in,ia in,ja in,atol in, && rtol in,id)Initialise self given input of remaining arguments. The real arguments mustboth be real(kr8) for compatibility with the rest of Fispact-II. This sub-routine determines whether real(kr8) matches default real or default doubleprecision so that the appropriate solver calls are made to SLSODES or DLSODESrespectively.

call odesolve step(self,y,delta t,changed,frhs sngl, && frhs dble,jac sngl,jac dble)Integrate the set of equations defined by the call to odesolve init for a timestepof delta t and place the solution in array y. frhs sngl frhs dble, jac sngland jac dble are subroutines provided by rateeq m to compute the right handside vector and columns of coefficients of the Jacobian matrix of the set of rateequations in default single- or double-precision arithmetic. The versions to beused are determined by odesolve init. The changed flag should be set to truefor the first call of this subprogram with the given self argument or for the firstcall following an updating of the matrix defining the system of equations.

11.3.5 Public function

odesolve id(self)This integer(ki4) function returns the unique identification number of selfallocated to it by the relevant call to odesolve init.

11.3.6 Dependencies

This module depends on the modules const kind m and log m, and the externally-supplied Fortran 77 code for SLSODES, DLSODES and their supporting routines.

11.4 path m

11.4.1 Summary

The path m module finds the significant paths and loops from a single source nuclide toa number of target nuclides and computes the weights of the pathways it finds. It usesthe five-step algorithm outlined in Section 2.16.3, with additional pruning as specifiedby the FISCHOOSE keyword.

Culham Electromagnetics

Page 188 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

11.4.2 Public types and data

All path data for the source nuclide and the set of target nuclides specified in the callto constructor path init are held privately in the path t self object:� �

!public typestype, public :: path_t

privateend type path_t� �

There are no public data.

11.4.3 Arguments

real(kr8), dimension(:), intent(out) :: atoms tThe array containing the number of atoms of target nuclides.

integer(ki4), dimension(:,:), intent(inout) :: edgesThe array of edges describing a path. edges(1,:) contains parent nuclide num-bers, and edges(2,:) contains daughter index numbers.

type(fischoose t) :: fischooseThe fission pruning object.

integer(ki4), dimension(:), intent(out) :: index dThe rate equation matrix index numbers of daughter nuclides on a path and itsassociated loops.

real(kr8), intent(in) :: loop floorThe fractional weight below which loops are discarded.

integer(ki4), dimension(:), intent(out) :: loop originThe index origins of loop data stored in nuc no p and index d.

integer(ki4), intent(in) :: max depth inThe maximum search depth in the digraph tree.

integer(ki4), intent(out) :: no edgesThe number of edges in the current path.

integer(ki4), intent(out) :: no loopsThe number of loops associated with the current path.

integer(ki4), dimension(:), intent(out) :: nuc no pThe nuclide numbers of the parent nuclides on a path and its associated loops.

real(kr8), intent(in) :: path floorThe fractional weight below which paths are discarded.

Culham Electromagnetics

Page 189 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

integer(ki4), intent(in) :: path noThe index number of the current path.

type(pathstep t) :: pathstepThe pathstep object.

type(path t) :: selfThe path object.

real(kr8), intent(in) :: source atomsThe number of source nuclides.

integer(ki4), intent(in) :: source nuclideThe nuclide number of the source nuclide.

real(kr8), dimension(:), intent(in) :: target atomsThe array of the numbers of each target nuclide.

integer(ki4), dimension(:), intent(in) :: target nuclideThe array of target nuclide numbers.

11.4.4 Public subroutines

call path delete(self)Deallocate the self object.

call path init(self,pathstep,fischoose,source nuclide, && source atoms,target nuclide,target atoms,max depth in, && path floor,loop floor)Identify all significant paths and loops from source nuclide to the array oftarget nuclide and compute the fraction of the inventories target atoms of thetarget atoms which arrive by each path and loop. Reaction and decay rates andthe adjacency matrix of the digraph of the reaction and decay chains are ob-tained from the rateeq object. Paths are discarded as insignificant according tothe fission reactions chosen by fischoose and to the path floor and loop floorthreshold fractions. All paths longer than max depth are also discarded. Thealgorithm for the calculation performed by this subprogram is outlined in Sec-tion 2.16.3.

call path links(self,path no,loop origin,nuc no p,index d,atoms t)Extract the parent nuclide number, daughter index number and number of tar-get atoms from the target path lists for path path no and its associated loops inthe self object self and return them in arrays (nuc no p, index d and atoms t).The path edges are stored in entries (1:loop origin(1)-1), and the entries forloop j are stored in (loop origin(j):loop origin(j+1)-1). The subroutinepath sizes is used to determine the dimension needed for the output arrays:call path sizes(path,i path,no edges,no loops) gives the calling program

Culham Electromagnetics

Page 190 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

no edges and no loops. The arrays loop origin and atoms t need to be di-mensioned to loops+1, and the arrays (nuc no p and index d) need to be dimen-sioned to no edges. Note that the final entry of the path is not a true edge; itcontains the nuclide number of the target nuclide and a zero daughter index.

call path sizes(self,path no,no edges,no loops)Return the number of edges and loops on the current path. This subprogram isused to obtain sizes for allocating arrays to contain the paths and loops.

11.4.5 Public functions

path count(self)This integer(ki4) function returns the current number of paths in the selfobject.

path length(self,path no)This integer(ki4) function returns the length of the path with number path noin the self object.

path nuc no t(path,path no)This integer(ki4) function returns the nuclide number of the target nuclide ofpath path no in the self object.

11.4.6 Dependencies

This module depends on modules const kind m, const phys m, digraph m, fischoose m.log m and pathstep m.

11.5 pathstep m

11.5.1 Summary

The purpose of the pathstep m module is to store path steps and the rateeq changehistory for use in pathways calculations and in sensitivity calculations. This enablesthe pathways and sensitivity analyses to be extended to multipulse irradiation phases.

The pathstep object has two queues. One queue saves the sequence of time intervalsand flux amplitudes used in the inventory calculation, together with a pointer to therateeq object that was used for the integration step. The second queue keeps a list ofthe rate equation objects. If the latest rateeq object differs from the previous one onlyby a change of flux amplitude, then it is not stored, but if it has new cross-sections,then the new rateeq object is added to the queue and becomes the current one.

Culham Electromagnetics

Page 191 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

11.5.2 Public types and data

All pathstep data are held privately in the pathstep t self object:� �!public typestype, public :: pathstep_t

privateend type pathstep_t� �

There are no public data.

11.5.3 Arguments

integer(ki4), dimension(:),intent(inout) :: d indexThe array of daughter nuclide rate equation row indices on a pathway.

real(kr8), dimension(:), intent(inout) :: flowThe vector of weights for multipulse path pruning (i.e., the set {Fi(Tj); j ∈ [1, J ]}where i labels the nuclide, see Section 2.16.2 on page 49).

integer(ki4), intent(in) :: index dThe row index of the daughter nuclide in the compressed form of the full rateequation matrix.

type(inventory t), intent(inout) :: inventoryAn inventory object.

integer(ki4), intent(in) :: nuc noThe root nuclide number.

integer(ki4), intent(in) :: nuc no dThe daughter nuclide number.

integer(ki4), dimension(:) , intent(inout) :: nuc no dDaughter row indices on edges.

integer(ki4), intent(in) :: nuc no pThe parent nuclide number.

integer(ki4), dimension(:) , intent(inout) :: nuc no pParent column indices on edges.

integer(ki4), intent(in) :: nuc no targetThe target nuclide number.

type(nuclide t), intent(in),target :: nuclideThe nuclide object.

Culham Electromagnetics

Page 192 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

type(rateeq t), intent(in) :: rateeqThe rate equation object.

integer(ki4), intent(in) :: reac noThe reaction number of the reaction for the nuclide with nuclide number nuc no p.

integer(ki4), dimension(:,:),intent(in) :: rowcolAn array of internal row and column indices for matrix elements for which cross-section values are changed (these (row, column) pairs are obtained using thepathstep element address function). The first index corresponds to a (row,column) pair, and the second index corresponds to the p-d edge.

type(rundata t), intent(in) :: rundataThe rundata object.

type(pathstep t), intent(inout) :: selfThe pathstep object.

real(kr8), intent(in) :: source atomsThe number of source nuclides.

real(kr8), intent(out) :: weightThe pruning weight for the path (Fi(TJ)).

real(kr8), dimension(:), intent(in) :: xsAn array of cross-section values to be changed. The array length is the same asthe dimension of nuc no p and nuc no d.

real(kr8), dimension(:), intent(in) :: xs oldAn array of cross-section values to be changed. The array length is the same asthe dimension of nuc no p and nuc no d.

11.5.4 Public subroutines

call pathstep add rateeq(self,nuclide,rateeq)Add the current rateeq matrix to the pathstep rateeq queue.

call pathstep add step(self,rundata)Add a step with the current time interval and flux amplitude to the pathstepstep queue.

call pathstep delete(self)Deallocate the pathstep queues.

call pathstep edge weight(self,nuc no p,index d,weight,flow)Return the edge weight and flow vector for the edge connecting parent nuc no pto daughter index d in the directed graph tree.

Culham Electromagnetics

Page 193 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call pathstep full inventory(self,inventory,nuc no p, && nuc no d,xs old,xs,nuclide)Calculate the evolution of the full inventory for a list of path steps (stored inself) that may include irradiation steps with differing fluxes and interveningcooling steps. The nuc no p, nuc no d, xs old and xs arguments are used tospecify changes in cross-sections that are fed into the calculation during use ofthis subprogram in sensitivity calculations.

call pathstep init(self,rundata,rateeq)Initialise the pathstep queues.

call pathstep init flow(self,nuc no,flow)Initialise the flow vector used for multipulse pruning.

call pathstep print(self)Print a summary of the path steps.

call pathstep write(self)Write a summary of the path steps to OUTPUT.

11.5.5 Public functions

pathstep decay rate pd(self,nuc no p,index d)This real(kr8) function returns the parent-daughter decay rate from the firstrateeq object. (This physical quantity is assumed to be independent of time.)

pathstep flux(self)This real(kr8) function returns the pulse-averaged flux.

pathstep index d(self,nuc no p,nuc no d)This integer(ki4) function returns the row index of the daughter nuclide in thecompressed full rate equation matrix.

pathstep inventory(self,source atoms,nuc no target,nuc no p, && d index)This real(kr8) function returns the number of target atoms arising from the setsource atoms along the pathway defined by arrays p nuc no and d index. Thetarget nuclide is given by nuc no target, and the source nuclide is the first entryin array p nuc no.

pathstep no daughters(self,nuc no p)This integer(ki4) function returns the number of daughters that the nuclidewith number nuc no p has.

pathstep no nuclides(self)This integer(ki4) function returns the number of different nuclides in the rateequations for the full inventory.

Culham Electromagnetics

Page 194 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

pathstep nuc no d(self,nuc no p,index d)This integer(ki4) function returns the nuclide number of the daughter corre-sponding to index d.

pathstep reaction rate(self,nuc no p,reac no)This real(kr8) function returns the pulse-averaged reaction rate (c.f., Equa-tion (140)).

pathstep stepcount(self)This integer(ki4) function returns the number of steps recorded in the pathstepstep list.

pathstep total rate pd(self,nuc no p,index d)This real(kr8) function returns the pulse-averaged total parent-daughter rate(c.f., Equation (139)).

pathstep total time(self)This real(kr8) function returns the total irradiation time in the pathstep steplist.

11.5.6 Dependencies

This module depends on modules const kind m, const phys m, files m, fission m,inventory m, log m, nuclide m, rateeq m, reaction m, reaction type m and rundata m.

11.6 pathways m

11.6.1 Summary

This is the main pathways and uncertainties calculation module. Pathways objects areused for these calculations that are initiated by the UNCERTAINTY and ZEROkeywords and for the pathways calculations initiated by the PATH or ROUTESand ZERO keywords. This module contains the data type and subprograms used forpathways calculations.

The module provides procedures for

• memory allocation for, and computation of, pathways

• memory allocation and computation of factors used in uncertainty estimates

• writing pathways and generic pathways to output

• computing and writing specific pathways to output (PATH keyword)

Culham Electromagnetics

Page 195 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

• computing and writing pathways for user-specified source and target (ROUTESkeyword)

• returning the pathways fractional error squared and target nuclide number foruse in computing error estimates

• memory deallocation

The creator subprogram pathways init manages the allocation of memory for, andthe construction of, the set of significant pathways from the source nuclides to thetarget nuclides. It also computes the cross-section and decay rate factors needed topredict uncertainties from the inventories along each pathway.

The source and target nuclide numbers and inventories are input. The source comesfrom the initial inventory and the target comes from the list of dominant nuclides at thestep at which the pathways calculation is performed. The nuclide object gives access tothe nuclear data and inventories. The pathstep object provides the information on theflux amplitudes, time intervals, rate equation matrices and changes in cross-sectionsduring the sequence of pulses over which the pathways calculations are performed. Therundata object gives access to selections made in the INPUT file.

A significant pathway is one where the ratio of the final inventory at the target arisingfrom the pathway to the total final inventory is greater than self%path floor. Thepathway may be a path, i.e., a sequence of different parent-daughter nuclide pairs(digraph edges), or a combination of a path and one or more significant loops. Asignificant loop is one that contributes more than a self%loop floor fraction of thetotal inventory of the pathway.

pathways init first allocates arrays and stores the source and target nuclide numbersand inventories. It then initialises the fischoose object that is used in path initto prune paths arising from actinides not specified by the FISCHOOSE keyword.path init is then used to find significant pathways for each source nuclide and storethem in the self%source(:)%path objects. The fischoose object is then deleted.Pathways are sorted into target order and factors required for uncertainty calculationsare computed.

pathways delete deallocates the pathways object arrays.

pathways output writes pathways to OUTPUT.

pathways routes uses pathways init and pathways output to create and output thepathways object for sources and targets selected by the ROUTES keyword.

pathways path creates and outputs pathways information for paths specified by thePATH keyword.

pathways frac error sq and pathways target nuc no provide the information neededto compute uncertainties in radiological quantities.

Culham Electromagnetics

Page 196 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

11.6.2 Public types and data

All pathways data for the set of source and target nuclides specified in the call toconstructor pathways init are held privately in the pathways t self object:� �

!public typestype, public :: pathways_t

privateend type pathways_t� �

There are no public data.

11.6.3 Arguments

type(inventory t), intent(in) :: inventoryThe initial and current inventories of all nuclides.

logical, optional, dimension(:), intent(inout) :: is dominantFlags to indicate dominant nuclides.

type(nuclide t), intent(inout) :: nuclideThe nuclide data object.

integer(ki4), intent(in) :: pathresetSelector for pathways output.

type(pathstep t), intent(inout) :: pathstepThe pathstep object.

type(rundata t), intent(inout) :: rundataThe run control data object.

type(pathways t), intent(inout) :: selfThe pathways object.

real(kr8), dimension(:), intent(in) :: source atomsThe array of numbers of each source nuclide.

integer(ki4), dimension(:), intent(in) :: source nuc noThe array of source nuclide numbers.

integer(ki4), intent(in) :: targetLocal array index of a target nuclide.

real(kr8), dimension(:), intent(in) :: target atomsThe array of numbers of each target nuclide.

integer(ki4), dimension(:), intent(in) :: target nuc noThe array of target nuclide numbers. The index of the current target nuclide inthe pathways object.

Culham Electromagnetics

Page 197 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

11.6.4 Public subroutines

call pathways delete(self)Delete the pathways object.

call pathways init(self,nuclide,pathstep,rundata, && source nuc no,source atoms,target nuc no, target atoms)Find pathways from source nuclides to target nuclides and quantify the impor-tant paths and important reactions on those paths. Compute the fractionaluncertainty in the number of each of the target nuclides for use in estimating theuncertainty in radiological quantities.

This routine performs the following tasks. It

1. stores settings from the ROUTES, UNCERTAINTY, UNCTYPE andGENERIC keywords;

2. allocates source and target nuclide arrays and saves the source and targetnuclide numbers and numbers of atoms;

3. uses the fischoose m module to act on the FISCHOOSE keyword;

4. uses the path m module to identify significant paths and loops and to cal-culate the edge weights on the reaction chain graphs;

5. sorts paths into target order;

6. calls private subprogram pathway edges errors to

(a) compute the percentage contribution of each reaction and decay to thetotal rate coefficient for each edge (using edge reaction decay);

(b) compute the reaction or decay type of each edge (using edge type);

(c) compute the fractional squared path error from reactions on the edges ofeach path if cross-section uncertainty is selected (add reaction errors).The fractional squared path error (path%error sq) is

∆2pt =

(∆Npt

Npt

)2

(166)

for path p to target nuclide t. The contributions of reactions on edgese along path p to ∆2

pt are given by the first term on the rhs of Equa-tion (138) on page 54.The pathstep m module enquiry functions are used to obtain the pulse-averaged reaction rates.

(d) compute the fractional squared path error from decays on the edges ofeach path if decay uncertainty is selected (add decay errors). Contri-butions are collected from the set of edges De where the parent is long-lived or for a short lived parent whose daughter is the target nuclide ofthe path, and are given by the second term on the rhs of Equation (138).The decay m module enquiry functions decay half life(decay) anddecay half unc(decay) are respectively used to get values of τe and∆τe for the decay object decay associated with edge e.

Culham Electromagnetics

Page 198 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

(e) compute the fractional error in the number of atoms of target t. Thisinvolves the computation of the square of the error in the contributionfrom path p to the number of atoms of target t (see dn path sq insubroutine atoms fractional error):

(∆Ntp)2 = ∆2

tpN2tp (167)

and then summing over the paths arising from the set of uncorrelatednon-fissioning, t ∈ Su and from summing over the f sets of correlatedfission sources p ∈ Sf :

(∆Nt)2 =

∑p∈Su

(∆Ntp)2 +

∑f

∑p∈Sf

√(∆Ntp)2 (168)

((∆Ni/Ni)2 is stored as private variable self%target(i)%frac error atoms sq

in the pathways t self object. Uncertainty estimates for quantity q arecomputed using

(∆Q)2 =∑i

q2i (∆Ni/Ni)

2 (169)

where the sum is over all targets i.

7. deletes the fishchoose t and path t objects used in computing the path-ways.

call pathways output(self,nuclide,pathstep,pathreset,is dominant)

Write the pathways summary to OUTPUT as paths.

call pathways output generic(self,nuclide,pathreset,is dominant)

Write the generic pathways summary to OUTPUT as paths.

call pathways paths(self,inventory,nuclide,pathstep,rundata)Write the pathways summary to OUTPUT as paths for specific paths.

call pathways routes(self,inventory,nuclide,pathstep,rundata)Write the pathways summary to OUTPUT as paths for specific sources and targets.

call pathways summary(self,nuclide,pathstep)Print the pathways summary in a tabular form.

11.6.5 Public functions

pathways frac error sq(self,target)This real(kr8) function returns the square of the fractional error (∆Nt/Nt)

2 fora given target nuclide t ∈ [1, T ]. See Section 2.17 for more details.

pathways no targets(self)This integer(ki4) function returns the number of target nuclides, T .

Culham Electromagnetics

Page 199 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

pathways target nuc no(self,target)This integer(ki4) function returns the nuclide number of target.

11.6.6 Dependencies

This module depends on modules const kind m, decay m, decay type m, files m,fischoose m, fission m, inventory m, log m, nuclide m, path m, pathstep m, reaction m,reaction type m, rundata m and zai m

11.7 rateeq m

11.7.1 Summary

The rateeq m module assembles the stiff-ode set of equations used for inventory evo-lution steps or for pathways analysis and manages their solution using odesolve m.

The module provides function calls for odesolve m that provide vectors of the righthand sides of the rate equations and elements in columns of the Jacobian matrix.

The module assembles the equations by

1. using physics data from nuclide t;

2. applying INPUT specifications passed to it through rundata;

The module provides procedures for

• the allocation and initialisation of workspace;

• the generation of a compact description of the sparse system matrix;

• the calculation of the right-hand sides of the system of equations;

• the calculation of an approximate (linearised) Jacobian matrix;

• the organisation of calls to the ode solver via interfaces in module odesolve m;

• the deallocation of workspace.

11.7.2 Public types and data

All rate equation data are held privately in the rateeq t self object:

Culham Electromagnetics

Page 200 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

� �!public typestype, public :: rateeq_t

privateend type rateeq_t� �

There are no public data.

11.7.3 Arguments

real(kr8), dimension(:), intent(in) :: decayAn array of decay constants to be changed. The array length is the same as thesecond dimension of rowcol.

real(kr8), intent(in) :: delta tThe timestep in seconds.

real(kr8), intent(in) :: fluxThe flux amplitude of the projectile.

real(kr8), intent(in) :: flux ampThe flux amplitude of the projectile.

integer(ki4), intent(in) :: index dA daughter nuclide row index in the compactly stored rate equation matrix forthe self object.

integer(ki4), dimension(:), intent(in) :: index dThe array of rateeq row indices in the compactly stored full rate equation matrixfor daughter nuclides on the path and loops making up a pathway.

type(inventory t), intent(inout) :: inventoryThe initial and current abundances of all the nuclides.

real(kr8), dimension(:), optional, intent(in) :: && inventory subsetThe initial abundances of the nuclides.

real(kr8), dimension(0:), intent(inout) :: inventoryThe output abundances of the nuclides. Note that element 0 of the array is usedto store the ‘sink’ nuclide inventory.

logical, intent(in) :: irradiationThe flag to distinguish between irradiation and cooling steps. (True for irradia-tion.)

integer(ki4), intent(in) :: nuc noA nuclide number.

Culham Electromagnetics

Page 201 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

integer(ki4), intent(in) :: nuc no dA daughter nuclide number.

integer(ki4), intent(in) :: nuc no pA parent nuclide number.

integer(ki4), dimension(:), intent(in) :: nuc no pThe array of parent nuclides on the path and loops making up a pathway.

type(nuclide t), target, intent(inout) :: nuclideThe nuclide data.

type(rateeq t), intent(in) :: rateeq fullThe self type object for the rate equations of the full inventory.

integer(ki4), dimension(:,:),intent(in) :: rowcolAn array of internal row and column indices for matrix elements for which cross-section values are changed (these (row, column) pairs are obtained using therateeq element address function). The first index corresponds to a (row, col-umn) pair, and the second index corresponds to the p-d edge.

type(rundata t) :: rundataThe run control data.

type(rateeq t) :: selfThe self type object for rateeq.

real(kr8),intent(in) :: source atomsThe initial inventory at the head of a pathway.

real(kr8),intent(in) :: time intervalThe duration of an integration step.

real(kr8), dimension(:), intent(in) :: xsA new cross-section value to be inserted instead of xs old at the location givenby nuc no p and nuc no d.

real(kr8), dimension(:), intent(in) :: xs oldA cross-section value to be replaced by xs at the location given by nuc no p andnuc no d.

type(zai t), optional, intent(in) :: zai setThe ZAI data for a subset of nuclides.

11.7.4 Public subroutines

call rateeq change decay(self,rowcol,decay)This subroutine replaces selected decay constants by values given in the decayarray at locations specified by the corresponding rowcol values.

Culham Electromagnetics

Page 202 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call rateeq change induced xs(self,nuc no p,nuc no d,xs old,xs)This subroutine replaces selected induced cross-sections by values given in thexs array at locations specified by the corresponding rowcol values.

call rateeq delete(self)Deallocate self.

call rateeq get inventory(self,inventory)This subroutine copies the current inventory from the rateeq t object to theinventory output array.

call rateeq init(self,inventory,nuclide,rundata,irradiation && [,zai set,inventory subset])Initialise the rateeq t self type. In the absence of the optional arguments selfis set to include all nuclides known to nuclide. If irradiation is false, then theextra sparsity of the equations that results when fluxes are zero is exploited toget faster solutions. The optional arguments (in [. . . ]) are used to set up reducedsets of rate equations for pathways calculations.

call rateeq matrix copy(self,rateeq full)This subroutine makes a copy of the rate equation matrix for use by the pathstepmodule.

call rateeq new induced xs(self,nuclide,rundata)Replace induced cross-section values in self by new ones from nuclide.

call rateeq path init(self,rateeq full,source atoms,nuc no p, && index d)This subroutine prepares work space, identifies the size of the system of equationsfor a path integration, establishes the sparsity pattern of the linearised equationsand calls odesolve init to set options and provide input data for the libraryroutine LSODES. This initialisation uses a subset of the data from the fullinventory calculation rateeq t object rateeq full to populate the path rateeq tself object. Edges are described by arrays of parent nuclide numbers and daughterindices, (the compact row indices of the daughters in the rateeq full matrix).

call rateeq path matrix update(self,rateeq full)This subroutine replaces matrix elements in the rate equation path matrix by newvalues if the full rate equation object has been recomputed because of changesin the cross-section data.

call rateeq set rates(self,flux)This subroutine uses the input projectile flux amplitude flux to update thereaction rates used in the rate equations.

call rateeq set timestep(self,delta t)This subroutine stores the next time interval in the rateeq t object.

Culham Electromagnetics

Page 203 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call rateeq solve(self)This subroutine prepares pointers so that the service routines called by the solvercan access the rate equation data and calls odesolve step to call the libraryroutine LSODES. It is permissible to switch contexts between different instancesof the rateeq t object.

call rateeq step(self,inventory,nuclide,time interval && [,inventory subset])This subroutine takes the current inventory from inventory, integrates it forwardfor the given time interval and returns the results to inventory. If the optionalargument inventory subset is present then it updates the inventory stored inthat array.

11.7.5 Public functions

rateeq decay rate(self,nuc no)This real(kr8) function returns the total decay rate of the given nuclide.

rateeq decay rate pd(self,nuc no p,index d)This real(kr8) function returns the decay rate from the parent to the daughterin s−1.

rateeq element address pd(self,nuc no p,nuc no d)This integer(ki4), dimension(2) function returns the internal row and columnindices for the parent-daughter edge for the rateeq object self.

rateeq flux(self)This real(kr8) function returns the projectile flux for the self object.

rateeq index d(self,nuc no p,nuc no d)This integer(ki4) function returns the rate equation matrix column index ofthe daughter nuclide.

rateeq induced xs(self,nuc no)This real(kr8) function returns the the total induced cross-section of the givennuclide.

rateeq induced xs pd(self,nuc no p,index d)This real(kr8) function returns the total cross-section for induced reactionsfrom the parent to the daughter in units of cm−2.

rateeq is initialised(self)This logical function is true if self has been initialised.

rateeq no daughters(self,nuc no p)This integer(ki4) function returns the number of daughters for a given parentnuclide.

Culham Electromagnetics

Page 204 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

rateeq no nuclides(self)This integer(ki4) function returns the number of nuclides in self.

rateeq no pd(self)This integer(ki4) function returns the number of parent-daughter edges inself.

rateeq nuc atoms(self,nuc no)This real(kr8) function returns the number of atoms of the nuclide with thegiven nuclide number. If the nuclide is not found, zero is returned.

rateeq nuc no d(self,nuc no p,index d)This integer(ki4) function returns the nuclide number of the daughter of parentnuc no p with row index index d.

rateeq p depletion rate(self,nuc no,flux amp)This real(kr8) function returns the total depletion rate of a given parent nuclide.This routine does not assume that rateeq set rates has been called for thecurrent time interval, instead using the flux amplitude value passed as a functionargument. The rate is in s−1.

rateeq pd total rate(self,nuc no p,index d,flux amp)This real(kr8) function returns the total creation rate of the daughter from theparent for a path calculation. This routine does not assume that rateeq set rateshas been called for the current time interval, instead using the flux amplitudevalue passed as a function argument. The rate is in s−1.

rateeq scpr xs(self,nuc no)This real(kr8) function returns the total scpr cross-section of the given nuclide.

rateeq scpr xs pd(self,nuc no p,index d)This real(kr8) function returns the total cross-section for sequential chargedparticle reactions from the parent to the daughter in units of cm−2.

11.7.6 Dependencies

This module depends on modules const kind m, const phys m, decay m, decay type m,fission m, files m, inventory m, log m, nuclide m, odesolve m, reaction m, reaction type m,rundata m and zai m.

11.8 sensitivity m

11.8.1 Summary

This module manages sensitivity calculations in response to the SENSITIVITY key-word. The module provides a sensitivity object and its methods to compute the mean,

Culham Electromagnetics

Page 205 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

standard deviation and Pearson correlation coefficients for the response of chosen finalnuclide inventories to variations of cross-sections, decay rates or both.

Sensitivity data are generated using a monte-carlo method. A set of inventory runs areundertaken for the distribution of cross-sections and data are collected for selected nu-clides as specified by the SENSITIVITY, ERROR, MCSAMPLE and MCSEEDkeywords.

The calculation and output of sensitivity data are triggered by the ZERO keyword.The sensitivity calculation is undertaken for all the irradiation pulses up to the occur-rence of the ZERO keyword, and will work correctly even for cases where the collapsedcross-sections change with time.

Raw data are written to the sens output channel for possible further processing byother sensitivity analysis tools.

11.8.2 Public types and data

All sensitivity data are held privately in the sensitivity t self object:� �!public typestype, public :: sensitivity_t

privateend type sensitivity_t� �

There are no public data.

11.8.3 Arguments

type(dominant t), intent(inout) :: dominantThe dominant object.

type(inventory t), intent(inout) :: inventoryThe inventory object.

type(nuclide t), target, intent(in) :: nuclideThe nuclide object.

type(pathstep t), intent(inout) :: pathstepThe pathstep object.

type(rundata t), intent(in) :: rundataThe rundata object.

type(sensitivity t), intent(inout) :: selfThe sensitivity self object.

Culham Electromagnetics

Page 206 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

type(date time t), intent(in) :: timestampThe run timestamp.

11.8.4 Public subroutines

call sensitivity init(self,dominant,nuclide,inventory, && rundata,timestamp)Initialise the sensitivity object.

call sensitivity delete(self)Delete the sensitivity object.

call sensitivity mcruns(self,nuclide,pathstep,inventory)Run a set of inventory calculations for variations of the cross-sections or decaysand accumulate sensitivity data.

call sensitivity output(self,nuclide,pathstep)Write sensitivity data summary to output.

11.8.5 Public functions

None.

11.8.6 Dependencies

This module depends on modules const kind m, const phys m, date time m, dominant m,files m, fission m, inventory m, log m, nuclide m, pathstep m, random m, reaction m,rundata m and zai m.

12 I/O and Control Modules

12.1 dominant m

12.1.1 Summary

The dominant m module constructs local lists of nuclides that provide dominant con-tributions to the various heat production and radiological quantities of interest. Theselists are used for the production of printed output and graph plotting files.

Culham Electromagnetics

Page 207 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

12.1.2 Public types and data

All dominant nuclide data are held in the dominant self type, dominant t� �!public typestype, public :: dominant\_t

privateend type ddominant\_t� �

The public data in dominant m are the parameters� �integer(ki4), public, parameter :: dom_mass=0integer(ki4), public, parameter :: dom_activity=1integer(ki4), public, parameter :: dom_total_heat=2integer(ki4), public, parameter :: dom_dose_rate=3integer(ki4), public, parameter :: dom_gamma_heat=4integer(ki4), public, parameter :: dom_beta_heat=5integer(ki4), public, parameter :: dom_ingestion=6integer(ki4), public, parameter :: dom_inhalation=7integer(ki4), public, parameter :: dom_clearance=8integer(ki4), public, parameter :: dom_merged=9� �

These descriptive names are provided for use elsewhere in the program in conjunctionwith functions dominant total and dominant value.

12.1.3 Arguments

type(gamma dose t), intent(in) :: doseGamma dose data.

type(inventory t), intent(in) :: inventoryAn inventory object.

integer(ki4),intent(in) :: listnameThe name of one of the five graphical lists.

integer(ki4),intent(in) :: nuc noThe local array index of a dominant nuclide.

integer(ki4),intent(inout),dimension(:) :: nuc no domThe nuclide numbers of dominant nuclides.

type(nuclide t), intent(in) :: nuclideThe nuclide data object.

type(rundata t), intent(inout) :: rundataThe rundata object.

integer(ki4),intent(in) :: quantityThe name of one of the nine quantities.

Culham Electromagnetics

Page 208 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

type(dominant t) :: selfA dominant self type.

12.1.4 Public subroutines

call dominant cooling start(self)This subroutine saves values at the start of the cooling period.

call dominant delete(self)This subroutine deallocates all allocatable arrays and linked lists in the selfobject.

call dominant graph nuclides(self)This subroutine examines the lists of dominant nuclides in the five categoriesfor graph plotting and adds a nuclide to the list for plotting if its contributionexceeds the graph floor fraction of the total quantity being displayed in thegraph.

call dominant init(self,inventory,rundata)This subroutine allocates and initialises the arrays used for dominant nuclideoutput.

call dominant nuc no(self,nuc no dom)This subroutine returns an array of nuclide numbers on the merged dominantnuclide list. If the array dimension of nuc no dom is greater than the valueprovided by output no dominant, then the array is infilled with zeroes, and if itis less, the list is truncated.

call dominant nuclide lists(self,inventory,nuclide,dose)This subroutine finds dominant nuclides in up to eight different categories. In ad-dition it creates a merged list of dominant nuclides from all the chosen categories,to be used in specifying the target nuclides set in the pathways calculation.

call dominant output(self,nuclide)This subroutine writes the tables of dominant nuclide data to OUTPUT.

12.1.5 Public functions

dominant gr list next(self)If the active list is not exhausted, this logical function sets the current linked-list pointer to the next item on the list and returns true, otherwise it returnsfalse.

dominant gr list set(self,listname)If the specified list is not empty, this logical function sets the current linked-listpointer to the head of the list and returns true, otherwise it returns false.

Culham Electromagnetics

Page 209 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

dominant gr nuc no(self)This integer(ki4) function returns the nuclide number of the current nuclideon the active graphical list.

dominant merged nuc no(self,nuc no)This integer(ki4) function returns the nuclide number of the current nuclideon the merged dominant nuclide list.

dominant no merged(self)This integer(ki4) function returns the number of nuclides on the merged dom-inant nuclide list.

dominant step count(self)This integer(ki4) function returns the number of steps remaining in the currentgraphical list after the current step.

dominant total(self,quantity)This real(kr8) function returns the total of the specified quantity.

dominant value(self,quantity,nuc no)This real(kr8) function returns the value of the specified

dominant zero value(self)This real(kr8) function returns the value of the current graphical quantity forthe current nuclide at ZERO time.

12.1.6 Dependencies

This module depends on modules const kind m, const phys m, decay m, files m,gamma dose m, inventory m, log m, nuclide m, rundata m and zai m.

12.2 endf m

12.2.1 Summary

The endf m module manages the reading of ENDF-like EAF and TENDL library files.Public buffers endf text, endf cont, endf list, and endf tab1 are used for readingthe library files (see the following subsections for details). If the allocated array sizesin the last two of these buffers are too small, they are reallocated with larger arraysizes.

12.2.2 Public types and data

Culham Electromagnetics

Page 210 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

� �!public typestype, public :: endf_text_t

character(len=66) text !text stringinteger(ki4) :: mat ! material number, =ntape for TPIDinteger(ki4) :: mf ! file number, =0 for TPIDinteger(ki4) :: mt ! section number, =0 for TPID

!!$ integer(ki4) :: ns ! sequence numberend type endf_text_t

type, public :: endf_cont_treal(kr8) :: c1 ! application dependent, ZA for HEADreal(kr8) :: c2 ! application dependent, AWR for HEADinteger(ki4) :: l1 ! application dependentinteger(ki4) :: l2 ! application dependentinteger(ki4) :: n1 ! application dependentinteger(ki4) :: n2 ! application dependentinteger(ki4) :: mat ! material number, =ntape for TPIDinteger(ki4) :: mf ! file number, =0 for TPIDinteger(ki4) :: mt ! section number, =0 for TPID

!!$ integer(ki4) :: ns ! sequence numberend type endf_cont_t

type, public :: endf_list_ttype(endf_cont_t) :: cont ! control line of listreal(kr8), dimension(:), allocatable :: b ! list of real values

end type endf_list_t

type, public :: endf_tab1_ttype(endf_cont_t) :: cont ! control line of tableinteger(ki4), allocatable, dimension(:) :: nbt ! list of integer ↘

→valuesinteger(ki4), allocatable, dimension(:) :: int ! list of integer ↘

→valuesreal(kr8), allocatable, dimension(:) :: x ! list of real valuesreal(kr8), allocatable, dimension(:) :: y ! list of real values

end type endf_tab1_t

! public variablestype(endf_text_t), public :: endf_texttype(endf_cont_t), public :: endf_conttype(endf_list_t), public :: endf_listtype(endf_tab1_t), public :: endf_tab1� �

12.2.3 Arguments

integer(ki4), optional, intent(out) :: eofRead status used to report encountering end of file.

character(len=32), intent(out) :: labelCharacter file header of EAF library.

integer(ki4), intent(in) :: mat

Culham Electromagnetics

Page 211 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Current ENDF mat number.

integer(ki4), intent(in) :: mfCurrent ENDF file number.

integer(ki4), optional, intent(in) :: n listInitial length of list.

integer(ki4), optional, intent(in) :: n tab1Initial length of tab1 interpolation tables.

integer(ki4), intent(in) :: unitFile unit for reading data.

integer(ki4), optional, intent(in) :: x tab1Initial length of tab1 x,y tables.

12.2.4 Public subroutines

call endf deleteDeallocate lists and tables.

call endf eaf header(unit,label)Skip to the next end of an EAF header section.

call endf init(n list,n tab1,x tab1)Initialise storage for reading lists and tables. All the arguments are optional, andif they are omitted default sizes are assumed and adjusted as needed during filereading.

call endf read cont(unit,[eof])Read an ENDF control record. The default action on eof is to die, but theoptional argument eof passes the status flag back to the calling program. Thisallows eof to be used in the sequential reading of a sequence of decay and specfiles.

call endf read list(unit)Read an ENDF list record.

call endf read tab1(unit)Read an ENDF one-dimensional table record.

call endf read text(unit)Read an ENDF text record.

call endf skipto fend(unit,mat)Skip to the next ENDF end of file (fend) record.

call endf skipto mend(unit)Skip to the next ENDF end of material (mend) record.

Culham Electromagnetics

Page 212 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call endf skipto send(unit,mat,mf)Skip to the next ENDF end of section (send) record.

12.2.5 Public functions

None.

12.2.6 Dependencies

This module depends on modules const kind m and log m.

12.3 endfmat m

12.3.1 Summary

This is an object-oriented input/output module that manages the reading ENDF tapedata. It extracts MF=1, 2, 3, 10, 33 and 40 data from an ENDF file and stores thedata in the endfmat t object for use by other Fispact-II modules. In addition, ENDFMF=5,8 and 32 data are recognised but are not used in this version of Fispact-II.This module provides enquiry functions for extracting data from the endfmat t datastructures for use elsewhere in the code.

The ENDF disc file for the current material is assumed to be opened and positionedat the HEAD of MF=1. The ENDF “files” are read in numerical order; duplicate orwrongly ordered MF’s precipitate a fatal error. The consistency of ZA and AWR from“file” to “file” is also checked.

The queues of reactions are sorted into the order of increasing daughter ZAI and themf=3 and mf=10 lists are merged. Energy-dependent cross-sections are collapsed withthe given projectile flux and the reaction is discarded if the resulting cross-section isbelow xs threshold.

The module has the capability to store and retrieve binary files containing the contentsof the endfmat t data structures and this is used to provide faster input of the ENDFcross-section data in the computation of collapsed cross-sections and their uncertain-ties.

12.3.2 Public types and data� �! public typetype, public :: endfmat_t

private

Culham Electromagnetics

Page 213 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

end type endfmat_t� �12.3.3 Arguments

real(kr8), dimension(:), intent(inout) :: fluxProjectile flux spectrum.

real(kr8), dimension(:), intent(out) :: frac covAn array of fractional covariances.

real(kr4), dimension(:),intent(out) :: full xsAn array of cross-sections in energy bins.

logical, intent(in) :: get covIf this is .true. then MF=33 and MF=40 covariance data are to be stored.

logical, intent(in) :: get ucIf this is .true. then MF=2 data for universal curve self-shielding factors areto be stored.

logical, intent(in) :: get uncIf this is .true. then MF=33 and MF=40 uncertainty data are to be stored.

real(kr8), intent(in) :: len denEffective length for universal curve self-shielding.

integer(ki4), intent(in) :: libtypeThis specifies the type of ENDF library.

integer(ki4), dimension(:),intent(out) :: mtAn array of MT values.

integer(ki4), dimension(:), intent(out) :: no covThe numbers of covariance values.

integer(ki4), dimension(:), intent(out) :: no xsThe sizes of the cross-section arrays.

integer(ki4), intent(in) :: reacIndex for the reaction array.

type(endfmat t), intent(inout) :: selfThe endfmat data self object

real(kr8), dimension(:), intent(out) :: sigmaAn array of cross-section values.

real(kr8), dimension(:), intent(out) :: sigma uncAn array of cross-section fractional uncertainties.

Culham Electromagnetics

Page 214 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

real(kr8), dimension(:), intent(inout) :: wtAn array of resonance weights.

real(kr8), dimension(:), intent(inout) :: wt gresAn array of products of weights and Gres.

real(kr4), dimension(:), intent(out) :: xsAn array of cross-sections.

integer(ki4), intent(in) :: xs noThe index of a cross-section.

real(kr4), dimension(:), intent(out) :: xs uncAu array of cross-section uncertainties.

integer(ki4), dimension(:),intent(out) :: zai dAn array of daughter ZAIs.

integer(ki4), intent(in) :: zai pParent ZAI from index file.

12.3.4 Public subroutines

endfmat collapse(self,flux)Collapse cross sections and discard collapsed cross-sections below the thresholdof xs threshold barns. The ENDF data are ordered in MT value but for use inFispact-II the tables are more convenient in zai d order, and so the reactionlist is ordered in terms of increasing zai d.

endfmat covar(self,reac,mt,zai d,frac cov)Return arrays of the second reaction mt and zai d and the fractional covariancesfor reaction reac.

call endfmat deleteDeallocate the endfmat t object arrays.

endfmat full xs(self,xs no,full xs)Return an array of cross-sections in energy bins for reaction number xs no.

endfmat init(self,get uc,get unc,get cov,libtype)Initialise endfmat t self object.

endfmat reaction(self,mt,zai d,sigma,sigma unc,no xs,no cov)Return arrays of mt, zai d, sigma and sigma unc for reactions of the currentmaterial. Also provide the number of cross-sections versus energy and the numberof covariances for each of the reactions.

endfmat read(self,zai p)Read ENDF data for the current material.

Culham Electromagnetics

Page 215 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

endfmat res factors(self,len den,wt,wt gres)Use ENDF MF=2 data to calculate weights and products of weights with self-shielding factors Gres for use in the universal sigmoid curve model of self shield-ing.

endfmat retrieve(self)Read the ENDF data for the current material from the binary file xs endfb.

endfmat store(self)Write the ENDF data for the current material to the binary file xs endfb.

endfmat xs vs en(self,mt,zai d,xs,xs unc)Return cross-sections and fractional uncertainties in each energy bin as given byenergy bounds%xs. The cross-section required is specified by (p,d,mt), where pand d are respectively the ZAI of the parent and daughter nuclide and mt is thereaction MT. The cross-sections to be used are located by searching first themf=10 list of reactions, and if this fails then by searching the mf=3 list.

12.3.5 Public functions

endfmat label(self)Return the character label of the dataset from MF=1.

endfmat material(self)Return the MAT number for the current self object.

endfmat no reac(self)Return the total number of reactions in the current self object.

endfmat zai p(self)Return the ZAI of the parent material for the current self object.

12.3.6 Dependencies

This module depends on modules const kind m, const math m, const phys m, endf m,energy bounds m, files m, log m, reaction type m and zai m.

12.4 files m

12.4.1 Summary

The files m module manages the input and output files used by the code.

This module provides

Culham Electromagnetics

Page 216 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

1. linkage to physical files;

2. file opening and closing;

3. I/O error handling.

This module

1. links physical files specified in FILES to file units;

2. opens output files for writing;

3. opens input files for reading;

4. checks the status of files.

The handling of file names is implemented using queues for each file unit. Each filecan only be opened once for each instance that is listed in the FILES file. If multipleinstances are required (e.g. for modelling time-varying neutron fluxes) then files areopened on a specific unit in the order in which they appear in the FILES file. Multipleinstances of the same file name are permitted.

The module largely reproduces the idiosyncratic file handling used in Fispact-2007but with some minor changes to improve robustness and consistency. Following Fispact-2007, it

1. concatenates a sequence of physical files containing decay data (DECAY on unitdecay) with names ending in .nnn ∈ {.001, .002, . . . };

2. concatenates a sequence of five physical files (with internal name SPEC *, where* takes values 1–5) associated with units spec 1–spec 5 when reading data forscpr calculations.

To avoid accidental data loss, the module will close down the run if asked to write toan existing COLLAPXO, ARRAYX or FLUXES file. The user can override this safe behaviourwith the CLOBBER keyword.

To allow for time-evolving projectile fluxes, multiple instances of files ARB FLUX, FLUXES,COLLAPXI and COLLAPXO may occur in the FILES file and will be queued by this moduleto be used in sequence as required by the INPUT keywords.

For consistency, the TAB* and LOG files may be added to FILES. If they are absent,this module will automatically name them. Stream numbers on the TAB* keywords inINPUT are not used.

Culham Electromagnetics

Page 217 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

12.4.2 Public types and data

The fixed unit numbers used by Fispact-2007 have been retained with some smallmodifications. The list of public variables gives names to these to make it easier toidentify the unit being used in read and write statements. Points to note are:

• unit 18 is called ind nuc to avoid a name conflict with the intrinsic functionindex;

• spec has been introduced to handle all the spec * files;

• summaryx and halfunc are not used in the new program;

• the output unit number has been changed from 6 to 38 to avoid different be-haviour from different Fortran compilers in the treatment of stdout and stderrstreams;

• a new output stream runlog has been added to receive information on theprogress of a run, such as timings and warning and error messages;

• a new output stream ind nuco has been added to receive a reduced index ofnuclides;

• a new input stream prob tab has been added to specify the directory containingprobability table files for self-shielding calculations;

• a new input stream xs endf has been added to specify the directory containingthe cross-section files of the TENDL library;

• a new input stream xs endfb has been added to specify a binary file to containpreviously-read ENDF-format library data;

• a new input stream dk endf has been added to specify the directory containingthe decay files of the TENDL library;

• a new input stream fy endf has been added to specify the directory containingthe fission yield files of the TENDL library.

• a new input stream sf endf has been added to specify the directory containingthe spontaneous fission yield files of the TENDL library.� �

! public variablesinteger(ki4), public, parameter :: spec =33integer(ki4), public, parameter :: arb_flux=3integer(ki4), public, parameter :: files =4integer(ki4), public, parameter :: input =5integer(ki4), public, parameter :: output =38integer(ki4), public, parameter :: crossunc=7integer(ki4), public, parameter :: asscfy =8integer(ki4), public, parameter :: fissyld =9

Culham Electromagnetics

Page 218 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

integer(ki4), public, parameter :: graph =10integer(ki4), public, parameter :: a2data =11integer(ki4), public, parameter :: collapxi=12integer(ki4), public, parameter :: arrayx =13integer(ki4), public, parameter :: hazards =14integer(ki4), public, parameter :: summaryx=15integer(ki4), public, parameter :: gnuplot =15integer(ki4), public, parameter :: decay =16integer(ki4), public, parameter :: collapxo=17integer(ki4), public, parameter :: ind_nuc =18integer(ki4), public, parameter :: crossec =19integer(ki4), public, parameter :: fluxes =20integer(ki4), public, parameter :: stop_pro=21integer(ki4), public, parameter :: stop_deu=22integer(ki4), public, parameter :: stop_alp=23integer(ki4), public, parameter :: stop_tri=24integer(ki4), public, parameter :: stop_he3=25integer(ki4), public, parameter :: xn_pn =26integer(ki4), public, parameter :: xn_dn =27integer(ki4), public, parameter :: xn_an =28integer(ki4), public, parameter :: xn_tn =29integer(ki4), public, parameter :: xn_hn =30integer(ki4), public, parameter :: xn_d2n =31integer(ki4), public, parameter :: xn_t2n =32integer(ki4), public, parameter :: spec_1 =33integer(ki4), public, parameter :: spec_2 =34integer(ki4), public, parameter :: spec_3 =35integer(ki4), public, parameter :: spec_4 =36integer(ki4), public, parameter :: spec_5 =37integer(ki4), public, parameter :: halfunc =38integer(ki4), public, parameter :: absorp =39integer(ki4), public, parameter :: clear =40integer(ki4), public, parameter :: xn_p2n =41integer(ki4), public, parameter :: xn_a2n =42integer(ki4), public, parameter :: xn_h2n =43integer(ki4), public, parameter :: tab1 =44integer(ki4), public, parameter :: tab2 =45integer(ki4), public, parameter :: tab3 =46integer(ki4), public, parameter :: tab4 =47integer(ki4), public, parameter :: runlog =48integer(ki4), public, parameter :: ind_nuco=49integer(ki4), public, parameter :: sens =50integer(ki4), public, parameter :: prob_tab=51integer(ki4), public, parameter :: xs_endf =52integer(ki4), public, parameter :: dk_endf =53integer(ki4), public, parameter :: fy_endf =54integer(ki4), public, parameter :: sf_endf =55integer(ki4), public, parameter :: xs_endfb=56

integer(ki4), public, parameter :: files_max_unit_no=56integer(ki4), public, parameter :: files_max_fn_length =132� �

Culham Electromagnetics

Page 219 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

12.4.3 Arguments

logical, intent(in) :: clobberOutput file overwrite selector. If set to true, then existing output files may beoverwritten.

integer(ki4), intent(in) :: fileThe file unit number.

character(len=*), intent(in) :: filerootThe root for constructing file names for this run.

character(len=*), intent(in) :: files nameThe full pathname of the FILES file.

logical, optional :: must existIf this optional flag is set to true, then a file with the ‘io’ option is opened forread only.

integer(ki4), intent(in) :: outfileThe file unit number for output.

character(len=files max fn length), intent(out), optional :: && pathnameThe full pathname of an individual nuclide in a TENDL or probability tablelibrary directory.

character(len=*), intent(in) :: subfile nameThe name of an individual nuclide file in a directory of TENDL or probabilitytable library files

integer(ki4), intent(in) :: unitThe file unit number.

12.4.4 Public subroutines

call files close(file)Close the file with file unit number file.

call files deleteDeallocate files storage.

call files init(fileroot,files name)Read the FILES file and initialise file handling.

call files log queueWrite a list of files in all queues to the log file.

Culham Electromagnetics

Page 220 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call files open(unit[,must exist])Open the next file on unit. The optional argument can be set to true to openan input/output file for read only.

call files opened list(outfile)Write a list of files that have been opened to outfile.

call files printq(unit)Print a list of files in the queue for unit.

call files set clobber(clobber)Turn off overwrite protection on output files if clobber is true.

12.4.5 Public functions

files name(unit)This character(len=max fn length) function returns the name of the file asso-ciated with unit.

files open subfile(unit,subfile name[,pathname])This logical function opens an individual file in a directory set using files open.False is returned if the file cannot be found, but an error in opening the file pre-cipitates a fatal error message.

files unitname(unit)This character(len=8) function returns the name of the file unit associated withunit.

12.4.6 Dependencies

This module depends on modules const kind m and log m.

12.5 fischoose m

12.5.1 Summary

fischoose prunes the graph edges for selected actinide fission reactions from the treesrepresenting directed graphs in path m. It implements the FISCHOOSE keyword.

fischoose m is subordinate to path m. The subprogram path init computes weightsfor path edges as it searches, and whenever the weight goes below the path floor thenthe path is discarded. If the FISCHOOSE keyword is not included in the INPUT file,then fischoose weight returns a weight of 1 for all actinides, so all possible fissionparents are considered. If FISCHOOSE is present, then fischoose weight returns

Culham Electromagnetics

Page 221 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

zero except for those actinide parents listed with the FISCHOOSE keyword. Thishas the effect of pruning the path where the actinide parent is not listed.

12.5.2 Public types and data� �!public typestype, public :: fischoose_t

privateend type fischoose_t� �

There are no public data.

12.5.3 Arguments

integer(ki4), dimension(:), intent(in) :: fischoose nuc noNuclides to be included.

integer(ki4), intent(in) :: nuc no dThe daughter nuclide number.

integer(ki4), intent(in) :: nuc no pThe parent nuclide number.

type(nuclide t), intent(inout) :: nuclideThe nuclide object.

logical, intent(in) :: presentTrue if the FISCHOOSE keyword has been used.

type(fischoose t), intent(inout) :: selfThe fischoose self object.

12.5.4 Public subroutines

call fischoose init(self,nuclide,present,fischoose nuc no)Initialise the fischoose object according to the FISCHOOSE keyword settings.

call fischoose delete(self)Delete the fischoose object.

12.5.5 Public function

fischoose weight(self,nuc no p,nuc no d)This real(kr8) function returns the fischoose edge weight. It sets the weight tozero if the FISCHOOSE keyword is used, the parent nuclide is an actinide that

Culham Electromagnetics

Page 222 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

is not listed and the daughter nuclide is produced by a fission reaction. A weightof one is given to non-fissionable parents and to retained fissionable parents. Ifthe FISCHOOSE keyword is not used the weight is always one. A weight ofone is also given to parents on the discarded fission parent list if the daughter isnot a fission product.

12.5.6 Dependencies

This module depends on modules const kind m, fission m, log m and nuclide m.

12.6 fp ii m

12.6.1 Summary

The fp ii m module provides routines to write the output headings for Fispact-II.

12.6.2 Public types and data

There are no public types or data.

12.6.3 Arguments

None of the public subprograms has arguments.

12.6.4 Public subroutines

call fp ii bannerWrite the title box for Fispact-II.

call fp ii textWrite the header notes for Fispact-II.

call fp ii versionWrite the version summary for Fispact-II.

12.6.5 Dependencies

This module depends on files m.

Culham Electromagnetics

Page 223 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

12.7 gamma dose m

12.7.1 Summary

The gamma dose m module provides values of gamma doses required for the inventoryoutput tables.

12.7.2 Public types and data� �!public typestype, public :: gamma_dose_t

privateend type gamma_dose_t� �

There are no public data.

12.7.3 Arguments

real(kr8), intent(in) :: atomsThe number of atoms of the current nuclide.

type(decay t),intent(inout) :: decayThe decay data for the current nuclide.

real(kr8), intent(in) :: distThe distance from the point source.

type(inventory t),intent(in) :: inventoryThe object containing the initial and current inventories of all nuclides.

real(kr8),intent(in) :: mindThreshold number of atoms for output of single nuclide data.

type(nuclide t),intent(in) :: nuclideThe object containing all the nuclide data.

logical, intent(in) :: planeTrue for a plane gamma dose calculation, false for a point source.

type(gamma dose t), intent(inout) :: selfThe gamma dose self type.

Culham Electromagnetics

Page 224 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

12.7.4 Public subroutines

The public subroutines are the creator and destructor:

call gamma dose delete(self)Deallocate self.

call gamma dose init(self,inventory,nuclide,mind,plane,dist)Initialise self for the gamma dose calculations.

12.7.5 Public functions

gamma dose(self,atoms,decay)This real(kr8) function returns the gamma dose for the current nuclide.

gamma dose bremss correction(self,atoms,decay)This real(kr8) function returns the gamma dose arising from the bremsstrahlungcorrection for the current nuclide.

gamma dose total(self,inventory,nuclide)This real(kr8) function returns the total gamma dose.

gamma dose total approx(self,inventory,nuclide)This real(kr8) function that returns the total gamma dose where approximatespectra are used.

12.7.6 Dependencies

This module depends on modules const kind m, const math m, const phys m, decay m,element m, energy bounds m, inventory m, log m, nuclide m and zai m.

12.8 keyword m

12.8.1 Summary

The keyword m module provides a keyword object and its methods to define the masterindex of INPUT file keywords, including their arguments and other properties.

At present there are ninety-nine keywords defined in the master index. These keywordsare listed in Table 17. Some of the Fispact-2007 keywords are now deprecated; theseare recognised by Fispact-II and cause a warning message to be generated when theyare encountered. Some deprecated keywords are just ignored and others are converted

Culham Electromagnetics

Page 225 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

to their currently-accepted equivalent so that the run may continue. The warningmessages make it clear how Fispact-II now responds to deprecated keywords.

In only one case is backwards compatibility with Fispact-2007 not maintained: key-word UNCERTAINTY with first argument 4. The long form of the argument listfor this keyword has been redefined for Fispact-II because of the complete redesignof the pathways and uncertainty calculations. If the obsolete form of this keyword isencountered then Fispact-II issues a fatal error message and closes down the run.

See the header output from the program and the User Manual [56] for more information.Each keyword used in the input file may be shortened to its first three characters ifthose characters uniquely identify the full keyword, and if not, then sufficient charactersmust be used for the keyword to be uniquely identified.

The index of recognised keywords associates each keyword with the expected syntax ofits argument list and the specific numbers and types of arguments that should follow.The keyword arguments fall into eight categories:

1. a fixed number of arguments;

2. a single string argument beginning with ‘*’ and terminating in newline;

3. two alternative fixed numbers of arguments;

4. a fixed number of arguments and one loop;

5. a fixed number of arguments and two sequential loops;

6. a fixed number of arguments and two nested loops;

7. a fixed number of arguments and one loop for the PATH keyword;

8. three alternative fixed numbers of arguments.

The keyword arguments can be of ten different types:

1. boolean, represented as 0 or 1;

2. character string without embedded blanks;

3. element name;

4. integer;

5. nuclide or element name;

6. nuclide name;

7. floating-point number;

Culham Electromagnetics

Page 226 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

Table 17: Keywords recognised by the Fispact-II Release-3-20 code.

ACROSS ADCROSS ADLAMAINPUT ALAM ARRAYATOMS ATWO BREMSSTRAHLUNGCLEAR CLOBBER COLLAPSECONV COVARIANCE CULTABCUMFYLD DAYS DENSITYDEPLETION DOMINANT DOSEEAFVERSION END ENDPULSEENFA ERROR FISCHOOSEFISPACT FISYIELD FLUXFUEL FULLXS GENERICGETDECAY GETXS GRAPHGROUP GRPCONVERT HALFHAZARDS HOURS INDEXPATHIRON LEVEL LIBVERSIONLINA LOGLEVEL LOOKAHEADLOOPS MASS MCSAMPLEMCSEED MIND MINSMONITOR NEWFILE NOCOMPNOERROR NOFISS NOHEADERNOSORT NOSTABLE NOT1NOT2 NOT3 NOT4OVER PARTITION PATHPATHRESET POWER PRINTLIBPROBTABLE PROJECTILE PULSEREADSF RESULT ROUTESSAVELINES SECS SENSITIVITYSEQNUMBER SEQUENTIAL SORTDOMINANTSPECTRUM SPEK SPLITSSFCHOOSE SSFDILUTION SSFFUELSSFGEOMETRY SSFMASS STEPTAB1 TAB2 TAB3TAB4 TAPA TIMETOLERANCE UNCERTAINTY UNCTYPEUSEFISSION WALL XSTHRESHOLDYEARS ZERO

Culham Electromagnetics

Page 227 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

8. character string possibly containing embedded blanks;

9. a unit of time for the ALAM keyword;

10. a nuclide name, nuclide number or zero.

The keyword master index also stores the status of each keyword in the current versionof Fispact-II, which can be one of seven categories:

1. the keyword is current;

2. the keyword is obsolete and is now ignored;

3. the keyword now has no effect and is ignored, but may be implemented in futureversions;

4. the keyword is deprecated, but can be replaced together with all its argumentsand processing can continue;

5. the keyword is deprecated, but can be replaced and processing can continue withthe same arguments;

6. the keyword is deprecated in a specific context determined by the previous key-word, but can be replaced and processing can continue with the same arguments;

7. the keyword has an obsolete form which has been superseded and processingcannot continue with the obsolete argument list.

Warning messages, a substitute token string and the special name of the previouskeyword are stored for the appropriate categories of keywords.

12.8.2 Public types and data

The only public type is the self type keyword t:� �!public typestype, public :: keyword_t

privateend type keyword_t� �

The following parameters are made available for use elsewhere in the code:� �!! number of keywords in the master indexinteger(ki4), public, parameter :: keyword_no_keys =100

!! maximum keyword lengthinteger(ki4), public, parameter :: keyword_max_key_len=20

Culham Electromagnetics

Page 228 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

! keyword argument list typesinteger(ki4), public, parameter :: keyword_list_fixed=1integer(ki4), public, parameter :: keyword_list_string=2integer(ki4), public, parameter :: keyword_list_two_len=3integer(ki4), public, parameter :: keyword_list_one_loop=4integer(ki4), public, parameter :: keyword_list_two_loop=5integer(ki4), public, parameter :: keyword_list_two_nested=6integer(ki4), public, parameter :: keyword_list_path=7integer(ki4), public, parameter :: keyword_list_three_len=8

!keyword argument typeinteger(ki4), public, parameter :: keyword_arg_boolean=1integer(ki4), public, parameter :: keyword_arg_character=2integer(ki4), public, parameter :: keyword_arg_element=3integer(ki4), public, parameter :: keyword_arg_integer=4integer(ki4), public, parameter :: keyword_arg_nuc_or_el=5integer(ki4), public, parameter :: keyword_arg_nuclide=6integer(ki4), public, parameter :: keyword_arg_float=7integer(ki4), public, parameter :: keyword_arg_string=8integer(ki4), public, parameter :: keyword_arg_time=9integer(ki4), public, parameter :: keyword_arg_nuc_name_no_0 =10

! keyword argument type strings (keep in step with above integers)character(len=23), public, parameter, dimension(10) :: &

& keyword_arg_type_char = (/ && ’boolean ’, && ’string (without blanks)’, && ’element name ’, && ’integer ’, && ’nuclide or element name’, && ’nuclide name ’, && ’floating -point number ’, && ’string (with blanks) ’, && ’time unit (for ALAM) ’, && ’nuclide name , num. or 0’ /)

!keyword status in FISPACT-IIinteger(ki4), public, parameter :: keyword_stat_current=0integer(ki4), public, parameter :: keyword_stat_ignore=1integer(ki4), public, parameter :: keyword_stat_pending=2integer(ki4), public, parameter :: keyword_stat_rep_all=3integer(ki4), public, parameter :: keyword_stat_rep_key=4integer(ki4), public, parameter :: keyword_stat_cond_rep_key=5integer(ki4), public, parameter :: keyword_stat_cond_err=6

!types of tokens in substitution stringsinteger(ki4), public, parameter :: keyword_subst_key=0integer(ki4), public, parameter :: keyword_subst_integer=↘→keyword_arg_integer� �

Culham Electromagnetics

Page 229 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

12.8.3 Arguments

integer(ki4), intent(in) :: i argAn argument number identifying the position of an argument in the master indexdescription of its keyword.

integer(ki4), intent(in) :: i keyA keyword index number identifying the position of a keyword in the masterindex.

integer(ki4), intent(in) :: i substA token number identifying the position of a token in the list of tokens to besubstituted for a deprecated keyword.

type(keyword t), intent(inout) :: selfThe keyword self object.

character(len=*), intent(inout) :: tokenA token as a character string.

12.8.4 Public subroutines

The public subroutines are the creator and destructor:

call keyword delete(self)Deallocate all allocatable components of the self object.

call keyword init(self)Initialise the keyword master index defining all properties of the keywords to berecognised in the INPUT file.

12.8.5 Public functions

keyword arg type(self,i key,i arg)This integer(ki4) function returns the argument type of the given argument ofthe keyword identified by the given index number.

keyword arglist type(self,i key)This integer(ki4) function returns the type of the argument list for the keywordidentified by the given index number.

keyword cond key(self,i key)This character(len=keyword max key len) function returns the name of theprevious keyword that triggers the conditional replacement of the keyword iden-tified by the given index number.

Culham Electromagnetics

Page 230 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

keyword index(self,token)This integer(ki4) function returns the index number of the given token if it isunambiguously recognised as a keyword, or an error return. The return codesare:

0 if the token is not recognised as a keyword or theabbreviation of a keyword,

− no. of matches if the token is ambiguous as a keyword,−keyword no keys if the token is too long to be a keyword.

keyword long list(self,i key)This integer(ki4) function returns the value of the first argument that indicatesthe long form of the argument list for the keyword identified by the given indexnumber that has two possible argument list lengths.

keyword loop1(self,i key)This integer(ki4) function returns the position of the argument giving theiteration count of the first loop of arguments for the keyword identified by thegiven index number.

keyword loop1 arg type(self,i key,i arg)This integer(ki4) function returns the argument type of the given argument inthe first loop of the keyword identified by the given index number.

keyword loop2(self,i key)This integer(ki4) function returns the position of the argument giving theiteration count of the second loop of arguments for the keyword identified by thegiven index number.

keyword loop2 arg type(self,i key,i arg)This integer(ki4) function returns the argument type of the given argument inthe second loop of the keyword identified by the given index number.

keyword message1(self,i key)This character(len=max buf len) function returns the first warning messagefor the keyword identified by the given index number.

keyword message2(self,i key)This character(len=max buf len) function returns the second warning messagefor the keyword identified by the given index number.

keyword name(self,i key)This character(len=keyword max key len) function returns the name of thekeyword identified by the given index number.

keyword no args(self,i key)This integer(ki4) function returns the size of the argument list for the keywordidentified by the given index number.

Culham Electromagnetics

Page 231 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

keyword no loop1 args(self,i key)This integer(ki4) function returns the size of the argument list of the first loopof arguments for the keyword identified by the given index number.

keyword no loop2 args(self,i key)This integer(ki4) function returns the size of the argument list of the secondloop of arguments for the keyword identified by the given index number.

keyword no obs args(self,i key)This integer(ki4) function returns the size of the obsolete form of the argumentlist for the keyword identified by the given index number.

keyword no subst(self,i key)This integer(ki4) function returns the size of the substitution list for the dep-recated keyword identified by the given index number.

keyword obs arg type(self,i key,i arg)This integer(ki4) function returns the argument type of the given argument ofthe obsolete form of the keyword identified by the given index number.

keyword obs list(self,i key)This integer(ki4) function returns the value of the first argument that indicatesthe obsolete long form of the argument list for the keyword identified by the givenindex number that has three possible argument list lengths.

keyword short no args(self,i key)This integer(ki4) function returns the size of the short form of the argumentlist for the keyword identified by the given index number.

keyword status(self,i key)This integer(ki4) function returns the status of the keyword identified by thegiven index number.

keyword subst type(self,i key,i subst)This integer(ki4) function returns the type of the given token in the substitu-tion list for the deprecated keyword identified by the given index number.

keyword substitute(self,i key)This character(len=max buf len) function returns the string of tokens to besubstituted for the deprecated keyword identified by the given index number.

12.8.6 Dependencies

This module depends on modules const kind m and log m.

Culham Electromagnetics

Page 232 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

12.9 mfi m

12.9.1 Summary

The mfi m module provides an interface that allows FISPACT-II to be closely coupledwith other codes where inventory calculations for a large number of different arbitraryflux spectra are needed.

This module provides the top-level FISPACT program units that require no previouscalls to other FISPACT routines. However, these subroutines are intended to be calledby user-supplied driving programs and no main program is included in this module.

This module provides procedures for

• managing the reading of the nuclear data libraries

• collapsing and re-collapsing cross-sections

• initialising the Bateman equation solver

• performing time step calculations

• returning inventories and derived results to the calling program.

12.9.2 Public types and data

There are no public types or data.

12.9.3 Arguments

real(kr8), intent(inout), dimension(:) :: atomsThe initial inventory given as input to mfi rateeq init or the final inventoryreturned by mfi get atoms.

real(kr8), intent(inout) :: distThe distance to be used in point-source dose calculations.

real(kr8), intent(inout), dimension(:) :: energy binThe energy bins used to describe the fluxes and cross-sections.

character(len=*), intent(in) :: filerootThe fileroot for output from mfi m.

character(len=*), intent(in) :: filesfileThe name of the FILES file.

Culham Electromagnetics

Page 233 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

real(kr8), intent(inout), dimension(:) :: fluxesThe flux spectrum binned by energy groups.

real(kr8), intent(inout) :: flux ampThe amplitude of the projectile flux.

real(kr8), intent(inout), dimension(24) :: gamma en binThe upper energies (in MeV) of the energy bins used to describe the gammaspectrum. The lower energy of the first bin is zero.

real(kr8), intent(inout), dimension(24) :: gamma powerThe gamma spectrum in 24 bins.

real(kr8), intent(inout) :: new xsA new collapsed cross-section to overwrite an existing one.

integer(ki4), intent(out) :: no nucThe number of nuclide types in the master index of nuclides.

logical, intent(in) :: nofissSet to true if fission reactions are to be excluded.

real(kr8), intent(inout) :: mindThe minimum significant number of atoms for any nuclide in the inventory.

real(kr8), intent(inout), dimension(:) :: nuc activityThe array of activities (in Bq) of the nuclides in the current inventory.

real(kr8), intent(inout), dimension(:) :: nuc gamma doseThe array of dose rates (in Sv/hr) of the current inventory of nuclides.

real(kr8), intent(inout), dimension(:) :: nuc massThe array of masses (in grams) of the current inventory of nuclides.

logical, intent(inout) :: planeFlag indicating whether gamma doses should be calculated for a plane (T) orpoint (F) source.

real(kr8), intent(inout) :: time intervalThe duration of a time step for integrating the rate equations.

integer(ki4), intent(inout), dimension(:) :: zai allThe ZAI values of all the nuclides, provided that the array in the calling programis large enough.

integer(ki4), intent(inout) :: zaiThe ZAI value of a nuclide.

integer(ki4), intent(in) :: zai dThe ZAI value of a daughter nuclide.

integer(ki4), intent(in) :: zai pThe ZAI value of a parent nuclide.

Culham Electromagnetics

Page 234 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

12.9.4 Public subroutines

call mfi collapse xs(fluxes,energy bin)Collapse, or re-collapse, cross-sections with new fluxes.

call mfi deleteDelete all internal Fispact-II objects, issue final output if required and closedown the Fispact-II run.

call mfi get activity(nuc activity)Return the array of activities (in Bq) of the nuclides in the current inventory.

call mfi get atoms(atoms)Return the array of numbers of nuclides in the current inventory.

call mfi get dose(nuc gamma dose,mind,plane,dist)Return the array of dose rates (in Sv/hr) of the current inventory of nuclides.

call mfi get mass(nuc mass)Return the array of masses (in grams) of the current inventory of nuclides.

call mfi get no nuclides(no nuc)Return the number of nuclide types in the index.

call mfi get spectrum(gamma en bin,gamma power)Return the gamma spectrum in 24 energy bins.

call mfi initInitialise a Fispact-II run, performing many of the initialisation calls of themain program of a stand-alone run.

call mfi over xs(zai p,zai d,new xs)Overwrite the collapsed cross-section for a given parent-daughter pair.

call mfi rateeq init(atoms)Initialise the rate equation matrices for cooling and irradiation steps and loadthe initial inventory.

call mfi set fileroot(fileroot)Set the fileroot for output from mfi m. If this routine is not called before mfi initor if it is called with a blank fileroot, no output is generated.

call mfi set files(filesfile)Set the name of the FILES file containing pointers to the nuclide index file, ARRAYXfile and COLLAPX files.

call mfi set no fission(nofiss)Set the flag controlling whether or not fission reactions are included in the rateequations.

Culham Electromagnetics

Page 235 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call mfi step(flux amp,time interval)Integrate the rate equations for the given time interval with the specified fluxamplitude.

call mfi zai(zai all)Return the ZAI values for all the nuclides.

12.9.5 Public functions

mfi get nuclide name(zai)This character(len=9) function returns the name of the nuclide with the givenZAI.

12.9.6 Dependencies

This module depends on modules clock m, const kind m, const phys m, date time m,decay m, element m, energy bounds m, files m, flux m, gamma dose m, inventory m,log m, nuclide m, rateeq m, reaction m, rundata m and zai m.

12.10 output m

12.10.1 Summary

The output m module manages the writing to OUTPUT, TAB* and GRAPH in a similarform to the output produced by Fispact-2007.

This module provides procedures for

• writing library summaries (using printlib m)

• writing a readable summary of the contents of the collapx file (using printlib m)

• writing tables initiated by the ATOMS and SPECTRUM keywords

• writing output intiated by the TABn keywords

• writing output initiated by the OVER keyword

• writing output initiated by the IRON keyword

• writing output initiated by the PARTITION keyword

• writing output initiated by the GRAPH keyword

• managing the computation of gamma doses (using gamma dose m)

Culham Electromagnetics

Page 236 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

• accumulating and writing lists of dominant nuclides (using dominant m)

• writing output initiated by the UNCERTAINTY, PATH and ROUTES key-words (using pathways m)

12.10.2 Public types and data

There are no public types or data.

12.10.3 Arguments

type(dominant t), intent(inout) :: dominantThe dominant nuclide data.

type(flux t), intent(in) :: fluxThe projectile spectrum data.

type(inventory t), intent(in) :: inventoryThe initial and current inventories of all nuclides.

type(nuclide t), intent(inout) :: nuclideThe nuclide data.

type(pathstep t), intent(inout) :: pathstepThe step and rateeq data.

type(pathways t), intent(inout) :: pathwayThe pathways data.

type(rateeq t), intent(inout) :: rateeq coolThe rate equation data for cooling.

type(rundata t), intent(inout) :: rundataThe run control data.

type(date time t), intent(in) :: timestampThe timestamp of the run.

12.10.4 Public subroutines

call output close(rundata)Close the output stream and the TABn files.

call output collapx(nuclide,rundata,flux)Write a summary of collapsed cross-sections and cross-section uncertainties toOUTPUT in response to PRINTLIB 4. This function provides a readable sum-mary of the data in the collapx output file.

Culham Electromagnetics

Page 237 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call output deleteDeallocate.

call output gas kerma dpa(nuclide)Set the logical flags controlling the calculation and output of appm, kerma anddpa according to whether or not cross-section data for these are available.

call output graphs(dominant,nuclide,rundata)Write graph plotting data to the GRAPH file, and when gnuplot output is selectedalso write a gnuplot command file to the GNUPLOT file.

call output init(rundata,timestamp)Initialise the output stream and write the banner header and other introductoryoutput.

call output inventory(inventory,nuclide,rundata,dominant)Print inventory data to OUTPUT. At the first call the key to the inventory tablesis printed.

call output pathways(pathway,pathstep,inventory,dominant, && nuclide,rundata)Write pathways and uncertainty data to OUTPUT.

call output pathways init(pathway,pathstep,inventory, && dominant,nuclide,rateeq cool,rundata)Compute pathways for the current dominant nuclide list, integrating over thesequence of timesteps held in the pathstep object.

call output printlib(nuclide,rundata,flux)Write library summary to OUTPUT in response to the PRINTLIB keyword inINPUT. There are five groups of output

1. decay data;

2. branching fractions, cross-sections, bremsstrahlung candidates;

3. gamma spectrum;

4. collapx data;

5. discrete spectral lines;

6. resonance parameters.

These are selected by the PRINTLIB keyword argument. Fission fractions areoutput in the first five cases.

call output summary(inventory)Write a summary of the physical data of the run to OUTPUT.

12.10.5 Public functions

There are no public functions.

Culham Electromagnetics

Page 238 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

12.10.6 Dependencies

This module depends on modules const kind m, const phys m, date time m, decay m,decay type m, dominant m, element m, energy bounds m, files m, flux m, fp ii m,gamma dose m, inventory m, log m, nuclide m, pathstep m, pathways m, printlib m,rateeq m, reaction m, reaction type m, regulatory m, rundata m and zai m.

12.11 printlib m

12.11.1 Summary

Write the library summary to OUTPUT. There are three groups of output that corre-spond to Fispact-2007 output, a fourth one added to provide a readable summary ofthe collapsed cross-sections that Fispact-IIstores in binary form, a fifth one to printout discrete spectral lines, a sixth one to print out ENDF cross-section data sources, aseventh one to print out ENDF decay data sources, an eighth one to provide a summaryof the decay data and a ninth one to print out natural isotopic abundances:

1. decay data and fission fractions;

2. branching fractions, cross-sections, bremmstrahlung candidates and fission frac-tions;

3. gamma spectrum and fission fractions;

4. cross-sections in a 2-column format;

5. discrete decay spectrum lines;

6. cross-section data sources (ENDF libraries only);

7. decay data sources (ENDF libraries only);

8. decay data summary;

9. natural isotopic abundances.

12.11.2 Public types and data

There are no public types or data.

Culham Electromagnetics

Page 239 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

12.11.3 Arguments

logical, intent(in) :: do uncIf true then print the uncertainties.

type(flux t), intent(in) :: fluxThe projectile spectrum data.

type(nuclide t), intent(inout) :: nuclideThe nuclide data.

integer(ki4), intent(in) :: printlib noThe print option selector.

logical, intent(inout) :: use gamma 22If true then use 22 energy groups for the gamma spectra, otherwise use 24 energygroups.

12.11.4 Public subroutine

call printlib write(nuclide,flux,printlib no,do unc, && use gamma 22)Write library summary tables as specified in the Summary section above as se-lected by the printlib no (∈ [1, 6]) and the two logical switches.

12.11.5 Public functions

There are no public functions.

12.11.6 Dependencies

This module depends on modules const kind m, const phys m, decay m, decay type m,element m, energy bounds m, files m, fission m, flux m, log m, nuclide m, reaction m,reaction type m, rundata m, spectrum type m and zai m.

12.12 pulse m

The pulse m module has been withdrawn from Release 2.00 and later releases ofFispact-II. Its functionality has been incorporated in the new token m module; seeSection 12.14 on page 258.

Culham Electromagnetics

Page 240 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

12.13 rundata m

12.13.1 Summary

The rundata m module reads control data from INPUT as interpreted by token m, parsesinput keywords and their arguments, and stores settings and manages events specifiedby them.

The module provides

1. default data values;

2. input keyword interpretation and validation;

3. initialisation checking;

4. run control.

The complex syntax of the INPUT file is read and interpreted by token m to producea list of tokens, which are keywords and their arguments. The routines in rundata mtake tokens from this list and process them. Settings keywords set control values inthe self object, and Actions keywords return actions to the calling program.

The input is divided into three phases:

1. library keywords cause all the nuclear data to be read and processed; this phaseis terminated by the FISPACT keyword;

2. initialisation keywords specify all the initial conditions for an inventory calcula-tion, define what auxiliary calculations are to be performed and specify outputoptions; this phase is terminated by the first TIME keyword;

3. the inventory calculation keywords specify the time intervals to be used anddefine any changes in flux amplitude, flux spectrum or nuclear data that occurbetween time intervals; this phase is terminated by the END keyword whichcloses down the run.

12.13.2 Public types and data

The only public type is the self type rundata t:� �!public typetype, public :: rundata_t

privateend type rundata_t� �

Culham Electromagnetics

Page 241 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

The following actions have been defined and have been made available as public pa-rameters (see Section 7 for more information):� �! public variablesinteger(ki4), public, parameter :: run_closedown=0integer(ki4), public, parameter :: run_irrad_step=1integer(ki4), public, parameter :: run_irrad_init=2integer(ki4), public, parameter :: run_cooling_step=3integer(ki4), public, parameter :: run_pathways_init=4integer(ki4), public, parameter :: run_pathways_anal=5integer(ki4), public, parameter :: run_output_inventory=6integer(ki4), public, parameter :: run_output_summary=7integer(ki4), public, parameter :: run_partition=8integer(ki4), public, parameter :: run_path=9integer(ki4), public, parameter :: run_routes=10integer(ki4), public, parameter :: run_reset_xs=11integer(ki4), public, parameter :: run_over=12integer(ki4), public, parameter :: run_add_pathstep=13integer(ki4), public, parameter :: run_add_rateeq=14integer(ki4), public, parameter :: run_update_rateeq=15integer(ki4), public, parameter :: run_sensitivity=16integer(ki4), public, parameter :: run_nuclide_react=17integer(ki4), public, parameter :: run_nuclide_decay=18integer(ki4), public, parameter :: run_nuclide_a2data=19integer(ki4), public, parameter :: run_printlib=20integer(ki4), public, parameter :: run_initial_values=21integer(ki4), public, parameter :: run_rateeq_irrad=22integer(ki4), public, parameter :: run_rateeq_cool=23integer(ki4), public, parameter :: run_pathstep_init=24integer(ki4), public, parameter :: run_dominant_init=25integer(ki4), public, parameter :: run_group_convert=26integer(ki4), public, parameter :: run_initial_output=27integer(ki4), public, parameter :: run_labelling=28integer(ki4), public, parameter :: run_read_doses=29integer(ki4), public, parameter :: run_nuclide_clearance =30integer(ki4), public, parameter :: run_nuclide_hazards=31integer(ki4), public, parameter :: run_collapse_fissyld =32integer(ki4), public, parameter :: run_gas_kerma_dpa=33integer(ki4), public, parameter :: run_reset_loglevel=34integer(ki4), public, parameter :: run_power_to_fluxamp =35� �

12.13.3 Arguments

logical, intent(out) :: added summaryFlag to indicate whether an additional summary table should be displayed at theend of the output.

logical, intent(out) :: arb fluxFlag to indicate whether the flux spectrum specification is given in non-standardenergy bins (T) or the same standard energy groups as the cross-sections.

real(kr8), intent(out) :: atolThe absolute error tolerance to be used by the solver.

Culham Electromagnetics

Page 242 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

real(kr8), intent(out) :: atol pathThe absolute error tolerance to be used by the solver for pathways calculations.

real(kr8), intent(out) :: atoms tThe number of atoms of the target nuclide of the current path specified with theRESULT keyword.

logical, intent(out) :: atwoFlag to indicate whether A2 data should be added to the output.

integer(ki4), intent(out) :: brems no nucThe number of nuclides specified with the BREMSSTRAHLUNG keyword.

logical, intent(out) :: clearFlag to indicate whether clearance data should be added to the output.

logical, intent(out) :: coolingTrue for cooling steps.

logical, intent(out) :: crossecFlag to indicate whether a reaction (T) or decay (F) has been specified with theOVER keyword.

real(kr8), intent(out) :: cumulative timeThe current elapsed time in the inventory evolution calculation.

real(kr8), intent(out) :: cutoffCutoff level for sensitivity calculations.

logical, intent(out) :: decayFlag to indicate whether sensitivity to decay constant values is to be calculated.

logical, intent(out) :: decay uncFlag to indicate whether half-life uncertainties are to be used.

logical, intent(out) :: decayoldFlag to indicate whether decay data are to be read from an ARRAYX file (T) orfrom EAF or ENDF-format library files (F).

real(kr8), intent(out) :: density gpercm3The density of the target specified with the DENSITY keyword.

integer(ki4), intent(out) :: dil nnucThe number of nuclides specified with the SSFDILUTION keyword.

real(kr8), intent(out) :: distThe distance from a point source to be used for gamma dose calculations.

real(kr8), intent(out) :: distrib lower boundThe lower cutoff for the probability distribution function to be used for monte-carlo sensitivity calculations.

Culham Electromagnetics

Page 243 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

real(kr8), intent(out) :: distrib upper boundThe upper cutoff for the probability distribution function to be used for monte-carlo sensitivity calculations.

logical, intent(out) :: dk splitFlag to indicate whether decay data are split into individual disc files for eachnuclide (the new format) or collected into a small number of files (the EAFformat).

logical, intent(out) :: do covFlag to indicate whether LB=6 covariance data are to be used.

logical, intent(out) :: do scprFlag to indicate whether sequential charged particle reaction data are availableand should be used. (Always false for Fispact-II.)

logical, intent(out) :: do spekFlag to indicate whether approximate gamma spectra should be used when spe-cific data are not available.

logical, intent(out) :: do uncFlag to indicate whether cross-section uncertainty data are available and shouldbe used.

real(kr8), intent(out) :: dominant cutoffThe threshold below which nuclides are discarded from the dominant list.

logical, intent(out) :: errorFlag to indicate whether the fractional error (T) or value (F) of a cross-sectionor decay constant specified with the OVER keyword is to be modified.

integer(ki4), intent(out) :: error distributionSelector for the probability distribution function specified for sensitivity calcula-tions.

logical, intent(out) :: first coolingTrue for the first cooling step.

logical, intent(out) :: fischooseFlag to indicate whether the FISCHOOSE keyword is present in the INPUT file.

integer(ki4), intent(out) :: fischoose sizeThe number of nuclides in the list specified with the FISCHOOSE keyword.

character(len=72), intent(out) :: fispact titleThe run title, obtained from the FISPACT keyword.

logical, intent(out) :: fisyield includeTrue if the list of nuclides given with the FISYIELD keyword is to be includedin the calculation; false if it is an exclusion list.

Culham Electromagnetics

Page 244 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

logical, intent(out) :: fisyield presentFlag to indicate whether the FISYIELD keyword is present in the INPUT file.

integer(ki4), intent(out) :: fisyield sizeSize of the list of nuclides given with the FISYIELD keyword.

type(flux t), intent(inout) :: fluxThe projectile flux object.

real(kr8), intent(out) :: flux ampThe flux amplitude.

logical, intent(out) :: fullxsFlag to indicate whether energy-dependent cross-section data should be stored.

logical, intent(out) :: fy indepThe flag indicating whether independent fission yields, MT=454, (T) or cumu-lative fission yields, MT=459, (F) should be used.

logical, intent(out) :: generic pathsFlag to indicate whether generic pathway information is to be output.

integer(ki4), intent(out) :: graph formatSelector for the format of the graph file to be written.

integer(ki4), intent(out) :: graph noThe number of graphs to be output.

integer(ki4), dimension(5), intent(out) :: graph typeThe types of the graphs to be plotted.

logical, intent(out) :: graph uncertFlag to indicate whether uncertainties should be plotted on graphs.

logical, intent(out) :: halfFlag to indicate whether half-life data should be added to the inventory tables.

logical, intent(out) :: hazardsFlag to indicate whether hazard data should be added to the printed output andgraphs.

integer(ki4), intent(in) :: iAn array index used to select elements or nuclides from the lists specified with theBREMSSTRAHLUNG, FUEL, MASS, PARTITION, SSFCHOOSE orSSFDILUTION keywords.

character(len=*), intent(in) :: in bufferCharacter string to be added to monitoring output when the MONITOR 1vkeyword is used.

Culham Electromagnetics

Page 245 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

logical, intent(out) :: ironFlag to indicate whether the IRON keyword appears in the INPUT file.

integer(ki4), intent(out) :: lib typeSelector for the type of library.

logical, intent(out) :: lookaheadFlag to indicate whether the LOOKAHEAD keyword appears in the INPUTfile.

real(kr8), intent(out) :: loop floorThe minimum weight for a pathway loop to be retained.

logical, intent(out) :: material by elementFlag to indicate whether additional tables describing inventory compositions byelement should be output.

integer(ki4), intent(out) :: max depthThe greatest depth of tree search used to find paths.

integer(ki4), dimension(:), intent(out) :: mc seedThe array of seed values from the Fortran intrinsic random number generator.The dimension of this array is platform-dependent.

integer(ki4), intent(out) :: mc seed dimensionThe platform-dependent dimension of the seed array used by the Fortran intrinsicrandom number generator.

real(kr8), intent(out) :: mindThe threshold below which nuclides are omitted from inventory output.

real(kr8), intent(in) :: new flux ampThe new flux amplitude calculated from the POWER keyword and KERMAdata.

real(kr8), intent(out) :: new valueThe replacement value of a reaction or decay decay constant, or its fractionalerror, specified with the OVER keyword.

integer(ki4), intent(out) :: next actionThe runstep action selector.

logical, intent(in) :: nofissFlag to indicate whether the NOFISS keyword appears in the INPUT file.

integer(ki4), intent(out) :: no elementsThe number of elements specified with the MASS and SSFMASS keywords.

integer(ki4), intent(out) :: no mc samplesThe number of monte-carlo samples to be used in sensitivity calculations for eachparent-daughter pair.

Culham Electromagnetics

Page 246 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

integer(ki4), intent(in) :: no mtThe local array index of an MT value specified with the POWER keyword.

integer(ki4), intent(out) :: no mtThe number of MT values specified with the POWER keyword.

integer(ki4), intent(out) :: no nucThe number of nuclides specified with the SENSITIVITY keyword.

integer(ki4), intent(out) :: no nuclidesThe number of nuclides specified with the FUEL and SSFFUEL keywords.

integer(ki4), intent(out) :: no pdThe number of parent-daughter pairs specified with the SENSITIVITY key-word.

integer(ki4), intent(out) :: no xs binsThe number of energy bins used to describe the group cross-sections.

logical, intent(out) :: nostabFlag to indicate whether stable nuclides should be omitted (T) or included (F)in the output of inventory tables.

integer(ki4), intent(in) :: nstepThe sequence number of a time interval following the ZERO keyword, i.e. acooling step.

logical, intent(out) :: not use fissionFlag to indicate whether fission yield data has been used (F) or not (T).

integer(ki4), dimension(:), intent(inout) :: nuc noAn array of nuclide numbers specified with the FISCHOOSE or FISYIELDkeywords.

integer(ki4), dimension(:), intent(inout) :: nuc nosAn array of nuclide numbers on the current path.

integer(ki4), intent(out) :: nuc no dA daughter nuclide number in a reaction or decay specified with the OVER orROUTES keyword.

integer(ki4), dimension(:), intent(out) :: nuc no dAn array of daughter nuclide numbers used in sensitivity calculations.

integer(ki4), intent(inout) :: nuc no pA parent nuclide number in a reaction or decay specified with the OVER orROUTES keyword.

integer(ki4), dimension(:), intent(out) :: nuc no pAn array of parent nuclide numbers used in sensitivity calculations.

Culham Electromagnetics

Page 247 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

integer(ki4), intent(out) :: nuc no targetThe nuclide number of a path target.

logical, intent(out) :: output dominantFlag to indicate whether tables of dominant nuclides should be output.

logical, intent(out) :: output inventoryFlag to indicate whether inventory tables should be output.

real(kr8), intent(out) :: path floorThe minimum weight for a path to be retained.

integer(ki4), intent(out) :: path lenThe number of nuclides in a path.

logical, intent(out) :: planeFlag to indicate whether a plane or point source should be used in gamma dosecalculations.

real(kr8), intent(out) :: powerThe power level specified by the POWER keyword.

logical, intent(out) :: printTrue to produce a full probability table printout in OUTPUT, false for summaryoutput only.

logical, intent(out) :: printlibFlag to indicate whether library data output has been requested.

integer(ki4), intent(out) :: printlib noSelector for the form of the library data output.

logical, intent(out) :: probtabFlag controlling probability table use.

integer(ki4), intent(out) :: projectileSelector for the projectile.

logical, intent(out) :: reactoldFlag to indicate whether cross-section data are to be read from a COLLAPX file(T) or from EAF or ENDF-format library files (F).

logical, intent(out) :: read fissFlag to indicate whether induced fission yield data should be read.

logical, intent(out) :: read sfFlag to indicate whether spontaneous fission data should be read.

logical, intent(out) :: result keyFlag to indicate whether the target of the current path has been specified withthe RESULT keyword.

Culham Electromagnetics

Page 248 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

real(kr8), intent(out) :: rtolThe relative error tolerance to be used by the solver.

real(kr8), intent(out) :: rtol pathThe relative error tolerance to be used by the solver for pathways calculations.

logical, intent(out) :: save linesFlag to indicate whether data on discrete spectral lines should be stored.

type(rundata t), intent(inout) :: selfThe rundata self object.

logical, intent(out) :: sigma uncFlag to indicate whether cross-section uncertainties are to be used.

logical, intent(out) :: sigmoidFlag to indicate whether the universal sigmoid curve model for self shielding isto be used.

integer(ki4), intent(out) :: ssf geomThe selector indicating the target geometry to be used in the universal sigmoidcurve model for self shielding.

integer(ki4), intent(out) :: ssf nchoThe number of elements or nuclides specified with the SSFCHOOSE keyword.

real(kr8), intent(in) :: t in secsA time in seconds.

logical, intent(out) :: tab1Flag to indicate whether the TAB1 file of tabular data should be written.

logical, intent(out) :: tab2Flag to indicate whether the TAB2 file of tabular data should be written.

logical, intent(out) :: tab3Flag to indicate whether the TAB3 file of tabular data should be written.

logical, intent(out) :: tab4Flag to indicate whether the TAB4 file of tabular data should be written.

real(kr8), intent(out) :: time intervalThe current timestep.

integer(ki4), intent(out) :: time interval noThe sequence number of the time interval in the inventory evolution calculation.

integer(ki4), intent(out) :: topxThe number of dominant nuclides included in the tables printed in the OUTPUTfile.

Culham Electromagnetics

Page 249 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

integer(ki4), intent(out) :: topxxThe number of nuclides included in the list of dominant nuclides used for uncer-tainty calculations..

real(kr8), intent(out) :: total mass kgThe total mass of the target in kilograms.

real(kr8), dimension(:), intent(out) :: uncertaintyAn array of the uncertainties associated with parent-daughter edges in sensitivitycalculations.

integer(ki4), intent(out) :: uncertainty outputSelector for the type of uncertainty output to be generated.

integer(ki4), intent(out) :: uncertainty typeSelector for the types of uncertainty to be used in the calculations.

logical, intent(out) :: use fissFlag to indicate whether fission reactions should be included in the calculations.

logical, intent(out) :: use gamma 22Flag to indicate whether to use 22 or 24 energy groups for gamma spectra data.

logical, intent(out) :: useparFlag to indicate whether to use a separate self-shielding factor for each macro-partial subset of reactions in the probability tables.

logical, intent(out) :: write indexFlag to indicate whether a reduced index file is to be written.

logical, intent(out) :: write outputFlag to indicate whether output is to be written for each timestep.

logical, intent(out) :: xsFlag to indicate whether sensitivity to cross-section values is to be calculated.

logical, intent(out) :: xs binFlag to indicate that the library data are to be read from a compressed binaryfile.

logical, intent(out) :: xs endfFlag to indicate whether cross-section and uncertainty data are to be obtainedfrom TENDL (T) or EAF (F) library files.

logical, intent(out) :: xs scaleFlag to indicate whether self-shielding factors are to be applied by scaling EAFor TENDL cross-sections (T) or by replacing the library cross-sections with thoseobtained from the probability table files (F).

type(zai t), intent(inout) :: zai libAll nuclide ZAI given in the INDEX file.

Culham Electromagnetics

Page 250 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

12.13.4 Public subroutines

call rundata decay settings(self,projectile,decayold, && save lines,do spek,read fiss,dk split,& fy indep,read sf)Provide access to the settings stored in the rundata self object for reading decaylibrary data.

call rundata delete(self)Deallocate all rundata storage and token m storage, and close the INPUT file.

call rundata delete over(self)Deallocate rundata storage allocated in response to the OVER keyword.

call rundata delete path(self)Deallocate rundata storage allocated in response to the PATH keyword.

call rundata disable fission(self)Inhibit the USEFISSION keyword and FISYIELD 0 keyword if NOFISShas been used in this or an earlier run that prepared the ARRAYX dataset.

call rundata dominant(self,topx,topxx,dominant cutoff,mind, && hazards,clear)Provide access to the settings stored in the rundata self object for controllingdominant init.

call rundata fisyield nuc no(self,nuc no)Provide access to the nuclide numbers specified with the FISYIELD keyword.

call rundata fischoose nuc no(self,nuc no)Provide access to the nuclide numbers specified with the FISCHOOSE keyword.

call rundata init(self,zai lib)Open the INPUT file, call token init to read the file and compile the list of tokens,and initialise the action queue.

call rundata iv(self,iron,total mass kg,no elements, && no nuclides,density gpercm3,mind)Provide access to initial value settings that were obtained from the MASS orFUEL and MIND keywords and are stored in the rundata self object.

call rundata mfi init(self,zai lib,nofiss)Initialise the rundata self object for use with the multi-flux interface mfi.

call rundata monitor(self,in buffer)Write in buffer to the log file and to the terminal if the MONITOR 1 keywordappears in the INPUT file.

call rundata no inventory(self)Inhibit the inventory calculation actions if there are no decay data or if there isno initial inventory.

Culham Electromagnetics

Page 251 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call rundata output graphs(self,graph no,graph format, && graph type,graph uncert,hazards,fispact title)Provide access to the settings for the output of graphs that were obtained fromthe GRAPH, hazards and FISPACT keywords and are stored in the rundataself object.

call rundata output inventory(self,mind,dist,plane,atwo, && clear,hazards,half,iron,material by element, && output dominant,brems nuc no,nostab,output inventory, && write output,tab1,tab2,tab3,tab4,not use fission, && density gpercm3,added summary)Provide access to the settings for the output of the inventory tables that wereobtained from several keywords and are stored in the rundata self object.

call rundata output pathways(self,uncertainty type, && uncertainty output,mind,atwo,clear,hazards, && iron,lookahead)Provide access to the settings for the output of pathways information that wereobtained from the UNCERTAINTY UNCTYPE and other keywords and arestored in the rundata self object.

call rundata output printlib(self,printlib no,printlib, && do unc,use gamma 22)Provide access to the settings for the output of the library data that were obtainedfrom the PRINTLIB and GROUP keywords and are stored in the rundataself object.

call rundata path init(self)Set the pointer to the top of the path list stored privately in the rundata selfobject.

call rundata path nuc no(self,nuc nos,result key,atoms t)Return the nuclide numbers on the current path, a flag indicating if the targetof the path has been used with the RESULT keyword and if so, the number ofatoms of the target given with RESULT.

call rundata pathways settings(self,path floor,loop floor, && max depth,uncertainty type,use fiss,sigma unc,decay unc, && generic paths,write index,fischoose,fischoose size, && atol,rtol)Provide access to the settings for the pathways m module that are stored in therundata self object.

call rundata power level(self,power,no mt)Return the power level and the number of MT values specified with the POWERkeyword.

call rundata rateeq settings(self,atol,rtol,atol path, && rtol path,use fiss,fisyield present,fisyield include, &

Culham Electromagnetics

Page 252 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

& fisyield size)Provide access to the settings for the rateeq m module that are stored in therundata self object.

call rundata react settings(self,no xs bins,projectile, && lib type,reactold,do unc,do scpr,do cov,xs bin, && fullxs,arb flux,sigmoid,probtab,xs scale,xs endf)Provide access to the settings stored in the rundata self object for readingcross-section library data.

call rundata read(self,flux,next action)Return the next action from the private action queue, or if the queue is emptyread tokens from the token queue until the next action keyword is obtained,storing any settings encountered.

call rundata read xs settings(self)Read rundata settings from a COLLAPX file so that the settings can be used in acontinuation inventory run.

call rundata reset flux amp(self,new flux amp)Reset the flux amplitude using the value calculated from the POWER keywordand KERMA data.

call rundata reset xs(self)Reset settings to their default values for subsequent calls to nuclide react. Notethat the projectile cannot be changed, and the choices of FULLXS and NO-ERROR remain the same as set in the library preparation phase.

call rundata sensitivity edges(self,nuc no p,nuc no d, && uncertainty)Provide the nuclide numbers for the parent and daughter pairs (i.e. graph edges)in sensitivity calculations.

call rundata sensitivity mcseed(self,mc seed)Provide access to the seed array for the Fortran intrinsic random number gener-ator that is stored in the rundata self object.

call rundata sensitivity nucno(self,nuc no)Provide the nuclide numbers for the dependent nuclides in sensitivity calcula-tions.

call rundata sensitivity settings(self,xs,decay,cutoff,no pd, && no nuc,error distribution,no mc samples, && distrib lower bound,distrib upper bound, && mc seed dimension)Provide access to the settings for the sensitivity m module that are stored inthe rundata self object.

Culham Electromagnetics

Page 253 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

call rundata sensitivity(self,sens settings)Provide a copy of the rundata sensitivity data.

call rundata ssf settings(self,no xs bins,no elements, && no nuclides,ssf ncho,dil nnuc,usepar,ssf geom, && print,xs scale)Provide access to the settings stored in the rundata self object for readingprobability tables and cross-section library data for self-shielding calculations.

call rundata step(self,time interval no,time interval, && cumulative time,flux amp,cooling,first cooling)Provide access to the timestep summary information that is stored in the rundataself object. This is for use in subsequent pathways or sensitivity calculations.

call rundata time line(self)Write the inventory table time line header to the OUTPUT file.

call rundata write xs settings(self)Write rundata settings to a COLLAPX file so that the settings can be reused in asubsequent continuation inventory run.

12.13.5 Public functions

rundata arb flux(self)This logical function returns true if the projectile flux spectrum has been spec-ified in arbitrary energy groups.

rundata brems nuc no(self,i)This integer(ki4) function returns the nuclide number of the nuclide with ar-ray index i in the list of nuclides specified with the BREMSSTRAHLUNGkeyword.

rundata clobber(self)This logical function returns true if the overwriting of output files is permitted.

rundata convert time units(t in secs)This character(len=11) function returns the given time in seconds as a stringfor printed output, with the time unit chosen to yield a suitable size of numericalvalue.

rundata cooling step(self,nstep)This real(kr8) function returns the duration in seconds of the specified coolinginterval.

rundata cultab(self)This logical function returns true if the CULTAB variants of the TABn filesare to be written.

Culham Electromagnetics

Page 254 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

rundata fispact title(self)This character(len=72) function returns the run title, obtained from the FIS-PACT keyword.

rundata flux amp(self)This real(kr8) function returns the amplitude of the projectile flux.

rundata iv atoms(self,i)This real(kr8) function returns the initial number of atoms of the nuclide witharray index i in the list of nuclides specified with the FUEL keyword.

rundata iv frac(self,i)This real(kr8) function returns the initial fraction of the element with arrayindex i in the list of elements specified with the MASS keyword.

rundata iv nuc no(self,i)This integer(ki4) function returns the nuclide number of the nuclide with arrayindex i in the list of nuclides specified with the FUEL keyword.

rundata iv z(self,i)This integer(ki4) function returns the atomic number of the element with arrayindex i in the list of elements specified with the MASS keyword.

rundata kerma (self,no mt)This integer(ki4) function returns an MT value from the list specified with thePOWER keyword, identified by its local array index.

rundata no head(self)This logical function returns true if the writing of header information to theOUTPUT file is to be suppressed.

rundata no bins(self)This integer(ki4), dimension(3) function returns the numbers of energy binsused for cross-sections, sequential charged-particle reactions and arbitrary fluxspecifications.

rundata no cooling steps(self)This integer(ki4), dimension(3) function returns the number of steps follow-ing the ZERO keyword.

rundata over next(self,nuc no p,nuc no d,crossec,error,new value)This logical function returns true if the stack of reactions and decays specifiedwith the OVER keyword is not empty, pops the head from the stack and returnsthe stored data. Otherwise, if the stack is empty it returns false and the outputarguments are undefined.

rundata partition frac(self,i)This real(kr8) function returns the fraction to be kept of the element with arrayindex i in the list of elements specified with the PARTITION keyword.

Culham Electromagnetics

Page 255 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

rundata partition size(self,i)This integer(ki4) function returns the number of elemental inventories to bepartitioned in response to the PARTITION keyword.

rundata partition z(self,i)This integer(ki4) function returns the atomic number of the element with arrayindex i in the list of elements specified with the PARTITION keyword.

rundata path target(self,nuc no target,path len)This logical function returns true if there is another path in the internal listof paths, returns the stored data and advances the internal pointers to the nextpath. Otherwise, if the pointers have reached the end of the list it returns false,the output arguments are set to zero and the internal pointers are reset to thehead of the list.

rundata pathreset(self)This integer(ki4) function returns the stored argument of the PATHRESETkeyword that is used to control pathways output.

rundata projectile(self)This integer(ki4) function returns the selector identifying the projectile.

rundata reportlevel(self)This integer(ki4) function returns the logging level for error and warning re-porting.

rundata route next(self,nuc no p,nuc no d,path floor, && loop floor,max depth,atoms t,result key)This logical function returns true if the stack of reactions and decays specifiedwith the ROUTES keyword is not empty, pops the head from the stack andreturns the stored data. Otherwise, if the stack is empty it returns false and theoutput arguments are undefined.

rundata save pathsteps(self)This logical function returns true if pathsteps are to be saved for subsequentpathways or sensitivity calculations.

rundata save rateeq cool(self)This logical function returns true if the rateeq matrix for cooling steps is besaved for subsequent sensitivity calculations.

rundata ssf length1(self)This real(kr8) function returns the first characteristic length of the target thatis used in the universal sigmoid curve model of self shielding.

rundata ssf length2(self)This real(kr8) function returns the second characteristic length of the targetthat is used in the universal sigmoid curve model of self shielding. This lengthis relevant only for cylindrical targets.

Culham Electromagnetics

Page 256 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

rundata ssf efflen(self)This real(kr8) function returns the effective length scale of the target that isused in the universal sigmoid curve model of self shielding.

rundata ssfapply zai(self,i)This integer(ki4) function returns the ZAI index of the nuclide with arrayindex i in the list of nuclides specified with the SSFCHOOSE keyword.

rundata ssfdil eng(self,i,j)This integer(ki4) function returns the energy group number for group j for thenuclide with array index i in the list of nuclides specified with the SSFDILU-TION keyword.

rundata ssfdil ngrp(self,i)This integer(ki4) function returns the number of energy groups for the nuclidewith array index i in the list of nuclides specified with the SSFDILUTIONkeyword.

rundata ssfdil nuc no(self,i)This integer(ki4) function returns the nuclide number of the nuclide with arrayindex i in the list of nuclides specified with the SSFDILUTION keyword.

rundata ssfdil val(self,i,j)This real(kr8) function returns the dilution value specified for energy groupj for the nuclide with array index i in the list of nuclides specified with theSSFDILUTION keyword.

rundata ssfiv atoms(self,i)This real(kr8) function returns the initial number of atoms of the nuclide witharray index i in the list of nuclides specified with the SSFFUEL keyword.

rundata ssfiv frac(self,i)This real(kr8) function returns the initial fraction of the element with arrayindex i in the list of elements specified with the SSFMASS keyword.

rundata ssfiv nuc no(self,i)This integer(ki4) function returns the nuclide number of the nuclide with arrayindex i in the list of nuclides specified with the SSFFUEL keyword.

rundata ssfiv scale(self,i)This real(kr8) function returns the normalised fraction of a nuclide specifiedby the SSFFUEL keyword, or calculated by expanding the element list givenby the SSFMASS keyword.

rundata ssfiv tot mass(self)This real(kr8) function returns the total mass (in kg) of elements on the self-shielding mixture list.

Culham Electromagnetics

Page 257 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

rundata ssfiv z(self,i)This integer(ki4) function returns the atomic number of the element with arrayindex i in the list of elements specified with the SSFMASS keyword.

rundata use ssf tp(self)This logical function returns true if the input data meet all conditions for theprobability table calculations to be undertaken.

rundata use ssf uc(self)This logical function returns true if the input data meet all conditions for theself-shielding calculations to be undertaken using the universal sigmoid curvemodel.

rundata time interval(self)This real(kr8) function returns the time interval for the next integration stepin the inventory evolution calculation.

12.13.6 Dependencies

This module depends on modules const kind m, const phys m, element m, energy bounds m,files m, flux m, log m, pulse m, zai m,keyword m.

12.14 token m

12.14.1 Summary

The token m module provides a tokens object and its methods to allow the readingand syntax checking of INPUT files. A given file is read and is analysed into a stream oftokens separated by white space. (An exception is strings that start with ‘*’ and areterminated by newline. These may contain blanks.) Tabs and newlines are equivalentto spaces, so a token cannot span a line break. The token stream is stored as a queue,implemented as a doubly-linked list. The predecessor pointers are required to permitediting of the queue to replace deprecated keywords. Keywords are distinguishedfrom other tokens by matching against the index of known full keywords, provided bythe keyword m module. The token stream is parsed to confirm that the number andtypes of keyword arguments match those expected from the keyword properties storedin the index. PULSE . . . ENDPULSE loops are processed here, by making longjumps backwards along the queue from an ENDPULSE keyword to the correspondingPULSE keyword in response to a request for the next keyword, until the iterationcount of the loop is exhausted. Loops are hidden from the remainder of the code.

12.14.2 Public types and data

Culham Electromagnetics

Page 258 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

� �!public typestype, public :: token_t

privateend type token_t� �

There are no public data.

12.14.3 Arguments

type(token t), intent(inout) :: selfThe token self type.

type(zai t), intent(in) :: zai libThe ZAI indices known in the library.

12.14.4 Public subroutines

The public subroutines are the creator and destructor:

call token deleteDeallocate self and call keyword delete to deallocate the keyword master index.

call token init(self,zai lib)Call keyword init to create the keyword master index, initialise the head and tailpointers for the token queue, read the INPUT file to populate the token queue,check that the numbers and types of keyword arguments are as expected andreplace deprecated keywords.

12.14.5 Public functions

token cooling steps(self)This integer(ki4) function returns the number of time intervals following theZERO keyword, i.e. the number of cooling steps.

token irrad found(self)This logical function returns a flag indicating whether the token queue containsan irradiation step.

token next arg bool(self)This logical function returns the integer from the next token (interpreted asa boolean value), having advanced the current argument pointer and confirmedthat the token is an argument, not a keyword.

Culham Electromagnetics

Page 259 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

token next arg char(self)This character(len=max buf len) function returns the character string from thenext token, having advanced the current argument pointer and confirmed thatthe token is an argument, not a keyword.

token next arg int(self)This integer(ki4) function returns the integer value from the next token, hav-ing advanced the current argument pointer and confirmed that the token is anargument, not a keyword.

token next arg real(self)This real(kr8) function returns the real value from the next token, havingadvanced the current argument pointer and confirmed that the token is an argu-ment, not a keyword.

token next cooling dt(self)This real(kr8) function returns the duration in seconds of the next coolinginterval.

token next keyword(self)This character(len=keyword max key len) function returns the full name ofthe next keyword in the token queue. PULSE . . . ENDPULSE loops are in-tercepted and handled locally, so that the rest of the code is unaware of theexistence of loops. Loops may have arbitrary iteration counts and may be nestedto arbitrary depths. The next keyword and its arguments are echoed to the logfile and optionally to the terminal, depending on the MONITOR setting.

12.14.6 Dependencies

This module depends on modules const kind m, const phys m, element m, files m,keyword m, log m, zai m and file INPUT.

Culham Electromagnetics

Page 260 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

References

[1] J.W. Eastwood and J.G. Morgan. Proposal: Response to ITT T/PB020/13 Main-tenance and Update Work on EASY-II. Technical Report CEM/130516/PR/1Issue 2, Culham Electromagnetics Ltd, June 2013.

[2] C. Miller and J-Ch. Sublet. CCFE Invitation to Tender for Maintenance/Up-date WSork on EASY-II. Technical Report T/PB020/13, UK Atomic EnergyAuthority, May 2013.

[3] http://www-nds.iaea.org/exfor/endf.htm.

[4] C. Miller and R.A. Forrest. UKAEA Invitation to Tender for FISPACT – Phase2. Technical Report T/CM079/08, UKAEA, December 2008.

[5] J.W. Eastwood and J.G. Morgan. Proposal: Response to ITT T/CM079/08FISPACT Phase 2. Technical Report CEM/081203/PR/1 Issue 1, Culham Elec-tromagnetics Ltd, December 2008.

[6] P. Barham and J-Ch. Sublet. CCFE Invitation to Tender for FISPACT – Phase3. Technical Report T/CM018/10, CCFE, March 2010.

[7] J.W. Eastwood and J.G. Morgan. Proposal: Response to ITT T/CM018/10FISPACT Phase 3. Technical Report CEM/100421/PR/1 Issue 1, Culham Elec-tromagnetics Ltd, April 2010.

[8] C. Miller and J-Ch. Sublet. CCFE Invitation to Tender for FISPACT – Phase 4.Technical Report T/CM020/11, UK Atomic Energy Authority, July 2011.

[9] J.W. Eastwood and J.G. Morgan. Proposal: Response to ITT T/CM020/11FISPACT Phase 4. Technical Report CEM/110728/PR/1 Issue 1, Culham Elec-tromagnetics Ltd, August 2011.

[10] C. Miller. Amendment No. 2 to Tender T/CM020/11. Technical report, UKAtomic Energy Authority, August 2011.

[11] C. Miller and J-Ch. Sublet. CCFE Invitation to Tender for Maintenance/Up-date WSork on EASY-II. Technical Report T/CM024/12, UK Atomic EnergyAuthority, May 2012.

[12] J.W. Eastwood and J.G. Morgan. Proposal: Response to ITT T/CM024/12Maintenance/Update Work on EASY-II. Technical Report CEM/120504/PR/1Issue 1, Culham Electromagnetics Ltd, May 2012.

[13] R.A. Forrest. FISPACT-2007: User Manual. Technical Report UKAEA FUS 534,EURATOM/UKAEA Fusion Association, March 2007.

[14] J.W. Eastwood and J.G. Morgan. FISPACT-II(12) User Manual. Technical Re-port CEM/100421/SD/7, Culham Electromagnetics Ltd, December 2010.

Culham Electromagnetics

Page 261 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

[15] J-Ch. Sublet, J.W. Eastwood, and J.G. Morgan. FISPACT-II(12) User Manual.Technical Report CEM/100421/SD/7 Issue 2, Culham Electromagnetics Ltd, May2011. Re-issued as CCFE-R(11)11 Issue 1.

[16] J-Ch. Sublet, J.W. Eastwood, and J.G. Morgan. FISPACT-II(12) User Man-ual. Technical Report CEM/100421/SD/7 Issue 3, Culham Electromagnetics Ltd,September 2011. Re-issued as CCFE-R(11)11 Issue 2.

[17] J-Ch. Sublet, J.W. Eastwood, and J.G. Morgan. FISPACT-II(12) User Manual.Technical Report CEM/120504/SD/7 Issue 5, Culham Electromagnetics Ltd, May2013. Re-issued as CCFE-R(11)11 Issue 4.

[18] J-Ch. Sublet, J.W. Eastwood, and J.G. Morgan. FISPACT-II(12) User Man-ual. Technical Report CEM/130516/SD/7 Issue 6, Culham Electromagnetics Ltd,June 2014. Re-issued as CCFE-R(11)11 Issue 5.

[19] R.A. Forrest. The European Activation System: EASY-2007 Overview. TechnicalReport UKAEA FUS 533, UKAEA, 2007.

[20] M. Herman and A. Trkov, editors. ENDF-6 Formats Manual, Data Formats andProcedures for the Evaluated Nuclear Data File ENDF/B-VI and ENDF/B-VII,volume BNL-90365-2009 Rev. 2. Brookhaven National Laboratory, November2011.

[21] K. Radhakrishnan and A.C. Hindmarsh. Description and use of LSODE, the Liv-ermore solver for ordinary differential equations. Technical Report LLNL ReportUCRL-ID-113855, LLNL, 1993.

[22] Information technology, programming languages, Fortran. International StandardISO/IEC 1539-1, first edition 1997-12-15, 1997. Part 1: Base Language.

[23] Information technology, programming languages, Fortran, enhanced data typefacilities. Technical Report ISO/IEC TR 15581(E), second edition, 2001.

[24] J.W. Eastwood and J.G. Morgan. Fortran 95 Conventions for FISPACT. Techni-cal Report CEM/081203/WI/1 Issue 2, Culham Electromagnetics Ltd, February2009.

[25] http://en.wikipedia.org/wiki/concurrent versions system.

[26] http://ximbiot.com/cvs/manual.

[27] G.N. Purdy. CVS Pocket Reference. O’Reilly Media, Inc., 2003. ISBN0 596 00567 9.

[28] J. Vesperman. Essential CVS. O’Reilly Media, Inc., 2006. ISBN 0 596 52703 9.

[29] J.W. Eastwood and J.G. Morgan. The FISPACT Phase 2 CVS Repository. Tech-nical Report CEM/081203/WI/2 Issue 1, Culham Electromagnetics Ltd, February2009.

Culham Electromagnetics

Page 262 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

[30] J.W. Eastwood, J.G. Morgan, and R.A. Forrest. FISPACT Phase 2 User Re-quirements Document. Technical Report CEM/081203/SD/1 Issue 1, CulhamElectromagnetics Ltd, February 2009.

[31] J.W. Eastwood, J.G. Morgan, and J-Ch. Sublet. FISPACT-II(12) User Require-ments Document. Technical Report CEM/120504/SD/1 Issue 2, Culham Electro-magnetics Ltd, August 2012.

[32] S.W. Cierjacks, P. Oblozinsky, S. Kelzenberg, and B. Rzehorz. Development ofa novel algorithm and production of new nuclear data libraries for the treatmentof sequential(x, n) reactions in fusion material activation calculations. FusionTechnology, 24(3):277–287, November 1993.

[33] R.E. MacFarlane. NJOY 99/2001: new capabilities in data processing. Technicalreport, Los Alamos National Laboratory, 2002.

[34] R.E. MacFarlane and A.C. Kahler. Methods for Processing ENDF/B-VII withNJOY. Nuclear Data Sheets, 111(12):2739–2890, December 2010.

[35] J-Ch. Sublet and P. Ribon. A Probability Table Based Cross Section ProcessingSystem: CALENDF - 2001. J. Nuc. Sci. Tech., Supplement 2:856–859, August2002.

[36] J-Ch. Sublet, P. Ribon, and M. Coste-Delclaux. CALENDF-2010: User Manual.Technical Report CEA-R-6277, ISSN 0429-3460, CEA, 2011.

[37] I.I. Bondarenko, editor. Group Constants for Nuclear Reactor Calculations. Con-sultant Bureau, New York, 1964.

[38] G.I. Bell and S. Glasstone. Nuclear Reactor Theory. Van Nostrand Reinhold, NewYork, 1970.

[39] V. Gopalakrishnan and S. Ganesan. Self-Shielding and Energy Dependence ofDilution Cross-Section in the Resolved Resonance Region. Ann. Nucl. Energy,25(11):839–857, 1998.

[40] E. Martinho, I.F. Goncalves, and J. Salgado. Universal curve of epithermal neu-tron resonance self-shielding factors in foils, wires and spheres. Appl. RadiationIsotopes, 58(3):371–375, March 2003.

[41] E. Martinho, J. Salgado, and I.F. Goncalves. Universal curve of the thermalneutron self-shielding factor in foils, wires, spheres and cylinders. J. Radioanal.Nucl. Chem., 261(3):637–643, September 2004.

[42] J. Salgado, E. Martinho, and I.F. Goncalves. The calculation of neutron self-shielding factors of a group of isolated resonances. J. Radioanal. Nucl. Chem.,260(2):317–320, May 2004.

[43] N.P. Baumann. Resonance integrals and self-shielding factors for detector foils.Technical Report DP-817, du Pont de Nemours, Savannah River Laboratory, Jan-uary 1963.

Culham Electromagnetics

Page 263 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

[44] F.H. Frohner. Evaluation and analysis of nuclear resonance data. Technical report,Nucear Energy Agency, 2000. JEFF Report 18.

[45] R.G. Jaeger, editor. Engineering Compendium on Radiation Shielding. Springer-Verlag, 1968.

[46] The JEFF-3.1/-3.1.1 Radioactive Decay Data and Fission Yields Sub-libraries.OECD NEA, 2009. JEFF Report 20.

[47] O.N. Jarvis. Low-activity materials: reuse and disposal. Technical Report AERE-R-10860, Atomic Energy Research Establishment, 1983.

[48] R.A. Forrest, J. Kopecky, and J-Ch. Sublet. The European Activation File: EAF-2007 neutron-induced cross section library. Technical Report UKAEA FUS 535,UKAEA, 2007.

[49] R.A. Forrest. The European Activation File: EAF-2007 deuteron and proton-induced cross section libraries. Technical Report UKAEA FUS 536, UKAEA,2007.

[50] R.A. Forrest. The European Activation File: EAF-2007 decay data library. Tech-nical Report UKAEA FUS 537, UKAEA, 2007.

[51] J-Ch. Sublet, L.W. Packer, J. Kopecky, R.A. Forrest, A.J. Koning, and D.A.Rochman. The European Activation File: EAF-2010 neutron-induced cross sec-tion library. Technical Report CCFE-R(10)05, CCFE, 2010.

[52] L.W. Packer and J-Ch. Sublet. The European Activation File: EAF-2010 decaydata library. Technical Report CCFE-R(10)02, CCFE, 2010.

[53] L.W. Packer and J-Ch. Sublet. The European Activation File: EAF-2010 biolog-ical, clearance and transport libraries. Technical Report CCFE-R(10)04, CCFE,2010.

[54] http://www.netlib.org.

[55] J.W. Eastwood and J.G. Morgan. The FISPACT-II(12) Release 1.00 DetailedDesign Document. Technical Report CEM/100421/SD/3 Issue 3, Culham Elec-tromagnetics Ltd, September 2011.

[56] J-Ch. Sublet, J.W. Eastwood, and J.G. Morgan. FISPACT-II(12) User Man-ual. Technical Report CEM/100421/SD/7 Issue 4, Culham Electromagnetics Ltd,March 2012. Re-issued as CCFE-R(11)11 Issue 3.

Culham Electromagnetics

Page 264 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

APPENDICES

A Traceability

Note that this compliance table is not fully up to date with the present version ofFispact-II because the customer has not updated his User Requirements Specifica-tions to include all the changes requested in the various follow-on ITTs [6, 8, 11, 2]and in change requests during the execution of the resulting contracts.

Table 18: Cross Reference to URD requirements

URD Description SSD References

2.1 General capabilities2.1.1 Similar functionality Sec. 62.1.2 DDD in source Sec. 62.1.3 SQS in CVS Secs. 1.3, 62.1.4 CVS Release Versions Sec. 62.1.5 Execution time Sec. 62.1.6 Development timescale Secs. 1.3, 62.1.7 European Activation File data Secs. 3, 62.1.8 ENDF-format data Sec. 6

2.2 General constraints2.2.1 Defensive programming style Sec. 62.2.2 Fortran 95 Secs. 1.3, 62.2.3 Code portability Sec. 62.2.4 Dynamic memory allocation Sec. 62.2.5 Use LSODES solver Secs. 2.18, 11.3, 6

2.3 User characteristics2.3.1 Interface compatible with Fispact-2007 Secs. 3, 5, 122.3.2 Control input and library data checking Secs. 3, 12.142.3.3 Error logging and timing output Secs. 8.3, 8.1

2.4 Operational environment2.4.1 Batch mode Sec. 62.4.2 0, 1 or 2 command-line arguments Sec. 62.4.3 Unix, linux and windows Sec. 6

3.1 Input3.1.1 Use FILES and INPUT Secs. 5.1, 12.4, 5.2, 12.83.1.2 Resort to FILES in absence of arguments Sec. 7.2.2

continued on next page

Culham Electromagnetics

Page 265 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

continued from previous page

URD Description SSD References

3.1.3 Use of fileroot argument Sec. 7.2.23.1.4 Use of FILES file Secs. 5.1, 12.43.1.5 Mapping of all library, flux, collapsed cross-

section and condensed decay data files in FILESfile

Secs. 5.1, 12.4

3.1.6 Mappings for unused files to be read silently Sec. 5.13.1.7 Specifically, mappings used by Fispact-2007 for

sequential charged particle reactions are to beread and ignored

Sec. 5.1

3.1.8 All blank lines and lines beginning with # in theFILES file are to be ignored

Sec. 5.1

3.1.9 One mapping per line of the FILES file Sec. 5.13.1.10 FILES file in present working directory, or its full

pathname given as a command-line argumentSec. 6

3.1.11 Repeated mappings to be used sequentially Sec. 5.13.1.12 User data to be supplied to define a run Secs. 5.2, 3.2, 3.33.1.13 User options via INPUT Secs. 5.2, 12.133.1.14 Keywords to be recognised Sec. 12.83.1.15 Meanings of keywords and their arguments Sec. 12.83.1.16 User-specified pathways analysis Secs. 2.16, 7, 11.63.1.17 Dominant-nuclide pathways analysis Secs. 2.16, 7, 11.63.1.18 Comments in INPUT Sec. 5.23.1.19 Loops in INPUT Sec. 5.2.4

3.2 Capabilities3.2.1 External cross-section and decay data libraries Sec. 33.2.2 Master index of nuclides Sec. 3.43.2.3 Comprehensive decay data Sec. 3.53.2.4 Use of EAF format n-induced cross-section li-

brariesSecs. 2.4, 3

3.2.5 Use of EAF format d- and p-induced cross-sectionlibraries

Secs. 2.9, 2.8, 3

3.2.6 Use of EAF format decay data Sec. 3.53.2.7 Use of ENDF format n-induced cross-section li-

brariesSecs. 2.4, 4

3.2.8 Use of CALENDF probability table data Secs. 2.4.3, 3.73.2.9 Use of ENDF format α-, γ-, d- and p-induced

cross-section librariesSecs. 2.10, 2.7, 2.9, 2.8, 4

3.2.10 Use of ENDF format decay data Sec. 4.23.2.11 Sink nuclide Sec. 2.13.2.12 Reduced size of INDEX file Sec. 3.43.2.13 ARB FLUX file for non-standard energy groups Sec. 3.2

continued on next page

Culham Electromagnetics

Page 266 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

continued from previous page

URD Description SSD References

3.2.14 Irradiation piecewise-constant in time Sec. 2.13.2.15 Nuclides Z = 1 to Z = 111 Sec. 3.4, 10.53.2.16 Light nuclide secondaries included Secs. 2, 9.3, 9.33.2.17 Fully consistent fission, not source term Sec. 2.13.2.18 Equilibrium approximation not needed Sec. 2.183.2.19 Calculate number of atoms as a function of time Secs. 2, 7, 11.73.2.20 Mass, activity, decay energies, γ-dose rate, haz-

ards, clearance, activity/A2 ratioSecs. 5.3, 12.10

3.2.21 Radiological totals and sums over elements Secs. 5.3, 12.103.2.22 Secondary γ spectrum Secs. 2.3.2, 3.5.23.2.23 Trace elements in iron Sec. 2.12, 12.133.2.24 Sensitivity to λ and σ Sec. 2.153.2.25 Dominant nuclide lists Secs. 2.16, 7.1, 12.103.2.26 Pathway analysis capability Secs. 2.16, 11.63.2.27 Multi-pulse pathway analysis Secs. 2.16, 11.63.2.28 Loops in pathways Secs. 2.16, 11.63.2.29 Output reduced INDEX file for pathways Secs. 3.4, 11.63.2.30 Set of recognised induced reactions Secs. 2.4, 2.7, 2.8, 2.9, 2.103.2.31 Additional diagnostic MT numbers Sec. 9.53.2.32 Additional ignored MT numbers Sec. 9.53.2.33 Unrecognised MT numbers Sec. 9.53.2.34 Recognised decay modes Sec. 2.33.2.35 Recognised decay radiation types Sec. 9.63.2.36 Cross-section and half life uncertainty from EAF

dataSecs. 3.5, 3.8, 7, 9

3.2.37 Cross-section and half life uncertainty fromENDF data

Secs. 3.5, 3.8, 7, 9

3.2.38 Library data can be modified Sec. 11.73.2.39 Fission yields from EAF data Secs. 2.5,, 3.11, 9.53.2.40 Fission yields from ENDF data Secs. 2.5, 3.11, 9.53.2.41 Fission yield associations from EAF data Secs. 2.5, 3.103.2.42 Use of ENDF fission yields when using ENDF

cross-sectionsSec. 2.5

3.2.43 Fission yield associations not to be used withENDF fission yields

Sec. 2.5

3.2.44 User control of which actinides undergo fission Sec. 11.63.2.45 Allow thick as well as thin targets [after Release-

2-00]Sec. 2.13

3.2.46 All isomeric states in TENDL-2012 library [afterRelease-2-00]

Sec. 4.1

3.2.47 Use of the LB=6 covariance data [after Release-2-00]

Sec. 2.2

continued on next page

Culham Electromagnetics

Page 267 of 268

CEM/130516/SD/2 Issue 9Fispact SSD

continued from previous page

URD Description SSD References

3.2.48 Confirm consistency of excited states and isomericstates [after Release-2-00]

Sec. 4.1

3.3 Output3.3.1 Tables of physical output to OUTPUT file Secs. 5.3, 12.103.3.2 Line length for OUTPUT file Secs. 5.3, 12.103.3.3 Error reports and logging data to the LOG file Secs. 5.9, 8.33.3.4 Self-shielding summary to OUTPUT file Sec. 2.4.33.3.5 PRINTLIB summary to OUTPUT file Secs. 5.3, 12.103.3.6 Inventory output at each time interval Secs. 5.3, 12.103.3.7 Pathways analysis output Secs. 2.16, 11.6, 12.103.3.8 Monte-carlo sensitivity output Secs. 2.15, 11.8, 12.103.3.9 Unique labelling of output Secs. 8.2, 12.103.3.10 Split inventory streams at time interval Secs. 7.2.3, 11.2, 12.133.3.11 COLLAPX output Secs. 5.5, 10.53.3.12 ARRAYX output Secs. 5.7, 10.53.3.13 Standard runs Secs. 5.2, 73.3.14 GRAPH output Sec. 5.43.3.15 TAB* file output Sec. 5.93.3.16 Progress monitor output Sec. 12.133.3.17 Warning and error messages Sec. 8.33.3.18 Graphical output for use by gnuplot Sec. 5.43.3.19 CPU timing output Sec. 8.1

3.4 V&V3.4.1 Test runs from Appendix 14 of [13] Sec. 6.13.4.2 Test runs from Appendix 19 [13] Sec. 6.1

3.5 Acceptance3.5.1 SQS to be delivered Sec. 6.13.5.2 Appendix 14 of [13] on WINDOWS XP Sec. 6.1

Culham Electromagnetics

Page 268 of 268