Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fluka output #1254

Open
7 tasks done
grzanka opened this issue Oct 11, 2023 · 15 comments
Open
7 tasks done

Fluka output #1254

grzanka opened this issue Oct 11, 2023 · 15 comments
Assignees
Labels
Fluka Right now as the many-core CPUs are so popular we can switch to parallel compilation.

Comments

@grzanka
Copy link
Contributor

grzanka commented Oct 11, 2023

We need to be sure that Fluka output is properly presented by the UI:

  • pymchelper should properly digest all Fluka outputs
  • units should be properly presented (1-D and 2-D plots)
  • normalisation should be correct (when running on multiple tasks)

For all of the quantities present in the examples we should check, by comparison with SHIELD-HIT12A is:

  • axis and quantities are named correctly
  • units are present
  • if the quantity is of the same order if running on 1 or 10 tasks (check if averaging works correctly)
  • check if differential scorer works
@grzanka grzanka added the Fluka Right now as the many-core CPUs are so popular we can switch to parallel compilation. label Oct 11, 2023
@grzanka
Copy link
Contributor Author

grzanka commented Nov 22, 2023

Most probably that needs to be implemented in pymchelper

@hendzeld
Copy link
Contributor

hendzeld commented Nov 25, 2023

PR DataMedSci/pymchelper#691

Update in USRBIN for cartesian mesh

@hendzeld
Copy link
Contributor

PR DataMedSci/pymchelper#693

Update in USRBIN for 3D cylindrical scoring

@hendzeld
Copy link
Contributor

hendzeld commented Dec 7, 2023

Image

Image

@grzanka
Copy link
Contributor Author

grzanka commented Dec 7, 2023

What do we see on the plots ? If you aim at comparison SHIELD-HIT12A vs Fluka, then I'd start with 1D, not with 2D plots.

@hendzeld
Copy link
Contributor

hendzeld commented Dec 8, 2023

We should unify units for LET (KeV/um, GeV/cm MeV/cm, etc.)

@hendzeld
Copy link
Contributor

hendzeld commented Dec 17, 2023

Unifying output units: DataMedSci/pymchelper#702

@MatoKnap
Copy link
Contributor

I conducted several tests to compare the outputs of FLUKA and SHIELD-HIT12A using 1 and 10 tasks. I used the common example, 'Beam of protons with lead collimator,' which is compatible with both simulators, but modified the number of particles to 10^4. I ran the simulations on PLGrid using a direct run.

Here are the results:

Dose 1 task 10 tasks
Fluka dose_fluka_1 dose_fluka_10
ShieldHit dose_shieldhit_1 dose_shieldhit_10
Fluence 1 task 10 tasks
Fluka fluence_fluka_1 fluence_fluka_10
ShieldHit flence_shieldhit_1 fluence_shieldhit_10

Both normalization and averaging seem to work correctly, but the SHIELD-HIT12A result shows some anomalies.

@grzanka
Copy link
Contributor Author

grzanka commented May 29, 2024

Interesting. What kind of medium if placed in the region where SHIELD-HIT12A dose is ~0.5 ? Is it air ?
There are couple of definition of dose: "dose-to-medium" or "dose-to-water". There may be a difference between medium air and water. I dont remember what is implemented as default one for Fluka and SHIELD-HIT12A

@grzanka
Copy link
Contributor Author

grzanka commented May 29, 2024

Also funny to see that SHIELD-HIT12A protons seems to have shorter range than in Fluka

@MatoKnap
Copy link
Contributor

After resolving input file issues for SHIELD-HIT12A, I re-ran the simulations with 10^4 particles on PLGrid using corrected input files. The updated results now closely align. However, the dose peaks differ slightly: FLUKA reports ~1.8, while SHIELD-HIT12A shows ~1.6. Does this difference matter? If not, it suggests both simulators use the same units.

Dose 1 task 10 tasks
Fluka dose_fluka_1 dose_fluka_10
ShieldHit dose_shieldhit_1 dose_shieldhit_10
Fluence 1 task 10 tasks
Fluka fluence_fluka_1 fluence_fluka_10
ShieldHit flence_shieldhit_1 fluence_shieldhit_10

@grzanka
Copy link
Contributor Author

grzanka commented Dec 26, 2024

Can you reran with 10^6 or 10^7 particles ? It may be on 100 or 200 tasks

@grzanka
Copy link
Contributor Author

grzanka commented Dec 27, 2024

Indeed it seems that the units are correct and the averaging works well. I am bit puzzled by the bump on the dose vs depth (Z) plot between-5 and -4 cm. After rerunning the simulation with much higher statistics, can you upload the results to a GitHub gist ? I usually downloaded JSON into my local drive, opened it in reasonable text editor (i.e. notepad++ under Windows), then copied the content into the clipboard (Ctrl-C), then opened in the web browser GitHub gist site and pasted there the content of the file.

You could then point me to the results, like I did here: https://github.com/grzanka/plotly_lgad_dosimetry/blob/main/montecarlo/README.md

@MatoKnap
Copy link
Contributor

Here is a quick comparison using 10^5 particles. There are a few minor discrepancies in my tests:

  1. In Fluka with 200 tasks, only 84,000 primaries are reported as requested. This seems to be a visual bug, as the task bars are correct (I counted them).
  2. Shield-HIT with 200 tasks was run in batch mode, while the rest of the simulations were run directly.

This is an early preview; I’ll upload a detailed version on GitHub Gist later. I might run the next batch of tests tomorrow, as one of my simulations has been pending for three hours.

The differences between the simulators are real, particularly in the peak and the -5.5 to -4 cm region. Below are the current results:

Dose 100 tasks 200 tasks
Fluka fluka_dose_100 fluka_dose_200
ShieldHit shieldhit_dose_100 shieldhit_dose_200
Fluence 100 tasks 200 tasks
Fluka fluka_fluence_100 fluka_fluence_200
ShieldHit shieldhit_fluence_100 shieldhit_fluence_200

@MatoKnap
Copy link
Contributor

MatoKnap commented Jan 3, 2025

Here is a GitHub Gist with simulation results for Fluk and Shieldhit with 10^7 particles.
https://gist.github.com/MatoKnap/a69d508bd5b57ae2f5b8517c42ff3db5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fluka Right now as the many-core CPUs are so popular we can switch to parallel compilation.
Projects
None yet
Development

No branches or pull requests

3 participants