Skip to content

Add improved options for having mcpl2ssw store a more meaningful number of histories #135

@marquezj

Description

@marquezj

As discussed in #134, mcpl2ssw writes the number of particles in the list in the field np1 of the ssw file, which causes the wrong normalization in downstream MCNP calculations. This is a bug, and I am surprised that users did not came across this earlier. Maybe users had other ways to normalize their runs, but by default MCNP divides the tallies by the number of simulated particles.

A bug fix would be to set np1 to 1 by default, and warn the user that the ssw file is not normalized.

Since the np1 value is stored in the in ssw_np1 and correctly managed by mcpltool --merge , an improvement would be to save that value back in the ssw file. That would allow users to use MCPL to do operations on the file and keep the normalization.

Other Monte Carlo codes have their own ways to normalize tallies, and it might to difficult to automate this. But another improvement would be to add a command line option (--save-np1 or --normalization) to save that value. This is an issue in particular for ssw because they are binary files which are not easy to modify later by the user. In the case of PHITS dumps, this metadata is saved in a text file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions