Usrmed.f for optical photons reflection

Dear FLUKA experts,

I’m trying to implement the model of optical photons reflection by using usrmed.f routine. The geometry of the the model is simple (see pic 1): the slab of water (which is a reflector) is irradiated with a pencil beam of optical photons. The law reflection on the border of two media is implemented in the usrmed.f routine. But when I add usrmed.f file to my project nothing happens. The outcome is the same as in the project without usrmed.f routine - it’s just a mirror reflection. Can you, please, tell me what am I doing wrong in my project? I’ve attached inp file and usrmed.f routine below. Thank you in advance.


Optic.inp (1.8 KB)
usrmed.f (2.6 KB)

Dear Alexy,

you don’t any change, because the METAL property of the water prevents the optical photons entering the region, thus the if statement never will be true.

By the way, the usrmed.f user routine you linked changes the particle direction isotropically, but region number is not updated correctly, so the simulation will crash.

If you look at the 1st note in 7.22.54. OPT-PROP — FLUKA Manual you will find multiple user routines related to the optical photons, which may be better for your need, depending what you want to achieve.

Cheers,
David

A post was split to a new topic: Surface normal for Lambertian diffusion