[Yt-svn] yt-commit r1010 - trunk/yt/lagos

britton at wrangler.dreamhost.com britton at wrangler.dreamhost.com
Mon Dec 15 15:00:59 PST 2008


Author: britton
Date: Mon Dec 15 15:00:59 2008
New Revision: 1010
URL: http://yt.spacepope.org/changeset/1010

Log:
Added factor of h^2 to over density field.  This was missing from rho_crit_now, 
so old calculations were too low by a factor of h^2.



Modified:
   trunk/yt/lagos/EnzoFields.py

Modified: trunk/yt/lagos/EnzoFields.py
==============================================================================
--- trunk/yt/lagos/EnzoFields.py	(original)
+++ trunk/yt/lagos/EnzoFields.py	Mon Dec 15 15:00:59 2008
@@ -25,7 +25,7 @@
 
 from UniversalFields import *
 
-rho_crit_now = 1.8788e-29
+rho_crit_now = 1.8788e-29 # times h^2
 
 class EnzoFieldContainer(CodeFieldInfoContainer):
     _shared_state = {}
@@ -104,7 +104,7 @@
 
 def Overdensity(field,data):
     return (data['Density'] + data['particle_density']) / \
-        (rho_crit_now * ((1+data.pf['CosmologyCurrentRedshift'])**3))
+        (rho_crit_now * (data.pf['CosmologyHubbleConstant']**2) * ((1+data.pf['CosmologyCurrentRedshift'])**3))
 add_field("Overdensity",function=Overdensity,units=r"")
 
 # Now we add all the fields that we want to control, but we give a null function



More information about the yt-svn mailing list