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

#include <RingGeometry.hpp>

Inheritance diagram for RingGeometry:
Inheritance graph
[legend]

Public Member Functions

double density (double R, double z) const override
 
double height () const
 
double randomCylRadius () const override
 
double randomZ () const override
 
double ringRadius () const
 
double SigmaR () const override
 
double SigmaZ () const override
 
double width () const
 
- Public Member Functions inherited from SepAxGeometry
Position generatePosition () const override
 
virtual double randomCylRadius () const =0
 
virtual double randomZ () const =0
 
- 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

 RingGeometry ()
 
void setupSelfBefore () override
 
- Protected Member Functions inherited from SepAxGeometry
 SepAxGeometry ()
 
- 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 = SepAxGeometry
 
using ItemType = RingGeometry
 

Private Attributes

double _A
 
double _height
 
const double & _hz
 
const double & _R0
 
double _ringRadius
 
Array _Rv
 
const double & _w
 
double _width
 
Array _Xv
 

Friends

class ItemRegistry
 

Detailed Description

The RingGeometry class is a subclass of the SepAxGeometry class and describes the geometry of a ring as one would consider in dust-lane early-type galaxies. The geometry is characterized by a gaussian profile in the radial direction and an exponential fall-off in the vertical direction, resulting in the axisymmetric density profile

\[ \rho(R,z) = A\, \exp\left[ -\frac{(R-R_0)^2}{2w^2} \right] \exp\left( -\frac{|z|}{h_z} \right). \]

There are three free parameters in this class: the radius \(R_0\) of the ring, the radial dispersion \(w\) of the ring and the vertical scale height \(h_z\).

Constructor & Destructor Documentation

◆ RingGeometry()

RingGeometry::RingGeometry ( )
inlineprotected

Default constructor for concrete Item subclass RingGeometry : "a ring geometry" .

Member Function Documentation

◆ density()

double RingGeometry::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.

◆ height()

RingGeometry::height ( ) const
inline

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

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

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

◆ randomCylRadius()

double RingGeometry::randomCylRadius ( ) const
overridevirtual

This function returns the cylindrical radius \(R\) of a random position drawn from the geometry, by picking a uniform deviate \({\cal{X}}\) and solving the equation

\[ {\cal{X}} = 2\pi \int_0^R \rho_R(R')\, R'\, {\text{d}}R' \]

for \(R\). We just use the vector of cumulative masses stored internally.

Implements SepAxGeometry.

◆ randomZ()

double RingGeometry::randomZ ( ) const
overridevirtual

This function returns the height \(z\) of a random position drawn from the geometry, by picking a uniform deviate \({\cal{X}}\) and solving the equation

\[ {\cal{X}} = \int_{-\infty}^z \rho_z(z')\, {\text{d}}z' \]

for \(z\). For the ring geometry with its exponential vertical profile, this integration is simple, and the inversion results in

\[ z = \begin{cases} \; h_z\,\ln(2{\cal{X}}) & \text{if $0<{\cal{X}}<\tfrac{1}{2}$,} \\ \;-h_z\,\ln[2(1-{\cal{X}})] & \text{if $\tfrac{1}{2}<{\cal{X}}<1$.} \end{cases} \]

Implements SepAxGeometry.

◆ ringRadius()

RingGeometry::ringRadius ( ) const
inline

This function returns the value of the discoverable double property ringRadius : "the radius of the ring" .

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

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

◆ setupSelfBefore()

void RingGeometry::setupSelfBefore ( )
overrideprotectedvirtual

This function verifies the validity of the parameters of the geometry. The density normalization parameter \(A\) is set by the normalization condition that the total mass equals one. We find

\[ A = \frac{1}{4\pi\,w^2\,h_z \left[ {\text{e}}^{-t^2} + \sqrt{\pi}\,t\,(1 + {\text{erf}}\,t) \right]}, \]

with \(t = R_0/\sqrt{2}w\). The routine also creates a vector with the cumulative distribution \(X(r)\) corresponding to the radial part of the density, i.e. mass

\[ X(R) = \int_0^R \rho_R(R')\, R'\, {\text{d}}R' \]

at a large number of radii. For the ring geometry,

\[ \rho_R(R') = 4\pi\,A\,h_z \exp\left[ -\frac{(R-R_0)^2}{2w^2} \right], \]

and thus

\[ X(R) = 4\pi\,A\,w^2\,h_z \left[ \left({\text{e}}^{-t^2}-{\text{e}}^{-u^2}\right) + \sqrt{\pi}\,t\,({\text{erf}}\,t - {\text{erf}}\,u) \right], \]

with \(t\) as defined before and \(u = (R_0-R)/\sqrt{2}w\).

Reimplemented from Geometry.

◆ SigmaR()

double RingGeometry::SigmaR ( ) const
overridevirtual

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

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

For the ring geometry we obtain

\[ \Sigma_R = \sqrt{\frac{\pi}{2}}\,A\,w \left[ 1 + {\text{erf}} \left( \frac{R_0}{\sqrt{2} w} \right) \right]. \]

Implements AxGeometry.

◆ SigmaZ()

double RingGeometry::SigmaZ ( ) const
overridevirtual

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

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

For the ring geometry we find

\[ \Sigma_{\text{f}} = 2A\,h_z\, \exp\left(-\frac{R_0^2}{2w^2}\right). \]

Implements Geometry.

◆ width()

RingGeometry::width ( ) const
inline

This function returns the value of the discoverable double property width : "the radial width of the ring" .

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

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


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