c.. c..network common block declarations c..global sizes of the main storage c..abignet = maximum size of the network = maximum numer of isotopes c..abigrat = maximum number of reaction rates integer abignet,abigrat parameter (abignet = 500, 1 abigrat = 6000) c..ionmax = number of isotopes in the network c..nrat = number of reaction rates in the network integer ionmax,nrat common /netc1/ ionmax,nrat c..idnet = integer identification of network is being used c..netname = name of the network integer idnet character*8 netname common /netc2/ idnet,netname integer idaprox13,idaprox19,idtorch47,idtorch76, 1 idtorch127,idtorch200,idtorch489,idpp123,idcno, 2 idhotcno,idppcno,idwwrp,idpphotcno, 3 idiso7,idachain,idalfa7,idiso13,idtorchpp, 4 idtorchcno,idbigbang parameter (idaprox13 = 1, 1 idaprox19 = 2, 2 idtorch47 = 3, 3 idtorch76 = 4, 4 idtorch127 = 5, 5 idtorch200 = 6, 6 idtorch489 = 7, 7 idpp123 = 8, 8 idcno = 9, 9 idhotcno = 10, & idwwrp = 11, 1 idppcno = 12, 2 idpphotcno = 13, 3 idiso7 = 14, 4 idachain = 15, 5 idalfa7 = 16, 6 idiso13 = 17) parameter (idtorchpp = 18, 1 idtorchcno = 19, 2 idbigbang = 20) c..flags for tunring on or off or re-initializing weak interactions and c..screening corrections to the reaction rates integer weak_on,screen_on,screen_init common /flagc1/ weak_on,screen_on,screen_init c..logicals for the type of burning and storage for an c..adiabatic expansion/compression c.. c..one_step = true means do the integration in one time step mode c..hydrostatic = true means do the integration in hydrostatic mode c..expansion = true turns on the adiabatic mode c..psi = sign for an expansion (+1.0) or a compression (-1.0) c..den0 = initial density of the adiabatic run c..temp0 = initial temperature of the adiabatic run c..temp_stop = final adiabatic temperature at which the run terminates c..lfile = true means to write a file of the integration logical one_step,hydrostatic,expansion,lfile double precision psi,den0,temp0,temp_stop common /netadbt/ psi,den0,temp0,temp_stop, 1 one_step,hydrostatic,expansion,lfile c..logicals and storage for stopping the evolution if a chosen c..mass fraction drops below a certain value c..name_stop = name of isotope to stop on c..xmass_stop = mass fraction of name_stop at whick to halt c..id_stop = the identification number of name_stop character*4 name_stop integer id_stop double precision xmass_stop common /netnmst/ xmass_stop,id_stop,name_stop c..pointers and a logical for orienting the torch network in c..down-arrow mode which puts n,p,a at the end of the network or in c..up-arrow mode which puts n,p,a at the beginning of the network c..these are set in routine init_torch logical downarrow integer ionbeg,ionend common /netc3/ ionbeg,ionend,downarrow c..mass fractions, other composition variables c..xmass = mass fractions c..ymass = molar fractions c..ndens = number densities c..aion = number of nucleons c..zion = number of protons c..nion = number of neutrons c..bion = binding energies c..wpart = partition functions - statistical weights double precision xmass(abignet),ymass(abignet), 1 aion(abignet),zion(abignet), 2 nion(abignet),bion(abignet),wpart(abignet) common /netc6a/ xmass,ymass,aion,zion,nion,bion,wpart c..the raw reaction rates, their screening factors and the reaction rates c..ratraw = the unscreened, raw reaction rates c..scfac = screening factors c..ratdum = the screened reaction rates double precision ratraw(abigrat), 1 scfac(abigrat), 2 ratdum(abigrat) common /scc2b2/ ratraw,scfac,ratdum c..for tabular evaluation of the raw reaction rates c..allow storage for 120/points per decade c..logical use_tables for determing if tables are to be used integer nrattab,use_tables parameter (nrattab = 481) double precision rattab(abigrat,nrattab), 1 ttab(nrattab),dtab(abigrat) common /rcm2t/ rattab,ttab,dtab,use_tables c..reaction rate screening factors arrays c..scfacp = screening corrections with protons in an entrance channel c..scfaca = screening corrections with alphas in an entrance channel double precision scfacp(abignet),scfaca(abignet) common /scc1za/ scfacp,scfaca c..screening variables c..zs13 = (z1+z2)**(1./3.) c..zhat = combination of z1 and z2 raised to the 5/3 power c..zhat2 = combination of z1 and z2 raised to the 5/12 power c..lzav = log of effective charge c..aznut = combination of a1,z1,a2,z2 raised to 1/3 power double precision zs13(abigrat),zhat(abigrat), 1 zhat2(abigrat),lzav(abigrat), 2 aznut(abigrat),zs13inv(abigrat) common /netc6/ zs13,zhat,zhat2,lzav,aznut,zs13inv c..names of the isotopes and reaction rates c..flonam = name of the reaction sequence c..ratnam = name of the reaction rate c..ionam = name of the isotope in the network character*16 flonam(abigrat) character*16 ratnam(abigrat) character*5 ionam(abignet) common /netc4/ flonam,ratnam,ionam c..nuclear energy generation communication c..sdot = total nuclear energy generation rate c..sdot_flow = contributions to sdot from each isotope c..dtflag = determines if temperature derivative of sdot is taken c..ddflag = determines if density derivative of sdot is taken c..sdotdt = temp derivative of sdot c..sdotdd = density derivative of sdot c..sneut = total neutrino energy loss rate c..spair = neutrino loss rate from pair production c..splas = neutrino loss rate from plasmons c..sphot = neutrino loss from from photodisintegration c..sbrem = neutrino loss from bremmstralung c..srecomb = neutrino loss from recombination c..sneutpp = neutrino losses from the ppchains c..sneutcno = neutrino losses from the cno cycles c..spen = neutrino losses from p=>n c..snep = neutrino losses from n=>p c..snuw = neutrino losses from weak reactions on heavy nuclei integer dtflag,ddflag double precision sdot_flow(abignet), 1 sdot,sdotdt,sdotdd,sneut,spair,splas,sphot, 2 sbrem,srecomb,sneutpp,sneutcno,spen,snep,snuw common /netc7/ sdot_flow, 1 sdot,sdotdt,sdotdd,sneut,spair,splas,sphot, 2 sbrem,srecomb,sneutpp,sneutcno,spen,snep,snuw, 3 dtflag,ddflag c..reaction flow communication integer nflowx double precision flofor(abigrat),florev(abigrat), 1 flonet(abigrat) common /netflo/ flofor,florev,flonet,nflowx c..for nice identification of key isotopes integer nisotp parameter (nisotp=74) integer 1 ih1,iprot,ineut,ihe4,ih2,ih3,ihe3,ili6,ili7,ibe7, 2 ibe9,ib8,ib10,ib11,ic11,ic12,ic13,ic14,in13,in14, 3 in15,io14,io15,io16,io17,io18,if17,if18,if19,ine18, 4 ine19,ine20,ine21,ine22,ina21,ina22,ina23,img22,img23,img24, 5 img25,img26,ial25,ial26,ial27,isi27,isi28,isi29,isi30,ip30, 6 ip31,is30,is31,is32,icl35,iar36,ik39,ica40,isc45,iti44, 7 iti48,iv51,icr48,icr52,imn55,ife52,ife54,ife56,ico59,ini56, 8 ini58,icu63,izn60,izn64 common /netc8/ 1 ih1,iprot,ineut,ihe4,ih2,ih3,ihe3,ili6,ili7,ibe7, 2 ibe9,ib8,ib10,ib11,ic11,ic12,ic13,ic14,in13,in14, 3 in15,io14,io15,io16,io17,io18,if17,if18,if19,ine18, 4 ine19,ine20,ine21,ine22,ina21,ina22,ina23,img22,img23,img24, 5 img25,img26,ial25,ial26,ial27,isi27,isi28,isi29,isi30,ip30, 6 ip31,is30,is31,is32,icl35,iar36,ik39,ica40,isc45,iti44, 7 iti48,iv51,icr48,icr52,imn55,ife52,ife54,ife56,ico59,ini56, 8 ini58,icu63,izn60,izn64 c..for easy aprox13 rate identification: integer ir3a, irg3a, ircag, ir1212, ir1216, iroga, 1 iroag, irnega, irneag, irmgga, irmgag, irsiga, 2 irmgap, iralpa, iralpg, irsigp, irsiag, irsga, 3 irsiap, irppa, irppg, irsgp, irsag, irarga, 4 irsap, irclpa, irclpg, irargp, irarag, ircaga, 5 irarap, irkpa, irkpg, ircagp, ircaag, irtiga, 6 ircaap, irscpa, irscpg, irtigp, irtiag, ircrga, 7 irtiap, irvpa, irvpg, ircrgp, ircrag, irfega, 8 ircrap, irmnpa, irmnpg, irfegp, irfeag, irniga, 9 ir1616 common /netc12/ ir3a, irg3a, ircag, ir1212, ir1216, iroga, 1 iroag, irnega, irneag, irmgga, irmgag, irsiga, 2 irmgap, iralpa, iralpg, irsigp, irsiag, irsga, 3 irsiap, irppa, irppg, irsgp, irsag, irarga, 4 irsap, irclpa, irclpg, irargp, irarag, ircaga, 5 irarap, irkpa, irkpg, ircagp, ircaag, irtiga, 6 ircaap, irscpa, irscpg, irtigp, irtiag, ircrga, 7 irtiap, irvpa, irvpg, ircrgp, ircrag, irfega, 8 ircrap, irmnpa, irmnpg, irfegp, irfeag, irniga, 9 ir1616 c..add these rates for the aprox19 network integer irpp, ir33, ir34, ircpg, irnpg, iropg, 1 irnag, irfeap, ircopa, ircopg, irnigp, irfepg, 2 ircogp, ir52ng, ir53gn, ir53ng, ir54gn, irheng, 3 irhegn, irhng, irdgn, irdpg, irhegp, irpen, 4 ispen, irnep, isnep, irn56ec,isn56ec,ifa, 5 ifg common /netc13/ irpp, ir33, ir34, ircpg, irnpg, iropg, 1 irnag, irfeap, ircopa, ircopg, irnigp, irfepg, 2 ircogp, ir52ng, ir53gn, ir53ng, ir54gn, irheng, 3 irhegn, irhng, irdgn, irdpg, irhegp, irpen, 4 ispen, irnep, isnep, irn56ec,isn56ec,ifa, 5 ifg c..add these rates for the pp123 network integer irli7pa, irbepg, irb8ep, irbeec common /netc13a/ irli7pa, irbepg, irb8ep, irbeec c..add these rates for the cno network integer ir12cpg13n, ir12cpg13ninv, ir13nenu13c, 1 ir13cpg14n, ir13cpg14ninv, ir14npg15o, 2 ir14npg15oinv, ir15oenu15n, ir15npa12c, 3 ir15npa12cinv, ir15npg16o, ir15npg16oinv, 4 ir16opg17f, ir16opg17finv, ir17fenu17o, 5 ir17opa14n, ir17opa14ninv, ir17opg18f, 6 ir17opg18finv, ir18fenu18o, ir18opa15n, 7 ir18opa15ninv, ir18opg19f, ir18opg19finv, 8 ir19fpa16o, ir19fpa16oinv, ir13npg14o, 9 ir13npg14oinv, ir14oenu14n, ir14oap17f, & ir14oap17finv, ir17fpg18ne, ir17fpg18neinv, 1 ir18nenu18f, ir18fpa15o, ir18fpa15oinv, 2 ir16oag20ne, ir18neap21na, ir15oag19ne, 3 ir19nepg20na, ir26siap29p, ir44tiap47v common /netc13b/ ir12cpg13n, ir12cpg13ninv, ir13nenu13c, 1 ir13cpg14n, ir13cpg14ninv, ir14npg15o, 2 ir14npg15oinv, ir15oenu15n, ir15npa12c, 3 ir15npa12cinv, ir15npg16o, ir15npg16oinv, 4 ir16opg17f, ir16opg17finv, ir17fenu17o, 5 ir17opa14n, ir17opa14ninv, ir17opg18f, 6 ir17opg18finv, ir18fenu18o, ir18opa15n, 7 ir18opa15ninv, ir18opg19f, ir18opg19finv, 8 ir19fpa16o, ir19fpa16oinv, ir13npg14o, 9 ir13npg14oinv, ir14oenu14n, ir14oap17f, & ir14oap17finv, ir17fpg18ne, ir17fpg18neinv, 1 ir18nenu18f, ir18fpa15o, ir18fpa15oinv, 2 ir16oag20ne, ir18neap21na, ir15oag19ne, 3 ir19nepg20na, ir26siap29p, ir44tiap47v c..add these rates for the rp network integer irpg19e, irap18e, irpg14n, irpg22g, irap26i, 1 irap44t, irpg12c, irap14o, irpg17f, irgp17f, 2 irpg16o, irag15o, irag16o common /netc13c/ irpg19e, irap18e, irpg14n, irpg22g, irap26i, 1 irap44t, irpg12c, irap14o, irpg17f, irgp17f, 2 irpg16o, irag15o, irag16o c..add these rates for the bigbang network integer irweakn, irweakp, irpngd, irpngdinv, 1 irdpn2p, irdpn2pinv, irdngt, irdngtinv, 2 irddpt, irddptinv, irdpg3he, irdpg3heinv, 3 irddn3he, irddn3heinv, irtpn3he, irtpn3heinv, 4 irddg4he, irddg4heinv, irtpg4he, irtpg4heinv, 5 irtdn4he, irtdn4heinv, irtt2n4he, irtt2n4heinv, 6 ir3heng4he, ir3heng4heinv, 7 ir3hedp4he, ir3hedp4heinv, 8 ir3hetd4he, ir3hetd4heinv, ir3hetnp4he, 9 ir3hetnp4heinv, ir33inv, ir4henpg6li, & ir4henpg6liinv, ir4hedg6li, ir4hedg6liinv, 1 ir4hetn6li, ir4hetn6liinv, ir6lip3he4he, 2 ir6lip3he4heinv, ir4hetg7li, ir4hetg7liinv, 3 ir7lipa4he, ir7lipa4heinv, ir7lidn2a, 4 ir7lit2n2a, ir7li3henp2a, ir4he3heg7be, 5 ir4he3heg7beinv, ir6lipg7be, ir6lipg7beinv, 6 ir7lipn7be, ir7lipn7beinv common /netc13d/ irweakn, irweakp, irpngd, irpngdinv, 1 irdpn2p, irdpn2pinv, irdngt, irdngtinv, 2 irddpt, irddptinv, irdpg3he, irdpg3heinv, 3 irddn3he, irddn3heinv, irtpn3he, irtpn3heinv, 4 irddg4he, irddg4heinv, irtpg4he, irtpg4heinv, 5 irtdn4he, irtdn4heinv, irtt2n4he, irtt2n4heinv, 6 ir3heng4he, ir3heng4heinv, 7 ir3hedp4he, ir3hedp4heinv, 8 ir3hetd4he, ir3hetd4heinv, ir3hetnp4he, 9 ir3hetnp4heinv, ir33inv, ir4henpg6li, & ir4henpg6liinv, ir4hedg6li, ir4hedg6liinv, 1 ir4hetn6li, ir4hetn6liinv, ir6lip3he4he, 2 ir6lip3he4heinv, ir4hetg7li, ir4hetg7liinv, 3 ir7lipa4he, ir7lipa4heinv, ir7lidn2a, 4 ir7lit2n2a, ir7li3henp2a, ir4he3heg7be, 5 ir4he3heg7beinv, ir6lipg7be, ir6lipg7beinv, 6 ir7lipn7be, ir7lipn7beinv integer ir7bedp2a, ir7betnp2a, ir7be3he2p2a, 1 ir9bepa6li, ir9bepa6liinv, 2 irbe7pgb8, irbe7pgb8inv, irli6agb10, 3 irli6agb10inv, irli7anb10, irli7anb10inv, 4 irbe9pgb10, irbe9pgb10inv, irb10pabe7, 5 irb10pabe7inv, irli7agb11, irli7agb11inv, 6 irb11pa2he4, irb11pa2he4inv, ir7beag11c, 7 ir7beag11cinv, ir11bpn11c, ir11bpn11cinv, 8 ir8bap11c, ir8bap11cinv, ir10bpg11c, 9 ir10bpg11cinv, irc11na, ir8beag12c, & ir8beag12cinv, ir9bean12c, ir9bean12cinv, 1 ir11bpg12c, ir11bpg12cinv, ir11bap14c, 2 ir11bap14cinv common /netc13d/ ir7bedp2a, ir7betnp2a, ir7be3he2p2a, 1 ir9bepa6li, ir9bepa6liinv, 2 irbe7pgb8, irbe7pgb8inv, irli6agb10, 3 irli6agb10inv, irli7anb10, irli7anb10inv, 4 irbe9pgb10, irbe9pgb10inv, irb10pabe7, 5 irb10pabe7inv, irli7agb11, irli7agb11inv, 6 irb11pa2he4, irb11pa2he4inv, ir7beag11c, 7 ir7beag11cinv, ir11bpn11c, ir11bpn11cinv, 8 ir8bap11c, ir8bap11cinv, ir10bpg11c, 9 ir10bpg11cinv, irc11na, ir8beag12c, & ir8beag12cinv, ir9bean12c, ir9bean12cinv, 1 ir11bpg12c, ir11bpg12cinv, ir11bap14c, 2 ir11bap14cinv c..still for the bigbang double precision omega,cmbtemp,hubble,numfam common /netc13d/ omega,cmbtemp,hubble,numfam c..for electron capture on proton and positron capture on neutron reads c double precision rrpen(6,7),rrnep(6,7) c common /rnepc1/ rrpen,rrnep c..for the ffn weak rates integer nfuldim c parameter (nfuldim = 190) parameter (nfuldim = 600) double precision datful(5*nfuldim,6,7) common /fulcom/ datful double precision datfuleq(5*nfuldim*6*7) equivalence (datful,datfuleq) integer icode(nfuldim),nful,nfulnot double precision qn(nfuldim),rectot,rpdtot,redtot,eectot, 1 epdtot,eedtot,wrate common /fuldat/ qn,rectot,rpdtot,redtot,eectot,epdtot, 2 eedtot,wrate,icode,nful,nfulnot double precision recful(nfuldim),rpdful(nfuldim), 1 redful(nfuldim),eec(nfuldim),eed(nfuldim) common /fulrat/ recful,rpdful,redful,eec,eed c..for reading the strong and e&m rate coefficients integer cxdim parameter (cxdim=30000) double precision cx(cxdim) common /strngc/ cx c..for the cross sections and rates c..sig = strong & weak reaction rates c..signu = neutrino reaction rates integer ic1(10,abignet),ic2(10,abignet),nrr(7,abignet), 1 nrrneut(7,abignet),ist(abignet), 2 kmax,inetin common /crsc1/ ic1,ic2,nrr,nrrneut,ist,kmax,inetin double precision sigraw(14,abignet),sig(14,abignet), 1 as(6*abignet),gs(6*abignet), 2 signuc(4,abignet) common /crsc2/ sigraw,sig,as,gs,signuc c..for setting the torch network c..this will cover 100 different entries, which should be plenty integer izzz(100),inmin(100),inmax(100) common /zetc1/ izzz,inmin,inmax c..various hardwired rate names in torch double precision rpen,rnep,ra3,ral,r24,r23,r23n,r20,r32, 1 r31,r31n,r30,r28,rc28,rc27p,rc27n,rc24a,rli7pag, 2 rb11pa,rb8epn,rbe9pd,rc11na,raan,rgaan,rpp,rpng, 3 rpgn,rh2h3n,rh3pg,rhe4gp,rh3h3,rhe3he3,rhe3ng, 4 rhe4gn,rhe3dp,rhe3td,rhe3tnp common /hnamc1/ rpen,rnep,ra3,ral,r24,r23,r23n,r20,r32, 1 r31,r31n,r30,r28,rc28,rc27p,rc27n,rc24a,rli7pag, 2 rb11pa,rb8epn,rbe9pd,rc11na,raan,rgaan,rpp,rpng, 3 rpgn,rh2h3n,rh3pg,rhe4gp,rh3h3,rhe3he3,rhe3ng, 4 rhe4gn,rhe3dp,rhe3td,rhe3tnp c..various hardwired raw rate names in torch double precision rpen_raw,rnep_raw,ra3_raw,ral_raw, 1 r24_raw,r23_raw,r23n_raw,r20_raw,r32_raw, 2 r31_raw,r31n_raw,r30_raw,r28_raw,rc28_raw, 3 rc27p_raw,rc27n_raw,rc24a_raw,rli7pag_raw, 4 rb11pa_raw,rb8epn_raw,rbe9pd_raw,rc11na_raw, 5 raan_raw,rgaan_raw,rpp_raw,rpng_raw,rpgn_raw, 6 rh2h3n_raw,rh3pg_raw,rhe4gp_raw,rh3h3_raw, 7 rhe3he3_raw,rhe3ng_raw,rhe4gn_raw,rhe3dp_raw, 8 rhe3td_raw,rhe3tnp_raw common /hnamc2/ rpen_raw,rnep_raw,ra3_raw,ral_raw, 1 r24_raw,r23_raw,r23n_raw,r20_raw,r32_raw, 2 r31_raw,r31n_raw,r30_raw,r28_raw,rc28_raw, 3 rc27p_raw,rc27n_raw,rc24a_raw,rli7pag_raw, 4 rb11pa_raw,rb8epn_raw,rbe9pd_raw,rc11na_raw, 5 raan_raw,rgaan_raw,rpp_raw,rpng_raw,rpgn_raw, 6 rh2h3n_raw,rh3pg_raw,rhe4gp_raw,rh3h3_raw, 7 rhe3he3_raw,rhe3ng_raw,rhe4gn_raw,rhe3dp_raw, 8 rhe3td_raw,rhe3tnp_raw c..various hardwired branching ratio names in torch double precision b24n,b24p,b24a,b32n,b32p,b32d,b32a,bc27p,bc27n, 1 bc24a common /hnamc3/ b24n,b24p,b24a,b32n,b32p,b32d,b32a,bc27p,bc27n, 1 bc24a c..lets try having a work array that gets used whenever double precision zwork1(abignet) common /zworkc1/ zwork1