Simulating Geometry/Reactions Over Time

I am currently simulating a pulsed proton beam accelerating protons at a cylindrical mercury target. My aim to to track neutron spallation over time. Specifically, I am interested in tracking the average energy of neutrons produced after each beam pulse, and the average number of neutrons produced after each beam pulse.

I understand that each beamOn(event) is basically like “resetting” the simulation. Therefore I can’t simply run the beam for a certain number of pulses, since after each pulse, the geometry/simulation resets. I am interested on the dynamics of the spallation over time, as the mercury degrades.

What would be a suitable methodology for tracking and event over time in Geant4? I am not familiar with how this is acheived. How would you all suggest I go about the pseudocode behind my simulation?

Thank you all for your time and help!

Geant4 Version: 11.1.3
Operating System: Ubuntu 22.04.4 LTS
Compiler/Version: GCC/G++
CMake Version: 3.29.2


Hi,

Welcome to the Geant4 forum!

I am not familiar with spallation sources. What is the ‘degradation of mercury’?

If the properties of the target change over time, I would run several simulations, changing for each one the property you suspect that changes over time. For example, in fusion-evaporation nuclear reactions, the target may be consumed over the experiment, and the thickness of the target affects the kinematics. Therefore, for one may need to simulate assuming 100% original thickness, 80%, 60%…

Thank you for your time.

Alvaro


Edit: you may want to define a “Messenger” for your target, so you can change its composition between runs by using an UI command. This is shown during the last part of the Geant4 beginners course, here.

One approach to this would be to do a run with your “perfect” target. In your SD, record information about spallation-produced nuclear secondaries (set the “proton production cut” to zero, so the nuclei are trackable). With enough events, that’ll give you a distribution of what “degraded” contaminants get produced, and you can scale the Geant4 /run/beamOn count to whatever your true exposure is.

Then you do another run, where yuo add those contaminants to your material at the “ppm” or “ppt” level, whatever is appropriate. Now you can see what effect they have. Rinse and repeat to get a rough time evolution.

1 Like

Thank you for your response! By spallation I am referring specifically to neutron scattering as a result of incident protons. I am looking to simulate a system similar to the Spallation Neutron Source where I can simulate the collision of high energy protons with the mercury target.

Specifically, I am looking to track the changes in the emitted neutron flux after consecutive collisions. I would assume that the neutron flux decreases over time as more and more neutrons are scattered from the mercury target, and the rate of neutron scattering would decrease.

If the properties of the target change over time, I would run several simulations, changing for each one the property you suspect that changes over time. For example, in fusion-evaporation nuclear reactions, the target may be consumed over the experiment, and the thickness of the target affects the kinematics. Therefore, for one may need to simulate assuming 100% original thickness, 80%, 60%…

Yes, exactly! However, I am trying to examine how the target is “consumed” over time. I am interested in how long the target can produce a neutron flux above a certain threshold before the neutron flux caused by scattering drops below the threshold level. (Assuming the protons are continuously emitted and collide with the target at 60hZ)

Thank you for your feedback! However, I don’t think I was clear in my first post. By “spallation” I am referring more specifically to neutron scattering (the “spallation”) as a result of the proton interacting with the Hg. I don’t mean the macro-scale breakdown of the material. At the moment I am more interesting in tracking the decreasing neutron flux emitted from the target as the target loses neutrons over time.

Is there a method to update the target geometry similar to the method you suggested? I guess what I would attempt to do is track the scattering events and which specific nuclei within the target they originated from, and update the geometry with the new nuclei? Or do you think there is a better approach?

I’ve also seen that there is a GetGlobalTime() function in other forum posts, but I can’t seem to find much about it in the documentation. Would it be practical to have a single beamOn() event, but produce new proton primaries every t seconds, dictated by the GetGlobalTime() function?

So there’s a fundamental difference between Geant4 and real life. In a real beam, you’re probably getting millions or billions of protons per second on target. In a few minutes, enough of the 10^26 atoms in your target have interacted to make a noticeable difference.

In Geant4, you’re shooting one proton at a time, so you’re getting one atom (out of 10^26) altered. If you tried to take your Geant4 nuclear recoils and directly “modify the material”, you would see zero effect. Just a waste of time and effort :slight_smile:

You really do want to run a series of samples. Do a /run/beamOn with maybe 1,000 or 10,000 or 1,000,000 events (one proton each). That gets you a statistical distribution for the rate at which different neutron-depleted nuclei are produced per proton.

Now you can scale that to your real life beamline – how much exposure corresponds to 1,000,000 protons? Knowing that ratio, you can scale up the number of altered nuclei, and work out “how much beam time would produce a 1 ppm change in composition of my sample”? Or equivalently, work out “how much change in composition corresponds to 1 minute of beam, or 1 hour of beam, or whatever”?

So with that in hand, you modify the material to have a 1 ppm or per mil or whatever addition of neutron-depleted isotope, and run a new beamOn, saving that data out to your “after1hour.root” file.

Rinse and repeat, to get a series of samples corresponding to different time intervals on your real-life beamline.

1 Like

Thanks for the feedback! This is the route I will take.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.