#include <LyaOptions.hpp>
Public Types | |
enum class | LyaAccelerationScheme : int { None , Constant , Variable } |
Public Member Functions | |
bool | includeHubbleFlow () const |
LyaAccelerationScheme | lyaAccelerationScheme () const |
double | lyaAccelerationStrength () const |
Public Member Functions inherited from SimulationItem | |
template<class T > | |
T * | find (bool setup=true) const |
template<class T > | |
T * | interface (int levels=-999999, bool setup=true) const |
virtual string | itemName () const |
void | setup () |
string | typeAndName () const |
Public Member Functions inherited from Item | |
Item (const Item &)=delete | |
virtual | ~Item () |
void | addChild (Item *child) |
const vector< Item * > & | children () const |
virtual void | clearItemListProperty (const PropertyDef *property) |
void | destroyChild (Item *child) |
virtual bool | getBoolProperty (const PropertyDef *property) const |
virtual vector< double > | getDoubleListProperty (const PropertyDef *property) const |
virtual double | getDoubleProperty (const PropertyDef *property) const |
virtual string | getEnumProperty (const PropertyDef *property) const |
virtual int | getIntProperty (const PropertyDef *property) const |
virtual vector< Item * > | getItemListProperty (const PropertyDef *property) const |
virtual Item * | getItemProperty (const PropertyDef *property) const |
virtual string | getStringProperty (const PropertyDef *property) const |
int | getUtilityProperty (string name) const |
virtual void | insertIntoItemListProperty (const PropertyDef *property, int index, Item *item) |
Item & | operator= (const Item &)=delete |
Item * | parent () const |
virtual void | removeFromItemListProperty (const PropertyDef *property, int index) |
virtual void | setBoolProperty (const PropertyDef *property, bool value) |
virtual void | setDoubleListProperty (const PropertyDef *property, vector< double > value) |
virtual void | setDoubleProperty (const PropertyDef *property, double value) |
virtual void | setEnumProperty (const PropertyDef *property, string value) |
virtual void | setIntProperty (const PropertyDef *property, int value) |
virtual void | setItemProperty (const PropertyDef *property, Item *item) |
virtual void | setStringProperty (const PropertyDef *property, string value) |
void | setUtilityProperty (string name, int value) |
virtual string | type () const |
Protected Member Functions | |
LyaOptions () | |
Protected Member Functions inherited from SimulationItem | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
Protected Member Functions inherited from Item | |
Item () | |
Private Types | |
using | BaseType = SimulationItem |
using | ItemType = LyaOptions |
Private Attributes | |
bool | _includeHubbleFlow |
LyaAccelerationScheme | _lyaAccelerationScheme |
double | _lyaAccelerationStrength |
Friends | |
class | ItemRegistry |
The LyaOptions class simply offers a number of configuration options related to the treatment of Lyman-alpha line transfer, if this is enabled in the simulation.
|
strong |
The enumeration type indicating the supported Lyman-alpha acceleration schemes.
In a high-optical-depth medium, the number of scatterings for photon packets near the Lyman-alpha line is so high, and the corresponding free path lengths so short, that the Monte Carlo photon cycle becomes prohibitively slow. The core-skipping acceleration mechanism, first introduced by Ahn et al. 2002 (ApJ, 567:922-930) and used by many authors since, forces the wavelength of some photon packets from the core of the Lyman-alpha line into the wings of the line. This dramatically reduces the scattering cross section, allowing the photon packet to escape. More specifically, all photon packets with a dimensionless frequency \(x\) smaller than a given critical value \(x_\mathrm{crit}\) are treated this way.
SKIRT implements three variations of the core-skipping acceleration scheme:
\[ x_\mathrm{crit} = s\, \left( \frac{n_\mathrm{H}}{T} \right)^{1/6}, \]
where \(s\) is the acceleration strength configured by the user and \(n_\mathrm{H}\) is the neutral hydrogen number density (in \(\mathrm{m}^{-3}\)) and \(T\) the gas temperature (in K) in the spatial cell hosting the scattering event. The rationale behind this formula is discussed below. This variable mechanism is applicable for most models, and is preferred for models with a broad dynamic range in optical depths.For both the constant and variable schemes, the user can configure the acceleration strength \(s\), with a default value of unity. Larger values will decrease run time and accuracy; smaller values will increase run time and accuracy.
Rationale for the variable scheme
The approximate analytical solutions for the Lyman-alpha spectrum emerging from a static slab or sphere (Neufeld 1990, Dijkstra et al. 2006) depend on the product \(a\tau_0\), where \(a\) is the Voigt parameter and \(\tau_0\) is the optical depth at the Lyman-alpha line center. Inspired by this result, many authors proposed acceleration schemes where \(x_\mathrm{crit}\) is determined as a function of this product. For example, Smith et al. 2015 (MNRAS, 449, 4336-4362) used a critical value proportional to \((a\tau_0)^{1/3}\).
However, calculating the optical depth requires selecting a path length. This has forced these schemes to depend on either a local scale (such as the size of the current spatial cell) or a global scale (such as the domain size). Both options seem undesirable, as they lead to a dependency on non-physical parameters (the resolution of the discretization or the portion of the physical world included in the model). Interestingly, Smith et al. 2015 (MNRAS, 449, 4336-4362) noted that one could use the Jeans length as a physically motivated length scale. Expressing the Jeans length as well as the other quantities in \((a\tau_0)^{1/3}\) as a function of the local gas properties leads to \(x_\mathrm{crit} \propto (n_\mathrm{H}/T)^{1/6}\). With the gas properties expressed in SI units, experiments with benchmark models show that a proportionality factor of order unity is appropriate.
None : "no acceleration" .
Constant : "acceleration scheme with a constant critical value" .
Variable : "acceleration scheme depending on local gas temperature and density" .
|
inlineprotected |
Default constructor for concrete Item subclass LyaOptions : "a set of options related to Lyman-alpha line transfer" .
|
inline |
This function returns the value of the discoverable Boolean property includeHubbleFlow : "include the Doppler shift caused by the expansion of the universe" .
The default value for this property is given by the conditional value expression "false" .
This property is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.
|
inline |
This function returns the value of the discoverable LyaAccelerationScheme enumeration property lyaAccelerationScheme : "the Lyman-alpha line transfer acceleration scheme" .
The default value for this property is given by the conditional value expression "Variable" .
This property is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.
|
inline |
This function returns the value of the discoverable double property lyaAccelerationStrength : "the acceleration strength; higher is faster but less accurate" .
The minimum value for this property is "]0" .
The maximum value for this property is "10]" .
The default value for this property is given by the conditional value expression "1" .
This property is relevant only if the Boolean expression "lyaAccelerationSchemeConstant|lyaAccelerationSchemeVariable" evaluates to true after replacing the names by true or false depending on their presence.
This property is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.