Working on modifying neqcooling stuff to work with equation of state module

I added a new EoS called EOS_MULTISPECIES_GAS which uses an array of species mass, free electron number, and gamma, to calculate pressure, temperature, etc…

And I've also started to look through the neqcooling routines to see how the code handles some chemistry stuff… Apparently the last version of AstroBEAR did not support any molecular hydrogen - just hydrogen and helium ionizations…

I tried looking back in the repository for molecular hydrogen routines and found the 1st revision checked into the repository had

 OIcool=OI_cool(nvec(iH2),nvec(iH),Temp)
 H2cool=H2_cool(nvec(iH2),nvec(iH),Temp)
 dmcool = DMCoolingRate(Temp)*ne*(nvec(iH)+nvec(iHII))

 H2diss = H2_diss(nvec(iH2), nvec(iH), nvec(iHe), ne, Temp)
 H2term = -H2diss + H2_dust_Recomb_table(nvec(iH)+nvec(iHII),nvec(iH),Temp)
 hion = H_ioniz_table(nvec(iH),ne,Temp) 
 hrec = H_recomb_table(nvec(iHII),ne,Temp)
 heion = He_ioniz_table(nvec(iHe),ne,Temp)
 herec = He_recomb_table(nvec(iHeII),ne,Temp)

 dqdt(iE)=-(OICool+H2Cool+dmcool+BindH2*H2diss+IonH*hion+IonHe*heion)

 dqdt(iH2)    = H2term
 dqdt(iHII)   = (hion-hrec)
 dqdt(iH)     = (-(hion-hrec) - 2.d0*H2term)
 dqdt(iHe)    = (herec-heion)
 dqdt(iHeII)  = -dqdt(iHe)

And there were two sections commented out. The first one had to do with a critical density for molecular H2 cooling

 CDH2=CriticalDenH2(nvec(iH),Temp)
 ! function used to smothly conect high HI and low HI density cooling rates
 CD=one/(one+CDH2)
 IF(CD<0.01) THEN
   H2cool=H2_critical_cool_table(nvec(iH2),Temp)*(one-CD)
 ELSE IF(CD<0.99) THEN
   H2cool=H2_cool(nvec(iH2),nvec(iH),Temp)*CD+H2_critical_cool_table(nvec(iH2),Temp)*(one-CD)
 ELSE
   H2cool=H2_cool(nvec(iH2),nvec(iH),Temp)
 END IF

and the other had to do with dust cooling

 dustcool=dust_cool_table(nHneuc-nvec(iH2),Temp)  ! dust cooling due to H sticking
 dqdt(iE)=-(OICool+H2Cool+dmcool+BindH2*H2diss+IonH*hion+IonHe*heion+dustcool)

Then in 2009 Bobby made a few changes

He added Helium double ionization though forgot to modify the source term for HeII to account for ionization / recombination

heIIion = HeII_ioniz_table(nvec(iHeII),ne,Temp) 
heIIIrec = HeIII_recomb_table(nvec(iHeIII),ne,Temp)
dqdt(iHeIII) = (heIIion-heIIIrec)
dqdt(iHeII)  = -dqdt(iHe)

He also (accidentally?) removed molecular hydrogen reactions

He then modified the dm cooling contribution from

DMCoolingRate(Temp)*ne*(nvec(iH)+nvec(iHII))

to

DmCoolingRate(Temp)*nvec(iHII) * (nvec(iH)+nvec(iHii))

which amounts to assuming that the number of free electrons is equal to the number of ionized hydrogen atoms… Which isn't true if there is helium around to ionize…

He also added hydrogen excitation cooling

Hex_cool=ne*nvec(iH)*HexCoolingRate(Temp)

and recombination energy losses

Rec_cool=(Boltzmann*Temp)*hrec + (Boltzmann*Temp)*herec

While the average energy of the recombining electron is 3/2 kB T, I vaguely remember Pat saying something about integrating over the cross sections and the velocity distribution etc…. and that the energy loss is just kB T

And finally he added BBC Cooling and changed the name of the dmcooling table file to DMcooling.tab instead of cooling.tab

Then 1 month later Jacob turned off HeII ionization and HeIII recombination completely which seems reasonable as it was only half-implemented…

And then Bobby implemented a Van der Waals equation of state…

Cooling Processes

Process notes Dalgarno McCray BBC II Cool NeqCooling ZCooling
Hydrogen Ionization X X
Hydrogen Recombination X X
Helium Ionization X X
Helium Recombination X X
gas-grain collisions
H2 dissociation
H2 formation
H2 rovibrational
OH rovibrational
H2O rovibrational
CO rovibrational
atomic collisions
brehsstrahlung (free-free)
hydrogen-impact excitation of metals Important at low x (and low T) X X (weighted by x) X (weighted by x)
electron-impact excitation of metals = X X
electron-impact excitation of hydrogen = 2X 2X
photo-electric heating from small grains and PAH's
cosmic rays
soft x-rays

Comments

No comments.