Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
e8bcc6b
#1 fix: skip (alpha, n) spectrum output in tape7, tape8 if id=1 (magn…
ilariacasalbore Mar 25, 2026
f032510
#1 fix: skip output of grand total (alpha,n) + s.f. + d.n. neutron sp…
ilariacasalbore Mar 26, 2026
fca895e
#1 fix: set gtq equal to gttqan if (alpha,n) is the only contribution…
ilariacasalbore Mar 26, 2026
588e3b3
#2 fix: if itest=1 (only one contribution to neutron emission), add t…
ilariacasalbore Mar 26, 2026
a06d8bb
#2 fix: ensure isfnq (number of nuclides undergoing spontaneous fissi…
ilariacasalbore Mar 26, 2026
8d8ff3e
#2 fix: change position of isfnq updating so that it is not increased…
ilariacasalbore Mar 26, 2026
0106764
#2 fix: ensure idnnq (number of nuclides emitting delayed neutrons) i…
ilariacasalbore Mar 26, 2026
b860f92
#2 fix: move update of isfnq and idnnq value when nt=0 before the cal…
ilariacasalbore Mar 30, 2026
7b87a11
#1, #2 test: update outputs in samples using the modified version of …
ilariacasalbore Mar 30, 2026
483a7ee
#2 test: add new sample with spontaneous fission being the only contr…
ilariacasalbore Mar 30, 2026
9ed39df
#1, #2 chore: update executable to match the latest code changes
ilariacasalbore Mar 30, 2026
444d4fb
#1 fix: solve double normalization of the total neutron spectrum if (…
ilariacasalbore Mar 31, 2026
d834c01
#1 test: update outputs in samples using the latest version of the code
ilariacasalbore Mar 31, 2026
62659c3
#1 chore: update executable to match the latest code changes
ilariacasalbore Mar 31, 2026
99da90d
#4 refactor: add flag to enable or disable sensitivity calculation
ilariacasalbore Apr 9, 2026
6b2ac3a
#4 refactor: delete output pdata if sensitivity calculation is not en…
ilariacasalbore Apr 9, 2026
7114b5b
#4 test: update samples input so that sensitivity calculation is enabled
ilariacasalbore Apr 9, 2026
42afa31
#4 chore: update executable with latest changes to the source code
ilariacasalbore Apr 9, 2026
2cd16d1
#5 fix: pass missing variables to three region problem subroutines
ilariacasalbore Apr 14, 2026
8954aad
#5 chore: update executable with latest changes to the source code
ilariacasalbore Apr 15, 2026
3032fb1
#5 test: add new sample to test three-region interface configuration
ilariacasalbore Apr 15, 2026
8bec8d5
#6 chore: remove bin folder containing executable
ilariacasalbore Apr 15, 2026
156bee0
#6 chore: add Makefile
ilariacasalbore Apr 15, 2026
c7cf869
#6 chore: add .gitignore
ilariacasalbore Apr 15, 2026
6368b1a
#6 chore: update README
ilariacasalbore Apr 15, 2026
f320408
#5 test: fix three-region interface test
ilariacasalbore Apr 15, 2026
07f255c
#7: Address comments in the review
ilariacasalbore Apr 29, 2026
a4780fb
#7: Update samples
ilariacasalbore Apr 30, 2026
e982ded
#8 fix: initialize variables and address minor issues
ilariacasalbore May 6, 2026
38cebc1
#8 test: update samples
ilariacasalbore May 6, 2026
f726d6c
#8 chore: update Makefile with debug options
ilariacasalbore May 6, 2026
a7da468
#8 fix: correct Makefile
ilariacasalbore May 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin/
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Compiler and flags
FC = gfortran
FFLAGS = -std=legacy -fdefault-real-8 -fdefault-double-8 -fdefault-integer-8 -fbacktrace
FDEBUG = -g -Wall -Wextra -O0 -fcheck=all -ffpe-trap=invalid,zero,overflow \
-finit-real=snan -finit-integer=-999999 -finit-logical=true \
-fsanitize=address,undefined

# Directories
SRC_DIR = src
BIN_DIR = bin

# Files
TARGET = $(BIN_DIR)/sources4d
SRC = src/sources4d.for

.PHONY: all debug clean

all: $(BIN_DIR) $(TARGET)

debug: FFLAGS += $(FDEBUG)
debug: $(BIN_DIR) $(TARGET)

$(BIN_DIR):
mkdir -p $(BIN_DIR)

$(TARGET): $(SRC)
$(FC) $(FFLAGS) $< -o $@

clean:
rm -f $(TARGET)
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ SOURCES is a code for computing neutron source rates and spectra from spontaneou

SOURCES4D has been built and tested only on a Linux platform with an Intel FORTRAN compiler.

# Directory Contents
## Directory Contents

src--source code

bin--executable code

data--data files

docs--documentation
Expand All @@ -24,15 +22,30 @@ User manual describing the new features in SOURCES4D.
- mc2019.proc_v_n_pp2335-2347.pdf
> Jeffrey A. Favorite, “Second Derivative of an (alpha,n) Neutron Source with Respect to Constituent Isotope Densities,” _Proceedings of the International Conference on Mathematics and Computational Methods Applied to Nuclear Science and Engineering (M&C 2019)_, 2335–2347, Portland, Oregon, August 25–29, 2019.

samples--8 test inputs and outputs and utility scripts
samples--10 test inputs and outputs and utility scripts

## How to install

To clone this repository and build the executable, please type the following commands:
```bash
git clone https://github.com/lanl/SOURCES4D.git
cd SOURCES4D
make
```

## Usage

For usage instruction, refer to the manual included in the `docs` folder.

The latest version of the code introduces an additional input parameter to enable or disable the sensitivity calculation. This parameter must be added in `card 2`, after the `idd`, `id`, `erg` parameters. It accepts two values: `0` to disable the sensitivity calculation and `1` to enable it. To ensure compatibility with older inputs, this parameter is optional and, if omitted, it defaults to `0`. The sensitivity calculation is only available for the homogeneous configuration and for the alpha beam configuration.

# Copyright
## Copyright

© 2024. Triad National Security, LLC. All rights reserved.

This program was produced under U.S. Government contract 89233218CNA000001 for Los Alamos National Laboratory (LANL), which is operated by Triad National Security, LLC for the U.S. Department of Energy/National Nuclear Security Administration. All rights in the program are reserved by Triad National Security, LLC, and the U.S. Department of Energy/National Nuclear Security Administration. The Government is granted for itself and others acting on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this material to reproduce, prepare derivative works, distribute copies to the public, perform publicly and display publicly, and to permit others to do so.

# License
## License

GPLv3
This software is open source under the GNU General Public License ; either version 3.0 of the License, or (at your option) any later version
Expand Down
Binary file removed bin/sources4d
Binary file not shown.
2 changes: 1 addition & 1 deletion samples/test1/tape1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Sample 1 - PuBe13 Source (Stewart, 1953)
1 2 1
1 2 1 1
2 0
4 0.928571
94 0.071429
Expand Down
256 changes: 256 additions & 0 deletions samples/test10/outp
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
SOURCES 4D Calculation
<<<<<<<<<<<>>>>>>>>>>>



Summary of Input
================

Title: Three-Region Interface Problem Am-CO2-plastic

Three region problem input (idd = 4)
Magnitudes and spectra computed.

2000 alpha energy groups used at each interface.
Maximum energy for alpha spectra: 6.500E+00 MeV.
Minimum energy for alpha spectra: 1.000E-07 MeV.

Number of neutron spectrum energy groups: 20
Maximum neutron energy is 1.00000E+01 MeV.
Minimum neutron energy is 0.00000E+00 MeV.

Neutron Energy Group Structure:

Group Upper-Bound Lower-Bound
----- ----------- -----------
1 1.00000E+01 9.50000E+00
2 9.50000E+00 9.00000E+00
3 9.00000E+00 8.50000E+00
4 8.50000E+00 8.00000E+00
5 8.00000E+00 7.50000E+00
6 7.50000E+00 7.00000E+00
7 7.00000E+00 6.50000E+00
8 6.50000E+00 6.00000E+00
9 6.00000E+00 5.50000E+00
10 5.50000E+00 5.00000E+00
11 5.00000E+00 4.50000E+00
12 4.50000E+00 4.00000E+00
13 4.00000E+00 3.50000E+00
14 3.50000E+00 3.00000E+00
15 3.00000E+00 2.50000E+00
16 2.50000E+00 2.00000E+00
17 2.00000E+00 1.50000E+00
18 1.50000E+00 1.00000E+00
19 1.00000E+00 5.00000E-01
20 5.00000E-01 0.00000E+00

Number of angular groups: 100

Angular Group Structure:

Group Upper-Bound Lower-Bound
----- ----------- -----------
1 1.57080E-02 0.00000E+00
2 3.14159E-02 1.57080E-02
3 4.71239E-02 3.14159E-02
4 6.28319E-02 4.71239E-02
5 7.85398E-02 6.28319E-02
6 9.42478E-02 7.85398E-02
7 1.09956E-01 9.42478E-02
8 1.25664E-01 1.09956E-01
9 1.41372E-01 1.25664E-01
10 1.57080E-01 1.41372E-01
11 1.72788E-01 1.57080E-01
12 1.88496E-01 1.72788E-01
13 2.04204E-01 1.88496E-01
14 2.19911E-01 2.04204E-01
15 2.35619E-01 2.19911E-01
16 2.51327E-01 2.35619E-01
17 2.67035E-01 2.51327E-01
18 2.82743E-01 2.67035E-01
19 2.98451E-01 2.82743E-01
20 3.14159E-01 2.98451E-01
21 3.29867E-01 3.14159E-01
22 3.45575E-01 3.29867E-01
23 3.61283E-01 3.45575E-01
24 3.76991E-01 3.61283E-01
25 3.92699E-01 3.76991E-01
26 4.08407E-01 3.92699E-01
27 4.24115E-01 4.08407E-01
28 4.39823E-01 4.24115E-01
29 4.55531E-01 4.39823E-01
30 4.71239E-01 4.55531E-01
31 4.86947E-01 4.71239E-01
32 5.02655E-01 4.86947E-01
33 5.18363E-01 5.02655E-01
34 5.34071E-01 5.18363E-01
35 5.49779E-01 5.34071E-01
36 5.65487E-01 5.49779E-01
37 5.81195E-01 5.65487E-01
38 5.96903E-01 5.81195E-01
39 6.12611E-01 5.96903E-01
40 6.28319E-01 6.12611E-01
41 6.44026E-01 6.28319E-01
42 6.59734E-01 6.44026E-01
43 6.75442E-01 6.59734E-01
44 6.91150E-01 6.75442E-01
45 7.06858E-01 6.91150E-01
46 7.22566E-01 7.06858E-01
47 7.38274E-01 7.22566E-01
48 7.53982E-01 7.38274E-01
49 7.69690E-01 7.53982E-01
50 7.85398E-01 7.69690E-01
51 8.01106E-01 7.85398E-01
52 8.16814E-01 8.01106E-01
53 8.32522E-01 8.16814E-01
54 8.48230E-01 8.32522E-01
55 8.63938E-01 8.48230E-01
56 8.79646E-01 8.63938E-01
57 8.95354E-01 8.79646E-01
58 9.11062E-01 8.95354E-01
59 9.26770E-01 9.11062E-01
60 9.42478E-01 9.26770E-01
61 9.58186E-01 9.42478E-01
62 9.73894E-01 9.58186E-01
63 9.89602E-01 9.73894E-01
64 1.00531E+00 9.89602E-01
65 1.02102E+00 1.00531E+00
66 1.03673E+00 1.02102E+00
67 1.05243E+00 1.03673E+00
68 1.06814E+00 1.05243E+00
69 1.08385E+00 1.06814E+00
70 1.09956E+00 1.08385E+00
71 1.11527E+00 1.09956E+00
72 1.13097E+00 1.11527E+00
73 1.14668E+00 1.13097E+00
74 1.16239E+00 1.14668E+00
75 1.17810E+00 1.16239E+00
76 1.19381E+00 1.17810E+00
77 1.20951E+00 1.19381E+00
78 1.22522E+00 1.20951E+00
79 1.24093E+00 1.22522E+00
80 1.25664E+00 1.24093E+00
81 1.27235E+00 1.25664E+00
82 1.28805E+00 1.27235E+00
83 1.30376E+00 1.28805E+00
84 1.31947E+00 1.30376E+00
85 1.33518E+00 1.31947E+00
86 1.35088E+00 1.33518E+00
87 1.36659E+00 1.35088E+00
88 1.38230E+00 1.36659E+00
89 1.39801E+00 1.38230E+00
90 1.41372E+00 1.39801E+00
91 1.42942E+00 1.41372E+00
92 1.44513E+00 1.42942E+00
93 1.46084E+00 1.44513E+00
94 1.47655E+00 1.46084E+00
95 1.49226E+00 1.47655E+00
96 1.50796E+00 1.49226E+00
97 1.52367E+00 1.50796E+00
98 1.53938E+00 1.52367E+00
99 1.55509E+00 1.53938E+00
100 1.57080E+00 1.55509E+00


Region A Title: Am-241 in region A

Number of elemental constituents in region A: 1
Solid stopping cross-sections used (isga= 0) in region A.
Elemental Constituents in Region A:

Z-value Atom Fraction
------- -------------
95 1.0000000000

Number of source nuclides to be evaluated: 1

Source Nuclides in Region A:

ZAID Atom Fraction
---- -------------
952410 1.000E+00


Region B Title: CO2 in region B

Number of elemental constituents in region B: 2
Gas stopping cross-sections used (isgb= 1) in region B.
Material B atom density: 1.00000E-05 atoms/b-cm.
Interface region thickness: 2.00000E+00 cm.

Elemental Constituents in Region B:

Z-value Atom Fraction
------- -------------
6 0.3330000000
8 0.6670000000

Number of target nuclides in region B: 3

Target Nuclides in Region B:

ZAID Atom Fraction
---- -------------
60130 7.333E-03
80170 2.667E-04
80180 1.333E-03


Region C Title: Plastic in region C

Number of elemental constituents in region C: 3
Solid stopping cross-sections used (isgc= 0) in region C.

Elemental Constituents in Region C:

Z-value Atom Fraction
------- -------------
6 0.4850000000
1 0.4240000000
8 0.0909481000

Number of target nuclides in region C: 3

Target Nuclides in Region C:

ZAID Atom Fraction
---- -------------
60130 5.189E-03
80170 3.458E-05
80180 1.866E-04




Summary of Output
=================

Total (alpha,n) neutron source from all sources and targets: 1.62646E+01 n/sec-cm^2.

Average (alpha,n) neutron energy: 3.78568E+00 MeV.

Normalized Neutron Energy Spectrum by Energy Group for All Sources:
(Note: group structure is independent of erg record!)

Group Contribution
----- ------------
1 0.00000E+00
2 0.00000E+00
3 0.00000E+00
4 0.00000E+00
5 5.33240E-10
6 2.75391E-03
7 1.35322E-02
8 2.29478E-02
9 3.32288E-02
10 7.97711E-02
11 1.24029E-01
12 1.82249E-01
13 1.86493E-01
14 1.24982E-01
15 6.35776E-02
16 6.72408E-02
17 4.72129E-02
18 2.40592E-02
19 1.20936E-02
20 1.58296E-02
Loading