/*PrtAllTau master routine controlling printout of optical depths at end of calculation */ #include "cddefines.h" #include "taulines.h" #include "nhe1lvl.h" #include "he.h" #include "nhe1.h" #include "hydrogenic.h" #include "nh.h" #include "opac.h" #include "elmton.h" #include "he1tau.h" #include "he3tau.h" #include "colden.h" #include "sphere.h" #include "taucon.h" #include "printe82.h" #include "prtmet.h" #include "prtalltau.h" void PrtAllTau(void) { long int i, limit; float fcon, flin; # ifdef DEBUG_FUN fputs( "<+>PrtAllTau()\n", debug_fp ); # endif /* optical depths used by code are total through model, * when sphere is set, this is twice optical depth through * computed structure */ if( sphere.lgSphere ) { fcon = 2.; if( sphere.lgStatic ) { flin = 2.; } else { flin = 1.; } } else { fcon = 1.; flin = 1.; } /* print out optical depths and column densities */ /* R(1300) is Rayleigh scattering */ fprintf( ioQQQ, "\n Contin Optical Depths: COMP:"); fprintf( ioQQQ,PrintEfmt("%9.2e", taucon.telec)); fprintf( ioQQQ, " H-:"); fprintf( ioQQQ,PrintEfmt("%9.2e",taucon.thmin )); fprintf( ioQQQ, " R(1300):"); fprintf( ioQQQ,PrintEfmt("%9.2e", coldenCom.colden[IPCHI-1]*6.71e-24)); fprintf( ioQQQ, " H2+:"); fprintf( ioQQQ,PrintEfmt("%9.2e", coldenCom.colden[IPCH2PLS-1]*7e-18)); fprintf( ioQQQ, " HeTri:"); fprintf( ioQQQ,PrintEfmt("%9.2e", opac.TauTotal[0][he.nhei3-1]/fcon)); fprintf( ioQQQ, " Pfa:"); PrintE82( ioQQQ , opac.TauTotal[0][HydroLines[0][5][4].ipCont-1]/fcon); fprintf( ioQQQ, "\n" ); fprintf( ioQQQ, " Pa:"); fprintf( ioQQQ,PrintEfmt("%9.2e", opac.TauTotal[0][HydroLines[0][4][3].ipCont-1]/fcon)); fprintf( ioQQQ, " Ba:"); fprintf( ioQQQ,PrintEfmt("%9.2e", opac.TauTotal[0][HydroLines[0][3][2].ipCont-1]/fcon)); fprintf( ioQQQ, " Hb:"); fprintf( ioQQQ,PrintEfmt("%9.2e", opac.TauTotal[0][HydroLines[0][4][2].ipCont-1]/fcon)); fprintf( ioQQQ, " La:"); fprintf( ioQQQ,PrintEfmt("%9.2e", opac.TauTotal[0][HydroLines[0][IP2P][IP1S].ipCont-1]/fcon)); fprintf( ioQQQ, " 1r:"); PrintE93( ioQQQ , opac.TauTotal[0][nh.ipHn[0][IP1S]-1]/fcon); fprintf( ioQQQ, " 1.8:"); PrintE82( ioQQQ , opac.TauTotal[0][nhe1Com.nhe1[0]-1]/fcon); fprintf( ioQQQ, " 4.:"); PrintE93( ioQQQ , opac.TauTotal[0][nh.ipHn[1][IP1S]-1]/fcon); fprintf( ioQQQ, "\n"); /* print optical depths of previous iteration */ fprintf( ioQQQ, " Line Optical Depths: 10830:"); fprintf( ioQQQ,PrintEfmt("%9.2e", he3tau[IPT10830-1].TauIn/flin)); fprintf( ioQQQ, " 3889:"); fprintf( ioQQQ,PrintEfmt("%9.2e", he3tau[IPT3889-1].TauIn/flin)); fprintf( ioQQQ, " 5876:"); fprintf( ioQQQ,PrintEfmt("%9.2e", he3tau[IPT5876-1].TauIn/flin)); fprintf( ioQQQ, " 7065:"); fprintf( ioQQQ,PrintEfmt("%9.2e", he3tau[IPT7065-1].TauIn/flin)); fprintf( ioQQQ, " 2.06m:"); fprintf( ioQQQ,PrintEfmt("%9.2e", t206.TauIn/flin)); fprintf( ioQQQ, " 21 cm"); fprintf( ioQQQ,PrintEfmt("%9.2e", TauLines[ipH21cm].TauIn/flin)); fprintf( ioQQQ, "\n" ); /* print optical depths of some metal lines */ prtmet(); limit = MIN2(nhlevel,8); fprintf( ioQQQ, "\n Old hydro optical depths:" ); fprintf( ioQQQ , "%4i", 1 ); fprintf( ioQQQ,PrintEfmt("%9.2e", opac.tauabs[1][nh.ipHn[0][IP1S]-1]/fcon)); for( i=2; i <= limit; i++ ) { fprintf( ioQQQ , "%4ld",i); fprintf( ioQQQ,PrintEfmt("%9.2e", opac.tauabs[1][nh.ipHn[0][i]-1]/fcon)); } fprintf( ioQQQ, "\n" ); /* absorption continuum optical depths are energies of some hydrogen lines */ fprintf( ioQQQ, " New hydro optical depths:" ); fprintf( ioQQQ , "%4i", 1 ); fprintf( ioQQQ,PrintEfmt("%9.2e", opac.tauabs[0][nh.ipHn[0][IP1S]-1]/fcon)); for( i=2; i <= limit; i++ ) { fprintf( ioQQQ , "%4ld",i); fprintf( ioQQQ,PrintEfmt("%9.2e", opac.tauabs[0][nh.ipHn[0][i]-1]/fcon)); } fprintf( ioQQQ, "\n" ); fprintf( ioQQQ, " Old H Lines:" ); fprintf( ioQQQ, "%2i-%1i",2, 1 ); fprintf( ioQQQ,PrintEfmt("%9.2e", HydroLines[0][IP2P][IP1S].TauTot/flin )); for( i=2; i <= limit-i; i++ ) { fprintf( ioQQQ, "%2ld-%1ld",i + 1, i ); fprintf( ioQQQ,PrintEfmt("%9.2e", HydroLines[0][i+1][i].TauTot/flin )); } fprintf( ioQQQ, "\n" ); fprintf( ioQQQ, " New H Lines:" ); fprintf( ioQQQ, "%2i-%1i",2, 1 ); fprintf( ioQQQ,PrintEfmt("%9.2e", HydroLines[0][IP2P][IP1S].TauIn/flin )); for( i=2; i <= limit-i; i++ ) { fprintf( ioQQQ, "%2ld-%1ld",i + 1, i ); fprintf( ioQQQ,PrintEfmt("%9.2e", HydroLines[0][i+1][i].TauIn/flin )); } fprintf( ioQQQ, "\n" ); /* print helium lines if helium exists */ if( elmton.lgElmtOn[1] ) { fprintf( ioQQQ, " Old He Is optical depths:" ); for( i=1; i <= 8; i++ ) { fprintf( ioQQQ, "%4ld", i ); fprintf( ioQQQ,PrintEfmt("%9.2e", opac.tauabs[1][nhe1Com.nhe1[i-1]-1]/fcon) ); } fprintf( ioQQQ, "\n" ); fprintf( ioQQQ, " New He Is optical depths:" ); for( i=1; i <= 8; i++ ) { fprintf( ioQQQ, "%4ld", i ); fprintf( ioQQQ,PrintEfmt("%9.2e", opac.tauabs[0][nhe1Com.nhe1[i-1]-1]/fcon )); } fprintf( ioQQQ, "\n" ); fprintf( ioQQQ, " Old He Is Lines:" ); for( i=1; i <= 8; i++ ) { fprintf( ioQQQ, "%2ld-%1ld",i + 1, i ); fprintf( ioQQQ,PrintEfmt("%9.2e", he1tauCOM.he1lim[i-1][i]/flin )); } fprintf( ioQQQ, "\n" ); fprintf( ioQQQ, " New He Is Lines:" ); for( i=1; i <= 8; i++ ) { fprintf( ioQQQ, "%2ld-%1ld",i + 1, i ); fprintf( ioQQQ,PrintEfmt("%9.2e", he1tauCOM.he1tau[i-1][i]/ flin) ); } fprintf( ioQQQ, "\n" ); } # ifdef DEBUG_FUN fputs( " <->PrtAllTau()\n", debug_fp ); # endif return; }