Motivation
The absorption opacity returned by the NonLTELineGasMix class is negative in case the medium exhibits stimulated emission. The explicit absorption technique (see the MonteCarloSimulation class) supports the corresponding negative optical depths along a photon path. However, numerical problems arise if the negative optical depth magnitude becomes too high. This may happen, for example, as a result of Monte Carlo noise, or in the early stages when a simulation has not yet converged.
Description
With this update, the NonLTELineGasMix class imposes a user-configurable lower limit on the (negative) optical depth along a cell diagonal before returning an absorption opacity. The default optical depth limit is -2.
Tests
Verified that an example simulation no longer shows infinite or NaN luminosities. All functional tests still work.
Motivation The absorption opacity returned by the
NonLTELineGasMix
class is negative in case the medium exhibits stimulated emission. The explicit absorption technique (see theMonteCarloSimulation
class) supports the corresponding negative optical depths along a photon path. However, numerical problems arise if the negative optical depth magnitude becomes too high. This may happen, for example, as a result of Monte Carlo noise, or in the early stages when a simulation has not yet converged.Description With this update, the
NonLTELineGasMix
class imposes a user-configurable lower limit on the (negative) optical depth along a cell diagonal before returning an absorption opacity. The default optical depth limit is -2.Tests Verified that an example simulation no longer shows infinite or NaN luminosities. All functional tests still work.