Store information on S(a,b) table on Material objects (no reading of data performed yet).

This commit is contained in:
Paul Romano 2011-10-26 13:41:30 -04:00
parent 5df9c18209
commit 3299dddaa1
5 changed files with 30 additions and 5 deletions

View file

@ -11,7 +11,7 @@
<density value="1.0" units="g/cc" />
<nuclide name="H-1" xs="03c" ao="2.0" />
<nuclide name="O-16" xs="03c" ao="1.0" />
<sab uid="H-H2O" xs="10t" />
<sab name="H-H2O" xs="10t" />
</material>
</materials>

View file

@ -409,6 +409,7 @@ contains
character(MAX_LINE_LEN) :: msg
type(Material), pointer :: m => null()
type(nuclide_xml), pointer :: nuc => null()
type(sab_xml), pointer :: sab => null()
! Display output message
msg = "Reading materials XML file..."
@ -494,6 +495,17 @@ contains
else
m % atom_percent(j) = -nuc % wo
end if
! Read S(a,b) table information
if (size(material_(i) % sab) == 1) then
sab => material_(i) % sab(1)
name = trim(sab % name) // "." // trim(sab % xs)
m % sab_name = name
m % has_sab_table = .true.
elseif (size(material_(i) % sab) > 1) then
msg = "Cannot have multiple S(a,b) tables on a single material."
call fatal_error(msg)
end if
end do
! Add material to dictionary

View file

@ -18,8 +18,10 @@ module material_header
real(8), allocatable :: total_xs(:) ! macroscopic cross-section
! S(a,b) data references
integer :: sab_table ! index in sab_tables
integer :: sab_nuclide ! index of nuclide which has S(a,b) table
logical :: has_sab_table = .false.
character(10) :: sab_name ! name of S(a,b) table
integer :: sab_table ! index in sab_tables
integer :: sab_nuclide ! index of nuclide which has S(a,b) table
end type Material
end module material_header

View file

@ -492,16 +492,27 @@ contains
character(MAX_LINE_LEN) :: string
type(Nuclide), pointer :: nuc => null()
! Write identifier for material
write(ou,*) 'Material ' // int_to_str(mat % uid)
! Write total atom density in atom/b-cm
write(ou,*) ' Atom Density = ' // trim(real_to_str(mat % density)) &
& // ' atom/b-cm'
! Write atom density for each nuclide in material
write(ou,*) ' Nuclides:'
do i = 1, mat % n_nuclides
nuc => nuclides(mat % nuclide(i))
density = mat % atom_density(i)
string = ' ' // trim(nuc % name) // ' = ' // &
string = ' ' // trim(nuc % name) // ' = ' // &
& trim(real_to_str(density)) // ' atom/b-cm'
write(ou,*) trim(string)
end do
! Write information on S(a,b) table
if (mat % has_sab_table) then
write(ou,*) ' S(a,b) table = ' // trim(mat % sab_name)
end if
write(ou,*)
nullify(nuc)

View file

@ -34,7 +34,7 @@
<component name="uid" type="integer" />
<component name="density" type="density_xml" />
<component name="nuclides" tag="nuclide" type="nuclide_xml" dimension="1" />
<component name="sab" type="sab_xml" />
<component name="sab" type="sab_xml" dimension="1" />
</typedef>
<variable name="material_" tag="material" type="material_xml" dimension="1" />