Subroutine Sources option in MCNP

Click For Summary
SUMMARY

The discussion centers on utilizing the Subroutine Source option in MCNP for simulating an electron beam impacting a tungsten target to generate bremsstrahlung spectra. Users are advised to implement energy bin tallies on the flux and utilize the SDEF card for secondary surface sources. The conversation highlights discrepancies in photon flux results between primary and secondary setups, attributed to the parallel description of photon emission and the influence of secondary particles like electrons and neutrons. Suggestions include splitting the test area into sections for improved accuracy and sharing input files for collaborative troubleshooting.

PREREQUISITES
  • Familiarity with MCNP (Monte Carlo N-Particle Transport Code) version 6 or later.
  • Understanding of subroutine source implementation in MCNP, specifically source.f.
  • Knowledge of energy bin tallies and their application in MCNP simulations.
  • Experience with SDEF cards for defining source parameters in MCNP.
NEXT STEPS
  • Research advanced techniques for implementing user-defined sources in MCNP.
  • Learn about optimizing simulation time for high-energy electron beams in MCNP.
  • Explore methods for analyzing discrepancies in photon flux results between different simulation setups.
  • Investigate the impact of secondary particle interactions on simulation accuracy in MCNP.
USEFUL FOR

Researchers and practitioners in radiation physics, medical physics, and computational modeling who are utilizing MCNP for particle transport simulations, particularly those focusing on bremsstrahlung radiation and secondary source modeling.

thanhpham
Messages
3
Reaction score
0
Hi, everyone. I am using MCNP to simulate an incident electron beam hitting a tungsten target and obtaining the bremsstrahlung spectra in natural element samples placed behind the initial setup.
I want to use the Subroutine Source option in MCNP to record all the directions, weights, energies, etc., of all the particles crossing the surface right in front of the sample. This recorded data will be used as a secondary source for other simulations with different elements in the future to reduce simulation time.
I have read the MCNP manual, but I still don’t understand how to use this option.
I would greatly appreciate it if you could help me.
 

Attachments

  • 5MeV.txt
    5MeV.txt
    2.4 KB · Views: 58
  • 1.png
    1.png
    9 KB · Views: 57
  • 2.png
    2.png
    13.3 KB · Views: 107
Engineering news on Phys.org
Welcome to PhysicsForums @thanhpham,

I assume you are talking about the user source subroutine source.f? This routine can be written to create source particles but they get sent to transport. They don't get sent back to the source routine at any point. I don't know a way to do what you want efficiently.

I also wonder if any extra information you get will be overshadowed by the worse statistics from fewer particles. That you might have a single photon of one particular energy that always hits the same spot at the same angle may not help the accuracy of the result.

I suggest you start by using energy bin tallies on the flux, and then use this to make a distribution you can use with an SDEF card.
 
  • Like
  • Informative
Likes   Reactions: thanhpham, berkeman and Astronuc
Thanks for your reply, @Alex A.

I already did as you suggested. I obtained the energy bin tallies and used them as a secondary surface source.

However, the F4 tally results of photon in the sample from the secondary surface source are significantly different from those obtained using the primary setup.

I think, the difference may be due to the fact that I can only describe the energy beam of photons emitted from the secondary surface source as parallel, while in reality, it is not. Moreover, electrons passing through the tungsten target from the initial electron beam, along with a small fraction of neutrons generated when the electron beam interacts with the tungsten target, may also alter the photon flux in the sample.

With a low-energy electron beam and a thin tungsten target, the simulation time required to achieve a reasonable statistical error is relatively short. However, with a higher-energy electron beam, a thicker tungsten target, or when adding additional structures, the simulation time becomes significantly longer. That is why I want to find a way to record a secondary source for future use with different samples.
 
If you can share what results didn't work and the input files, someone might have an idea.

I'm wondering if you should split the test area into three sections, upper tally, lower tally and middle section to kill all particles that enter. You will need to run your result tally(s) as well.

The 5 MeV electron beam is fully stopped by the target and PET right? (btw PET is not a hydrocarbon, it has oxygen in it)
 
Alex A said:
If you can share what results didn't work and the input files, someone might have an idea.

I'm wondering if you should split the test area into three sections, upper tally, lower tally and middle section to kill all particles that enter. You will need to run your result tally(s) as well.

The 5 MeV electron beam is fully stopped by the target and PET right? (btw PET is not a hydrocarbon, it has oxygen in it)
Please see the attachment.

I used the photon flux results (f2 tally) through the surface of the Titanium sample in the 1st setup to model it as a photon-emitting surface with a parallel beam incident on a same Titanium sample in the 2nd setup. The photon flux results (f4 tally) in Titanium sample of the two setups are different, but they have the same ratio. Is there a way to solve my problems?
 

Attachments

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 15 ·
Replies
15
Views
4K
  • · Replies 0 ·
Replies
0
Views
4K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 54 ·
2
Replies
54
Views
8K
  • · Replies 14 ·
Replies
14
Views
3K