mctools / mcpl

Monte Carlo Particle Lists
https://mctools.github.io/mcpl/
Other
28 stars 13 forks source link

MCNP6: External MCPL Volumetric Phase Spaces #79

Open yrrepy opened 7 months ago

yrrepy commented 7 months ago

Hello, I have phase-space files that I manage to relatively easily get into the lovely MCPL format. These are not generated in MCNP.

I would like to run them in/with MCNP (6.2,6.3) but it always complains as the particles are not strictly associated with a surface. I have tried several methods including using a reference MCNP surface phase-space and fission cel (volumetric) phase-space to pull in the header, assign the flags (generally as dummies in my externally produce MCPL file). Tried this in several fashions; to no avail.

Alas, I think the only solution is to compile MCNP6 with some coding to be able to read in MCPL formats as the source. Does anyone have any experience doing this and possibly examples? (obviously, please do not share any LANL MCNP source).

tkittel commented 7 months ago

I am not sure, as I do not use mcnp myself. My guess is that you might have to manually propagate your particles to an actual surface in your system, or something like that. @dddijulio , @marquezj , @ebknudsen does one of you have some experience with this?

marquezj commented 7 months ago

Hi @yrrepy. I do not understand the problem you are trying to solve: is it a surface dump that somehow is not interpreted as such by MCNP, or is it a volumetric source that you try to read?

Also, do you have minimum working example to test?

tkittel commented 7 months ago

I am guessing his input MCPL file is generated manually, hence the particles can start at arbitrary positions?

So to be sure it works,@yrrepy make sure you have added the correct surface number of a surface in your MCNP geometry, and make sure the particle coordinates all lie on that surface.

dddijulio commented 7 months ago

I could also add to verify that the reference ssw file was created properly. I usually place a fictitious source next to the surface in mind and generate a ssw file to use as the reference.

From the help of mcpl2ssw: In order to do so and get the details of the SSW format correct, the user must also provide a reference SSW file from the same approximate setup (MCNP version, input deck...) where the new SSW file is to be used

marquezj commented 7 months ago

Answering to myself: of course, it is in the title: you want volumetric sources.

In that case the problem (I think) is you need to convert them into MCNP srctp files, not ssw / ssr files, which is what is currently supported by MCPL.

yrrepy commented 7 months ago

Yes, I am trying to start particles that are at arbitrary (X,Y,Z) locations. They are not associated, nor lie (explicitly or intentionally) on any surface. When I try to trick it (by assigning it a dummy surface or cell or such), MCNP keeps getting lost with where the particles are/start and whence they go. This is not a bad geometry lost particle issue.

@marquezj; I believe srctp files are only useful for kcode simulations, no? This is a fixed source sdef run.

ebknudsen commented 7 months ago

I don't really remember any MCNP-code details, since I haven't had access to that source code for a while. Would a practical workaround then be to transport MCPL-particles to one or more dummy surfaces, dump to a 2nd MCPL-file and use that as input to MCNP. I know how that could be accomplished using McStas/McXtrace but you might prefer a different tool. It would not be very difficult to write one up from scratch, I suppose.