Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
thermal.h
Go to the documentation of this file.
1/* This file is part of Cloudy and is copyright (C)1978-2025 by Gary J. Ferland and
2 * others. For conditions of distribution and use see copyright notice in license.txt */
3
4#ifndef THERMAL_H_
5#define THERMAL_H_
6
7/* thermal.h */
8
9#include "module.h"
10#include "depth_table.h"
11
12#define NCOLNT 10000L
13
16void TempChange(
17 double TempNew ,
18 /* option to force update of all variables */
19 bool lgForceUpdate);
20
24void TempChange(
25 double TempNew );
26
27class t_thermal : public module
28{
29public:
30 const char *chName() const
31 {
32 return "thermal";
33 }
34
35 void zero();
37
41
45
51
57
60
64 long int nUnstable;
66
70
73
78
80 bool lgTLaw;
81
89
93
97
104 double cooling[NCOLNT],
106 long int ncltot;
107# define NCOLNT_LAB_LEN 15
109
110 /* element coolants, the last one is molecular */
111 double elementcool[LIMELM + 1];
112 /* heavy element collisional ionization cooling
113 * zero with CoolHeavy.colmet, add to element cooling
114 * at cool_save.cpp */
116
117 /* cooling due to level 2 lines */
118 double dima;
119
123
128
130 double totcol,
137
139 double dCooldT;
140
142 double tsq1,
144
148 double te_update;
149
154
160
163 long int ipMaxExtra;
164
167
169 double htot,
170
173
176
179
182private:
185public:
186 double heating( long nelem, long ion )
187 {
188 return m_heating[nelem][ion];
189 }
190 void setHeating( long nelem, long ion, double heating )
191 {
192 m_heating[nelem][ion] = heating;
193 }
194 void AddHeating( long nelem, long ion, double heating )
195 {
196 m_heating[nelem][ion] += heating;
197 }
198};
199extern t_thermal thermal;
200
202{
204 double HeatNet;
208 double HeatHiEnr;
209};
210
211#endif /* THERMAL_H_ */
const int LIMELM
Definition cddefines.h:318
float realnum
Definition cddefines.h:127
Definition depth_table.h:8
module()
Definition module.h:29
Definition thermal.h:28
double heatl
Definition thermal.h:134
double m_heating[LIMELM][LIMELM]
Definition thermal.h:184
double heating(long nelem, long ion)
Definition thermal.h:186
double FreeFreeTotHeat
Definition thermal.h:178
realnum collam[NCOLNT]
Definition thermal.h:103
void comment(t_warnings &)
Definition thermal.h:36
double char_tran_heat
Definition thermal.h:166
long int nUnstable
Definition thermal.h:64
realnum thist
Definition thermal.h:68
void setHeating(long nelem, long ion, double heating)
Definition thermal.h:190
bool lgCoolEvalOK
Definition thermal.h:159
void AddHeating(long nelem, long ion, double heating)
Definition thermal.h:194
double dima
Definition thermal.h:118
double heatnt[NCOLNT]
Definition thermal.h:105
realnum HeatLineMax
Definition thermal.h:181
double tsq1
Definition thermal.h:142
bool lgCExtraOn
Definition thermal.h:151
double dHeatdT
Definition thermal.h:175
realnum ConstGrainTemp
Definition thermal.h:59
realnum T0SN99
Definition thermal.h:91
bool lgTLaw
Definition thermal.h:80
double ctot
Definition thermal.h:132
realnum wlCoolHeatMax
Definition thermal.h:126
double dCooldT
Definition thermal.h:139
bool lgTeHigh
Definition thermal.h:72
bool lgTeSN99
Definition thermal.h:92
double htot
Definition thermal.h:169
DepthTable tlaw
Definition thermal.h:95
const char * chName() const
Definition thermal.h:30
bool lgTeTLaw
Definition thermal.h:96
bool lgTeBD96
Definition thermal.h:84
double char_tran_cool
Definition thermal.h:166
bool lgTemperatureConstantCommandParsed
Definition thermal.h:50
realnum cextpw
Definition thermal.h:153
bool lgPredNextTe
Definition thermal.h:40
double heavycollcool[LIMELM]
Definition thermal.h:115
realnum CoolHeatMax
Definition thermal.h:125
bool lgEdnGTcm
Definition thermal.h:77
double coolheat
Definition thermal.h:136
realnum CoolExtra
Definition thermal.h:152
double power
Definition thermal.h:172
realnum GBarMax
Definition thermal.h:162
char chClntLab[NCOLNT][NCOLNT_LAB_LEN+1]
Definition thermal.h:108
bool lgTemperatureConstant
Definition thermal.h:44
void zero()
Definition thermal.cpp:8
realnum SigmaBD96
Definition thermal.h:88
long int ipMaxExtra
Definition thermal.h:163
double totcol
Definition thermal.h:130
char chCoolHeatMax[NCOLNT_LAB_LEN+1]
Definition thermal.h:127
double elementcool[LIMELM+1]
Definition thermal.h:111
double halfte
Definition thermal.h:143
long int ncltot
Definition thermal.h:106
double cooling[NCOLNT]
Definition thermal.h:104
bool lgCNegChk
Definition thermal.h:122
realnum ConstTemp
Definition thermal.h:56
realnum tlowst
Definition thermal.h:69
realnum T0BD96
Definition thermal.h:86
bool lgUnstable
Definition thermal.h:65
double te_update
Definition thermal.h:148
Definition warnings.h:11
Definition thermal.h:202
double HeatNet
Definition thermal.h:204
double HeatHiEnr
Definition thermal.h:208
double HeatLowEnr
Definition thermal.h:206
t_thermal thermal
Definition thermal.cpp:6
void TempChange(double TempNew, bool lgForceUpdate)
Definition temp_change.cpp:31
#define NCOLNT_LAB_LEN
Definition thermal.h:107
#define NCOLNT
Definition thermal.h:12