The SKIRT project
advanced radiative transfer for astrophysics
Public Member Functions | Protected Member Functions | Private Types | Friends | List of all members
GrainComposition Class Referenceabstract

#include <GrainComposition.hpp>

Inheritance diagram for GrainComposition:
Inheritance graph
[legend]

Public Member Functions

virtual double bulkDensity () const =0
 
virtual string name () const =0
 
virtual string resourceNameForEnthalpies () const =0
 
virtual string resourceNameForMuellerMatrix () const
 
virtual string resourceNameForOpticalProps () const =0
 
virtual bool resourcesForSpheroidalEmission (bool &resource, double &interpol, string &tableName1, string &tableName2) 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 ItemgetItemProperty (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)
 
Itemoperator= (const Item &)=delete
 
Itemparent () 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

 GrainComposition ()
 
- 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 = GrainComposition
 

Friends

class ItemRegistry
 

Detailed Description

GrainComposition is an abstract class that represents the optical and calorimetric properties of a population of dust grains with a given material composition.

The basic optical properties are provided for arbitrary grain sizes and at arbitrary wavelengths; in practice, they are defined on a two-dimensional grid of wavelengths λk and grain sizes ai. The basic optical properties include the absorption and scattering efficiencies Qk,iabs and Qk,isca and the scattering phase function asymmetry parameter gk,i. All of these quantities are dimensionless.

Optionally, a grain composition may provide the four coefficients Sxx of the Mueller matrix for spherical grains, as a function of wavelength, grain size, and scattering angle. A dust mix containing grain compositions that provide the Mueller matrix coefficients can support the MaterialPhaseFunction and SphericalPolarization scattering modes, in addition to the HenyeyGreenstein scattering mode (see the MaterialMix class for more information on scattering modes).

Furthermore, a grain composition may optionally provide additional properties relevant for calculating the polarization effects of scattering, absorption and emission by spheroidal grains. The current implementation supports only the properties relevant for polarized emission, i.e the absorption efficiencies Qabs(a,λ,θ) and the corresponding linear polarization efficiencies Qabspol(a,λ,θ) as a function of grain size a, wavelength λ and emission angle θ. For consistency, the Qabs values given here, when averaged over the emission angle, should match the basic Qabs mentioned above.

The calorimetric properties consist of the specific enthalpy (internal energy) per unit volume, given in J/m3, at arbitrary temperature. The specific enthalpy is obtained by integrating the specific heat capacity of the material over the temperature range, using an arbitrary zero point. In practice, the specific enthalpy is defined on a grid of temperatures Tt resulting in a set of values ht.

A final, key property is the bulk mass density ρbulk of the grain material, a single value given in kg/m3. To obtain the specific enthalpy per unit of mass (J/kg) from the provided specific enthalpy per unit volume (J/m3), one needs to divide the provided values by the bulk mass density (in kg/m3). Also, the same bulk mass density value must be used for calculating the dust mass from the size distribution to obtain consistent results.

The GrainComposition class provides a public interface for retrieving the resource names for the various tables mentioned above, and for retrieving the value of the bulk mass density. Subclasses are required to implement these functions appropriately.

Constructor & Destructor Documentation

◆ GrainComposition()

GrainComposition::GrainComposition ( )
inlineprotected

Default constructor for abstract Item subclass GrainComposition : "a dust grain composition" .

Member Function Documentation

◆ bulkDensity()

virtual double GrainComposition::bulkDensity ( ) const
pure virtual

◆ name()

virtual string GrainComposition::name ( ) const
pure virtual

◆ resourceNameForEnthalpies()

virtual string GrainComposition::resourceNameForEnthalpies ( ) const
pure virtual

◆ resourceNameForMuellerMatrix()

virtual string GrainComposition::resourceNameForMuellerMatrix ( ) const
virtual

This function returns the name of the stored table resource tabulating the coefficients of the Mueller matrix as a function of wavelength, grain size, and scattering angle. This function is invoked for the MaterialPhaseFunction scattering mode (to obtain S11 ) and for the SphericalPolarization scattering mode (to obtain all four Sxx coefficients). The default implementation in this base class returns the empty string, indicating that only the HenyeyGreenstein scattering mode can be used.

Reimplemented in PolarizedGraphiteGrainComposition, and PolarizedSilicateGrainComposition.

◆ resourceNameForOpticalProps()

virtual string GrainComposition::resourceNameForOpticalProps ( ) const
pure virtual

This function returns the name of the stored table resource tabulating the basic optical properties (absorption and scattering efficiencies and asymmetry parameter) as a function of wavelength and grain size. The asymmetry parameter values are used only with the HenyeyGreenstein scattering mode.

Implemented in BegemannPorousAluminaGrainComposition, CrystalEnstatiteGrainComposition, CrystalForsteriteGrainComposition, DorschnerOlivineGrainComposition, DraineGraphiteGrainComposition, DraineIonizedPAHGrainComposition, DraineNeutralPAHGrainComposition, DraineSilicateGrainComposition, DustEmGrainComposition, HofmeisterPericlaseGrainComposition, MieSilicateGrainComposition, MinSilicateGrainComposition, PolarizedGraphiteGrainComposition, PolarizedSilicateGrainComposition, TrustGraphiteGrainComposition, TrustNeutralPAHGrainComposition, and TrustSilicateGrainComposition.

◆ resourcesForSpheroidalEmission()

virtual bool GrainComposition::resourcesForSpheroidalEmission ( bool &  resource,
double &  interpol,
string &  tableName1,
string &  tableName2 
) const
virtual

This function returns information on the resources required for implementing thermal emission from aligned spheriodal grains. It is invoked for the SpheroidalPolarization scattering mode. If the grain composition does not support this mode, the function returns false and the output arguments remain unchanghed. If the grain composition does support this mode, the function returns true and the output arguments are updated as follows:

  • resource: true if the specified tables are built-in resources or false if they are provided as user input files.
  • interpol: the interpolation fraction between the two tables in range [0,1]; the value is used to linearly interpolate between the two tables. A value of 0 means that the second table is ignored, a value of 1 means that the first table is ignored. A value in between is used to linearly interpolate between the two tables.
  • tableName1: the name of the first stored table (resource or user input file); this name must always be provided (i.e. non-empty and valid) even if interpol is equal to 1.
  • tableName2: the name of the second stored table (resource or user input file); this name may be missing (i.e. the empty string) if interpol is equal to 0.

Each of the stored tables tabulates the absorption efficiencies Qabs(a,λ,θ) and the corresponding linear polarization efficiencies Qabspol(a,λ,θ) as a function of grain size a, wavelength λ and emission angle θ.

The default implementation in this base class returns false and does not change the output arguments, indicating that there is no support for spheroidal grains.

Reimplemented in SpheroidalGraphiteGrainComposition, and SpheroidalSilicateGrainComposition.


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