- #1
Salman Khan
- 19
- 1
- TL;DR Summary
- Mcnp
Particle display in visual editor of mcnp input file only shows particles inside source, I am interested to see particle path towards tally region. Plz guide thanks
To visualize particles outside the source in MCNP, you need to use the PTRAC feature, which tracks particles through the simulation. You can output the particle tracks to a file and then use visualization tools like ParaView or VisIt to render the particle trajectories.
In your MCNP input file, you need to include the PTRAC card with appropriate settings to record the particle tracks. Specify the type of particles you want to track, the events you are interested in (e.g., collisions, surface crossings), and the output format. For example, you might use the command `PTRAC FILE=1 NPS=1000000 MAX=10000000` to track particle histories.
The PTRAC output file contains detailed information about the tracked particles, such as their position, energy, and direction at each recorded event. You will need to parse this file, which is often in a binary format, using a script or a specialized tool provided by MCNP or third-party software to extract and visualize the relevant data.
Yes, you can filter the particle tracks by specifying criteria in your PTRAC settings or by post-processing the PTRAC output file. For example, you can set up your PTRAC card to only record events where particles cross specific surfaces or enter certain cells, which can help you focus on particles that exit the source region.
Several visualization tools are commonly used for displaying MCNP particle tracks, including ParaView, VisIt, and MCNP's own built-in plotting capabilities. These tools can read the PTRAC output file and allow you to create 3D visualizations of the particle trajectories, helping you to analyze and understand the behavior of particles outside the source.