fiedl / hole-ice-study

This project aims to incorporate the effects of hole ice into the clsim photon propagation simulation of the icecube neutrino observatory.
Other
4 stars 2 forks source link

Cross check: Absorption length and effective scattering length should have the same effect #72

Open fiedl opened 6 years ago

fiedl commented 6 years ago

Scenario: Shoot a pencil beams of photons onto a hole-ice cylinder. Deactivate scattering and absorption outside the cylinder.

(a) Set the effective scattering length inside to a fixed value, set the absorption length to be very large. (b) Set the absorption length inside to the same fixed value as the effective scattering length in (a), set the effective scattering length to a very large value.

Plot the distribution of the hole-ice penetration depth, i.e. how far do the photons make it into the cylinder.

Expectation: Effective scattering length and absorption length should have the same effect on the penetration behaviour. (This is how the effective scattering length is defined.)

bildschirmfoto 2018-05-28 um 18 04 19

Other cross checks: https://github.com/fiedl/hole-ice-study/issues/63

fiedl commented 6 years ago

Run simulation locally.

Start the photons right outside the hole-ice cylinder in order to save computation time. The absorption length outside is set to 10cm in order to absorb the photons when they leave the cylinder.

[2018-05-28 21:14:37] fiedl@fiedl-mbp ~/hole-ice-study/scripts/FiringRange master ⚡

# Absorption
rm tmp/*
time ./run.rb \
    --hole-ice-radius=0.5 \
    --effective-scattering-length=100.0 \
    --absorption-length=0.5 \
    --distance=0.505 \
    --number-of-photons=1000 \
    --cpu --save-photon-paths \
    --number-of-runs=1 --number-of-parallel-runs=1 \
    --angle=-90 \
    |grep "CROSS CHECK" |grep -v "INFO" \
    > ~/hole-ice-study/results/cross_checks/cross_check_72.txt
steamshovel tmp/propagated_photons.i3

# Scattering
rm tmp/*
time ./run.rb \
    --hole-ice-radius=0.5 \
    --effective-scattering-length=0.5 \
    --absorption-length=100.0 \
    --distance=0.505 \
    --number-of-photons=1000 \
    --cpu --save-photon-paths \
    --number-of-runs=1 --number-of-parallel-runs=1 \
    --angle=-90 \
    |grep "CROSS CHECK" |grep -v "INFO" \
    > ~/hole-ice-study/results/cross_checks/cross_check_72_scat.txt
steamshovel tmp/propagated_photons.i3

Absorption:

bildschirmfoto 2018-05-28 um 21 18 53

Scattering:

bildschirmfoto 2018-05-28 um 21 32 03

fiedl commented 6 years ago
[2018-05-28 21:41:58] fiedl@fiedl-mbp ~/hole-ice-study/scripts/lib master ⚡
▶ python plot_cross_check_absorption_length_and_effective_scattering_length_penetration_depth.py

bildschirmfoto 2018-05-28 um 21 42 13

This doesn't look too convincing, yet.

fiedl commented 6 years ago

I guess the problem is the cylinder geometry.

bildschirmfoto 2018-05-28 um 21 48 09

By filtering out the photons that are absorbed outside the cylinder, I'm only counting photons that scatter within the cylinder until they have spent their whole absorption length inside.

A geometry where the medium border is defined by a plane, e.g. at x=x0, would be more suitable than a cylinder geometry. (See also notes 2018-05-28.)

fiedl commented 6 years ago

Planar geometry

Implementing a planar geometry by hand:


// propagation_through_media.c
inline void apply_propagation_through_different_media(...) {
  // Medium change at x = x0 := -256.02301025390625
  int number_of_medium_changes = 0;
  const floating_t x0 = -256.02301025390625;
  const floating_t scattering_inside = /* ... */;
  const floating_t absorption_inside = /* ... */;

  if ((photonDirAndWlen.x > 0) && (photonPosAndTime.x < x0)) {
    number_of_medium_changes = 1;
    distances_to_medium_changes[0] = 0;
    local_scattering_lengths[0] = 100.0;
    local_absorption_lengths[0] = 100.0;
    distances_to_medium_changes[1] = x0 - photonPosAndTime.x;
    local_scattering_lengths[1] = scattering_inside;
    local_absorption_lengths[1] = absorption_inside;
  } else if ((photonDirAndWlen.x < 0) && (photonPosAndTime.x < x0)) {
    distances_to_medium_changes[0] = 0;
    local_scattering_lengths[0] = 100.0;
    local_absorption_lengths[0] = 100.0;
  } else if ((photonDirAndWlen.x > 0) && (photonPosAndTime.x > x0)) {
    distances_to_medium_changes[0] = 0;
    local_scattering_lengths[0] = scattering_inside;
    local_absorption_lengths[0] = absorption_inside;
  } else {
    number_of_medium_changes = 1;
    distances_to_medium_changes[0] = 0;
    local_scattering_lengths[0] = scattering_inside;
    local_absorption_lengths[0] = absorption_inside;
    distances_to_medium_changes[1] = photonPosAndTime.x - x0;
    local_scattering_lengths[1] = 100.0;
    local_absorption_lengths[1] = 100.0;
  }
}
fiedl commented 6 years ago

Scattering dominant:

  const floating_t x0 = -256.02301025390625;
  const floating_t absorption_inside = 100.0;
  const floating_t effective_scattering_inside = 1.0;
  const floating_t scattering_inside = effective_scattering_inside * (1 - 0.94);

Run the simulation locally:

[2018-05-29 13:29:39] fiedl@fiedl-mbp ~/hole-ice-study/scripts/FiringRange master ⚡
▶ rm tmp/*
time ./run.rb \
    --distance=1.0 \
    --number-of-photons=1000 --plane-wave \
    --cpu --save-photon-paths \
    --number-of-runs=1 --number-of-parallel-runs=1 \
    --angle=-90 \
    |grep "CROSS CHECK" |grep -v "INFO" \
    > ~/hole-ice-study/results/cross_checks/cross_check_72_scat.txt
steamshovel tmp/propagated_photons.i3

bildschirmfoto 2018-05-29 um 14 21 12

fiedl commented 6 years ago

Absorption dominant:

  const floating_t x0 = -256.02301025390625;
  const floating_t absorption_inside = 1.0;
  const floating_t effective_scattering_inside = 100.0;
  const floating_t scattering_inside = effective_scattering_inside * (1 - 0.94);

Run the simulation locally:

[2018-05-29 13:58:06] fiedl@fiedl-mbp ~/hole-ice-study/scripts/FiringRange master ⚡
▶ rm tmp/*
time ./run.rb \
    --distance=1.0 \
    --number-of-photons=1000 --plane-wave \
    --cpu --save-photon-paths \
    --number-of-runs=1 --number-of-parallel-runs=1 \
    --angle=-90 \
    |grep "CROSS CHECK" |grep -v "INFO" \
    > ~/hole-ice-study/results/cross_checks/cross_check_72_abs.txt
steamshovel tmp/propagated_photons.i3

bildschirmfoto 2018-05-29 um 14 23 56

fiedl commented 6 years ago

Plotting this

[2018-05-29 14:27:01] fiedl@fiedl-mbp ~/hole-ice-study/scripts/lib master ⚡
▶ python plot_cross_check_absorption_length_and_effective_scattering_length_penetration_depth.py

bildschirmfoto 2018-05-29 um 14 27 19

does not look too good.

fiedl commented 6 years ago

Maybe, the effective scattering length has nothing to do with the absorption length. "Effective" could also mean that when simulating fewer scattering steps, i.e. increasing the scattering length, one must compensate with a different mean scattering angle.

Then, I should get the same behaviour as above when dropping the medium border and just simulation one consistent medium.

Expectation: The penetration depth should show the same behaviour as above, only shifted by one meter.

  int number_of_medium_changes = 0;
  const floating_t x0 = -256.02301025390625;
  const floating_t absorption_inside = 1.0;
  const floating_t effective_scattering_inside = 100.0;
  const floating_t scattering_inside = effective_scattering_inside * (1 - 0.94);

  distances_to_medium_changes[0] = 0;
  local_scattering_lengths[0] = scattering_inside;
  local_absorption_lengths[0] = absorption_inside;

Absorption dominant:

  const floating_t absorption_inside = 1.0;
  const floating_t effective_scattering_inside = 100.0;
[2018-05-29 14:24:05] fiedl@fiedl-mbp ~/hole-ice-study/scripts/FiringRange master ⚡
▶ rm tmp/*
time ./run.rb \
    --distance=1.0 \
    --number-of-photons=1000 --plane-wave \
    --cpu --save-photon-paths \
    --number-of-runs=1 --number-of-parallel-runs=1 \
    --angle=-90 \
    |grep "CROSS CHECK" |grep -v "INFO" \
    > ~/hole-ice-study/results/cross_checks/cross_check_72_abs_consistent_medium.txt
steamshovel tmp/propagated_photons.i3

bildschirmfoto 2018-05-29 um 15 21 10

Scattering dominant:

  const floating_t absorption_inside = 100.0;
  const floating_t effective_scattering_inside = 1.0;
[2018-05-29 15:21:18] fiedl@fiedl-mbp ~/hole-ice-study/scripts/FiringRange master ⚡
▶ rm tmp/*
time ./run.rb \
    --distance=1.0 \
    --number-of-photons=1000 --plane-wave \
    --cpu --save-photon-paths \
    --number-of-runs=1 --number-of-parallel-runs=1 \
    --angle=-90 \
    |grep "CROSS CHECK" |grep -v "INFO" \
    > ~/hole-ice-study/results/cross_checks/cross_check_72_scat_consistent_medium.txt
steamshovel tmp/propagated_photons.i3

bildschirmfoto 2018-05-29 um 15 24 32

[2018-05-29 15:25:53] fiedl@fiedl-mbp ~/hole-ice-study/scripts/lib master ⚡
▶ python plot_cross_check_absorption_length_and_effective_scattering_length_penetration_depth.py

bildschirmfoto 2018-05-29 um 15 26 15

fiedl commented 6 years ago

Result: For both cases, dominant scattering and dominant absorption, one can observe qualitatively the same penetration depth distribution, which was expected; but the parameters are not the same.