Manticore
Version 1.0
Physics of Molecular Clouds
|
#include <Dust.h>
Classes | |
struct | Opacity |
Fixed power-law opacity parameters. More... | |
Public Member Functions | |
Dust (const std::string &model="OH5", double rho=100.0) | |
Default constructor. More... | |
Dust (double lamb0, double kappa0, double beta) | |
Fixed power-law constructor. More... | |
~Dust () | |
Destructor. More... | |
double | kappa (double nu) const |
Gas/dust extinction opacity (cm^2/g). More... | |
const std::string & | name () const noexcept |
Current model name. More... | |
double | rho () const noexcept |
Current model gas-to-dust ratio. More... | |
void | setModel (const std::string &model, double rho=100.0) |
Set dust properties model (table-based). More... | |
void | setModel (double lamb0, double kappa0, double beta) |
Set dust properties model (fixed power law). More... | |
Protected Attributes | |
std::string | name_ |
Current model name. More... | |
Opacity | opacity_ = {0.0, 0.0, 0.0} |
Fixed power law. More... | |
double | rho_ |
Current model gas-to-dust ratio. More... | |
gsl_spline * | spline_ = nullptr |
Table interpolator. More... | |
Dust model.
This class supports both arbitrary, table-based opacity models as well as fixed power laws. The underlying model is set at construction but can be changed during use; cf. setModel(). Table-based models are evaluated via cubic spline interpolation of the logarithm of the opacity.
|
inline |
Default constructor.
[in] | model | Dust model name. |
[in] | rho | Gas-to-dust ratio. |
Definition at line 33 of file Dust.h.
References rho(), and setModel().
|
inline |
|
inline |
Fixed power-law constructor.
[in] | lamb0 | Fiducial wavelength (microns). |
[in] | kappa0 | Fiducial opacity. |
[in] | beta | Opacity scaling. |
Definition at line 45 of file Dust.h.
References setModel().
double manticore::Dust::kappa | ( | double | nu | ) | const |
Gas/dust extinction opacity (cm^2/g).
[in] | nu | Observation frequency (Hz). |
The opacity value is interpolated from tabulated values assuming a fixed power law dependence between adjacent points. If nu lies woutside the range of the table, the corresponding end value is extrapolated.
Definition at line 222 of file Dust.cc.
References manticore::Dust::Opacity::beta, manticore::Dust::Opacity::inu0, manticore::Dust::Opacity::kappa0, opacity_, and spline_.
Referenced by manticore::Graybody::dInu_dS(), manticore::Graybody::dInu_dT(), and manticore::Graybody::Inu().
|
inlinenoexcept |
Current model name.
Definition at line 64 of file Dust.h.
References name_.
Referenced by setModel().
|
inlinenoexcept |
Current model gas-to-dust ratio.
Definition at line 67 of file Dust.h.
References rho_.
Referenced by Dust(), and setModel().
void manticore::Dust::setModel | ( | const std::string & | model, |
double | rho = 100.0 |
||
) |
Set dust properties model (table-based).
[in] | model | Dust model name. |
[in] | rho | Gas-to-dust ratio. |
Definition at line 164 of file Dust.cc.
References manticore::initSpline(), manticore::dust::modelMap, MU_ERROR, name_, opacity_, rho(), rho_, and spline_.
Referenced by manticore::ccfCheck(), and Dust().
void manticore::Dust::setModel | ( | double | lamb0, |
double | kappa0, | ||
double | beta | ||
) |
|
protected |
|
protected |
|
protected |
Current model gas-to-dust ratio.
Definition at line 77 of file Dust.h.
Referenced by rho(), and setModel().
|
protected |
Table interpolator.
Definition at line 83 of file Dust.h.
Referenced by kappa(), setModel(), and ~Dust().