/home66/gary/public_html/cloudy/c13_branch/source/conv.h File Reference

Go to the source code of this file.

Data Structures

struct  t_conv

Enumerations

enum  counter_type {
  MOLE_SOLVE, MOLE_SOLVE_STEPS, NEWTON, NEWTON_LOOP,
  CONV_BASE_CALLS, CONV_BASE_LOOPS, CONV_BASE_ACCELS, ION_SOLVES,
  ISO_LOOPS, EDEN_CHANGES, TEMP_CHANGES, PRES_CHANGES,
  NTYPES
}

Functions

void ConvIterCheck (void)
bool ConvInitSolution ()
int ConvPresTempEdenIoniz (void)
int ConvTempEdenIoniz (void)
int ConvEdenIoniz (void)
int ConvIoniz (void)
void ConvFail (const char chMode[], const char chDetail[])
int ConvBase (long loopi)
int eden_sum (void)
void EdenChange (double EdenNew)

Variables

t_conv conv

Detailed Description

this is the series of routines that converge the pressure, temperature, electron density, and ionization, for a zone. Ideally, only the top routine, ConvPresTempEdenIoniz, should be public

Definition in file conv.h.


Enumeration Type Documentation

Enumerator:
MOLE_SOLVE 
MOLE_SOLVE_STEPS 
NEWTON 
NEWTON_LOOP 
CONV_BASE_CALLS 
CONV_BASE_LOOPS 
CONV_BASE_ACCELS 
ION_SOLVES 
ISO_LOOPS 
EDEN_CHANGES 
TEMP_CHANGES 
PRES_CHANGES 
NTYPES 

Definition at line 69 of file conv.h.


Function Documentation

int ConvBase ( long  loopi  ) 

ConvBase main routine to drive ionization solution for all species, find total opacity called by ConvIoniz/ lgConverg check whether ionization of element nelem has converged

Parameters:
loopi this tells how many times ConvBase has been called by ConvIoniz while trying to converge electron density == 0 on first call - allows logic in ConvBase to check for ots oscillations

Todo:
0 PvH prefers test against err/10

Definition at line 163 of file conv_base.cpp.

References ASSERT, atmdat_3body(), t_thermal::char_tran_cool, t_thermal::char_tran_heat, ChargTranEval(), ChargTranSumHeat(), t_conv::chConvIoniz(), t_save::chHashString, conv, CONV_BASE_ACCELS, CONV_BASE_CALLS, CONV_BASE_LOOPS, CoolEvaluate(), t_secondaries::csupra, t_thermal::ctot, DEBUG_ENTRY, molezone::den, dense, deut, diatoms, DumpLine(), DynaIonize(), dynamics, t_dense::eden, eden_sum(), t_conv::EdenErrorAllowed, t_dense::EdenTrue, t_mole_local::elec, findspecieslocal(), fixit(), fnzone, fp_equal(), t_dense::gas_phase, GrainDrive(), gv, t_hmi::H2_total, t_conv::HeatCoolRelErrorAllowed, HeatSum(), HeatZero(), highen(), hmi, t_thermal::htot, t_conv::incrementCounter(), INPUT_LINE_LENGTH, ion_recom_calculate(), ion_trim(), ion_wrapper(), t_dense::IonHigh, t_conv::IonizErrorAllowed, t_dense::IonLow, ioQQQ, ipH_LIKE, ipHELIUM, ipHYDROGEN, ipNICKEL, t_save::ipTraceConvergeBase, iso_collapsed_update(), iso_renorm(), iso_sp, iso_update_rates(), iteration, lgAbort, t_dynamics::lgAdvection, t_conv::lgConvIoniz(), lgElemsConserved(), t_deuterium::lgElmtOn, t_dense::lgElmtOn, t_conv::lgFirstSweepThisZone, GrainVar::lgGrainElectrons, t_rfield::lgIonizReevaluate, t_conv::lgIonStageTrimed, lgNetEdenSrcSmall(), t_rfield::lgOpacityReevaluate, t_opac::lgOpacStatic, t_conv::lgOscilOTS, t_trace::lgOTSBug, t_opac::lgRedoStatic, t_conv::lgSearch, t_dense::lgSetIoniz, lgStatesConserved(), t_thermal::lgTemperatureConstant, t_trace::lgTrace, t_save::lgTraceConvergeBase, t_save::lgTraceConvergeBaseHash, t_conv::lgUpdateCouplings, t_conv::limPres2Ioniz, t_mole_global::list, LOOP_ION_LIMIT, MAX2, mole, mole_drive(), mole_global, mole_update_sources(), NISO, t_conv::nPres2Ioniz, t_conv::nTotalIoniz, t_StopCalc::nTotalIonizStop, t_trace::nTrConvg, t_mole_global::num_calc, nzone, opac, t_opac::opacity_abs, OpacityAddTotal(), phycon, PresTotCurrent(), t_conv::resetConvIoniz(), rfield, RT_line_all(), RT_OTS(), RT_OTS_PrtRate(), RT_OTS_Update(), save, SDIV(), t_secondaries::sec2total, secondaries, t_conv::setConvIonizFail(), SetDeuteriumIonization(), t_dense::SetIoniz, SMALLFLOAT, t_mole_local::species, t_iso_sp::st, StopCalc, TauLines, t_phycon::te, t_thermal::te_update, thermal, TorF(), GrainVar::TotalEden, trace, UpdateUTAs(), x0, x1, x2, t_deuterium::xIonDense, t_dense::xIonDense, and t_dense::xNucleiTotal.

Referenced by ConvInitSolution(), ConvIoniz(), and ion_recombAGN().

Here is the call graph for this function:

int ConvEdenIoniz ( void   ) 
void ConvFail ( const char  chMode[],
const char  chDetail[] 
)
bool ConvInitSolution (  ) 

ConvInitSolution drive search for initial solution at illuminated face, called by cloudy, returns 1 if outside conditions appropriate for cloudy

Definition at line 242 of file conv_init_solution.cpp.

References t_rfield::anu, ASSERT, t_conv::AverEdenError, t_conv::AverHeatCoolError, t_conv::AverPressError, t_conv::BigEdenError, t_conv::BigHeatCoolError, t_conv::BigPressError, t_dense::chDenseLaw, t_thermal::ConstTemp, conv, ConvBase(), ConvPresTempEdenIoniz(), ConvTempEdenIoniz(), CoolSave(), t_struc::coolstr, t_thermal::ctot, dCoolNetDTOld, DEBUG_ENTRY, t_struc::DenMass, t_struc::DenParticles, dense, t_struc::drad, t_radius::drad, t_radius::drad_mid_zone, t_struc::drad_x_fillfac, t_radius::drad_x_fillfac, t_radius::dVeffAper, dynamics, t_dense::eden, t_struc::ednstr, EE, t_geometry::FillFac, FindTempChangeFactor(), fp_equal(), FracMoleMax, t_dense::gas_phase, geometry, t_struc::hden, t_struc::heatstr, Heavy, t_struc::hiistr, t_conv::hist_pres_nzone, t_conv::hist_temp_nzone, t_struc::histr, t_thermal::htot, ioQQQ, t_Heavy::ipHeavy, ipHYDROGEN, ipOXYGEN, iteration, lgAbort, lgCoolNetConverge(), t_dense::lgDenseInitConstant, t_dense::lgEdenBad, t_conv::lgFirstSweepThisZone, t_conv::lgLastSweepThisZone, t_mole_global::lgNoMole, t_conv::lgOscilOTS, t_pressure::lgPressureInitialSpecified, t_dense::lgPressureVaryTime, t_radius::lgSdrmaxRel, t_conv::lgSearch, t_thermal::lgTeHigh, t_thermal::lgTemperatureConstant, t_dynamics::lgTimeDependentStatic, t_trace::lgTrace, LIMELM, max(), MAX2, MIN2, mole_global, t_dynamics::n_initial_relax, t_rfield::nflux, t_conv::nPres2Ioniz, t_conv::nTotalIoniz, t_conv::nTotalIoniz_start, t_trace::nTrConvg, t_dense::nzEdenBad, t_struc::o3str, OxyInGrains, t_dense::pden, phycon, pow(), pressure, t_pressure::PressureInitialSpecified, t_dense::PressureVaryTimeIndex, t_dense::PressureVaryTimeTimescale, PresTotCurrent(), t_pressure::PresTotlCurr, t_pressure::PresTotlInit, t_radius::Radius, radius, radius_first(), rfield, rfield_opac_zero(), SDIV(), t_radius::sdrmax, t_radius::sdrmin, set_NaN(), ShowMe(), SMALLDOUBLE, SMALLFLOAT, StopCalc, struc, t_phycon::te, t_StopCalc::TeFloor, t_phycon::TEMP_LIMIT_HIGH, t_phycon::TEMP_LIMIT_LOW, TempChange(), t_phycon::TEnerDen, t_struc::testr, thermal, t_dynamics::time_elapsed, TotalInsanity(), trace, t_struc::volstr, t_dense::xIonDense, and t_dense::xMassDensity.

Referenced by cloudy().

Here is the call graph for this function:

int ConvIoniz ( void   ) 

ConvIoniz called by ConvEdenIonz, it calls ConvBase until converged

Returns:
returns 1 if error condition, 0 if ok

Definition at line 11 of file conv_ioniz.cpp.

References t_conv::chConvIoniz(), conv, ConvBase(), t_conv::convIonizNewVal(), t_conv::convIonizOldVal(), t_thermal::ctot, DEBUG_ENTRY, t_thermal::htot, ioQQQ, lgAbort, t_conv::lgConvIoniz(), t_conv::lgOscilOTS, t_conv::lgSearch, t_conv::nPres2Ioniz, t_trace::nTrConvg, t_conv::resetConvIoniz(), thermal, TorF(), and trace.

Referenced by EdenError().

Here is the call graph for this function:

void ConvIterCheck ( void   ) 
int ConvPresTempEdenIoniz ( void   ) 
int ConvTempEdenIoniz ( void   ) 
int eden_sum ( void   ) 

eden_sum sum free electron density over all species, sets variable erredn.EdenTrue called by ConvEdenIoniz which actually controls the electron density updates returns 0 if all is ok, 1 if need to abort calc

Definition at line 18 of file eden_sum.cpp.

References ASSERT, DEBUG_ENTRY, dense, deut, t_dense::eden, t_dense::eden_from_metals, t_dense::EdenExtra, t_dense::EdenFraction, t_dense::EdenSet, t_dense::EdenTrue, t_mole_local::elec, fnzone, fp_equal(), t_dense::gas_phase, gv, ioQQQ, TransitionProxy::ipCont(), ipH1s, ipH2p, ipH_LIKE, ipHYDROGEN, ipLITHIUM, iso_sp, t_trace::lgESOURCE, GrainVar::lgGrainElectrons, t_trace::lgNeBug, t_trace::lgTrace, LIMELM, t_mole_global::list, mole, mole_global, t_mole_global::num_calc, t_rfield::otslin, rfield, safe_div(), t_mole_local::species, GrainVar::TotalEden, trace, t_iso_sp::trans(), t_deuterium::xIonDense, and t_dense::xIonDense.

Referenced by ConvBase().

Here is the call graph for this function:

void EdenChange ( double  EdenNew  ) 

Variable Documentation

Definition at line 5 of file conv.cpp.

Referenced by advection_set_default(), atom_levelN(), cdNwcns(), ChargTranEval(), check_co_ion_converge(), cloudy(), ConvBase(), ConvEdenIoniz(), ConvFail(), ConvInitSolution(), ConvIoniz(), ConvIterCheck(), ConvPresTempEdenIoniz(), ConvTempEdenIoniz(), CoolEvaluate(), CoolHeatError(), CoolSave(), dBase_solve(), EdenChange(), EdenError(), Fe2_cooling(), find_solution(), get_total_abundance_ions(), GrainCharge(), GrainChargeTemp(), GrainDrive(), GrainsInit(), grid_do(), H21_cm_pops(), diatomics::H2_Cooling(), diatomics::H2_LevelPops(), HeatSum(), HomogeneousSource(), ion_photo(), ion_solver(), ion_trim(), IonHelium(), iso_collapsed_update(), iso_collide(), iso_continuum_lower(), iso_ionize_recombine(), iso_level(), iso_radiative_recomb(), iso_renorm(), iso_update_rates(), iter_end_check(), IterStart(), lgCheckMonitors(), lgConvEden(), lgConvTemp(), lgCoolHeatCheckConverge(), lgElemsConserved(), lgNetEdenSrcSmall(), lgStatesConserved(), lgTestPressureConvergence(), limitedDensityScaling(), logPressureState(), map_do(), mole_h_reactions(), mole_solve(), MyAssert(), newton_step(), OpacityAddTotal(), TransitionProxy::outline(), ParseCommands(), ParseFail(), ParseIterations(), ParseSet(), PressureChange(), PresTotCurrent(), PrtComment(), PrtFinal(), PrtZone(), radius_increment(), RT_DestProb(), RT_iso_integrate_RRC(), RT_line_all(), RT_line_escape(), RT_line_fine_opacity(), RT_line_one(), RT_line_pumping(), RT_OTS_PrtRate(), RT_tau_inc(), RT_tau_init(), SaveDo(), SaveHeat(), GroupMap::setup(), ShowMe(), store_new_densities(), tauff(), TempChange(), UpdateUTAs(), zero(), and ZoneStart().

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Nov 2012 for cloudy by  doxygen 1.6.1