/*eshe1l o radiative transfer for helium singlets lines */ #include #include "cddefines.h" #include "eshe1l.h" #include "nhe1lvl.h" #include "showme.h" #include "doppvel.h" #include "he1tau.h" #include "he1nxt.h" #include "redis.h" #include "twoway.h" #include "rtescprob.h" double eshe1l(double *esin) { double damp, eshe1l_v; # ifdef DEBUG_FUN fputs( "<+>eshe1l()\n", debug_fp ); # endif /* evaluate esc prob for HeI LA */ damp = 606.7/DoppVel.doppler[1]; if( strcmp(redis.chRedis,"INCO") == 0 ) { /* incomplete redistribution */ eshe1l_v = escgrd(he1nxtCOM.he1nxt[0][1],he1tauCOM.he1lim[0][1], damp); *esin = twoway.wayin; } else { /* wind or complete redis */ eshe1l_v = escsub(he1nxtCOM.he1nxt[0][1],he1tauCOM.he1lim[0][1], damp); *esin = twoway.wayin; } if( eshe1l_v < 0. ) { fprintf( ioQQQ, " ESHE1L returns a negative value, of%10.2e\n", eshe1l_v ); fprintf( ioQQQ, " ESHE1L: the redistribution type was %4.4s\n", redis.chRedis ); fprintf( ioQQQ, " The optical depths are %10.2e%10.2e\n", he1nxtCOM.he1nxt[0][1], he1tauCOM.he1lim[0][1] ); ShowMe(); puts( "[Stop in eshe1l]" ); exit(1); } # ifdef DEBUG_FUN fputs( " <->eshe1l()\n", debug_fp ); # endif return( eshe1l_v ); }