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

#include <TTauriDiskGeometry.hpp>

Inheritance diagram for TTauriDiskGeometry:
Inheritance graph
[legend]

Public Member Functions

double density (double R, double z) const override
 
Position generatePosition () const override
 
double maxRadius () const
 
double minRadius () const
 
double radialIndex () const
 
double scaleHeight () const
 
double scaleLength () const
 
double SigmaR () const override
 
double SigmaZ () const override
 
double verticalIndex () const
 
- Public Member Functions inherited from AxGeometry
virtual double density (double R, double z) const =0
 
double density (Position bfr) const override
 
int dimension () const override
 
virtual double SigmaR () const =0
 
double SigmaX () const override
 
double SigmaY () const override
 
virtual double density (Position bfr) const =0
 
virtual int dimension () const =0
 
virtual Position generatePosition () const =0
 
virtual double SigmaX () const =0
 
virtual double SigmaY () const =0
 
virtual double SigmaZ () const =0
 
- 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

 TTauriDiskGeometry ()
 
void setupSelfBefore () override
 
- Protected Member Functions inherited from AxGeometry
 AxGeometry ()
 
- Protected Member Functions inherited from Geometry
 Geometry ()
 
Randomrandom () const
 
void setupSelfBefore () override
 
- 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 = AxGeometry
 
using ItemType = TTauriDiskGeometry
 

Private Attributes

const double & _a
 
double _a178
 
const double & _b
 
double _glnInn
 
double _glnInnOut
 
double _maxRadius
 
double _minRadius
 
double _radialIndex
 
const double & _Rd
 
double _rho0
 
const double & _Rinn
 
const double & _Rout
 
double _s0
 
double _scaleHeight
 
double _scaleLength
 
double _verticalIndex
 
const double & _zd
 

Friends

class ItemRegistry
 

Detailed Description

The TTauriDiskGeometry class describes the geometry of a typical passive disk around a T Tauri star. The disks are axisymmetric with a central cavity and are characterized by the density distribution

\[ \rho(R,z) = \rho_0 \left(\frac{R}{R_d}\right)^{-\alpha} \exp\left\{ -b \left[ \frac{z/z_d} {(R/R_d)^{9/8}} \right]^2 \right\} \qquad\qquad R_{\text{inn}} < R < R_{\text{out}}. \]

There are six parameters for this geometry: the exponent indices \(\alpha>0\) and \(b>0\), the inner and outer radii \(R_{\text{inn}}>0\) and \(R_{\text{out}}>R_{\text{inn}}\), and the scale length \(R_d>0\) and scale height \(z_d>0\).

Special cases of this geometry are used in the radiative transfer benchmark problems described by Pascucci et al. (2004, A&A, 417, 793) and Pinte et al. (2009, A&A, 498, 967).

Note: for the implementation of this geometry we use the generalized logarithm defined by SpecialFunctions::gln() and its inverse SpecialFunctions::gexp(). Specifically, we often use the difference function SpecialFunctions::gln2() defined as

\[ {\text{gln2}}(p,x_1,x_2) = {\text{gln}}(p,x_1) - {\text{gln}}(p,x_2) = \int_{x_2}^{x_1} t^{-p}\,{\text{d}}t. \]

This item type is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.

Constructor & Destructor Documentation

◆ TTauriDiskGeometry()

TTauriDiskGeometry::TTauriDiskGeometry ( )
inlineprotected

Default constructor for concrete Item subclass TTauriDiskGeometry : "a T Tauri disk geometry" .

Member Function Documentation

◆ density()

double TTauriDiskGeometry::density ( double  R,
double  z 
) const
overridevirtual

This function returns the density \(\rho(R,z)\) at the cylindrical radius \(R\) and height \(z\). It just implements the analytical formula.

Implements AxGeometry.

◆ generatePosition()

Position TTauriDiskGeometry::generatePosition ( ) const
overridevirtual

This function generates a random position from the geometry by drawing a random point from the three-dimensional probability density \(p({\bf{r}})\, {\text{d}}{\bf{r}} = \rho({\bf{r}})\, {\text{d}}{\bf{r}}\). In the present case, we accomplish this by picking a random cylindrical radius \(R\), a random height \(z\), and a random azimuth \(\phi\) from the appropriate one-dimensional probability distribution functions.

We first generate a random radius \(R\) from the marginal distribution

\[ p(R)\,{\text{d}}R = 2\pi R\, {\text{d}}R\, \int_{-\infty}^\infty \rho(R,z)\, {\text{d}}z. \]

The cumulative distribution is

\[ P(R) = 2\pi\, \int_{R_\text{inn}}^R R'\,{\text{d}}R' \, \int_{-\infty}^\infty \rho(R',z)\,{\text{d}}z. \]

Using the definitions of gln() and gln2() noted in the class header, the cumulative distribution can be written as

\[ P(R) = \frac{\text{gln2}\left(\alpha-\frac{17}{8}, \frac{R}{R_d}, \frac{R_{\text{inn}}}{R_d}\right)} {\text{gln2}\left(\alpha-\frac{17}{8}, \frac{R_{\text{out}}}{R_d}, \frac{R_{\text{inn}}}{R_d}\right)} = \frac{\text{gln}\left(\alpha-\frac{17}{8}, \frac{R}{R_d}, \right) - \text{gln}\left(\alpha-\frac{17}{8}, \frac{R_{\text{inn}}}{R_d}\right)} {\text{gln2}\left(\alpha-\frac{17}{8}, \frac{R_{\text{out}}}{R_d}, \frac{R_{\text{inn}}}{R_d}\right)}. \]

A random \(R\) is generated by picking a uniform deviate \({\cal{X}}\) and setting \({\cal{X}}=P(R)\). After resolving for \(R\), and using the inverse generalized logarithm gexp(), we obtain

\[ R = R_d\, \text{gexp}\left[\alpha-\frac{17}{8}, \text{gln}\left(\alpha-\frac{17}{8}, \frac{R_{\text{inn}}}{R_d}\right) + {\cal{X}}\, \text{gln2}\left(\alpha-\frac{17}{8}, \frac{R_{\text{out}}}{R_d}, \frac{R_{\text{inn}}}{R_d}\right) \right]. \]

We then generate a random height from the conditional distribution function

\[ p(z)\,{\text{d}}z = \dfrac{\rho(R,z)\,{\text{d}}z}{\int_{-\infty}^\infty \rho(R,z')\, {\text{d}}z'}, \]

where \(R\) is the random cylindrical radius generated before. One easily finds that this distribution is a Gaussian distribution with mean zero and dispersion

\[ \sigma(R) = \frac{1}{\sqrt{2b}}\,z_d\,\left(\frac{R}{R_d}\right)^{9/8}. \]

Generating a random \(z\) from this distribution is easy as the Random class contains a gaussian random number generating function.

Finally, we simply generate the azimuth from a uniform distribution between 0 and \(2\pi\).

Implements Geometry.

◆ maxRadius()

TTauriDiskGeometry::maxRadius ( ) const
inline

This function returns the value of the discoverable double property maxRadius : "the outer radius of the disk" .

This property represents a physical quantity of type "length" .

The minimum value for this property is "]0" .

◆ minRadius()

TTauriDiskGeometry::minRadius ( ) const
inline

This function returns the value of the discoverable double property minRadius : "the inner radius of the disk" .

This property represents a physical quantity of type "length" .

The minimum value for this property is "]0" .

◆ radialIndex()

TTauriDiskGeometry::radialIndex ( ) const
inline

This function returns the value of the discoverable double property radialIndex : "the radial exponent index α" .

The minimum value for this property is "]0" .

The default value for this property is given by the conditional value expression "2.5" .

◆ scaleHeight()

TTauriDiskGeometry::scaleHeight ( ) const
inline

This function returns the value of the discoverable double property scaleHeight : "the scale height" .

This property represents a physical quantity of type "length" .

The minimum value for this property is "]0" .

◆ scaleLength()

TTauriDiskGeometry::scaleLength ( ) const
inline

This function returns the value of the discoverable double property scaleLength : "the scale length" .

This property represents a physical quantity of type "length" .

The minimum value for this property is "]0" .

◆ setupSelfBefore()

void TTauriDiskGeometry::setupSelfBefore ( )
overrideprotectedvirtual

This function verifies that the parameters are valid and it calculates the normalization constant \(\rho_0\) determined by requiring that total mass equals one:

\[ 1 = 2\pi\, \int_{R_\text{inn}}^{R_\text{out}} R\,{\text{d}}R \, \int_{-\infty}^\infty \rho(R,z)\,{\text{d}}z. \]

Given that

\[ \int_{-\infty}^{+\infty} \exp(-a^2x^2)\,\text{d}x = \frac{\sqrt{\pi}}{a}, \]

and using the definition of gln2() noted in the class header, we find after some algebra that

\[ \rho_0 = \left[ 2\, \pi^{3/2}\, b^{-1/2}\, R_d^2\, z_d\, \text{gln2}\left(\alpha-\frac{17}{8}, \frac{R_{\text{out}}}{R_d}, \frac{R_{\text{inn}}}{R_d}\right) \right]^{-1}. \]

Reimplemented from Geometry.

◆ SigmaR()

double TTauriDiskGeometry::SigmaR ( ) const
overridevirtual

This function returns the radial surface density, i.e. the integration of the density along a line in the equatorial plane starting at the centre of the coordinate system,

\[ \Sigma_R = \int_0^\infty \rho(R,0)\,{\text{d}}R. \]

Using the definition of gln2() noted in the class header, we easily find for the T Tauri disk geometry that

\[ \Sigma_R = \rho_0\, R_d\, \text{gln2}\left( \alpha, \frac{R_{\text{out}}}{R_d}, \frac{R_{\text{inn}}}{R_d} \right). \]

Implements AxGeometry.

◆ SigmaZ()

double TTauriDiskGeometry::SigmaZ ( ) const
overridevirtual

This function returns the vertical surface density, i.e. the integration of the density along the entire Z-axis,

\[ \Sigma_Z = \int_{-\infty}^\infty \rho(0,z)\, {\text{d}}z. \]

For the T Tauri disk geometry with its central cylindrical cavity, this integral is zero.

Implements Geometry.

◆ verticalIndex()

TTauriDiskGeometry::verticalIndex ( ) const
inline

This function returns the value of the discoverable double property verticalIndex : "the vertical exponent index b" .

The minimum value for this property is "]0" .

The default value for this property is given by the conditional value expression "0.5" .


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