Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
cool_eval.cpp File Reference
#include "cddefines.h"
#include "cool_eval.h"
#include "taulines.h"
#include "wind.h"
#include "coolheavy.h"
#include "radius.h"
#include "conv.h"
#include "h2.h"
#include "rt.h"
#include "opacity.h"
#include "ionbal.h"
#include "trace.h"
#include "dynamics.h"
#include "grainvar.h"
#include "atmdat.h"
#include "atoms.h"
#include "called.h"
#include "hmi.h"
#include "magnetic.h"
#include "phycon.h"
#include "hyperfine.h"
#include "iso.h"
#include "thermal.h"
#include "cooling.h"
#include "pressure.h"
#include "mole.h"
#include "rfield.h"
#include "doppvel.h"
#include "freebound.h"
#include "dense.h"
#include "atmdat_gaunt.h"
#include "iterations.h"
#include "vectorize.h"
Include dependency graph for cool_eval.cpp:

Macros

#define N21CM_TE   16
 

Functions

STATIC double CoolH2_GA08 (double Temp)
 
STATIC void fndneg (void)
 
STATIC void fndstr (double tot, double dc)
 
STATIC void CoolHyperfine (void)
 
STATIC double eeBremsCooling (double Te, double eden)
 
void CoolEvaluate (double *tot)
 
STATIC double ga08_sum (double Temp, double *coeff, int ncoeff)
 
STATIC double ga08_oH2_H_b100 (double Temp)
 
STATIC double ga08_oH2_H_b1000 (double Temp)
 
STATIC double ga08_oH2_H_b6000 (double Temp)
 
STATIC double ga08_oH2_H_stitch_100 (double Temp)
 
STATIC double ga08_oH2_H_stitch_1000 (double Temp)
 
STATIC double ga08_oH2_H (double Temp)
 
STATIC double ga08_pH2_H_b100 (double Temp)
 
STATIC double ga08_pH2_H_b1000 (double Temp)
 
STATIC double ga08_pH2_H_b6000 (double Temp)
 
STATIC double ga08_pH2_H_stitch_100 (double Temp)
 
STATIC double ga08_pH2_H (double Temp)
 
STATIC double ga08_pH2_pH2_a100_b6000 (double Temp)
 
STATIC double ga08_pH2_pH2 (double Temp)
 
STATIC double ga08_pH2_oH2_a100_b6000 (double Temp)
 
STATIC double ga08_pH2_oH2 (double Temp)
 
STATIC double ga08_oH2_pH2_a100_b6000 (double Temp)
 
STATIC double ga08_oH2_pH2 (double Temp)
 
STATIC double ga08_oH2_oH2_a100_b6000 (double Temp)
 
STATIC double ga08_oH2_oH2 (double Temp)
 
STATIC double ga08_pH2_He_b6000 (double Temp)
 
STATIC double ga08_pH2_He (double Temp)
 
STATIC double ga08_oH2_He_b6000 (double Temp)
 
STATIC double ga08_oH2_He (double Temp)
 
STATIC double ga08_pH2_p_a10_b1e4 (double Temp)
 
STATIC double ga08_pH2_p (double Temp)
 
STATIC double ga08_oH2_p_a10_b1e4 (double Temp)
 
STATIC double ga08_oH2_p (double Temp)
 
STATIC double ga08_pH2_e_a10_b1000 (double Temp)
 
STATIC double ga08_pH2_e_a1000_b1e4 (double Temp)
 
STATIC double ga08_pH2_e (double Temp)
 
STATIC double ga08_oH2_e_a10_b1e4 (double Temp)
 
STATIC double ga08_oH2_e (double Temp)
 
void eeBremsSpectrum (double Te, vector< realnum > &jnu, vector< double > &knu)
 

Variables

static const bool PRT_DERIV = false
 
static const double EPS = 0.01
 
static const double aI [11][11]
 
static const double bI [11]
 
static const double aII [9][3]
 
static const double bII [9][2]
 
static const double cII [7][5]
 
static const double Gf1 [3][5]
 
static const double Gf2 [2][5]
 
static const double aIII [9][3]
 
static const double bIII [9][2]
 

Macro Definition Documentation

◆ N21CM_TE

#define N21CM_TE   16

Referenced by CoolHyperfine().

Function Documentation

◆ CoolEvaluate()

◆ CoolH2_GA08()

◆ CoolHyperfine()

◆ eeBremsCooling()

STATIC double eeBremsCooling ( double Te,
double eden )

References aII, aIII, bI, bII, bIII, cII, DEBUG_ENTRY, Gf1, Gf2, pow(), pow2, powpq(), and STATIC.

Referenced by CoolEvaluate().

Here is the call graph for this function:

◆ eeBremsSpectrum()

void eeBremsSpectrum ( double Te,
vector< realnum > & jnu,
vector< double > & knu )

References aI, aII, aIII, bII, bIII, cII, DEBUG_ENTRY, e1_scaled(), fp_equal(), max(), min(), phycon, pow(), pow2, pow3, powpq(), avx_ptr< T, lgBC >::ptr0(), rfield, vexp(), vexpm1(), vlog10(), x1, and x2.

Referenced by OpacityAddTotal().

Here is the call graph for this function:

◆ fndneg()

STATIC void fndneg ( void )

References DEBUG_ENTRY, EPS, fprintf(), ioQQQ, STATIC, and thermal.

Referenced by CoolEvaluate().

Here is the call graph for this function:

◆ fndstr()

STATIC void fndstr ( double tot,
double dc )

References ASSERT, coolpr(), DEBUG_ENTRY, dense, EPS, fprintf(), ioQQQ, NCOLNT_LAB_LEN, nzone, phycon, STATIC, thermal, and trace.

Referenced by CoolEvaluate().

Here is the call graph for this function:

◆ ga08_oH2_e()

STATIC double ga08_oH2_e ( double Temp)

References DEBUG_ENTRY, dsexp(), ga08_oH2_e_a10_b1e4(), pow(), and STATIC.

Referenced by CoolH2_GA08().

Here is the call graph for this function:

◆ ga08_oH2_e_a10_b1e4()

STATIC double ga08_oH2_e_a10_b1e4 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_oH2_e().

Here is the call graph for this function:

◆ ga08_oH2_H()

STATIC double ga08_oH2_H ( double Temp)

References DEBUG_ENTRY, ga08_oH2_H_b100(), ga08_oH2_H_b1000(), ga08_oH2_H_b6000(), ga08_oH2_H_stitch_100(), ga08_oH2_H_stitch_1000(), pow(), and STATIC.

Referenced by CoolH2_GA08().

Here is the call graph for this function:

◆ ga08_oH2_H_b100()

STATIC double ga08_oH2_H_b100 ( double Temp)

References DEBUG_ENTRY, dsexp(), pow(), and STATIC.

Referenced by ga08_oH2_H(), and ga08_oH2_H_stitch_100().

Here is the call graph for this function:

◆ ga08_oH2_H_b1000()

STATIC double ga08_oH2_H_b1000 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_oH2_H(), ga08_oH2_H_stitch_100(), and ga08_oH2_H_stitch_1000().

Here is the call graph for this function:

◆ ga08_oH2_H_b6000()

STATIC double ga08_oH2_H_b6000 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_oH2_H(), and ga08_oH2_H_stitch_1000().

Here is the call graph for this function:

◆ ga08_oH2_H_stitch_100()

STATIC double ga08_oH2_H_stitch_100 ( double Temp)

References DEBUG_ENTRY, ga08_oH2_H_b100(), ga08_oH2_H_b1000(), and STATIC.

Referenced by ga08_oH2_H().

Here is the call graph for this function:

◆ ga08_oH2_H_stitch_1000()

STATIC double ga08_oH2_H_stitch_1000 ( double Temp)

References DEBUG_ENTRY, ga08_oH2_H_b1000(), ga08_oH2_H_b6000(), and STATIC.

Referenced by ga08_oH2_H().

Here is the call graph for this function:

◆ ga08_oH2_He()

STATIC double ga08_oH2_He ( double Temp)

References DEBUG_ENTRY, ga08_oH2_He_b6000(), pow(), and STATIC.

Referenced by CoolH2_GA08().

Here is the call graph for this function:

◆ ga08_oH2_He_b6000()

STATIC double ga08_oH2_He_b6000 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_oH2_He().

Here is the call graph for this function:

◆ ga08_oH2_oH2()

STATIC double ga08_oH2_oH2 ( double Temp)

References DEBUG_ENTRY, ga08_oH2_oH2_a100_b6000(), pow(), and STATIC.

Referenced by CoolH2_GA08().

Here is the call graph for this function:

◆ ga08_oH2_oH2_a100_b6000()

STATIC double ga08_oH2_oH2_a100_b6000 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_oH2_oH2().

Here is the call graph for this function:

◆ ga08_oH2_p()

STATIC double ga08_oH2_p ( double Temp)

References DEBUG_ENTRY, ga08_oH2_p_a10_b1e4(), pow(), and STATIC.

Referenced by CoolH2_GA08().

Here is the call graph for this function:

◆ ga08_oH2_p_a10_b1e4()

STATIC double ga08_oH2_p_a10_b1e4 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_oH2_p().

Here is the call graph for this function:

◆ ga08_oH2_pH2()

STATIC double ga08_oH2_pH2 ( double Temp)

References DEBUG_ENTRY, ga08_oH2_pH2_a100_b6000(), pow(), and STATIC.

Referenced by CoolH2_GA08().

Here is the call graph for this function:

◆ ga08_oH2_pH2_a100_b6000()

STATIC double ga08_oH2_pH2_a100_b6000 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_oH2_pH2().

Here is the call graph for this function:

◆ ga08_pH2_e()

STATIC double ga08_pH2_e ( double Temp)

References DEBUG_ENTRY, dsexp(), ga08_pH2_e_a1000_b1e4(), ga08_pH2_e_a10_b1000(), pow(), and STATIC.

Referenced by CoolH2_GA08().

Here is the call graph for this function:

◆ ga08_pH2_e_a1000_b1e4()

STATIC double ga08_pH2_e_a1000_b1e4 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_pH2_e().

Here is the call graph for this function:

◆ ga08_pH2_e_a10_b1000()

STATIC double ga08_pH2_e_a10_b1000 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_pH2_e().

Here is the call graph for this function:

◆ ga08_pH2_H()

STATIC double ga08_pH2_H ( double Temp)

References DEBUG_ENTRY, ga08_pH2_H_b100(), ga08_pH2_H_b1000(), ga08_pH2_H_b6000(), ga08_pH2_H_stitch_100(), pow(), and STATIC.

Referenced by CoolH2_GA08().

Here is the call graph for this function:

◆ ga08_pH2_H_b100()

STATIC double ga08_pH2_H_b100 ( double Temp)

References DEBUG_ENTRY, dsexp(), pow(), and STATIC.

Referenced by ga08_pH2_H(), and ga08_pH2_H_stitch_100().

Here is the call graph for this function:

◆ ga08_pH2_H_b1000()

STATIC double ga08_pH2_H_b1000 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_pH2_H(), and ga08_pH2_H_stitch_100().

Here is the call graph for this function:

◆ ga08_pH2_H_b6000()

STATIC double ga08_pH2_H_b6000 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_pH2_H().

Here is the call graph for this function:

◆ ga08_pH2_H_stitch_100()

STATIC double ga08_pH2_H_stitch_100 ( double Temp)

References DEBUG_ENTRY, ga08_pH2_H_b100(), ga08_pH2_H_b1000(), and STATIC.

Referenced by ga08_pH2_H().

Here is the call graph for this function:

◆ ga08_pH2_He()

STATIC double ga08_pH2_He ( double Temp)

References DEBUG_ENTRY, ga08_pH2_He_b6000(), pow(), and STATIC.

Referenced by CoolH2_GA08().

Here is the call graph for this function:

◆ ga08_pH2_He_b6000()

STATIC double ga08_pH2_He_b6000 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_pH2_He().

Here is the call graph for this function:

◆ ga08_pH2_oH2()

STATIC double ga08_pH2_oH2 ( double Temp)

References DEBUG_ENTRY, ga08_pH2_oH2_a100_b6000(), pow(), and STATIC.

Referenced by CoolH2_GA08().

Here is the call graph for this function:

◆ ga08_pH2_oH2_a100_b6000()

STATIC double ga08_pH2_oH2_a100_b6000 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_pH2_oH2().

Here is the call graph for this function:

◆ ga08_pH2_p()

STATIC double ga08_pH2_p ( double Temp)

References DEBUG_ENTRY, ga08_pH2_p_a10_b1e4(), pow(), and STATIC.

Referenced by CoolH2_GA08().

Here is the call graph for this function:

◆ ga08_pH2_p_a10_b1e4()

STATIC double ga08_pH2_p_a10_b1e4 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_pH2_p().

Here is the call graph for this function:

◆ ga08_pH2_pH2()

STATIC double ga08_pH2_pH2 ( double Temp)

References DEBUG_ENTRY, ga08_pH2_pH2_a100_b6000(), pow(), and STATIC.

Referenced by CoolH2_GA08().

Here is the call graph for this function:

◆ ga08_pH2_pH2_a100_b6000()

STATIC double ga08_pH2_pH2_a100_b6000 ( double Temp)

References DEBUG_ENTRY, ga08_sum(), and STATIC.

Referenced by ga08_pH2_pH2().

Here is the call graph for this function:

◆ ga08_sum()

Variable Documentation

◆ aI

const double aI[11][11]
static
Initial value:
= {
{ 3.15847e+00,-2.52430e+00, 4.04877e-01, 6.13466e-01, 6.28867e-01, 3.29441e-01,
-1.71486e-01,-3.68685e-01,-7.59200e-02, 1.60187e-01, 8.37729e-02 },
{ 2.46819e-02, 1.03924e-01, 1.98935e-01, 2.18843e-01, 1.20482e-01,-4.82390e-02,
-1.20811e-01,-4.46133e-04, 8.88749e-02, 2.50320e-02,-1.28900e-02 },
{ -2.11118e-02,-8.53821e-02,-1.52444e-01,-1.45660e-01,-4.63705e-02, 8.16592e-02,
9.87296e-02,-3.24743e-02,-8.82637e-02,-7.52221e-03, 1.99419e-02 },
{ 1.24009e-02, 4.73623e-02, 7.51656e-02, 5.07201e-02,-2.25247e-02,-8.17151e-02,
-4.59297e-02, 5.05096e-02, 5.58818e-02,-9.11885e-03,-1.71348e-02 },
{ -5.41633e-03,-1.91406e-02,-2.58034e-02,-2.23048e-03, 5.07325e-02, 5.94414e-02,
-2.11247e-02,-5.05387e-02, 9.20453e-03, 1.67321e-02,-3.47663e-03 },
{ 1.70070e-03, 5.39773e-03, 4.13361e-03,-1.14273e-02,-3.23280e-02,-2.19399e-02,
1.76310e-02, 2.23352e-02,-4.59817e-03,-8.24286e-03,-3.90032e-04 },
{ -3.05111e-04,-7.26681e-04, 4.67015e-03, 1.24789e-02,-1.16976e-02,-1.13488e-02,
6.31446e-02, 1.33830e-02,-8.54735e-02,-6.47349e-03, 3.72266e-02 },
{ -1.21721e-04,-7.47266e-04,-2.20675e-03,-2.74351e-03,-1.00402e-03,-2.38863e-03,
-2.28987e-03, 7.79323e-03, 7.98332e-03,-3.80435e-03,-4.25035e-03 },
{ 1.77611e-04, 8.73517e-04,-2.67582e-03,-4.57871e-03, 2.96622e-02, 1.89850e-02,
-8.84093e-02,-2.93629e-02, 1.02966e-01, 1.38957e-02,-4.22093e-02 },
{ -2.05480e-05,-6.92284e-05, 2.95254e-05,-1.70374e-04,-5.43191e-04, 2.50978e-03,
4.45570e-03,-2.80083e-03,-5.68093e-03, 1.10618e-03, 2.33625e-03 },
{ -3.58754e-05,-1.80305e-04, 1.40751e-03, 2.06757e-03,-1.23098e-02,-8.81767e-03,
3.46210e-02, 1.23727e-02,-4.04801e-02,-5.68689e-03, 1.66733e-02 }
}

Referenced by eeBremsSpectrum().

◆ aII

const double aII[9][3]
static
Initial value:
= {
{ -3.7369800e+01,-9.3647000e+00, 9.2170000e-01 },
{ 3.8036590e+02, 9.5918600e+01,-1.3498800e+01 },
{ -1.4898014e+03,-3.9701720e+02, 7.6453900e+01 },
{ 2.8614150e+03, 8.4293760e+02,-2.1783010e+02 },
{ -2.3263704e+03,-9.0730760e+02, 3.2097530e+02 },
{ -6.9161180e+02, 3.0688020e+02,-1.8806670e+02 },
{ 2.8537893e+03, 2.9129830e+02,-8.2416100e+01 },
{ -2.0407952e+03,-2.9902530e+02, 1.6371910e+02 },
{ 4.9259810e+02, 7.6346100e+01,-6.0024800e+01 }
}

Referenced by eeBremsCooling(), and eeBremsSpectrum().

◆ aIII

const double aIII[9][3]
static
Initial value:
= {
{ 5.2163300e+01, 4.9713900e+01, 6.4751200e+01 },
{ -2.5703130e+02,-1.8977460e+02,-2.1389560e+02 },
{ 4.4681610e+02, 2.7102980e+02, 1.7414320e+02 },
{ -2.9305850e+02,-2.6978070e+02, 1.3650880e+02 },
{ 0.0000000e+00, 4.2048120e+02,-2.7148990e+02 },
{ 7.7047400e+01,-5.7662470e+02, 8.9321000e+01 },
{ -2.3871800e+01, 4.3277900e+02, 5.8258400e+01 },
{ 0.0000000e+00,-1.6053650e+02,-4.6080700e+01 },
{ 1.9970000e-01, 2.3392500e+01, 8.7301000e+00 }
}

Referenced by eeBremsCooling(), and eeBremsSpectrum().

◆ bI

const double bI[11]
static
Initial value:
= {
2.21564e+00, 1.83879e-01, -1.33575e-01, 5.89871e-02, -1.45904e-02, -7.10244e-04,
2.80940e-03, -1.70485e-03, 5.26075e-04, 9.94159e-05, -1.06851e-04
}

Referenced by eeBremsCooling().

◆ bII

const double bII[9][2]
static
Initial value:
= {
{ -1.1628100e+01,-8.6991000e+00 },
{ 1.2560660e+02, 6.3383000e+01 },
{ -5.3274890e+02,-1.2889390e+02 },
{ 1.1423873e+03,-1.3503120e+02 },
{ -1.1568545e+03, 9.7758380e+02 },
{ 7.5010200e+01,-1.6499529e+03 },
{ 9.9681140e+02, 1.2586812e+03 },
{ -8.8818950e+02,-4.0474610e+02 },
{ 2.5013860e+02, 2.7335400e+01 }
}

Referenced by eeBremsCooling(), and eeBremsSpectrum().

◆ bIII

const double bIII[9][2]
static
Initial value:
= {
{ -8.5862000e+00, 3.7643220e+02 },
{ 3.4134800e+01,-1.2233635e+03 },
{ -1.1632870e+02, 6.2867870e+02 },
{ 2.9654510e+02, 2.2373946e+03 },
{ -3.9342070e+02,-3.8288387e+03 },
{ 2.3754970e+02, 2.1217933e+03 },
{ -3.0600000e+01,-5.5166700e+01 },
{ -2.7617000e+01,-3.4943210e+02 },
{ 8.8453000e+00, 9.2205900e+01 }
}

Referenced by eeBremsCooling(), and eeBremsSpectrum().

◆ cII

const double cII[7][5]
static
Initial value:
= {
{ -5.7752000e+00, 3.0558600e+01,-5.4327200e+01, 3.6262500e+01,-8.4082000e+00 },
{ 4.6209700e+01,-2.4821770e+02, 4.5096760e+02,-3.1009720e+02, 7.4792500e+01 },
{ -1.6072800e+02, 8.7419640e+02,-1.6165987e+03, 1.1380531e+03,-2.8295400e+02 },
{ 3.0500700e+02,-1.6769028e+03, 3.1481061e+03,-2.2608347e+03, 5.7639300e+02 },
{ -3.2954200e+02, 1.8288677e+03,-3.4783930e+03, 2.5419361e+03,-6.6193900e+02 },
{ 1.9107700e+02,-1.0689366e+03, 2.0556693e+03,-1.5252058e+03, 4.0429300e+02 },
{ -4.6271800e+01, 2.6056560e+02,-5.0567890e+02, 3.8008520e+02,-1.0223300e+02 }
}

Referenced by eeBremsCooling(), and eeBremsSpectrum().

◆ EPS

const double EPS = 0.01
static

◆ Gf1

const double Gf1[3][5]
static
Initial value:
= {
{ 9.0640248e-01, 8.8891357e-01, 8.8622693e-01, 8.9657428e-01, 9.1906253e-01 },
{ 1.1330031e+00, 1.2222562e+00, 1.3293404e+00, 1.4569332e+00, 1.6083594e+00 },
{ 2.5492570e+00, 2.9028584e+00, 3.3233510e+00, 3.8244497e+00, 4.4229884e+00 }
}

Referenced by eeBremsCooling().

◆ Gf2

const double Gf2[2][5]
static
Initial value:
= {
{ 7.2512198e-01, 6.4648260e-01, 5.9081795e-01, 5.5173802e-01, 5.2517859e-01 },
{ 5.0355693e-01, 5.1463417e-01, 5.3173616e-01, 5.5502217e-01, 5.8485797e-01 }
}

Referenced by eeBremsCooling().

◆ PRT_DERIV

const bool PRT_DERIV = false
static