mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Store information on S(a,b) table on Material objects (no reading of data performed yet).
This commit is contained in:
parent
5df9c18209
commit
3299dddaa1
5 changed files with 30 additions and 5 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue