The FARGO_THORIN code developer's guide
 All Data Structures Files Functions Variables Typedefs Macros
Macros
fondam.h File Reference

Contains fondamental constants used thorough the code. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define G   1.0
 
#define PI   3.14159265358979323844
 
#define CPUOVERLAP   5 /* Zeus-like overlap kernel. 2:transport; 2: source, 1:viscous stress */
 
#define GASCONST   1.0
 
#define MOLWEIGHT   1.0
 
#define SQRT2PI_INV   (1.0/sqrt(2.0*PI))
 
#define fac1o15   (1.0/15.0)
 
#define fac1o21   (1.0/21.0)
 
#define fac4o75   (4.0/75.0)
 
#define MSOL_SI   1.98855e30
 
#define G_SI   6.674e-11
 
#define GM_SI   1.32712440018e20
 
#define AU_SI   149597870700.0 /* changing this can modify basic length unit */
 
#define R_STANDARD   8.3144598
 
#define MMW   2.4
 
#define R_SI   (R_STANDARD/(MMW*0.001)) /* R_specific = R/mu = 8.3144598 (standard gas constant) / (2.4 (fiducial mol.weight in PPDs) * 1g/mol) = 8.3144598/(2.4*0.001) in SI */
 
#define OPA2CU   (MSOL_SI*1000.0/pow(AU_SI*100.0,2.0)) /* (kappa in cgs cm^2/g) * OPA2CU = (kappa in code units) */
 
#define T2SI   (GM_SI/R_SI/AU_SI) /* (T in code units) * T2K = (T in Kelvins ~ cgs or SI) */
 
#define TIME2SI   (sqrt(pow(AU_SI,3.0)/GM_SI)) /* (time in code units) * TIME2S = (time in seconds ~ cgs or SI) */
 
#define RHO2CGS   (MSOL_SI*1000.0/pow(AU_SI*100.0,3.0)) /* (VOLUME!!! density in code units) * RHO2CGS = (volume density in g/cm^3 cgs) */
 
#define STEFANBOLTZMANN   (5.670367e-8*(1.0/MSOL_SI)*pow(1.0/TIME2SI,-3.0)*pow(1.0/T2SI,-4.0))
 
#define STEFANBOLTZMANNCONTROL   (5.670367e-5*pow(1.0/(R_SI*10000.0),4.0)*pow(1.0/(G_SI*1000.0),-2.5)*pow(1.0/(MSOL_SI*1000),-1.5)*pow(1.0/(AU_SI*100.0),-0.5))
 
#define MOLDIAMETER   2.72 /* value in angstroms */
 
#define ANGSTR_CGS   0.00000001 /* angstrom in centimeters */
 
#define AMU_CGS   1.660538921e-24 /* atomic mass unit in grams */
 
#define MOLCROSSEC_CGS   2.0e-15 /* molecular cross section of H2 in cm^2 */
 
#define SURFDENS2CGS   (MSOL_SI*1000.0/pow(AU_SI*100.0,2.0)) /* (surface density in code units) * SURFDENS2CGS = (surface density in g/cm^2 cgs) */
 
#define SIGMA2CGS   (MSOL_SI*1000.0/pow(AU_SI*100.0,2.0))
 
#define PRESS2CGS   (MSOL_SI*1000.0/(AU_SI*100.0*TIME2SI*TIME2SI))
 
#define FLUX2CU   (0.000003/(2.0*PI)) /* (radial flux in earth masses per year) * FLUX2CU = (radial flux in code units) */
 

Detailed Description

Contains fondamental constants used thorough the code.

Author
THORIN modifications by Ondřej Chrenko chren.nosp@m.ko@s.nosp@m.irrah.nosp@m..tro.nosp@m.ja.mf.nosp@m.f.cu.nosp@m.ni.cz, Copyright (C) 2017; original code by Frédéric Masset

Definition in file fondam.h.

Macro Definition Documentation

#define AMU_CGS   1.660538921e-24 /* atomic mass unit in grams */

Definition at line 47 of file fondam.h.

#define ANGSTR_CGS   0.00000001 /* angstrom in centimeters */

Definition at line 46 of file fondam.h.

#define AU_SI   149597870700.0 /* changing this can modify basic length unit */

Definition at line 30 of file fondam.h.

Referenced by CalculateFlaring(), and CalculateQirr().

#define CPUOVERLAP   5 /* Zeus-like overlap kernel. 2:transport; 2: source, 1:viscous stress */
#define fac1o15   (1.0/15.0)

Definition at line 24 of file fondam.h.

#define fac1o21   (1.0/21.0)

Definition at line 25 of file fondam.h.

#define fac4o75   (4.0/75.0)

Definition at line 26 of file fondam.h.

#define FLUX2CU   (0.000003/(2.0*PI)) /* (radial flux in earth masses per year) * FLUX2CU = (radial flux in code units) */

Definition at line 54 of file fondam.h.

Referenced by InitPebblesViaFlux().

#define G   1.0
#define G_SI   6.674e-11

Definition at line 28 of file fondam.h.

#define GASCONST   1.0

Definition at line 17 of file fondam.h.

Referenced by ComputeTemperatureField(), Energy(), and InitRadiatDiffusionFields().

#define GM_SI   1.32712440018e20

Definition at line 29 of file fondam.h.

#define MMW   2.4

Definition at line 32 of file fondam.h.

#define MOLCROSSEC_CGS   2.0e-15 /* molecular cross section of H2 in cm^2 */

Definition at line 48 of file fondam.h.

#define MOLDIAMETER   2.72 /* value in angstroms */

Definition at line 45 of file fondam.h.

#define MOLWEIGHT   1.0

Definition at line 18 of file fondam.h.

Referenced by ComputeTemperatureField(), Energy(), and InitRadiatDiffusionFields().

#define MSOL_SI   1.98855e30

Definition at line 27 of file fondam.h.

#define OPA2CU   (MSOL_SI*1000.0/pow(AU_SI*100.0,2.0)) /* (kappa in cgs cm^2/g) * OPA2CU = (kappa in code units) */

Definition at line 35 of file fondam.h.

Referenced by OpacityProfile().

#define PI   3.14159265358979323844
#define PRESS2CGS   (MSOL_SI*1000.0/(AU_SI*100.0*TIME2SI*TIME2SI))

Definition at line 53 of file fondam.h.

Referenced by CreateTorqueMapInfile().

#define R_SI   (R_STANDARD/(MMW*0.001)) /* R_specific = R/mu = 8.3144598 (standard gas constant) / (2.4 (fiducial mol.weight in PPDs) * 1g/mol) = 8.3144598/(2.4*0.001) in SI */

Definition at line 33 of file fondam.h.

#define R_STANDARD   8.3144598

Definition at line 31 of file fondam.h.

#define RHO2CGS   (MSOL_SI*1000.0/pow(AU_SI*100.0,3.0)) /* (VOLUME!!! density in code units) * RHO2CGS = (volume density in g/cm^3 cgs) */
#define SIGMA2CGS   (MSOL_SI*1000.0/pow(AU_SI*100.0,2.0))

Definition at line 52 of file fondam.h.

Referenced by CreateTorqueMapInfile().

#define SQRT2PI_INV   (1.0/sqrt(2.0*PI))

Definition at line 20 of file fondam.h.

Referenced by AccretePebblesOntoPlanets(), and MidplaneVolumeDensity().

#define STEFANBOLTZMANN   (5.670367e-8*(1.0/MSOL_SI)*pow(1.0/TIME2SI,-3.0)*pow(1.0/T2SI,-4.0))

Definition at line 39 of file fondam.h.

Referenced by CalculateQirr(), CalculateQminus(), and DiffusionCoefs().

#define STEFANBOLTZMANNCONTROL   (5.670367e-5*pow(1.0/(R_SI*10000.0),4.0)*pow(1.0/(G_SI*1000.0),-2.5)*pow(1.0/(MSOL_SI*1000),-1.5)*pow(1.0/(AU_SI*100.0),-0.5))

Definition at line 42 of file fondam.h.

#define SURFDENS2CGS   (MSOL_SI*1000.0/pow(AU_SI*100.0,2.0)) /* (surface density in code units) * SURFDENS2CGS = (surface density in g/cm^2 cgs) */

Definition at line 49 of file fondam.h.

#define T2SI   (GM_SI/R_SI/AU_SI) /* (T in code units) * T2K = (T in Kelvins ~ cgs or SI) */

Definition at line 36 of file fondam.h.

Referenced by CalculateQirr(), CreateTorqueMapInfile(), and OpacityProfile().

#define TIME2SI   (sqrt(pow(AU_SI,3.0)/GM_SI)) /* (time in code units) * TIME2S = (time in seconds ~ cgs or SI) */

Definition at line 37 of file fondam.h.