cloudy trunk
|
#include "cdstd.h"
#include <stdlib.h>
#include "cddefines.h"
#include "colden.h"
#include "physconst.h"
#include "mole.h"
#include "version.h"
#include "mole_priv.h"
#include "hmi.h"
#include "conv.h"
#include "dense.h"
#include "thermal.h"
#include "gammas.h"
#include "grainvar.h"
#include "ionbal.h"
#include "opacity.h"
#include "path.h"
#include "radius.h"
#include "atmdat.h"
#include "taulines.h"
#include "trace.h"
#include "deuterium.h"
#include "phycon.h"
#include "doppvel.h"
#include "rfield.h"
#include "secondaries.h"
#include "hextra.h"
#include "rt.h"
#include "iso.h"
#include "h2.h"
Go to the source code of this file.
Macros | |
#define | gzopen(file, mode) |
#define | gzgets(fp, buf, siz) |
#define | gzclose(fp) |
#define | gzFile FILE |
#define | FLTEQ(a, b) |
Enumerations | |
enum | { UDFA = 0 } |
enum | { BUFSIZE =256 } |
Functions | |
STATIC void | newreact (const char label[], const char fun[], double a, double b, double c) |
STATIC long | parse_reaction (count_ptr< mole_reaction > &rate, const char label[]) |
STATIC string | canonicalize_reaction_label (const char label[]) |
STATIC void | canonicalize_reaction (count_ptr< mole_reaction > &rate) |
STATIC void | register_reaction_vectors (count_ptr< mole_reaction > rate) |
STATIC void | mole_check_reverse_reactions (void) |
STATIC double | mole_get_equilibrium_constant (const char buf[]) |
STATIC double | mole_partition_function (const molecule *const sp) |
STATIC void | mole_generate_isotopologue_reactions (string atom_old, string atom_new) |
STATIC void | plot_sparsity (void) |
STATIC bool | lgReactBalance (const count_ptr< mole_reaction > &rate) |
STATIC void | read_data (const char file[], void(*parse)(char *s)) |
STATIC void | parse_base (char *s) |
STATIC void | parse_udfa (char *s) |
STATIC void | compare_udfa (const count_ptr< mole_reaction > &rate) |
double | frac_H2star_hminus (void) |
double | hmirat (double te) |
STATIC void | mole_h2_grain_form (void) |
STATIC void | mole_h_reactions (void) |
void | mole_create_react (void) |
void | mole_cmp_num_in_out_reactions () |
STATIC char * | getcsvfield (char **s, char c) |
void | mole_update_rks (void) |
void | mole_rk_bigchange (void) |
mole_reaction * | mole_findrate_s (const char buf[]) |
void | mole_punch (FILE *punit, const char speciesname[], const char args[], bool lgHeader, bool lgData, double depth) |
Variables | |
static realnum | albedo = 0.5 |
static map< formula_species, struct udfa_reaction_s * > | udfatab |
#define FLTEQ | ( | a, | |
b ) |
Definition at line 2685 of file mole_reactions.cpp.
Referenced by compare_udfa(), and parse_udfa().
#define gzclose | ( | fp | ) |
Definition at line 2621 of file mole_reactions.cpp.
#define gzFile FILE |
Definition at line 2622 of file mole_reactions.cpp.
#define gzgets | ( | fp, | |
buf, | |||
siz ) |
Definition at line 2620 of file mole_reactions.cpp.
#define gzopen | ( | file, | |
mode ) |
Definition at line 2619 of file mole_reactions.cpp.
anonymous enum |
Enumerator | |
---|---|
BUFSIZE |
Definition at line 2625 of file mole_reactions.cpp.
anonymous enum |
Enumerator | |
---|---|
UDFA |
Definition at line 49 of file mole_reactions.cpp.
STATIC void canonicalize_reaction | ( | count_ptr< mole_reaction > & | rate | ) |
Definition at line 2387 of file mole_reactions.cpp.
References DEBUG_ENTRY, t_mole_global::sort(), and STATIC.
Referenced by canonicalize_reaction_label(), and newreact().
STATIC string canonicalize_reaction_label | ( | const char | label[] | ) |
Definition at line 2371 of file mole_reactions.cpp.
References canonicalize_reaction(), DEBUG_ENTRY, parse_reaction(), and STATIC.
Referenced by mole_findrate_s(), and mole_generate_isotopologue_reactions().
STATIC void compare_udfa | ( | const count_ptr< mole_reaction > & | rate | ) |
Definition at line 2794 of file mole_reactions.cpp.
References CONFLICT, CORRECT, FLTEQ, MAXPRODUCTS, MAXREACTANTS, STATIC, and udfatab.
Referenced by newreact().
double frac_H2star_hminus | ( | void | ) |
Definition at line 690 of file mole_reactions.cpp.
References h2, hmi, and SDIV().
Referenced by mole_h_rate_diagnostics().
STATIC char * getcsvfield | ( | char ** | s, |
char | c ) |
Definition at line 2782 of file mole_reactions.cpp.
References STATIC.
Referenced by parse_base(), and parse_udfa().
double hmirat | ( | double | te | ) |
hmirat computes radiative association rate for H-
te |
Definition at line 1581 of file mole_reactions.cpp.
References DEBUG_ENTRY, and phycon.
Referenced by mole_h_reactions().
STATIC bool lgReactBalance | ( | const count_ptr< mole_reaction > & | rate | ) |
Definition at line 2574 of file mole_reactions.cpp.
References sign(), and STATIC.
Referenced by newreact().
STATIC void mole_check_reverse_reactions | ( | void | ) |
Definition at line 2084 of file mole_reactions.cpp.
References DEBUG_ENTRY, fixit(), ioQQQ, mole_priv::reactab, STATIC, and trace.
Referenced by mole_create_react().
void mole_cmp_num_in_out_reactions | ( | void | ) |
Definition at line 2183 of file mole_reactions.cpp.
References CHARS_SPECIES, DEBUG_ENTRY, ioQQQ, mole_global, and mole_priv::reactab.
void mole_create_react | ( | void | ) |
mole_create_react build reaction structures
Definition at line 1665 of file mole_reactions.cpp.
References DEBUG_ENTRY, dense, deut, fixit(), ipHELIUM, mole, mole_check_reverse_reactions(), mole_generate_isotopologue_reactions(), mole_global, newreact(), parse_base(), parse_udfa(), plot_sparsity(), mole_priv::reactab, read_data(), register_reaction_vectors(), SAHA, source, UDFA, and unresolved_atom_list.
Referenced by InitSimPostparse().
mole_reaction * mole_findrate_s | ( | const char | buf[] | ) |
Definition at line 3872 of file mole_reactions.cpp.
References canonicalize_reaction_label(), DEBUG_ENTRY, and mole_priv::reactab.
Referenced by t_mole_local::findrate(), t_mole_local::findrk(), mole_get_equilibrium_constant(), and t_mole_local::sink_rate().
STATIC void mole_generate_isotopologue_reactions | ( | string | atom_old, |
string | atom_new ) |
Definition at line 1935 of file mole_reactions.cpp.
References ASSERT, ATOMIC_MASS_UNIT, canonicalize_reaction_label(), create_isotopologues_one(), DEBUG_ENTRY, fixit(), ioQQQ, newreact(), parse_species_label(), mole_priv::reactab, and STATIC.
Referenced by mole_create_react().
STATIC double mole_get_equilibrium_constant | ( | const char | buf[] | ) |
Definition at line 2127 of file mole_reactions.cpp.
References BIGFLOAT, DEBUG_ENTRY, MIN2, mole_findrate_s(), mole_partition_function(), mole_reaction::nproducts, mole_reaction::nreactants, mole_reaction::products, mole_reaction::reactants, and STATIC.
STATIC void mole_h2_grain_form | ( | void | ) |
Definition at line 2925 of file mole_reactions.cpp.
References ASSERT, dense, fixit(), fnzone, GetAveVelocity(), GrainDrive(), gv, h2, hmi, ipHYDROGEN, MALLOC, MAT_CAR, MAT_CAR2, MAT_SIL, MAT_SIL2, NQGRID, phycon, POW2, qheat(), SDIV(), sexp(), and STATIC.
Referenced by mole_update_rks().
STATIC void mole_h_reactions | ( | void | ) |
hmole_reactions - evaluates hydrogen chemistry reactions
Definition at line 3268 of file mole_reactions.cpp.
References ASSERT, colden, conv, DEBUG_ENTRY, molezone::den, dense, diatoms, EN1RYD, esc_PRD_1side(), findspecieslocal(), fixit(), fnzone, fp_equal(), GammaBn(), GammaPrt(), GetDopplerWidth(), h2, t_phoHeat::HeatNet, hmi, hmirat(), ioQQQ, ipCOL_H2g, ipCOL_H2s, ipHE_LIKE, ipHELIUM, ipHYDROGEN, iso_sp, iteration, MAX2, mole_global, nzone, opac, phycon, POW2, radius, rfield, SAHA, secondaries, sexp(), SMALLFLOAT, STATIC, and TotalInsanity().
Referenced by mole_update_rks().
Definition at line 2159 of file mole_reactions.cpp.
References ASSERT, AVOGADRO, BIGFLOAT, BOLTZMANN, DEBUG_ENTRY, dsexp(), ELECTRON_MASS, fixit(), molecule::form_enthalpy, HION_LTE_POP, molecule::label, molecule::mole_mass, phycon, and STATIC.
Referenced by mole_get_equilibrium_constant().
void mole_punch | ( | FILE * | punit, |
const char | speciesname[], | ||
const char | args[], | ||
bool | lgHeader, | ||
bool | lgData, | ||
double | depth ) |
Definition at line 4221 of file mole_reactions.cpp.
References DEBUG_ENTRY, findspecies(), mole_reaction::index, molecule::index, mole_reaction::label, mole, mole_reaction::nproducts, mole_reaction::nreactants, mole_reaction::products, mole_reaction::pvector, mole_reaction::pvector_excit, mole_priv::reactab, mole_reaction::reactants, mole_reaction::rvector, and mole_reaction::rvector_excit.
Referenced by SaveDo().
void mole_rk_bigchange | ( | void | ) |
Definition at line 2866 of file mole_reactions.cpp.
References ASSERT, DEBUG_ENTRY, mole_reaction::index, ioQQQ, mole_reaction::label, mole, nzone, and mole_priv::reactab.
Referenced by ZoneEnd().
void mole_update_rks | ( | void | ) |
mole_update_rks update rate coefficients, only temp part
Definition at line 2840 of file mole_reactions.cpp.
References mole_reaction::a, DEBUG_ENTRY, mole_reaction::index, ioQQQ, mole_reaction::label, mole, mole_h2_grain_form(), mole_h_reactions(), mole_priv::reactab, and mole_reaction::rk().
Referenced by mole_drive().
STATIC void newreact | ( | const char | label[], |
const char | fun[], | ||
double | a, | ||
double | b, | ||
double | c ) |
Definition at line 2237 of file mole_reactions.cpp.
References ABSENT, ASSERT, canonicalize_reaction(), cdEXIT, compare_udfa(), DEBUG_ENTRY, EXIT_FAILURE, Singleton< t_version >::Inst(), ioQQQ, lgReactBalance(), parse_reaction(), mole_priv::reactab, source, STATIC, and UDFA.
Referenced by mole_create_react(), mole_generate_isotopologue_reactions(), and parse_base().
STATIC void parse_base | ( | char * | s | ) |
Definition at line 2220 of file mole_reactions.cpp.
References getcsvfield(), newreact(), and STATIC.
Referenced by mole_create_react().
STATIC long parse_reaction | ( | count_ptr< mole_reaction > & | rate, |
const char | label[] ) |
Definition at line 2298 of file mole_reactions.cpp.
References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, findspecies(), ioQQQ, molecule::isEnabled, MAXPRODUCTS, MAXREACTANTS, null_mole, STATIC, and trace.
Referenced by canonicalize_reaction_label(), and newreact().
STATIC void parse_udfa | ( | char * | s | ) |
Definition at line 2686 of file mole_reactions.cpp.
References ASSERT, findspecies(), FLTEQ, getcsvfield(), MALLOC, MAXPRODUCTS, MAXREACTANTS, null_mole, t_mole_global::sort(), STATIC, and udfatab.
Referenced by mole_create_react().
STATIC void plot_sparsity | ( | void | ) |
Definition at line 2501 of file mole_reactions.cpp.
References molecule::index, MALLOC, mole_global, mole_reaction::nproducts, mole_reaction::nreactants, mole_reaction::products, mole_reaction::pvector, mole_priv::reactab, mole_reaction::reactants, mole_reaction::rvector, and STATIC.
Referenced by mole_create_react().
STATIC void read_data | ( | const char | file[], |
void(* | parse )(char *s) ) |
Definition at line 2664 of file mole_reactions.cpp.
References BUFSIZE, fixit(), open_data(), and STATIC.
Referenced by mole_create_react().
STATIC void register_reaction_vectors | ( | count_ptr< mole_reaction > | rate | ) |
Definition at line 2419 of file mole_reactions.cpp.
References DEBUG_ENTRY, lgDifferByExcitation(), and STATIC.
Referenced by mole_create_react().
|
static |
Definition at line 77 of file mole_reactions.cpp.
|
static |
Definition at line 2662 of file mole_reactions.cpp.
Referenced by compare_udfa(), and parse_udfa().