Cloudy
Spectral Synthesis Code for Astrophysics
|
#include <dynamics.h>
Public Member Functions | |
const char * | chName () const |
void | zero () |
void | comment (t_warnings &) |
bool | isInitialRelaxIteration (long int iteration) |
isInitialRelaxIteration - Check if initial iteration More... | |
bool | doNonEquilibriumSolve (long int iteration) |
double | Cool () |
double | Heat () |
double | dCooldT () |
Public Member Functions inherited from module | |
module () | |
virtual | ~module () |
Public Attributes | |
bool | lgAdvection |
double | Cool_r |
double | Heat_v |
double | dHeatdT |
double | CoolMax |
double | HeatMax |
double | Rate |
multi_arr< double, 2 > | Source |
multi_arr< double, 3 > | StatesElem |
vector< double > | molecules |
bool | lgISO [NISO] |
bool | lgMETALS |
bool | lgCoolHeat |
bool | lg_coronal_time_init |
bool | lgTimeDependentStatic |
double | time_elapsed |
bool | lgRecom |
bool | lgStatic_completed |
double | AdvecLengthInit |
double | FluxCenter |
char | chPresMode [20] |
double | ShockDepth |
double | ShockMach |
long int | n_initial_relax |
double | FluxScale |
bool | lgFluxDScale |
double | FluxIndex |
double | dRad |
double | oldFullDepth |
double | convergence_error |
double | convergence_tolerance |
double | discretization_error |
double | error_scale1 |
double | error_scale2 |
bool | lgSetPresMode |
realnum | Upstream_density |
realnum | DivergePresInteg |
bool | lgEquilibrium |
bool | lgTracePrint |
double | timestep_init |
double | timestep |
double | timestep_stop |
double | timestep_factor |
all of these are initialized in zero
|
inlinevirtual |
Implements module.
|
inlinevirtual |
Implements module.
double t_dynamics::Cool | ( | ) |
References Cool_r, t_phycon::EnthalpyDensity, Heat_v, MERGE, phycon, and scalingDensity().
Referenced by CoolEvaluate(), CoolSave(), DynaIterEnd(), DynaPrtZone(), DynaSave(), lines_general(), radius_increment(), SaveDo(), and SaveHeat().
double t_dynamics::dCooldT | ( | ) |
References Cool_r, phycon, t_pressure::PresGasCurr, pressure, and t_phycon::te.
Referenced by CoolEvaluate(), and DynaSave().
bool t_dynamics::doNonEquilibriumSolve | ( | long int | iteration | ) |
References ASSERT, DEBUG_ENTRY, lgAdvection, lgEquilibrium, lgTimeDependentStatic, n_initial_relax, and Rate.
Referenced by funjac(), HomogeneousSource(), iso_level(), and mole_eval_dynamic_balance().
double t_dynamics::Heat | ( | ) |
References Cool_r, t_phycon::EnthalpyDensity, Heat_v, MERGE, phycon, and scalingDensity().
Referenced by CoolEvaluate(), CoolSave(), DynaPrtZone(), DynaSave(), lines_general(), radius_increment(), SaveDo(), and SaveHeat().
bool t_dynamics::isInitialRelaxIteration | ( | long int | iteration | ) |
isInitialRelaxIteration - Check if initial iteration
At the beginning of a dynamical run, a number of steady-state iterations are performed to relax the solution before any dynamical solves are done. This method checks if the given iteration
is one of the initial relaxation iterations.
[in] | iteration | iteration number |
bool
true, if initial iteration; else false References DEBUG_ENTRY, and n_initial_relax.
Referenced by ConvInitSolution(), CoolEvaluate(), DynaIonize(), DynaIterEnd(), DynaIterStart(), IterEnd(), Atom_LevelN::operator()(), PrintSpectrum(), and radius_next().
|
virtual |
Implements module.
References AdvecLengthInit, AdvecSpecificEnthalpy, BIGFLOAT, convergence_tolerance, Cool_r, CoolMax, DEBUG_ENTRY, dHeatdT, discretization_error, DivergePresInteg, dRad, error_scale2, FluxCenter, FluxIndex, FluxScale, Heat_v, HeatMax, ipH_LIKE, lgAdvection, lgCoolHeat, lgEquilibrium, lgFluxDScale, lgISO, lgMETALS, lgRecom, lgSetPresMode, lgStatic_completed, lgTimeDependentStatic, n_initial_relax, NISO, nOld_zone, Rate, time_elapsed, timestep_factor, timestep_init, and Upstream_density.
double t_dynamics::AdvecLengthInit |
the initial value of the advection length, reset with set advection length
Referenced by DynaIterEnd(), ParseSet(), and zero().
char t_dynamics::chPresMode[20] |
flag set by the "set dynamics pressure mode" command
Referenced by ParseSet(), PresMode::set(), and stepDensity().
double t_dynamics::convergence_error |
convergence_error and discretization_error give estimates of convergence: :: convergence_error – change between the last iterations; :: discretization_error – error in the upstream interpolation. When (and if) discretization_error >> convergence_error, the interpolation length should be decreased.
They should both be based on the same norm of the models, but what norm may be experimented with – at present, it's H+/Htot just weighted by cell number, which makes the estimates sensitive to the structure of the primary ionization front.
Referenced by ConvIterCheck(), and DynaNewStep().
double t_dynamics::convergence_tolerance |
the allowed rel error, by default 0.1
Referenced by ConvIterCheck(), DynaNewStep(), and zero().
double t_dynamics::Cool_r |
advective cooling minus heating (erg cm^-3 s^-1)
Referenced by Cool(), dCooldT(), DynaIonize(), Heat(), and zero().
double t_dynamics::CoolMax |
largest fraction of cooling and heating
Referenced by IterStart(), lines_general(), PrtComment(), and zero().
double t_dynamics::dHeatdT |
Referenced by CoolEvaluate(), DynaIonize(), and zero().
double t_dynamics::discretization_error |
the error to be expected based on the coarseness of current advection length
Referenced by ConvIterCheck(), DynaIterEnd(), DynaNewStep(), DynaStartZone(), and zero().
realnum t_dynamics::DivergePresInteg |
Referenced by DynaEndZone(), DynaIterEnd(), pressureZone(), stepDensity(), and zero().
double t_dynamics::dRad |
the proposed thickness for the next zone when advection is included
Referenced by DynaStartZone(), radius_next(), and zero().
double t_dynamics::error_scale1 |
two ways of scaling the error estimate for convergence
Referenced by DynaNewStep().
double t_dynamics::error_scale2 |
Referenced by ConvIterCheck(), DynaIterEnd(), DynaNewStep(), DynaStartZone(), and zero().
double t_dynamics::FluxCenter |
the center of the particle flux law
Referenced by DynaFlux(), ParseDynaWind(), and zero().
double t_dynamics::FluxIndex |
the power law index of the particle flux law
Referenced by DynaFlux(), ParseDynaWind(), and zero().
double t_dynamics::FluxScale |
the scale of the particle flux law
Referenced by DynaFlux(), ParseDynaWind(), and zero().
double t_dynamics::Heat_v |
Referenced by Cool(), DynaIonize(), Heat(), and zero().
double t_dynamics::HeatMax |
Referenced by IterStart(), lines_general(), PrtComment(), and zero().
bool t_dynamics::lg_coronal_time_init |
var set with coronal time init - says to use constant temperature on first relax iterations then let temp run free
Referenced by DynaIterEnd(), InitDefaultsPreparse(), and ParseCoronal().
bool t_dynamics::lgAdvection |
is advection turned on ?, set to false in zero
Referenced by AbundChange(), advection_set_default(), ConvBase(), ConvIterCheck(), doNonEquilibriumSolve(), HomogeneousSource(), ion_trim2(), IterRestart(), IterStart(), Atom_LevelN::operator()(), PrintRates(), PrtZone(), radius_next(), zero(), ZoneEnd(), and ZoneStart().
bool t_dynamics::lgCoolHeat |
factor to turn off advective cooling
Referenced by DynaIonize(), ParseDont(), and zero().
bool t_dynamics::lgEquilibrium |
Enforce equilibrium populations
Referenced by doNonEquilibriumSolve(), ParseSet(), and zero().
bool t_dynamics::lgFluxDScale |
whether we also need to scale by the face density
Referenced by DynaFlux(), ParseDynaWind(), and zero().
bool t_dynamics::lgISO[NISO] |
factor to turn off advection for H-like or He-like iso seq, no advection h-like, he-like
Referenced by iso_level(), ParseDont(), PresTotCurrent(), and zero().
bool t_dynamics::lgMETALS |
factor to turn off advection for rest of ions, "no advection metals"
Referenced by ParseDont(), PresTotCurrent(), and zero().
bool t_dynamics::lgRecom |
true if recombination logic in place
Referenced by DynaIterEnd(), DynaIterStart(), lgNeedTimestep(), ParseCoronal(), PrtComment(), radius_next(), timestep_next(), and zero().
bool t_dynamics::lgSetPresMode |
flag set true if set dynamics flow type was set - this means to use the specified option, and not to derive one
Referenced by ParseSet(), PresMode::set(), and zero().
bool t_dynamics::lgStatic_completed |
true if model ends since time dependent model is finished
Referenced by cloudy(), DynaIterEnd(), DynaIterStart(), SaveDo(), and zero().
bool t_dynamics::lgTimeDependentStatic |
set true if time dependent static simulation
Referenced by check_grid_file(), ConserveEnergy(), ConvBase(), ConvInitSolution(), CoolEvaluate(), doNonEquilibriumSolve(), DynaIonize(), DynaIterEnd(), HomogeneousSource(), ion_trim2(), IterEnd(), IterRestart(), IterStart(), lgNeedTimestep(), Atom_LevelN::operator()(), ParseCoronal(), ParseDynaTime(), PresTotCurrent(), PrintRates(), PrtComment(), PrtZone(), radius_first(), radius_next(), SaveDo(), zero(), ZoneEnd(), and ZoneStart().
bool t_dynamics::lgTracePrint |
Referenced by DynaEndZone(), DynaIonize(), DynaIterEnd(), DynaStartZone(), InitDefaultsPreparse(), ParseCoronal(), ParseDynaTime(), ParseDynaWind(), and stepDensity().
vector<double> t_dynamics::molecules |
save molecular network densities
Referenced by DynaCreateArrays(), DynaIonize(), and mole_eval_dynamic_balance().
long int t_dynamics::n_initial_relax |
set how many iterations we will start with, before allowing changes. This allows the solution to relax to an equilibrium set with "set dynamics relax" command
Referenced by ConvIterCheck(), doNonEquilibriumSolve(), DynaIterEnd(), isInitialRelaxIteration(), ParseSet(), save_DT(), and zero().
double t_dynamics::oldFullDepth |
the depth of the last iteration
Referenced by DynaCreateArrays(), DynaIonize(), and DynaSaveLast().
double t_dynamics::Rate |
the advection rate (s^-1)
Referenced by doNonEquilibriumSolve(), DynaCreateArrays(), DynaIonize(), DynaSave(), DynaStartZone(), funjac(), HomogeneousSource(), iso_level(), mole_eval_dynamic_balance(), PrintRates(), SaveDo(), and zero().
double t_dynamics::ShockDepth |
the shock depth in cm set with "set dynamics shock depth" command
Referenced by ParseSet(), and PresMode::set().
double t_dynamics::ShockMach |
the isothermal Mach number at which to insert an antishock set with "set dynamics antishock Mach" command
Referenced by ParseSet(), and PresMode::set().
multi_arr<double,2> t_dynamics::Source |
the advective recombination rate (cm^-3 s^-1)
Referenced by DynaCreateArrays(), DynaIonize(), DynaSave(), DynaStartZone(), HomogeneousSource(), ion_trim2(), iso_level(), mole_eval_dynamic_balance(), PrintRates(), and SaveDo().
multi_arr<double,3> t_dynamics::StatesElem |
the advective isolevel balance terms
Referenced by DynaCreateArrays(), DynaIonize(), and iso_level().
double t_dynamics::time_elapsed |
elapsed time in time dependent static model
Referenced by ConvInitSolution(), DynaIterEnd(), DynaIterStart(), DynaPunchTimeDep(), IterEnd(), matchGeneric(), save_DT(), SaveDo(), and zero().
double t_dynamics::timestep |
double t_dynamics::timestep_factor |
Referenced by DynaIterEnd(), and zero().
double t_dynamics::timestep_init |
Referenced by InitDynaTimestep(), lgNeedTimestep(), ParseDynaTime(), timestep_next(), and zero().
double t_dynamics::timestep_stop |
Referenced by DynaIterEnd(), and ParseDynaTime().
realnum t_dynamics::Upstream_density |
Upstream density
Referenced by CoolEvaluate(), DynaStartZone(), and zero().