32 bool lgShield_this_zone,
41 if( !
rfield.lgInducProcess )
48 double shield_continuum;
62 if( lgShield_this_zone && dTau > 1e-3 )
64 double dTauRel = dTau / (1.+t.
Emis().TauCon());
66 t.
Emis().
pump() *= log(1. + dTauRel ) / dTauRel;
98 if( !
rt.lgElecScatEscape )
107 double opac_line = (*t.
Lo()).Pop() * t.
Emis().
opacity()/DopplerWidth;
110 double opac_electron =
dense.eden*6.65e-25;
113 double opacity_ratio = opac_electron/(opac_electron+opac_line);
137 fprintf(
ioQQQ,
"PROBLEM RT_line_escape called with large negative "
138 "optical depth, zone %.2f, setting lgAbort true.\n",
150 if(
conv.lgFirstSweepThisZone && lgGoodTau )
154 if( tau_Sobolev < 1E-5 )
160 t.
Emis().
Pesc() = ( 1.f - exp( -1.f * tau_Sobolev ) )/ tau_Sobolev;
176 if(
conv.lgFirstSweepThisZone && lgGoodTau )
182 if( pestrk > 0.f && t.
Emis().
Pesc() < 1.f )
194 if(
conv.lgFirstSweepThisZone && lgGoodTau )
201 if( pestrk > 0.f && t.
Emis().
Pesc() < 1.f )
214 if(
conv.lgFirstSweepThisZone && lgGoodTau )
218 if( pestrk > 0.f && t.
Emis().
Pesc() < 1.f )
242 if( pestrk > 0.f && t.
Emis().
Pesc() < 1.f )
254 fprintf(
ioQQQ,
" RT_line_escape called with impossible redistribution function %d\n",
305 realnum cells_wide_1x = DopplerWidth/
rfield.fine_opac_velocity_width;
313 double dTauEffec = opac_line*
radius.depth_x_fillfac;
319 const bool doDamp = dTauEffec*t.
Emis().
damp()/9. > 0.1;
320 long int nCells_core = (long)(cells_wide_1x*4.f + 1.5f);
323 if( ipLineCenter - nCells_core < 1 )
324 nCells_core = ipLineCenter - 1;
325 if( ipLineCenter + nCells_core >
rfield.nfine )
326 nCells_core = ipLineCenter -
rfield.nfine - 1;
329 nCells_core =
MAX2( 1 , nCells_core );
331 long int nCells_damp;
343 nCells_damp = (long)x;
345 if( ipLineCenter-nCells_damp < 1 )
346 nCells_damp = ipLineCenter-1;
348 if( ipLineCenter+nCells_damp >
rfield.nfine )
349 nCells_damp =
rfield.nfine - ipLineCenter-1;
355 nCells_damp =
MIN2(
rfield.nfine-ipLineCenter , ipLineCenter )-1;
360 nCells_damp = nCells_core;
363 static vector<realnum> xprofile, profile;
364 xprofile.resize(nCells_damp);
365 profile.resize(nCells_damp);
367 for(
long int i=0; i<nCells_damp; ++i )
370 xprofile[i] = (
realnum) i/cells_wide_1x;
376 rfield.fine_opac_zone[ipLineCenter] += profile[0]*opac_line;
377 for(
long int i=1; i<nCells_damp; ++i )
379 rfield.fine_opac_zone[ipLineCenter+i] += profile[i]*opac_line;
380 rfield.fine_opac_zone[ipLineCenter-i] += profile[i]*opac_line;
394 bool lgShield_this_zone,
433 enum {DEBUG_LOC=
false};
436 static long int nTau[100];
441 for(n=0; n<100; ++n )
447 n = (long)log10( (*t.
Lo()).Pop() )+37;
453 for(n=0; n<100; ++n )
454 fprintf(
ioQQQ,
"%li\t%li\n", n , nTau[n] );
481 if(
conv.lgLastSweepThisZone )
#define DEBUG_ENTRY(funcname)
long int & ipFine() const
realnum & Pelec_esc() const
realnum & opacity() const
realnum & FracInwd() const
realnum & dampXvel() const
realnum EnergyErg() const
qList::iterator Lo() const
bool systemIs(const TransitionList *query) const
qList::iterator Hi() const
EmissionList::reference Emis() const
t_iso_sp iso_sp[NISO][LIMELM]
UNUSED const double EN1RYD
UNUSED const double SQRTPI
double esc_CRDwing(double tau, double tout, double damp)
double RT_continuum_shield_fcn(const TransitionProxy &t)
double esc_CRDcore(double tau, double tout)
double RT_DestProb(double abund, double crsec, long int ipanu, double widl, double escp, int nCore)
double RTesc_lya(double *esin, double *dest, double abund, const TransitionProxy &t, realnum DopplerWidth)
double esc_PRD(double tau, double tout, double damp)
void RT_line_one(const TransitionProxy &t, bool lgShield_this_zone, realnum pestrk, realnum DopplerWidth)
STATIC void RT_line_pumping(const TransitionProxy &t, bool lgShield_this_zone, realnum DopplerWidth)
STATIC void RT_line_fine_opacity(const TransitionProxy &t, realnum DopplerWidth)
STATIC void RT_line_electron_scatter(const TransitionProxy &t, realnum DopplerWidth)
STATIC void RT_line_escape(const TransitionProxy &t, realnum pestrk, realnum DopplerWidth, bool lgGoodTau)
void VoigtH(realnum a, const realnum v[], realnum y[], int n)
void DumpLine(const TransitionProxy &t)
bool lgTauGood(const TransitionProxy &t)