cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions | Variables
dynamics.cpp File Reference
#include "cddefines.h"
#include "cddrive.h"
#include "struc.h"
#include "colden.h"
#include "radius.h"
#include "stopcalc.h"
#include "hextra.h"
#include "iterations.h"
#include "conv.h"
#include "timesc.h"
#include "dense.h"
#include "mole.h"
#include "thermal.h"
#include "pressure.h"
#include "phycon.h"
#include "wind.h"
#include "iso.h"
#include "dynamics.h"
#include "cosmology.h"
#include "parser.h"
#include "rfield.h"
Include dependency graph for dynamics.cpp:

Go to the source code of this file.

Macros

#define NTIME   200
 
#define MERGE   0
 

Functions

STATIC void DynaNewStep (void)
 
STATIC void DynaSaveLast (void)
 
STATIC bool lgNeedTimestep ()
 
STATIC void InitDynaTimestep ()
 
STATIC double timestep_next (void)
 
void DynaIonize (void)
 
void DynaStartZone (void)
 
void DynaEndZone (void)
 
void DynaIterEnd (void)
 
realnum DynaFlux (double depth)
 
void DynaCreateArrays (void)
 
STATIC void advection_set_default (bool lgWind)
 
void ParseDynaTime (Parser &p)
 
void ParseDynaWind (Parser &p)
 
void DynaPrtZone (void)
 
void DynaPunchTimeDep (FILE *ipPnunit, const char *chJob)
 
void DynaSave (FILE *ipPnunit, char chJob)
 
void DynaIterStart (void)
 

Variables

static const bool lgPrintDynamics = false
 
t_dynamics dynamics
 
static int ipUpstream =-1
 
static int iphUpstream =-1
 
static int ipyUpstream =-1
 
static double ** UpstreamIon
 
static double *** UpstreamStatesElem
 
static vector< double > UpstreamElem
 
static vector< double > Upstream_molecules
 
static vector< double > time_elapsed_time
 
static vector< double > time_flux_ratio
 
static vector< double > time_dt
 
static vector< double > time_dt_scale_factor
 
static bool lgtime_dt_specified
 
static vector< int > lgtime_Recom
 
static long int nTime_flux =0
 
static double Dyn_dr
 
static double AdvecSpecificEnthalpy
 
static vector< double > Old_depth
 
static vector< realnumOld_histr
 
static vector< realnumOld_xLyman_depth
 
static vector< realnumOld_hiistr
 
static vector< realnumOld_pressure
 
static vector< realnumOld_density
 
static vector< realnumOld_DenMass
 
static vector< realnumEnthalpyDensity
 
static vector< realnumOld_ednstr
 
static vector< realnumOld_EnthalpyDensity
 
static realnum ** Old_molecules
 
static realnum *** Old_xIonDense
 
static realnum ** Old_gas_phase
 
static realnum **** Old_StatesElem
 
static long int nOld_zone
 

Macro Definition Documentation

#define MERGE   0

Definition at line 2192 of file dynamics.cpp.

Referenced by t_dynamics::Cool(), and t_dynamics::Heat().

#define NTIME   200

Definition at line 76 of file dynamics.cpp.

Referenced by ParseDynaTime().

Function Documentation

STATIC void advection_set_default ( bool  lgWind)
void DynaCreateArrays ( void  )
void DynaEndZone ( void  )

DynaEndZone called at end of iteration when advection is turned on

Definition at line 835 of file dynamics.cpp.

References DEBUG_ENTRY, t_radius::depth, t_dynamics::DivergePresInteg, t_radius::drad, DynaFlux(), fprintf(), ioQQQ, t_dynamics::lgTracePrint, radius, wind, and Wind::windv.

Referenced by ZoneEnd().

Here is the call graph for this function:

realnum DynaFlux ( double  depth)
void DynaIonize ( void  )
void DynaIterEnd ( void  )
void DynaIterStart ( void  )
STATIC void DynaNewStep ( void  )
void DynaPrtZone ( void  )
void DynaPunchTimeDep ( FILE *  ipPnunit,
const char *  chJob 
)

DynaPunchTimeDep - save info about time dependent solution

Parameters
ipPnunit
*chJob

Definition at line 2059 of file dynamics.cpp.

References cdIonFrac(), cdTemp(), colden, t_colden::colden, column(), cosmology, DEBUG_ENTRY, dense, t_dense::eden, findspecieslocal(), fprintf(), t_dense::gas_phase, ipCOL_HTOT, ipHYDROGEN, t_cosmology::redshift_current, rfield, scalingDensity(), SDIV(), t_rfield::time_continuum_scale, t_dynamics::time_elapsed, t_dynamics::timestep, and TotalInsanity().

Referenced by SaveDo().

Here is the call graph for this function:

void DynaSave ( FILE *  ipPnunit,
char  chJob 
)

DynaSave save info related to advection

Parameters
ipPnunit
chJob

Definition at line 2168 of file dynamics.cpp.

References AdvecSpecificEnthalpy, t_dynamics::Cool(), t_dynamics::dCooldT(), DEBUG_ENTRY, t_radius::depth_mid_zone, t_phycon::EnthalpyDensity, fprintf(), t_dynamics::Heat(), t_thermal::htot, ipHYDROGEN, phycon, radius, t_dynamics::Rate, scalingDensity(), t_dynamics::Source, thermal, and TotalInsanity().

Referenced by SaveDo().

Here is the call graph for this function:

STATIC void DynaSaveLast ( void  )
void DynaStartZone ( void  )
STATIC void InitDynaTimestep ( )
STATIC bool lgNeedTimestep ( )
void ParseDynaTime ( Parser p)
void ParseDynaWind ( Parser p)
STATIC double timestep_next ( void  )

Definition at line 137 of file dynamics.cpp.

References DEBUG_ENTRY, fprintf(), ioQQQ, lgPrintDynamics, t_dynamics::lgRecom, t_timesc::time_therm_short, timesc, t_dynamics::timestep, and t_dynamics::timestep_init.

Referenced by DynaIterEnd().

Here is the call graph for this function:

Variable Documentation

double AdvecSpecificEnthalpy
static

Definition at line 94 of file dynamics.cpp.

Referenced by DynaIonize(), DynaPrtZone(), DynaSave(), DynaStartZone(), and t_dynamics::zero().

double Dyn_dr
static

Definition at line 91 of file dynamics.cpp.

Referenced by DynaIonize(), DynaIterEnd(), DynaNewStep(), and DynaStartZone().

t_dynamics dynamics
vector<realnum> EnthalpyDensity
static

Definition at line 100 of file dynamics.cpp.

Referenced by DynaCreateArrays(), DynaIonize(), DynaPrtZone(), and DynaSaveLast().

int iphUpstream =-1
static

Definition at line 43 of file dynamics.cpp.

Referenced by DynaIterEnd(), and DynaStartZone().

int ipUpstream =-1
static

Definition at line 43 of file dynamics.cpp.

Referenced by DynaIonize(), DynaIterEnd(), and DynaStartZone().

int ipyUpstream =-1
static

Definition at line 43 of file dynamics.cpp.

Referenced by DynaIterEnd(), and DynaStartZone().

const bool lgPrintDynamics = false
static

Definition at line 40 of file dynamics.cpp.

Referenced by DynaIterEnd(), DynaIterStart(), ParseDynaTime(), and timestep_next().

bool lgtime_dt_specified
static

Definition at line 74 of file dynamics.cpp.

Referenced by DynaIterEnd(), and ParseDynaTime().

vector<int> lgtime_Recom
static

Definition at line 75 of file dynamics.cpp.

Referenced by DynaIterEnd(), and ParseDynaTime().

long int nOld_zone
static

Definition at line 130 of file dynamics.cpp.

Referenced by DynaNewStep(), DynaSaveLast(), DynaStartZone(), and t_dynamics::zero().

long int nTime_flux =0
static

Definition at line 79 of file dynamics.cpp.

Referenced by DynaIterEnd(), DynaIterStart(), and ParseDynaTime().

vector<realnum> Old_DenMass
static

Definition at line 100 of file dynamics.cpp.

Referenced by DynaCreateArrays(), and DynaSaveLast().

vector<realnum> Old_density
static

Definition at line 100 of file dynamics.cpp.

Referenced by DynaCreateArrays(), DynaNewStep(), DynaSaveLast(), and DynaStartZone().

vector<double> Old_depth
static

Definition at line 97 of file dynamics.cpp.

Referenced by DynaCreateArrays(), DynaIonize(), DynaNewStep(), DynaSaveLast(), and DynaStartZone().

vector<realnum> Old_ednstr
static

Definition at line 100 of file dynamics.cpp.

Referenced by DynaCreateArrays(), and DynaSaveLast().

vector<realnum> Old_EnthalpyDensity
static

Definition at line 100 of file dynamics.cpp.

Referenced by DynaCreateArrays(), DynaSaveLast(), and DynaStartZone().

realnum** Old_gas_phase
static

Definition at line 124 of file dynamics.cpp.

Referenced by DynaCreateArrays(), and DynaSaveLast().

vector<realnum> Old_hiistr
static

Definition at line 100 of file dynamics.cpp.

Referenced by DynaCreateArrays(), and DynaSaveLast().

vector<realnum> Old_histr
static

Definition at line 100 of file dynamics.cpp.

Referenced by DynaCreateArrays(), and DynaSaveLast().

realnum** Old_molecules
static

Definition at line 118 of file dynamics.cpp.

Referenced by DynaCreateArrays(), DynaNewStep(), DynaSaveLast(), and DynaStartZone().

vector<realnum> Old_pressure
static

Definition at line 100 of file dynamics.cpp.

Referenced by DynaCreateArrays(), and DynaSaveLast().

realnum**** Old_StatesElem
static

Definition at line 127 of file dynamics.cpp.

Referenced by DynaCreateArrays(), DynaNewStep(), DynaSaveLast(), and DynaStartZone().

realnum*** Old_xIonDense
static

Definition at line 121 of file dynamics.cpp.

Referenced by DynaCreateArrays(), DynaIonize(), DynaNewStep(), DynaSaveLast(), and DynaStartZone().

vector<realnum> Old_xLyman_depth
static

Definition at line 100 of file dynamics.cpp.

Referenced by DynaCreateArrays(), and DynaSaveLast().

vector<double> time_dt
static

Definition at line 70 of file dynamics.cpp.

Referenced by DynaIterEnd(), and ParseDynaTime().

vector<double> time_dt_scale_factor
static

Definition at line 70 of file dynamics.cpp.

Referenced by DynaIterEnd(), and ParseDynaTime().

vector<double> time_elapsed_time
static

Definition at line 70 of file dynamics.cpp.

Referenced by DynaIterEnd(), DynaIterStart(), and ParseDynaTime().

vector<double> time_flux_ratio
static

Definition at line 70 of file dynamics.cpp.

Referenced by DynaIterStart(), and ParseDynaTime().

vector<double> Upstream_molecules
static

Definition at line 64 of file dynamics.cpp.

Referenced by DynaCreateArrays(), DynaIonize(), and DynaStartZone().

vector<double> UpstreamElem
static

Definition at line 61 of file dynamics.cpp.

Referenced by DynaCreateArrays(), DynaIonize(), and DynaStartZone().

double** UpstreamIon
static

Definition at line 58 of file dynamics.cpp.

Referenced by DynaCreateArrays(), DynaIonize(), and DynaStartZone().

double*** UpstreamStatesElem
static

Definition at line 59 of file dynamics.cpp.

Referenced by DynaCreateArrays(), DynaIonize(), and DynaStartZone().