Dipartimento di Fisica e Astronomia dell'Università degli Studi di Firenze, via Giovanni Sansone 1, 50019, Sesto Fiorentino, Italy.
Department of Biomedical Engineering, Tufts University, 4 Colby Street, Medford, MA, 02155, USA.
Sci Rep. 2021 Sep 30;11(1):19486. doi: 10.1038/s41598-021-98429-3.
In this work, we present a robust and powerful method for the verification, with arbitrary accuracy, of Monte Carlo codes for simulating random walks in complex media. Such random walks are typical of photon propagation in turbid media, scattering of particles, i.e., neutrons in a nuclear reactor or animal/humans' migration. Among the numerous applications, Monte Carlo method is also considered a gold standard for numerically "solving" the scalar radiative transport equation even in complex geometries and distributions of the optical properties. In this work, we apply the verification method to a Monte Carlo code which is a forward problem solver extensively used for typical applications in the field of tissue optics. The method is based on the well-known law of average path length invariance when the entrance of the entities/particles in a medium obeys to a simple cosine law, i.e., Lambertian entrance, and annihilation of particles inside the medium is absent. By using this law we achieve two important points: (1) the invariance of the average path length guarantees that the expected value is known regardless of the complexity of the medium; (2) the accuracy of a Monte Carlo code can be assessed by simple statistical tests. We will show that we can reach an arbitrary accuracy of the estimated average pathlength as the number of simulated trajectories increases. The method can be applied in complete generality versus the scattering and geometrical properties of the medium, as well as in presence of refractive index mismatches in the optical case. In particular, this verification method is reliable to detect inaccuracies in the treatment of boundaries of finite media. The results presented in this paper, obtained by a standard computer machine, show a verification of our Monte Carlo code up to the sixth decimal digit. We discuss how this method can provide a fundamental tool for the verification of Monte Carlo codes in the geometry of interest, without resorting to simpler geometries and uniform distribution of the scattering properties.
在这项工作中,我们提出了一种强大而稳健的方法,用于以任意精度验证模拟复杂介质中随机漫步的蒙特卡罗代码。这种随机漫步是光在混浊介质中的传播、粒子散射的典型特征,例如在核反应堆中的中子或动物/人类的迁移。在众多应用中,蒙特卡罗方法也被认为是数值“求解”复杂几何形状和光学性质分布的标量辐射传输方程的黄金标准。在这项工作中,我们将验证方法应用于一个蒙特卡罗代码,该代码是一个正向问题求解器,广泛用于组织光学领域的典型应用。该方法基于当实体/粒子进入介质时遵循简单余弦定律(即朗伯进入)且介质内部不存在粒子湮没时平均路径长度不变的著名定律。通过使用该定律,我们实现了两个重要目标:(1)平均路径长度不变性保证了无论介质的复杂性如何,预期值都是已知的;(2)可以通过简单的统计测试评估蒙特卡罗代码的准确性。我们将表明,随着模拟轨迹数量的增加,我们可以达到估计平均路径长度的任意精度。该方法可以针对散射和介质的几何特性以及光学情况下的折射率失配进行完全通用的应用。特别是,这种验证方法可以可靠地检测有限介质边界处理中的不准确性。本文给出的结果是在标准计算机上获得的,证明了我们的蒙特卡罗代码可以达到第六位小数的验证精度。我们讨论了如何在不依赖于更简单的几何形状和均匀散射特性分布的情况下,为感兴趣的几何形状中的蒙特卡罗代码验证提供基本工具。