Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
dynamics.h
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2023 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 
4 #ifndef DYNAMICS_H_
5 #define DYNAMICS_H_
6 
7 #include "module.h"
8 #include "container_classes.h"
9 
11 void DynaIterStart(void);
12 
14 void DynaIterEnd(void);
15 
17 void DynaStartZone(void);
18 
20 void DynaEndZone(void);
21 
23 void DynaIonize(void);
24 
26 void DynaCreateArrays( void );
27 
31 class Parser;
32 void ParseDynaWind( Parser &p );
33 
37 void ParseDynaTime( Parser &p );
38 
40 void DynaPrtZone( void );
41 
46 void DynaSave(FILE* ipPnunit , char chJob );
47 
52 void DynaPunchTimeDep( FILE* ipPnunit , const char *chJob );
53 
54 realnum DynaFlux(double depth);
55 
57 struct t_dynamics : public module
58 {
59  const char *chName() const
60  {
61  return "dynamics";
62  }
63  void zero();
64  void comment(t_warnings&) {}
65 
77  bool isInitialRelaxIteration( long int iteration );
78 
79  bool doNonEquilibriumSolve( long int iteration );
80 
81 
84 
86  double Cool_r, Heat_v, dHeatdT;
87 
88  double Cool(), Heat(), dCooldT();
89 
91  double CoolMax, HeatMax;
92 
94  double Rate;
95 
98 
101 
103  vector<double> molecules;
104 
106  bool lgISO[NISO];
107 
109  bool lgMETALS;
110 
113 
117 
120 
122  double time_elapsed;
123 
125  bool lgRecom;
126 
129 
132 
134  double FluxCenter;
135 
137  char chPresMode[20];
138 
140  double ShockDepth;
141 
144  double ShockMach;
145 
149  long int n_initial_relax;
150 
152  double FluxScale;
153 
156 
158  double FluxIndex;
159 
161  double dRad;
162 
164  double oldFullDepth;
165 
175  /* the error from comparing this iteration with the previous one */
177 
180 
183 
186 
190 
193 
195 
198 
199  /* set true with trace option on time command */
201 
202  /* initial timestep (seconds) read off time command,
203  * each iteration accounts for this much time */
205  timestep,
208 };
209 extern t_dynamics dynamics;
210 
211 #endif /* DYNAMICS_H_ */
Definition: warnings.h:11
double FluxCenter
Definition: dynamics.h:134
double Cool()
Definition: dynamics.cpp:2252
double convergence_tolerance
Definition: dynamics.h:179
multi_arr< double, 3 > StatesElem
Definition: dynamics.h:100
vector< double > molecules
Definition: dynamics.h:103
const int NISO
Definition: cddefines.h:321
bool lgFluxDScale
Definition: dynamics.h:155
char chPresMode[20]
Definition: dynamics.h:137
void DynaStartZone(void)
Definition: dynamics.cpp:512
bool lgMETALS
Definition: dynamics.h:109
bool lgAdvection
Definition: dynamics.h:83
bool lgTimeDependentStatic
Definition: dynamics.h:119
bool lgTracePrint
Definition: dynamics.h:200
double ShockMach
Definition: dynamics.h:144
void DynaIterEnd(void)
Definition: dynamics.cpp:988
void DynaEndZone(void)
Definition: dynamics.cpp:967
Definition: parser.h:41
bool lgISO[NISO]
Definition: dynamics.h:106
double FluxScale
Definition: dynamics.h:152
bool lgStatic_completed
Definition: dynamics.h:128
void ParseDynaWind(Parser &p)
Definition: dynamics.cpp:1863
realnum DynaFlux(double depth)
Definition: dynamics.cpp:1423
double error_scale2
Definition: dynamics.h:185
double Heat_v
Definition: dynamics.h:86
void DynaPrtZone(void)
Definition: dynamics.cpp:2074
double Heat()
Definition: dynamics.cpp:2238
long int iteration
Definition: cddefines.cpp:15
double timestep_stop
Definition: dynamics.h:204
void zero()
Definition: dynamics.cpp:1451
void DynaCreateArrays(void)
Definition: dynamics.cpp:1531
void DynaPunchTimeDep(FILE *ipPnunit, const char *chJob)
Definition: dynamics.cpp:2104
void DynaIterStart(void)
Definition: dynamics.cpp:2272
double timestep
Definition: dynamics.h:204
bool doNonEquilibriumSolve(long int iteration)
Definition: dynamics.cpp:57
float realnum
Definition: cddefines.h:127
double dHeatdT
Definition: dynamics.h:86
void DynaIonize(void)
Definition: dynamics.cpp:295
Definition: dynamics.h:57
bool lgEquilibrium
Definition: dynamics.h:197
double discretization_error
Definition: dynamics.h:182
void comment(t_warnings &)
Definition: dynamics.h:64
double dRad
Definition: dynamics.h:161
double CoolMax
Definition: dynamics.h:91
double Cool_r
Definition: dynamics.h:86
double timestep_init
Definition: dynamics.h:204
bool lgSetPresMode
Definition: dynamics.h:189
double error_scale1
Definition: dynamics.h:185
double Rate
Definition: dynamics.h:94
const char * chName() const
Definition: dynamics.h:59
void ParseDynaTime(Parser &p)
Definition: dynamics.cpp:1716
double AdvecLengthInit
Definition: dynamics.h:131
double dCooldT()
Definition: dynamics.cpp:2267
bool lgCoolHeat
Definition: dynamics.h:112
multi_arr< double, 2 > Source
Definition: dynamics.h:97
bool lgRecom
Definition: dynamics.h:125
double ShockDepth
Definition: dynamics.h:140
void DynaSave(FILE *ipPnunit, char chJob)
Definition: dynamics.cpp:2213
double time_elapsed
Definition: dynamics.h:122
long int n_initial_relax
Definition: dynamics.h:149
realnum Upstream_density
Definition: dynamics.h:192
double timestep_factor
Definition: dynamics.h:204
double convergence_error
Definition: dynamics.h:176
bool isInitialRelaxIteration(long int iteration)
isInitialRelaxIteration - Check if initial iteration
Definition: dynamics.cpp:48
Definition: module.h:26
double HeatMax
Definition: dynamics.h:91
double oldFullDepth
Definition: dynamics.h:164
bool lg_coronal_time_init
Definition: dynamics.h:116
double FluxIndex
Definition: dynamics.h:158
t_dynamics dynamics
Definition: dynamics.cpp:45
realnum DivergePresInteg
Definition: dynamics.h:194