Subroutine Sources option in MCNP

Click For Summary

Discussion Overview

The discussion centers around the use of the Subroutine Source option in MCNP for simulating an incident electron beam on a tungsten target and analyzing the resulting bremsstrahlung spectra. Participants explore the challenges of recording particle data for future simulations and the discrepancies observed between primary and secondary source setups.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant seeks assistance with the Subroutine Source option in MCNP to record particle data for future simulations.
  • Another participant questions the efficiency of the user source subroutine and suggests that the additional information may not improve accuracy due to potential statistical issues.
  • A participant reports significant differences in tally results between primary and secondary source setups, attributing this to the nature of the photon beam and interactions with the tungsten target.
  • Suggestions include using energy bin tallies and modeling the photon-emitting surface based on initial setup results.
  • There is a proposal to split the test area into sections to manage particle tracking and improve results.
  • Clarifications are made regarding the stopping power of the 5 MeV electron beam and the composition of materials involved in the simulation.

Areas of Agreement / Disagreement

Participants express differing views on the effectiveness of the Subroutine Source option and the implications of using secondary sources. There is no consensus on the best approach to resolve the discrepancies in simulation results.

Contextual Notes

Participants highlight limitations related to the assumptions made in modeling the photon beam and the statistical accuracy of the results. The discussion reflects ongoing uncertainties about the simulation setup and its implications for future experiments.

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: 61
  • 1.png
    1.png
    9 KB · Views: 59
  • 2.png
    2.png
    13.3 KB · Views: 112
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