Skip to content

Commit

Permalink
Changes to complete Version 4.1. See "Version4.1_Notes.txt"
Browse files Browse the repository at this point in the history
  • Loading branch information
krdepri committed Jul 23, 2020
1 parent b489d18 commit e6c432d
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 39 deletions.
37 changes: 37 additions & 0 deletions Version4.1_Notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Notes on changes for MatMCNP Version 4.1
- July 2020
-------------------------------

(1) The mass defects for each isotope were updated to reflect the values found here:

https://www.nndc.bnl.gov/nudat2/indx_sigma.jsp

At the time of the update this tool stated this �Nuclear Wallet Cards database version of 7/10/2019.�

(2) The value used to calculate the atomic masses (931.494 MeV/amu) was parameterized. As originally written
K. Kajder used the number in ~100 places in the code. Now, that value is a declared parameter in the
"NWC_DATABASE" module. This was done because this value is likely to change (see comments in the source),
but it's value was NOT changed in this version. For all practical purposes, the difference between this value
and the official value will not be detectable in MatMCNP. However, should one wish to update mass defects in
the future based on a different definition of the MeV/amu than the one used in 2004, it is easily
accomplished with a one line change.

(3) The default cross section set was updated to reflect the ENDF/B-VIII.0 release at 293.6 K (*.00c). For most
elements and isotopes, the only change was as simple as change "13027.80c" to "13027.00c". However, the new
cross section evaluation provided new evaluations for O-18 (treated as O-16 in previous versions), Neon
(not treated by MatMCNP previously), Ytterbium (not treated by MatMCNP previously), and Osmium (not treated
by MatMCNP previously). In addition, both Carbon and Platinum are now treated isotopically instead of as
elements. These changes made the "naturalzaid" routine obsolete and required changes to the "print_data"
routine.

(4) The code was modified to accept command line arguments for the input and output files. Now the code has 2 usages:

>> MatMCNP.exe

- The default "matmcnp.inp" and "matmcnp.out" files will be used. This method will continue to be used by the
batch (csh) and perl scripts.

>> MatMCNP.exe input-filename output-filename

- This is the updated code and requires 2 arguments. The filenames should be less than 80 characters.

Binary file added bin/MatMCNP_v4.1.exe
Binary file not shown.
33 changes: 25 additions & 8 deletions source/MatMCNP.f90
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ PROGRAM MatMCNP
IMPLICIT NONE

!Variables
CHARACTER(LEN=11)::infile,outfile
CHARACTER(LEN=80)::infile,outfile

REAL:: compound_density,total_atom_b_cm,total_fake_atomic_weight,FM_value
REAL, DIMENSION(92):: a_or_w_percent, w_percent,a_percent, fake_atomic_weight
REAL,DIMENSION(300):: iso_atom_b_cm
INTEGER:: number_elements,i
INTEGER:: num_args,number_elements,i
INTEGER, DIMENSION(92)::z_of_element
CHARACTER(LEN=3), DIMENSION(92)::natural_or_enriched
CHARACTER(LEN=6):: atomic, weight,symbol,atom_or_weight
Expand Down Expand Up @@ -69,12 +69,29 @@ PROGRAM MatMCNP
CALL Z91_Z92

!Assign names to input and output file.
! - Eventually I plan to make this an commandline option, so that
! the user can specify both the input and output file names.
! Currently, the MatMCNP program runs with a script that
! performs the file name moves for the user instead.
infile = "matmcnp.inp"
outfile = "matmcnp.out"
!
num_args = COMMAND_ARGUMENT_COUNT()
IF (num_args == 0) THEN
! The old method of input and output.
infile = "matmcnp.inp"
outfile = "matmcnp.out"
ELSE IF (num_args == 2) THEN
! Accept input as argument #1 and output as argument #2
! Not checking for it, but this will fail for filenames > 80 characters.
CALL GET_COMMAND_ARGUMENT(1, infile)
infile = TRIM(infile)
CALL GET_COMMAND_ARGUMENT(2, outfile)
outfile = TRIM(outfile)
ELSE
PRINT*, "MatMCNP expects no arguments OR 2 arguments."
PRINT*, ""
PRINT*, " If no argument is used, matmcnp.inp is the input file and"
PRINT*, " matmcnp.out is the output file."
PRINT*, ""
PRINT*, " If 2 arguments are used, the input filename is the 1st argument"
PRINT*, " and the output filename is the 2nd argument."
STOP
END IF

! Open the input and output file.
OPEN (UNIT = 10, FILE = infile, STATUS = "OLD")
Expand Down
3 changes: 1 addition & 2 deletions source/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
#
objects = NWC.o NWC-Database.o atom_density.o enriched.o \
MatMCNP.o naturalzaid.o print_data.o read_data.o \
MatMCNP.o print_data.o read_data.o \
title_comment.o weight_percent.o Z1_Z5.o Z6_Z10.o \
Z11_Z15.o Z16_Z20.o Z21_Z25.o Z26_Z30.o Z31_Z35.o \
Z36_Z40.o Z41_Z45.o Z46_Z50.o Z51_Z55.o Z56_Z60.o \
Expand Down Expand Up @@ -37,7 +37,6 @@ NWC-Database.o : NWC.o
atom_density.o : NWC.o NWC-Database.o
enriched.o : NWC.o NWC-Database.o
MatMCNP.o : NWC.o NWC-Database.o
naturalzaid.o : NWC.o NWC-Database.o
print_data.o : NWC.o NWC-Database.o
read_data.o : NWC.o NWC-Database.o
weight_percent.o : NWC.o NWC-Database.o
Expand Down
27 changes: 0 additions & 27 deletions source/naturalzaid.f90

This file was deleted.

5 changes: 3 additions & 2 deletions source/print_data.f90
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,13 @@ SUBROUTINE print_data(total_atom_b_cm,iso_atom_b_cm,mat_number,z_of_element)
END IF
END DO


!Print info. in MatMCNP format.
WRITE (UNIT=11,FMT=777) mat_number,output_array(1)%zaid,output_array(1)%atom_percent

!If there is more than one isotope in the mixture, then print out that information.
IF (adj_num_iso > 1) THEN
DO i=2,adj_num_iso
IF (num_iso > 1) THEN
DO i=2,num_iso
WRITE (UNIT=11,FMT=888) output_array(i)%zaid,output_array(i)%atom_percent
END DO
END IF
Expand Down

0 comments on commit e6c432d

Please sign in to comment.