[openmc-users] The external source file(hdf5 format) problem

When creating the source file, try making ‘filetype’ an attribute of the / group rather than a dataset. It looks like you already have a line commented out in your script that does this, but it needs a slight modification:

sourceyk_h5.attrs[‘filetype’] = np.string_(‘source’)

Let us know if that still doesn’t work.

Best,
Paul

Thank you very much. It works.
best wish,
Yin

在 2019年1月5日星期六 UTC+8上午6:12:47,Paul Romano写道:

Hi all

I am having a little trouble with a geometry that uses and external source file

The geometry appears to work for a basic point source and I can plot flux or absorption meshes

The geometry appears to half work for a source file when plotting flux as the flux is shown but the leakage is 1.0

The geometry does not work for a source file when plotting absorption as the but the leakage is 1.0

Can anyone see where I am going wrong here or does anyone have a simple technique for finding why the leakage is 1.0 ?

I think the only change between the examples is the file source for a basic source. The file source has similar energy and positions to the basic source

Many thanks

Jon

example_not_working_file_source_absor.py (4.16 KB)

example_working_basic_source.py (4.2 KB)

example_working_file_source_with_flux.py (4.21 KB)

source_7000_particles.h5 (467 KB)