Manticore  Version 1.0
Physics of Molecular Clouds
Classes | Public Member Functions | Protected Attributes | List of all members
manticore::Dust Class Reference

Dust model. More...

#include <Dust.h>

Collaboration diagram for manticore::Dust:
Collaboration graph
[legend]

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...
 

Detailed Description

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.

Note
Once initialized, a model may be safely shared among multiple threads.

Definition at line 28 of file Dust.h.

Constructor & Destructor Documentation

◆ Dust() [1/2]

manticore::Dust::Dust ( const std::string &  model = "OH5",
double  rho = 100.0 
)
inline

Default constructor.

Parameters
[in]modelDust model name.
[in]rhoGas-to-dust ratio.

Definition at line 33 of file Dust.h.

References rho(), and setModel().

◆ ~Dust()

manticore::Dust::~Dust ( )
inline

Destructor.

Definition at line 37 of file Dust.h.

References spline_.

◆ Dust() [2/2]

manticore::Dust::Dust ( double  lamb0,
double  kappa0,
double  beta 
)
inline

Fixed power-law constructor.

Parameters
[in]lamb0Fiducial wavelength (microns).
[in]kappa0Fiducial opacity.
[in]betaOpacity scaling.

Definition at line 45 of file Dust.h.

References setModel().

Member Function Documentation

◆ kappa()

double manticore::Dust::kappa ( double  nu) const

Gas/dust extinction opacity (cm^2/g).

Parameters
[in]nuObservation 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.

Returns
Dust+gas extinction opacity at the given wavelength.

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().

◆ name()

const std::string& manticore::Dust::name ( ) const
inlinenoexcept

Current model name.

Definition at line 64 of file Dust.h.

References name_.

Referenced by setModel().

◆ rho()

double manticore::Dust::rho ( ) const
inlinenoexcept

Current model gas-to-dust ratio.

Definition at line 67 of file Dust.h.

References rho_.

Referenced by Dust(), and setModel().

◆ setModel() [1/2]

void manticore::Dust::setModel ( const std::string &  model,
double  rho = 100.0 
)

Set dust properties model (table-based).

Parameters
[in]modelDust model name.
[in]rhoGas-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().

◆ setModel() [2/2]

void manticore::Dust::setModel ( double  lamb0,
double  kappa0,
double  beta 
)

Set dust properties model (fixed power law).

Parameters
[in]lamb0Fiducial wavelength (microns).
[in]kappa0Fiducial opacity.
[in]betaOpacity scaling.

Definition at line 196 of file Dust.cc.

References manticore::c_light, name(), name_, opacity_, rho_, and spline_.

Member Data Documentation

◆ name_

std::string manticore::Dust::name_
protected

Current model name.

Definition at line 74 of file Dust.h.

Referenced by name(), and setModel().

◆ opacity_

Opacity manticore::Dust::opacity_ = {0.0, 0.0, 0.0}
protected

Fixed power law.

Definition at line 80 of file Dust.h.

Referenced by kappa(), and setModel().

◆ rho_

double manticore::Dust::rho_
protected

Current model gas-to-dust ratio.

Definition at line 77 of file Dust.h.

Referenced by rho(), and setModel().

◆ spline_

gsl_spline* manticore::Dust::spline_ = nullptr
protected

Table interpolator.

Definition at line 83 of file Dust.h.

Referenced by kappa(), setModel(), and ~Dust().


The documentation for this class was generated from the following files: