00001 /* This file is part of Cloudy and is copyright (C)1978-2013 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 00004 #include "cddefines.h" 00005 #include "emission.h" 00006 #include "opacity.h" 00007 00008 /*EmLineJunk set all elements of transition struc to dangerous values */ 00009 /*EmLineZero set all elements of transition struc to zero */ 00010 00011 /*EmLineJunk set all elements of transition struc to dangerous values */ 00012 void EmLineJunk( EmissionList::reference t ) 00013 { 00014 00015 DEBUG_ENTRY( "EmLineJunk()" ); 00016 00017 /* optical depth in continuum to ill face */ 00018 t.TauCon() = -FLT_MAX; 00019 00020 /* inward and total line optical depths */ 00021 t.TauIn() = -FLT_MAX; 00022 t.TauTot() = -FLT_MAX; 00023 00024 /* type of redistribution function, */ 00025 t.iRedisFun() = INT_MIN; 00026 00027 /* array offset for line within fine opacity */ 00028 t.ipFine() = -10000; 00029 00030 /* inward fraction */ 00031 t.FracInwd() = -FLT_MAX; 00032 00033 /* continuum pumping rate */ 00034 t.pump() = -FLT_MAX; 00035 00036 /* line intensity */ 00037 t.xIntensity() = -FLT_MAX; 00038 00039 /* number of photons emitted per sec in the line */ 00040 t.phots() = -FLT_MAX; 00041 00042 /* gf value */ 00043 t.gf() = -FLT_MAX; 00044 00045 /* escape and destruction probs */ 00046 t.Pesc() = -FLT_MAX; 00047 t.Pdest() = -FLT_MAX; 00048 t.Pelec_esc() = -FLT_MAX; 00049 00050 /* damping constant */ 00051 t.damp() = -FLT_MAX; 00052 00053 /* ratio of collisional to radiative excitation*/ 00054 t.ColOvTot() = -FLT_MAX; 00055 00056 /* auto-ionization fraction */ 00057 t.AutoIonizFrac() = -FLT_MAX; 00058 00059 /* line opacity */ 00060 t.opacity() = -FLT_MAX; 00061 00062 t.PopOpc() = -FLT_MAX; 00063 00064 /* transition prob, Einstein A upper to lower */ 00065 t.Aul() = -FLT_MAX; 00066 00067 /* ots rate */ 00068 t.ots() = -FLT_MAX; 00069 return; 00070 } 00071 00072 /*TauZero set initial values of inward, outward, and local-to-continuum-source optical depths */ 00073 void TauZero( EmissionList::reference t ) 00074 { 00075 DEBUG_ENTRY( "TauZero()" ); 00076 00077 /* total optical depth in all overlapping lines to illuminated face, 00078 * used for pumping */ 00079 t.TauCon() = opac.taumin; 00080 00081 /* inward and total line optical depths */ 00082 /* >>chng 03 feb 14, from 0 to opac.taumin */ 00083 t.TauIn() = opac.taumin; 00084 00085 /* total optical depths */ 00086 t.TauTot() = 1e20f; 00087 00088 return; 00089 } 00090 00091 /*EmLineZero zeros out the emission line structure */ 00092 void EmLineZero( EmissionList::reference t ) 00093 { 00094 00095 DEBUG_ENTRY( "EmLineZero()" ); 00096 00097 /* inward fraction */ 00098 /* >>chng 03 feb 14, from 0 to 1 */ 00099 t.FracInwd() = 1.; 00100 00101 /* continuum pumping rate */ 00102 t.pump() = 0.; 00103 00104 /* line intensity */ 00105 t.xIntensity() = 0.; 00106 00107 /* number of photons emitted per sec in the line */ 00108 t.phots() = 0.; 00109 00110 /* escape and destruction probs */ 00111 /* >>chng 03 feb 14, change from 0 to 1 */ 00112 t.Pesc() = 1.; 00113 t.Pdest() = 0.; 00114 t.Pelec_esc() = 0.; 00115 00116 /* ratio of collisional to radiative excitation*/ 00117 t.ColOvTot() = 1.; 00118 00119 /* pop that enters net opacity */ 00120 t.PopOpc() = 0.; 00121 00122 /* ots rate */ 00123 t.ots() = 0.; 00124 return; 00125 }