InverseLight / ValoMC

Monte Carlo software for simulating light propagation
https://inverselight.github.io/ValoMC/
Other
44 stars 14 forks source link

Question about boundaries #8

Open ayaasser opened 4 years ago

ayaasser commented 4 years ago

What should I do with the boundaries if I want my grid to be simulated as if it has infinite size?

aaleino commented 4 years ago

The default behavior is such that once photons enter any boundary, they will never come back. So this mimics infinite domain with zero scattering coefficient outside. There is also no boundary reflection due to refractive index mismatch by default.

I think that the easiest way to mimic a non-zero scattering coefficient outside (or other ways the photon can re-enter) is to make sure that the exitance is small at all borders. That is, to prepare a large enough mesh. This way, the effect of the photons that should re-enter from the surrounding area back to the simulation domain will be small on the simulation results.