Commits

Britton Smith  committed 1a27706

Fixing temperature units and initializing the photoheating and
photoionization rates to 0 if uv background is off.

  • Participants
  • Parent commits 0f584c1

Comments (0)

Files changed (5)

File src/clib/calculate_cooling_time.C

 
   /* Calculate temperature units. */
 
-  gr_float temperature_units =  mh*POW(my_units.length_units/
-                                       my_units.time_units,2)/kboltz;
+  gr_float temperature_units =  mh * POW(my_units.a_units * 
+                                         my_units.length_units /
+                                         my_units.time_units, 2) / kboltz;
 
   /* Call the fortran routine to solve cooling equations. */
 

File src/clib/calculate_pressure.C

  
     /* Calculate temperature units. */
 
-    gr_float temperature_units =  mh*POW(my_units.length_units/
-                                         my_units.time_units,2)/kboltz;
+    gr_float temperature_units =  mh * POW(my_units.a_units * 
+                                           my_units.length_units /
+                                           my_units.time_units, 2) / kboltz;
 
     gr_float number_density, nH2, GammaH2Inverse,
       GammaInverse = 1.0/(my_chemistry.Gamma-1.0), x, Gamma1, temp;

File src/clib/calculate_temperature.C

 
   /* Calculate temperature units. */
 
-  gr_float temperature_units =  mh*POW(my_units.length_units/
-                                       my_units.time_units,2)/kboltz;
+  gr_float temperature_units =  mh * POW(my_units.a_units * 
+                                         my_units.length_units /
+                                         my_units.time_units, 2) / kboltz;
 
   gr_float number_density, tiny_number = 1.-20;
   gr_float inv_metal_mol = 1.0 / MU_METAL;

File src/clib/initialize_chemistry_data.C

   my_chemistry.n_cr_d1 = new gr_float[my_chemistry.NumberOfTemperatureBins];
   my_chemistry.n_cr_d2 = new gr_float[my_chemistry.NumberOfTemperatureBins]; 
 
+  my_chemistry.k24 = 0;
+  my_chemistry.k25 = 0;
+  my_chemistry.k26 = 0; 
+  my_chemistry.k27 = 0;
+  my_chemistry.k28 = 0;
+  my_chemistry.k29 = 0; 
+  my_chemistry.k30 = 0; 
+  my_chemistry.k31 = 0; 
+  my_chemistry.piHI = 0;
+  my_chemistry.piHeII = 0;
+  my_chemistry.piHeI = 0; 
+
   gr_int ioutput = 1;
-  gr_float temperature_units = mh*POW(my_units.length_units/
-                                   my_units.time_units,2)/kboltz;
+  gr_float temperature_units =  mh * POW(my_units.a_units * 
+                                         my_units.length_units /
+                                         my_units.time_units, 2) / kboltz;
 
   /* Call FORTRAN routine to do the hard work. */
  

File src/clib/solve_chemistry.C

 
   /* Calculate temperature units. */
 
-  gr_float temperature_units =  mh*POW(my_units.length_units/
-                                       my_units.time_units,2)/kboltz;
+  gr_float temperature_units =  mh * POW(my_units.a_units * 
+                                         my_units.length_units /
+                                         my_units.time_units, 2) / kboltz;
 
   /* Call the fortran routine to solve cooling equations. */