#include "cddefines.h"
#include "physconst.h"
#include "mole.h"
#include "mole_co_priv.h"
#include "hmi.h"
#include "rfield.h"
#include "dense.h"
#include "ionbal.h"
#include "grainvar.h"
#include "timesc.h"
#include <string.h>
#include <ctype.h>
Go to the source code of this file.
Enumerations | |
enum | spectype { MOLECULE, OTHER } |
enum | molstate { ACTIVE, PASSIVE } |
Functions | |
static void | newelement (const char label[], int ipion, int priority) |
static struct molecule * | newspecies (const char label[7], enum spectype type, enum molstate state, float *location, double frac0) |
static struct chem_element_s * | findelement (const char buf[]) |
static int | isactive (data_u *dat) |
static int | ispassive (data_u *dat) |
static int | isCOnet (data_u *dat) |
void | CO_Init (void) |
struct molecule * | findspecies (const char buf[]) |
struct COmole_rate_s * | CO_findrate_s (const char buf[]) |
double | CO_findrk (const char buf[]) |
double | CO_findrate (const char buf[]) |
void | CO_update_species_cache (void) |
double | CO_sink_rate (const char species[7]) |
void | CO_update_rks (void) |
double | CO_dissoc_rate (const char species[7]) |
double | CO_source_rate (const char species[7]) |
void | CO_punch_mol (FILE *punit, const char species[], char header[], double depth) |
void | CO_zero (void) |
Variables | |
struct chem_element_s ** | chem_element |
struct chem_element_s * | element_list [LIMELM] |
int32 * | ipiv |
float * | tot_ion |
struct mole_priv_s | mole_priv |
struct molecule | null_mole |
enum molstate |
enum spectype |
double CO_dissoc_rate | ( | const char | species[7] | ) |
Definition at line 700 of file mole_co_etc.cpp.
References coreactions, DEBUG_ENTRY, DEBUG_EXIT, findspecies(), molecule::hevmol, t_coreactions::list, t_coreactions::n, COmole_rate_s::nproducts, COmole_rate_s::nrates, COmole_rate_s::photon, COmole_rate_s::products, COmole_rate_s::rate_species, and COmole_rate_s::rk.
double CO_findrate | ( | const char | buf[] | ) |
Definition at line 571 of file mole_co_etc.cpp.
References CO_findrate_s(), DEBUG_ENTRY, DEBUG_EXIT, molecule::hevmol, COmole_rate_s::nrates, COmole_rate_s::rate_species, and COmole_rate_s::rk.
Referenced by CO_solve(), CoolOxyg(), and lines_lv1_li_ne().
struct COmole_rate_s* CO_findrate_s | ( | const char | buf[] | ) | [read] |
Definition at line 538 of file mole_co_etc.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, lookup(), mole_priv, data_u::p, and mole_priv_s::reactab.
Referenced by CO_drive(), CO_findrate(), and CO_findrk().
double CO_findrk | ( | const char | buf[] | ) |
Definition at line 553 of file mole_co_etc.cpp.
References ASSERT, CO_findrate_s(), DEBUG_ENTRY, DEBUG_EXIT, isnan, and COmole_rate_s::rk.
Referenced by hmole_step(), IonIron(), IonMagne(), and PunchDo().
void CO_Init | ( | void | ) |
called from cdInit to initialized co routines
Definition at line 45 of file mole_co_etc.cpp.
References molecule::active, ACTIVE, t_mole::amat, ASSERT, t_mole::b, t_mole::c, co, t_co::co_nzone, COmole, DEBUG_ENTRY, DEBUG_EXIT, dense, t_dense::eden_f, ELECTRON_MASS, mole_priv_s::elemtab, gv, molecule::hevcol, molecule::hevmol, hmi, t_hmi::Hmolec, molecule::index, ipCARBON, ipCHLORINE, ipHELIUM, ipHYDROGEN, ipIRON, ipiv, ipMAGNESIUM, ipMH2g, ipMH2p, ipMH2s, ipMH3p, ipMHm, chem_element_s::ipMl, chem_element_s::ipMlP, ipNITROGEN, ipOXYGEN, ipSILICON, ipSULPHUR, isactive(), isCOnet(), ispassive(), t_co::iteration_co, t_gv::lgDustOn, t_mole::lgElem_in_chemistry, t_mole::lgGrain_mole_deplete, LIMELM, makeplist(), MALLOC, mole, molecule::mole_mass, mole_priv, MOLECULE, molecule::n_nuclei, molecule::nElec, molecule::nelem_hevmol, newelement(), newhash(), newspecies(), null_mole, t_mole::num_comole_calc, t_mole::num_comole_tot, t_mole::num_elements, OTHER, PASSIVE, mole_priv_s::reactab, mole_priv_s::spectab, tot_ion, and t_dense::xIonDense.
Referenced by cloudy().
void CO_punch_mol | ( | FILE * | punit, | |
const char | species[], | |||
char | header[], | |||
double | depth | |||
) |
Definition at line 782 of file mole_co_etc.cpp.
References coreactions, DEBUG_ENTRY, DEBUG_EXIT, findspecies(), molecule::hevmol, COmole_rate_s::label, t_coreactions::list, t_coreactions::n, COmole_rate_s::nproducts, COmole_rate_s::nrates, COmole_rate_s::products, COmole_rate_s::rate_species, and COmole_rate_s::rk.
Referenced by PunchDo().
double CO_sink_rate | ( | const char | species[7] | ) |
Definition at line 619 of file mole_co_etc.cpp.
References coreactions, DEBUG_ENTRY, DEBUG_EXIT, findspecies(), molecule::hevmol, t_coreactions::list, t_coreactions::n, COmole_rate_s::nrates, COmole_rate_s::rate_species, and COmole_rate_s::rk.
double CO_source_rate | ( | const char | species[7] | ) |
Definition at line 742 of file mole_co_etc.cpp.
References coreactions, DEBUG_ENTRY, DEBUG_EXIT, findspecies(), molecule::hevmol, t_coreactions::list, t_coreactions::n, COmole_rate_s::nproducts, COmole_rate_s::nrates, COmole_rate_s::products, COmole_rate_s::rate_species, and COmole_rate_s::rk.
void CO_update_rks | ( | void | ) |
CO_update_rks update rate coefficients, only temp part
Definition at line 680 of file mole_co_etc.cpp.
References COmole_rate_s::a, coreactions, DEBUG_ENTRY, DEBUG_EXIT, COmole_rate_s::fun, t_coreactions::list, t_coreactions::n, and COmole_rate_s::rk.
Referenced by CO_drive(), and ConvBase().
void CO_update_species_cache | ( | void | ) |
Definition at line 594 of file mole_co_etc.cpp.
References ASSERT, COmole, DEBUG_ENTRY, DEBUG_EXIT, dense, t_dense::eden, t_dense::eden_f, molecule::hevmol, isnan, molecule::location, mole, and t_mole::num_comole_tot.
Referenced by CO_drive(), and ConvBase().
void CO_zero | ( | void | ) |
CO_zero allocate + initialize workspace
Definition at line 853 of file mole_co_etc.cpp.
References t_timesc::AgeCOMoleDest, cdEXIT(), COmole, DEBUG_ENTRY, DEBUG_EXIT, molecule::hevcol, molecule::hevmol, ioQQQ, lgFirstCall, MALLOC, mole, t_mole::num_comole_calc, t_mole::num_comole_tot, timesc, and molecule::xMoleFracMax.
Referenced by cloudy(), and CO_drive().
static struct chem_element_s * findelement | ( | const char | buf[] | ) | [static, read] |
Definition at line 522 of file mole_co_etc.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, mole_priv_s::elemtab, lookup(), mole_priv, and data_u::p.
Referenced by newspecies().
struct molecule* findspecies | ( | const char | buf[] | ) | [read] |
Definition at line 506 of file mole_co_etc.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, lookup(), mole_priv, null_mole, data_u::p, and mole_priv_s::spectab.
Referenced by AgeCheck(), cdColm(), CO_dissoc_rate(), CO_drive(), CO_punch_mol(), CO_sink_rate(), CO_solve(), CO_source_rate(), DynaPunchTimeDep(), GrainCollHeating(), HeatSum(), HeLikeLevel(), hmole_step(), iter_end_check(), lgMolecAver(), newreact(), OpacityAddTotal(), prt_smooth_predictions(), PrtZone(), PunchDo(), radius_increment(), and radius_next().
static int isactive | ( | data_u * | dat | ) | [static] |
Definition at line 486 of file mole_co_etc.cpp.
References molecule::active, DEBUG_ENTRY, DEBUG_EXIT, and data_u::p.
Referenced by CO_Init().
static int isCOnet | ( | data_u * | dat | ) | [static] |
static int ispassive | ( | data_u * | dat | ) | [static] |
static void newelement | ( | const char | label[], | |
int | ipion, | |||
int | priority | |||
) | [static] |
Definition at line 304 of file mole_co_etc.cpp.
References addentry(), ASSERT, chem_element_s::chName, DEBUG_ENTRY, DEBUG_EXIT, mole_priv_s::elemtab, chem_element_s::ipCl, chem_element_s::ipMl, chem_element_s::ipMlP, chem_element_s::ipZ, MALLOC, mole_priv, and data_u::p.
Referenced by CO_Init().
static struct molecule * newspecies | ( | const char | label[7], | |
enum spectype | type, | |||
enum molstate | state, | |||
float * | location, | |||
double | frac0 | |||
) | [static, read] |
Definition at line 327 of file mole_co_etc.cpp.
References molecule::active, ACTIVE, addentry(), ASSERT, ATOMIC_MASS_UNIT, t_dense::AtomicWeight, molecule::co_save, DEBUG_ENTRY, DEBUG_EXIT, dense, molecule::Excit, findelement(), chem_element_s::ipCl, ipHYDROGEN, chem_element_s::ipZ, molecule::label, t_mole::lgElem_in_chemistry, molecule::lgGas_Phase, LIMELM, molecule::location, MALLOC, mole, molecule::mole_mass, mole_priv, MOLECULE, molecule::n_nuclei, molecule::nElec, molecule::nElem, molecule::nelem_hevmol, t_mole::num_comole_calc, t_mole::num_comole_tot, t_mole::num_elements, data_u::p, molecule::pdr_mole_co, and mole_priv_s::spectab.
Referenced by CO_Init().
struct chem_element_s** chem_element |
struct chem_element_s* element_list[LIMELM] |
Definition at line 36 of file mole_co_etc.cpp.
int32* ipiv |
Definition at line 37 of file mole_co_etc.cpp.
Referenced by atom_levelN(), atom_pop5(), AtomSeqBeryllium(), CO_Init(), CO_solve(), FeIILevelPops(), HeLikeLevel(), hmole_step(), HydroLevelPop(), ion_solver(), oi_level_pops(), and SanityCheckBegin().
struct mole_priv_s mole_priv |
Definition at line 40 of file mole_co_etc.cpp.
Referenced by CO_create_react(), CO_findrate_s(), CO_Init(), findelement(), findspecies(), newelement(), newreact(), and newspecies().
Definition at line 41 of file mole_co_etc.cpp.
Referenced by CO_Init(), findspecies(), and newreact().
float* tot_ion |