1. Matthew Turk
  2. enzo-dev

Commits

Daniel Reynolds  committed 912ceaa Merge

merged to tip

  • Participants
  • Parent commits cac60ff, 6adbde9
  • Branches week-of-code

Comments (0)

Files changed (60)

File run/Cooling/OneZoneFreefallTest/plot.py

View file
 import sys
 
 from yt.mods import *
-from yt.analysis_modules.simulation_handler.api import EnzoSimulation
 
 do_fH2 = True
 do_t_cool = True
 else:
     keyword = 'without_dust'
 
-par_file = sys.argv[1]
-es = EnzoSimulation(par_file, get_data_by_force=True, initial_time=0)
+es = EnzoSimulation('OneZoneFreefallTest.enzo', find_outputs=True)
+es.get_time_series()
 
 T = []
 n = []
 t_cool = []
 t_dyn = []
 
-for output in es.allOutputs:
-    print output['filename']
-    pf = load(output['filename'])
+for pf in es:
     T.append(pf.h.grids[0]['Temperature'])
     n.append(pf.h.grids[0]['NumberDensity'][0,0,0])
     Z.append(pf.h.grids[0]['Metallicity'])
 
 met = na.round(na.log10(Z[0,0,:,0]))
 for i in range(T.shape[2]):
-    pylab.loglog(n, T[:, 0, i, 0], label='log (Z/Z$_{\odot}$) = %d' % met[i],
+    pylab.loglog(n, T[:, 0, i, 0], 
+                 label='log (Z/Z$_{\odot}$) = %d' % met[i],
                  color=colors[i], linestyle='-')
     if dust:
-        pylab.loglog(n, Tdust[:, 0, i, 0], color=colors[i], linestyle='--')
+        pylab.loglog(n, Tdust[:, 0, i, 0], 
+                     color=colors[i], linestyle='--')
 pylab.xlim(xmin=1.0)
 pylab.ylim(1e0, 1e4)
 pylab.xlabel('n [cm$^{-3}$]')
 
 if do_fH2:
     for i in range(T.shape[2]):
-        pylab.loglog(n, fH2[:, 0, i, 0], label='log (Z/Z$_{\odot}$) = %d' % met[i],
+        pylab.loglog(n, fH2[:, 0, i, 0], 
+                     label='log (Z/Z$_{\odot}$) = %d' % met[i],
                      color=colors[i])
     pylab.xlim(xmin=1.0)
     pylab.xlabel('n [cm$^{-3}$]')
 
 if do_t_cool:
     for i in range(T.shape[2]):
-        pylab.loglog(n, (t_cool[:, 0, i, 0]/t_dyn), label='log (Z/Z$_{\odot}$) = %d' % met[i],
+        pylab.loglog(n, (t_cool[:, 0, i, 0]/t_dyn), 
+                     label='log (Z/Z$_{\odot}$) = %d' % met[i],
                      color=colors[i])
     pylab.xlim(xmin=1.0)
     pylab.xlabel('n [cm$^{-3}$]')

File run/Cosmology/AMRZeldovichPancake/AMRZeldovichPancake.enzo

View file
+#
+# AMR PROBLEM DEFINITION FILE: Zeldovich Pancake (AMR version)
+#
+#  define problem
+#
+ProblemType                = 20      // Zeldovich pancake
+TopGridRank                = 1
+TopGridDimensions          = 16
+SelfGravity                = 1       // gravity on
+TopGridGravityBoundary     = 0       // Periodic BC for gravity
+LeftFaceBoundaryCondition  = 3       // same for fluid
+RightFaceBoundaryCondition = 3
+
+
+StopCycle = 5
+#
+#  problem parameters
+#
+ZeldovichPancakeCentralOffset    = 0
+ZeldovichPancakeCollapseRedshift = 1
+#
+#  define cosmology parameters
+#
+ComovingCoordinates        = 1       // Expansion ON
+CosmologyHubbleConstantNow = 0.5
+CosmologyComovingBoxSize   = 64.0    // 64 Mpc/h
+CosmologyMaxExpansionRate  = 0.01    //
+CosmologyInitialRedshift   = 20      // start at z=20
+CosmologyFinalRedshift     = 0
+CosmologyOmegaMatterNow    = 1
+CosmologyOmegaLambdaNow    = 0
+GravitationalConstant      = 1       // this must be true for cosmology
+
+#
+#  set I/O and stop/start parameters
+#
+dtDataDump             = 100.0
+#
+#  set hydro parameters
+#
+Gamma                  = 1.6667
+CourantSafetyNumber    = 0.5
+PPMDiffusionParameter  = 0       // diffusion off
+DualEnergyFormalism    = 1       // use total & internal energy
+ConservativeInterpolation = 0
+FluxCorrection            = 1
+InterpolationMethod       = 1
+#
+#  set grid refinement parameters
+#
+StaticHierarchy           = 0    // dynamic hierarchy
+MaximumRefinementLevel    = 2    // use up to 2 levels
+RefineBy                  = 4    // refinement factor
+CellFlaggingMethod        = 2 3    // use mass & shock criteria for refinement 
+MinimumOverDensityForRefinement  = 1.5  // times the initial overdensity
+#
+#  set some global parameters
+#
+MinimumEfficiency      = 0.4     // better value for 1d than 0.2

File run/Cosmology/AMRZeldovichPancake/AMRZeldovichPancake.enzotest

View file
+name = 'AMRZeldovichPancake'
+answer_testing_script = 'test_amrzeldovich.py'
+nprocs = 1
+runtime = 'short'
+hydro = True
+gravity = True
+AMR = True
+cosmology = True
+dimensionality = 1
+author = 'John Wise'
+max_time_minutes = 1
+fullsuite = True
+pushsuite = True
+quicksuite = True

File run/Cosmology/AMRZeldovichPancake/AMRZeldovichPancake.png

Added
New image

File run/Cosmology/AMRZeldovichPancake/notes.txt

View file
+AMRZeldovichPancake
+----------
+
+(John Wise, July 2010)
+
+This test simulates a collapsing sinusoidal cosmological pertubation
+in one-dimension, commonly known as a Zel'dovich pancake.  This
+problem tests both the hydrodynamics and gravity solvers and the
+implementation of cosmological expansion.  The system will form a
+caustic in the center of the domain with a density and temperature
+peak.  There should be a small dip in temperature at the center of the
+broad peak.  In flat cosmology, there exists an analytical solution in
+the linear phase of collapse and is given in Zel'dovich (1970).
+
+This test runs to completion and creates 2 outputs -- the initial
+(z=20) and final (z=0) states.  There are two levels of refinement by
+factors of 4.  The finest resolution element is the same as the
+non-AMR version of this test.  There are some small differences between
+Enzo v1.5 and v2.0 at the parent-child grid boundaries.

File run/Cosmology/AMRZeldovichPancake/scripts.py

View file
+from matplotlib import use; use('Agg')
+import matplotlib.pyplot as plt
+from yt.mods import *
+
+pf = load('DD0001/data0001')
+ray = pf.h.ortho_ray(0,(0,0))
+
+plt.subplot(311)
+plt.semilogy(ray['x'], ray['Density'], c='k', ls='-', marker='.', ms=5)
+plt.ylabel(r'Density (cm$^{-3}$)')
+
+plt.subplot(312)
+plt.semilogy(ray['x'], ray['Temperature'], c='k', ls='-', marker='.', ms=5)
+plt.ylabel('Temperature (K)')
+
+plt.subplot(313)
+plt.plot(ray['x'], 1e-5*ray['x-velocity'], c='k', ls='-', marker='.', ms=5)
+plt.ylabel('Velocity (km/s)')
+plt.xlabel('x')
+
+plt.savefig('AMRZeldovichPancake.png')

File run/Cosmology/AdiabaticExpansion/AdiabaticExpansion.enzo

View file
+#
+# AMR PROBLEM DEFINITION FILE: Adiabatic Expansion test
+#
+#  define problem
+#
+ProblemType                = 22      // Adiabatic Expansion
+TopGridRank                = 3
+TopGridDimensions          = 16 16 16
+SelfGravity                = 1       // gravity off
+TopGridGravityBoundary     = 0       // Periodic BC for gravity
+LeftFaceBoundaryCondition  = 3 3 3      // same for fluid
+RightFaceBoundaryCondition = 3 3 3
+#
+StaticRefineRegionLevel[0] = 0
+#StaticRefineRegionLeftEdge[0] = 0.375 0.375 0.375 
+#StaticRefineRegionRightEdge[0] = 0.625 0.625 0.625
+StaticRefineRegionLeftEdge[0] = 0.475 0.475 0.475 
+StaticRefineRegionRightEdge[0] = 0.725 0.725 0.725
+#
+#  problem parameters
+#
+AdiabaticExpansionInitialTemperature = 1   // K
+AdiabaticExpansionInitialVelocity    = 100   // km/s
+AdiabaticExpansionOmegaBaryonNow     = 1.0
+#
+#  define cosmology parameters
+
+
+ComovingCoordinates        = 1       // Expansion ON
+CosmologyHubbleConstantNow = 1.
+CosmologyOmegaMatterNow = 1
+CosmologyOmegaLambdaNow = 0
+CosmologyComovingBoxSize   = 64.0    // 64 Mpc/h
+CosmologyMaxExpansionRate  = 0.05    //
+CosmologyInitialRedshift   = 20      // start at z=20
+CosmologyFinalRedshift     = 0
+GravitationalConstant      = 1       // this must be true for cosmology
+#
+#  set I/O and stop/start parameters
+#
+Initialdt              = 1e-16
+dtDataDump             = 5.0
+#CycleSkipDataDump = 1
+#StopCycle = 15
+
+#
+#  set hydro parameters
+#
+InterpolationMethod    = 1
+ConservativeInterpolation = 1
+UseHydro               = 1
+
+HydroMethod            = 0
+Gamma                  = 1.6667
+CourantSafetyNumber    = 0.2
+PPMDiffusionParameter  = 0       // diffusion off
+DualEnergyFormalism    = 1       // use total & internal energy
+FluxCorrection = 0
+MaximumGravityRefinementLevel = 5
+#
+#  set grid refinement parameters
+#
+StaticHierarchy           = 0    // static hierarchy
+CellFlaggingMethod        = 2
+#
+#  set some global parameters
+#
+ParallelRootGridIO = 0
+PotentialIterations = 0
+WritePotential  = 1
+ComputePotential = 1
+Debug1 = 1

File run/Cosmology/AdiabaticExpansion/AdiabaticExpansion.enzotest

View file
+name = 'AdiabaticExpansion'
+answer_testing_script = None
+nprocs = 1
+runtime = 'short'
+hydro = True
+gravity = True
+AMR = True
+cosmology = True
+dimensionality = 1
+max_time_minutes = 1
+fullsuite = True
+pushsuite = True
+quicksuite = True

File run/Cosmology/Hydro/AMRCosmology/AMRCosmology.enzo

-#
-# AMR PROBLEM DEFINITION FILE: Cosmology Simulation (amr version)
-#
-#  define problem
-#
-ProblemType                = 30      // cosmology simulation
-TopGridRank                = 3
-TopGridDimensions          = 16 16 16
-SelfGravity                = 1       // gravity on
-TopGridGravityBoundary     = 0       // Periodic BC for gravity
-LeftFaceBoundaryCondition  = 3 3 3   // same for fluid
-RightFaceBoundaryCondition = 3 3 3
-#
-#  problem parameters
-#
-CosmologySimulationOmegaBaryonNow       = 0.04
-CosmologySimulationOmegaCDMNow          = 0.26
-CosmologySimulationDensityName          = GridDensity
-CosmologySimulationVelocity1Name        = GridVelocities
-CosmologySimulationVelocity2Name        = GridVelocities
-CosmologySimulationVelocity3Name        = GridVelocities
-CosmologySimulationParticlePositionName = ParticlePositions
-CosmologySimulationParticleVelocityName = ParticleVelocities
-#
-#  define cosmology parameters
-#
-ComovingCoordinates        = 1       // Expansion ON
-CosmologyOmegaMatterNow    = 0.3
-CosmologyOmegaLambdaNow    = 0.7
-CosmologyHubbleConstantNow = 0.5     // in 100 km/s/Mpc
-CosmologyComovingBoxSize   = 16.0    // in Mpc/h
-CosmologyMaxExpansionRate  = 0.015   // maximum allowed delta(a)/a
-CosmologyInitialRedshift   = 30      // 
-CosmologyFinalRedshift     = 0       //
-GravitationalConstant      = 1       // this must be true for cosmology
-#
-#  set I/O and stop/start parameters
-#
-StopCycle              = 1000          // stop after this many cycles
-dtDataDump             = 10.0         // dump at beginning and end
-#CycleSkipDataDump      = 20
-DataDumpName           = output_
-ParallelRootGridIO     = 1
-CosmologyOutputRedshift[0] = 10
-CosmologyOutputRedshift[1] = 8
-CosmologyOutputRedshift[2] = 6
-CosmologyOutputRedshift[3] = 4
-CosmologyOutputRedshift[4] = 3
-CosmologyOutputRedshift[5] = 2
-CosmologyOutputRedshift[6] = 1
-CosmologyOutputRedshift[7] = 0
-#
-#  set hydro parameters
-#
-Gamma                  = 1.6667
-PPMDiffusionParameter  = 0       // diffusion off
-DualEnergyFormalism    = 1       // use total & internal energy
-InterpolationMethod    = 1     // SecondOrderA
-CourantSafetyNumber    = 0.5
-ParticleCourantSafetyNumber = 0.8
-RadiativeCooling            = 0
-MultiSpecies                = 0
-#
-#  set grid refinement parameters
-#
-StaticHierarchy           = 0    // dynamic hierarchy
-MaximumRefinementLevel    = 2    // use up to 2 levels
-RefineBy                  = 2    // refinement factor
-CellFlaggingMethod        = 2 4    // use baryon mass for refinement 
-MinimumEfficiency         = 0.4  // fraction efficiency
-MinimumOverDensityForRefinement = 4.0 // times the initial density
-MinimumMassForRefinementLevelExponent = -0.3
-MinimumEnergyRatioForRefinement = 0.4 // min Egas/Etot for shock refinement
-#RefineRegionLeftEdge            = 0.15 0.20 0.41
-#RefineRegionRightEdge           = 0.35 0.45 0.79
-
-HierarchyFileInputFormat = 1;   // ASCII
-HierarchyFileOutputFormat = 2 ; // both HDF5 and ASCII
-
-#
-#  set some global parameters
-#
-GreensFunctionMaxNumber   = 30   // # of greens function at any one time
-

File run/Cosmology/Hydro/AMRCosmology/AMRCosmology.enzotest

-name = 'AMRCosmology'
-answer_testing_script = None
-nprocs = 1
-runtime = 'unknown'
-hydro = True
-gravity = True
-AMR = True
-cosmology = True
-dimensionality = 3
-max_time_minutes = 99999
-fullsuite = False
-pushsuite = False
-quicksuite = False

File run/Cosmology/Hydro/AMRNestedCosmology/AMRNestedCosmology.enzo

-#
-# nested cosmology simulation
-#
-ProblemType                    = 30
-TopGridRank                    = 3
-SelfGravity                    = 1
-TopGridGravityBoundary         = 0
-LeftFaceBoundaryCondition      = 3 3 3
-RightFaceBoundaryCondition     = 3 3 3
-BaryonSelfGravityApproximation = 1
-TopGridDimensions              = 32 32 32
-
-#
-#  problem parameters
-#
-CosmologySimulationOmegaBaryonNow       = 0.04
-CosmologySimulationOmegaCDMNow          = 0.26
-CosmologySimulationInitialTemperature   = 140.0  // DEBATABLE
-CosmologySimulationDensityName          = GridDensity
-CosmologySimulationVelocity1Name        = GridVelocities
-CosmologySimulationVelocity2Name        = GridVelocities
-CosmologySimulationVelocity3Name        = GridVelocities
-CosmologySimulationParticlePositionName = ParticlePositions
-CosmologySimulationParticleVelocityName = ParticleVelocities
-CosmologySimulationNumberOfInitialGrids = 3
-CosmologySimulationGridDimension[1]     = 32 32 32
-CosmologySimulationGridLeftEdge[1]      = 0.25 0.25 0.25
-CosmologySimulationGridRightEdge[1]     = 0.75 0.75 0.75
-CosmologySimulationGridLevel[1]         = 1
-CosmologySimulationGridDimension[2]     = 32 32 32
-CosmologySimulationGridLeftEdge[2]      = 0.375 0.375 0.375 
-CosmologySimulationGridRightEdge[2]     = 0.625 0.625 0.625
-CosmologySimulationGridLevel[2]         = 2
-
-#
-#  define cosmology parameters
-#
-ComovingCoordinates        = 1
-CosmologyOmegaMatterNow    = 0.3
-CosmologyOmegaLambdaNow    = 0.7
-CosmologyHubbleConstantNow = 0.70
-CosmologyComovingBoxSize   = 0.3
-CosmologyMaxExpansionRate  = 0.02
-CosmologyInitialRedshift   = 99
-CosmologyFinalRedshift     = 15
-GravitationalConstant      = 1
-
-#
-#  set I/O and stop/start parameters
-#
-
-dtDataDump                = 1.0
-RedshiftDumpName          = RD
-RedshiftDumpDir           = RD
-DataDumpName              = DD
-DataDumpDir               = DD
-
-CosmologyOutputRedshift[0] = 99
-CosmologyOutputRedshift[1] = 40
-CosmologyOutputRedshift[2] = 35
-CosmologyOutputRedshift[3] = 30
-CosmologyOutputRedshift[4] = 25
-CosmologyOutputRedshift[5] = 24
-CosmologyOutputRedshift[6] = 23
-CosmologyOutputRedshift[7] = 22
-CosmologyOutputRedshift[8] = 21
-CosmologyOutputRedshift[9] = 20
-CosmologyOutputRedshift[10] = 19
-CosmologyOutputRedshift[11] = 18
-CosmologyOutputRedshift[12] = 17
-CosmologyOutputRedshift[13] = 16
-CosmologyOutputRedshift[14] = 15
-
-#
-#  set hydro parameters
-#
-Gamma                        = 1.6667
-PPMDiffusionParameter        = 0
-DualEnergyFormalism          = 1
-HydroMethod                  = 0
-InterpolationMethod          = 1 
-CourantSafetyNumber          = 0.4
-ParticleCourantSafetyNumber  = 0.6
-UseMinimumPressureSupport    = 0
-MultiSpecies                 = 2
-RadiativeCooling             = 1    
-RadiationFieldType           = 0
-FluxCorrection               = 1
-ConservativeInterpolation    = 0
-
-#
-#  set grid refinement parameters
-#
-StaticHierarchy                 = 0
-MaximumRefinementLevel          = 12
-MaximumGravityRefinementLevel   = 12
-OutputFirstTimeAtLevel          = 6
-StopFirstTimeAtLevel            = 12
-RefineBy                        = 2
-CellFlaggingMethod              = 2 4 7
-MinimumEfficiency               = 0.35
-MinimumOverDensityForRefinement = 0.125 0.125
-RefineRegionLeftEdge            = 0.375 0.375 0.375
-RefineRegionRightEdge           = 0.625 0.625 0.625
-MinimumMassForRefinementLevelExponent = -0.3
-MinimumEnergyRatioForRefinement = 0.4 
-
-#
-#  set some global parameters
-#
-GreensFunctionMaxNumber   = 40
-ParallelRootGridIO        = 1
-ParallelParticleIO        = 1

File run/Cosmology/Hydro/AMRNestedCosmology/AMRNestedCosmology.enzotest

-name = 'AMRNestedCosmology'
-answer_testing_script = None
-nprocs = 1
-runtime = 'unknown'
-hydro = True
-gravity = True
-AMR = True
-cosmology = True
-dimensionality = 3
-max_time_minutes = 99999
-fullsuite = False
-pushsuite = False
-quicksuite = False

File run/Cosmology/Hydro/AMRZeldovichPancake/AMRZeldovichPancake.enzo

-#
-# AMR PROBLEM DEFINITION FILE: Zeldovich Pancake (AMR version)
-#
-#  define problem
-#
-ProblemType                = 20      // Zeldovich pancake
-TopGridRank                = 1
-TopGridDimensions          = 16
-SelfGravity                = 1       // gravity on
-TopGridGravityBoundary     = 0       // Periodic BC for gravity
-LeftFaceBoundaryCondition  = 3       // same for fluid
-RightFaceBoundaryCondition = 3
-
-
-StopCycle = 5
-#
-#  problem parameters
-#
-ZeldovichPancakeCentralOffset    = 0
-ZeldovichPancakeCollapseRedshift = 1
-#
-#  define cosmology parameters
-#
-ComovingCoordinates        = 1       // Expansion ON
-CosmologyHubbleConstantNow = 0.5
-CosmologyComovingBoxSize   = 64.0    // 64 Mpc/h
-CosmologyMaxExpansionRate  = 0.01    //
-CosmologyInitialRedshift   = 20      // start at z=20
-CosmologyFinalRedshift     = 0
-CosmologyOmegaMatterNow    = 1
-CosmologyOmegaLambdaNow    = 0
-GravitationalConstant      = 1       // this must be true for cosmology
-
-#
-#  set I/O and stop/start parameters
-#
-dtDataDump             = 100.0
-#
-#  set hydro parameters
-#
-Gamma                  = 1.6667
-CourantSafetyNumber    = 0.5
-PPMDiffusionParameter  = 0       // diffusion off
-DualEnergyFormalism    = 1       // use total & internal energy
-ConservativeInterpolation = 0
-FluxCorrection            = 1
-InterpolationMethod       = 1
-#
-#  set grid refinement parameters
-#
-StaticHierarchy           = 0    // dynamic hierarchy
-MaximumRefinementLevel    = 2    // use up to 2 levels
-RefineBy                  = 4    // refinement factor
-CellFlaggingMethod        = 2 3    // use mass & shock criteria for refinement 
-MinimumOverDensityForRefinement  = 1.5  // times the initial overdensity
-#
-#  set some global parameters
-#
-MinimumEfficiency      = 0.4     // better value for 1d than 0.2

File run/Cosmology/Hydro/AMRZeldovichPancake/AMRZeldovichPancake.enzotest

-name = 'AMRZeldovichPancake'
-answer_testing_script = 'test_amrzeldovich.py'
-nprocs = 1
-runtime = 'short'
-hydro = True
-gravity = True
-AMR = True
-cosmology = True
-dimensionality = 1
-author = 'John Wise'
-max_time_minutes = 1
-fullsuite = True
-pushsuite = True
-quicksuite = True

File run/Cosmology/Hydro/AMRZeldovichPancake/AMRZeldovichPancake.png

Removed
Old image

File run/Cosmology/Hydro/AMRZeldovichPancake/notes.txt

-AMRZeldovichPancake
-----------
-
-(John Wise, July 2010)
-
-This test simulates a collapsing sinusoidal cosmological pertubation
-in one-dimension, commonly known as a Zel'dovich pancake.  This
-problem tests both the hydrodynamics and gravity solvers and the
-implementation of cosmological expansion.  The system will form a
-caustic in the center of the domain with a density and temperature
-peak.  There should be a small dip in temperature at the center of the
-broad peak.  In flat cosmology, there exists an analytical solution in
-the linear phase of collapse and is given in Zel'dovich (1970).
-
-This test runs to completion and creates 2 outputs -- the initial
-(z=20) and final (z=0) states.  There are two levels of refinement by
-factors of 4.  The finest resolution element is the same as the
-non-AMR version of this test.  There are some small differences between
-Enzo v1.5 and v2.0 at the parent-child grid boundaries.

File run/Cosmology/Hydro/AMRZeldovichPancake/scripts.py

-from matplotlib import use; use('Agg')
-import matplotlib.pyplot as plt
-from yt.mods import *
-
-pf = load('DD0001/data0001')
-ray = pf.h.ortho_ray(0,(0,0))
-
-plt.subplot(311)
-plt.semilogy(ray['x'], ray['Density'], c='k', ls='-', marker='.', ms=5)
-plt.ylabel(r'Density (cm$^{-3}$)')
-
-plt.subplot(312)
-plt.semilogy(ray['x'], ray['Temperature'], c='k', ls='-', marker='.', ms=5)
-plt.ylabel('Temperature (K)')
-
-plt.subplot(313)
-plt.plot(ray['x'], 1e-5*ray['x-velocity'], c='k', ls='-', marker='.', ms=5)
-plt.ylabel('Velocity (km/s)')
-plt.xlabel('x')
-
-plt.savefig('AMRZeldovichPancake.png')

File run/Cosmology/Hydro/AdiabaticExpansion/AdiabaticExpansion.enzo

-#
-# AMR PROBLEM DEFINITION FILE: Adiabatic Expansion test
-#
-#  define problem
-#
-ProblemType                = 22      // Adiabatic Expansion
-TopGridRank                = 3
-TopGridDimensions          = 16 16 16
-SelfGravity                = 1       // gravity off
-TopGridGravityBoundary     = 0       // Periodic BC for gravity
-LeftFaceBoundaryCondition  = 3 3 3      // same for fluid
-RightFaceBoundaryCondition = 3 3 3
-#
-StaticRefineRegionLevel[0] = 0
-#StaticRefineRegionLeftEdge[0] = 0.375 0.375 0.375 
-#StaticRefineRegionRightEdge[0] = 0.625 0.625 0.625
-StaticRefineRegionLeftEdge[0] = 0.475 0.475 0.475 
-StaticRefineRegionRightEdge[0] = 0.725 0.725 0.725
-#
-#  problem parameters
-#
-AdiabaticExpansionInitialTemperature = 1   // K
-AdiabaticExpansionInitialVelocity    = 100   // km/s
-AdiabaticExpansionOmegaBaryonNow     = 1.0
-#
-#  define cosmology parameters
-
-
-ComovingCoordinates        = 1       // Expansion ON
-CosmologyHubbleConstantNow = 1.
-CosmologyOmegaMatterNow = 1
-CosmologyOmegaLambdaNow = 0
-CosmologyComovingBoxSize   = 64.0    // 64 Mpc/h
-CosmologyMaxExpansionRate  = 0.05    //
-CosmologyInitialRedshift   = 20      // start at z=20
-CosmologyFinalRedshift     = 0
-GravitationalConstant      = 1       // this must be true for cosmology
-#
-#  set I/O and stop/start parameters
-#
-Initialdt              = 1e-16
-dtDataDump             = 5.0
-#CycleSkipDataDump = 1
-#StopCycle = 15
-
-#
-#  set hydro parameters
-#
-InterpolationMethod    = 1
-ConservativeInterpolation = 1
-UseHydro               = 1
-
-HydroMethod            = 0
-Gamma                  = 1.6667
-CourantSafetyNumber    = 0.2
-PPMDiffusionParameter  = 0       // diffusion off
-DualEnergyFormalism    = 1       // use total & internal energy
-FluxCorrection = 0
-MaximumGravityRefinementLevel = 5
-#
-#  set grid refinement parameters
-#
-StaticHierarchy           = 0    // static hierarchy
-CellFlaggingMethod        = 2
-#
-#  set some global parameters
-#
-ParallelRootGridIO = 0
-PotentialIterations = 0
-WritePotential  = 1
-ComputePotential = 1
-Debug1 = 1

File run/Cosmology/Hydro/AdiabaticExpansion/AdiabaticExpansion.enzotest

-name = 'AdiabaticExpansion'
-answer_testing_script = None
-nprocs = 1
-runtime = 'short'
-hydro = True
-gravity = True
-AMR = True
-cosmology = True
-dimensionality = 1
-max_time_minutes = 1
-fullsuite = True
-pushsuite = True
-quicksuite = True

File run/Cosmology/Hydro/SphericalInfall/SphericalInfall.enzo

-#
-# AMR PROBLEM DEFINITION FILE: Spherical Infall Test Problem
-#
-#  define problem
-#
-ProblemType                = 24      // Spherical Infall
-TopGridRank                = 3
-TopGridDimensions          = 16 16 16
-SelfGravity                = 1       // gravity on
-TopGridGravityBoundary     = 0       // Periodic BCs
-LeftFaceBoundaryCondition  = 3 3 3   // but periodic for fluid
-RightFaceBoundaryCondition = 3 3 3
-#S2ParticleSize             = 3.0
-#GravityResolution          = 1.0
-#PressureFree               = 0       // turn on pressure
-#
-#  define intialization parameters
-#
-SphericalInfallInitialPerturbation = 0.5
-SphericalInfallNumberOfParticles   = 0
-SphericalInfallUseBaryons          = 1
-#SphericalInfallSubgridLeft        = 0.4375   // start of subgrid
-#SphericalInfallSubgridRight       = 0.5625   // end of subgrid
-#
-#  define cosmology parameters
-#
-ComovingCoordinates        = 1       // Expansion ON
-CosmologyHubbleConstantNow = 0.5     // h = 0.5
-CosmologyComovingBoxSize   = 25.0    // 25 Mpc/h
-CosmologyMaxExpansionRate  = 0.02    // maximum allowed delta(a)/a
-CosmologyInitialRedshift   = 99  // 
-CosmologyFinalRedshift     = 0       // stop  at z=0
-GravitationalConstant      = 1.0     // this must be true for cosmology
-CosmologyOmegaMatterNow    = 1.0
-CosmologyOmegaLambdaNow    = 0.0
-#
-#  set I/O and stop/start parameters
-#
-#StopTime               = 0.0
-#StopCycle              = 10
-dtDataDump             = 50000
-DataDumpName           = data
-#
-#  set hydro parameters
-#
-Gamma                  = 1.66667
-CourantSafetyNumber    = 0.5     // 
-PPMDiffusionParameter  = 0       // diffusion off
-DualEnergyFormalism    = 1       // use total & internal energy equations
-InterpolationMethod    = 1       // SecondOrderA
-#
-#  set grid refinement parameters
-#
-StaticHierarchy                 = 0    // dynamic hierarchy
-MaximumRefinementLevel          = 3    // use up to 3 levels
-RefineBy                        = 3    // refinement factor
-CellFlaggingMethod              = 2    // baryon overdensity
-MinimumOverDensityForRefinement = 2.0  // times the initial overdensity
-MinimumEfficiency               = 0.3  // fraction efficiency
-RefineRegionLeftEdge            = 0.2 0.2 0.2 // this stops the 'middle planes' from being
-RefineRegionRightEdge           = 0.8 0.8 0.8 //   refined (slows things down)
-#
-#  set some global parameters
-#
-GreensFunctionMaxNumber   = 10

File run/Cosmology/Hydro/SphericalInfall/SphericalInfall.enzotest

-name = 'SphericalInfall'
-answer_testing_script = None
-nprocs = 1
-runtime = 'short'
-hydro = True
-gravity = True
-AMR = True
-cosmology = True
-dimensionality = 3
-max_time_minutes = 1
-fullsuite = True
-pushsuite = True
-quicksuite = False

File run/Cosmology/Hydro/ZeldovichPancake/ZeldovichPancake.enzo

-#
-# AMR PROBLEM DEFINITION FILE: Zeldovich Pancake (one grid version)
-#
-#  define problem
-#
-ProblemType                = 20      // Zeldovich pancake
-TopGridRank                = 1
-TopGridDimensions          = 256
-SelfGravity                = 1       // gravity on
-TopGridGravityBoundary     = 0       // Periodic BC for gravity
-LeftFaceBoundaryCondition  = 3       // same for fluid
-RightFaceBoundaryCondition = 3
-#
-#  problem parameters
-#
-ZeldovichPancakeCentralOffset    = 0
-ZeldovichPancakeCollapseRedshift = 1
-#
-#  define cosmology parameters
-#
-ComovingCoordinates        = 1       // Expansion ON
-CosmologyHubbleConstantNow = 0.5
-CosmologyComovingBoxSize   = 64.0    // 64 Mpc/h
-CosmologyMaxExpansionRate  = 0.01    //
-CosmologyInitialRedshift   = 20      // start at z=20
-CosmologyFinalRedshift     = 0
-CosmologyOmegaMatterNow    = 1
-CosmologyOmegaLambdaNow    = 0
-GravitationalConstant      = 1       // this must be true for cosmology
-#
-#  set I/O and stop/start parameters
-#
-dtDataDump             = 100.0    // dump at beginning and end
-#
-#  set hydro parameters
-#
-Gamma                  = 1.6667
-CourantSafetyNumber    = 0.5
-PPMDiffusionParameter  = 0       // diffusion off
-DualEnergyFormalism    = 1       // use total & internal energy
-#
-#  set grid refinement parameters
-#
-StaticHierarchy           = 1    // static hierarchy
-RefineBy                  = 2
-#
-#  set some global parameters
-#

File run/Cosmology/Hydro/ZeldovichPancake/ZeldovichPancake.enzotest

-name = 'ZeldovichPancake'
-answer_testing_script = 'test_zeldovich.py'
-nprocs = 1
-runtime = 'short'
-hydro = True
-gravity = True
-cosmology = True
-dimensionality = 1
-author = 'John Wise'
-max_time_minutes = 1
-fullsuite = True
-pushsuite = True
-quicksuite = True

File run/Cosmology/Hydro/ZeldovichPancake/ZeldovichPancake.png

Removed
Old image

File run/Cosmology/Hydro/ZeldovichPancake/notes.txt

-ZeldovichPancake
-----------
-
-(John Wise, July 2010)
-
-This test simulates a collapsing sinusoidal cosmological pertubation
-in one-dimension, commonly known as a Zel'dovich pancake.  This
-problem tests both the hydrodynamics and gravity solvers and the
-implementation of cosmological expansion.  The system will form a
-caustic in the center of the domain with a density and temperature
-peak.  There should be a small dip in temperature at the center of the
-broad peak.  In flat cosmology, there exists an analytical solution in
-the linear phase of collapse and is given in Zel'dovich (1970).
-
-This test runs to completion and creates 2 outputs -- the initial
-(z=20) and final (z=0) states.  There is no refinement.  Enzo v1.5 and
-v2.0 produce exactly the same results.

File run/Cosmology/Hydro/ZeldovichPancake/scripts.py

-from matplotlib import use; use('Agg')
-import matplotlib.pyplot as plt
-from yt.mods import *
-
-pf = load('DD0001/data0001')
-ray = pf.h.ortho_ray(0,(0,0))
-
-plt.subplot(311)
-plt.semilogy(ray['x'], ray['Density'], c='k', ls='-', marker='.', ms=5)
-plt.ylabel(r'Density (cm$^{-3}$)')
-
-plt.subplot(312)
-plt.semilogy(ray['x'], ray['Temperature'], c='k', ls='-', marker='.', ms=5)
-plt.ylabel('Temperature (K)')
-
-plt.subplot(313)
-plt.plot(ray['x'], 1e-5*ray['x-velocity'], c='k', ls='-', marker='.', ms=5)
-plt.ylabel('Velocity (km/s)')
-plt.xlabel('x')
-
-plt.savefig('ZeldovichPancake.png')

File run/Cosmology/Inits/AMRCosmology/AMRCosmology.inits

-#  Generates initial grid and particle fields for a single-grid
-#    CDM simulation
-#
-#  Cosmology Parameters
-#
-
-# PREVIOUS (1998)
-
-# CosmologyOmegaMatterNow      = 1
-# CosmologyOmegaLambdaNow      = 0
-# CosmologyOmegaBaryonNow      = 0.06
-
-# CURRENT (WMAP)
-
-CosmologyOmegaMatterNow      = 0.3
-CosmologyOmegaLambdaNow      = 0.7
-CosmologyOmegaBaryonNow      = 0.04
-
-CosmologyComovingBoxSize     = 16       // in Mpc/h
-CosmologyHubbleConstantNow   = 0.5      // in units of 100 km/s/Mpc
-CosmologyInitialRedshift     = 30
-#
-#  Power spectrum Parameters
-#
-PowerSpectrumType            = 1             // BBKS
-PowerSpectrumSigma8          = 0.7
-PowerSpectrumPrimordialIndex = 1.0
-PowerSpectrumRandomSeed      = -123456789
-#
-#  Grid info
-#
-Rank                = 3
-GridDims            = 16 16 16
-InitializeGrids     = 1
-GridRefinement      = 1
-#
-#  Particle info
-#
-ParticleDims        = 16 16 16
-InitializeParticles = 1
-ParticleRefinement  = 1
-#
-#  Overall field parameters
-#
-MaxDims             = 16 16 16
-#NewCenter           = 0.5 0.5 0.5
-#StartIndex          = 0 0 0
-#
-#  Names
-#
-ParticlePositionName = ParticlePositions
-ParticleVelocityName = ParticleVelocities
-GridDensityName      = GridDensity
-GridVelocityName     = GridVelocities

File run/Cosmology/Inits/AMRNestedCosmology/AMRNestedCosmology_SubGrid.inits

-#
-#  Cosmology Parameters
-#
-CosmologyOmegaMatterNow      = 0.3
-CosmologyOmegaLambdaNow      = 0.7
-CosmologyOmegaBaryonNow      = 0.04
-CosmologyComovingBoxSize     = 0.3       // in Mpc/h
-CosmologyHubbleConstantNow   = 0.70      // in units of 100 km/s/Mpc
-CosmologyInitialRedshift     = 99
-#
-#  Power spectrum Parameters
-#
-PowerSpectrumType            = 11             // Eisenstein & Hu
-PowerSpectrumSigma8          = 0.9
-PowerSpectrumPrimordialIndex = 1.0
-PowerSpectrumRandomSeed      = -267478895
-#
-#  Grid info
-#
-Rank                = 3
-InitializeGrids     = 1
-GridRefinement      = 2
-GridDims = 32 32 32
-#
-#  Particle info
-#
-InitializeParticles = 1
-ParticleRefinement  = 2
-ParticleDims = 32 32 32
-
-#
-#  Overall field parameters
-#
-MaxDims = 128 128 128
-NewCenterFloat = 0.480763 0.674363 0.285945
-StartIndexInNewCenterTopGridSystem = 8 8 8
-EndIndexInNewCenterTopGridSystem   = 23 23 23
-RootGridDims = 32 32 32
-#
-#  Names
-#
-ParticlePositionName = ParticlePositions.1
-ParticleVelocityName = ParticleVelocities.1
-GridDensityName      = GridDensity.1
-GridVelocityName     = GridVelocities.1

File run/Cosmology/Inits/AMRNestedCosmology/AMRNestedCosmology_SubSubGrid.inits

-#
-#  Cosmology Parameters
-#
-CosmologyOmegaMatterNow      = 0.3
-CosmologyOmegaLambdaNow      = 0.7
-CosmologyOmegaBaryonNow      = 0.04
-CosmologyComovingBoxSize     = 0.3       // in Mpc/h
-CosmologyHubbleConstantNow   = 0.70      // in units of 100 km/s/Mpc
-CosmologyInitialRedshift     = 99
-#
-#  Power spectrum Parameters
-#
-PowerSpectrumType            = 11             // Eisenstein & Hu
-PowerSpectrumSigma8          = 0.9
-PowerSpectrumPrimordialIndex = 1.0
-PowerSpectrumRandomSeed      = -267478895
-#
-#  Grid info
-#
-Rank                = 3
-InitializeGrids     = 1
-GridRefinement      = 1
-GridDims = 32 32 32
-#
-#  Particle info
-#
-InitializeParticles = 1
-ParticleRefinement  = 1
-ParticleDims = 32 32 32
-
-#
-#  Overall field parameters
-#
-MaxDims = 128 128 128
-NewCenterFloat = 0.480763 0.674363 0.285945
-StartIndexInNewCenterTopGridSystem = 12 12 12
-EndIndexInNewCenterTopGridSystem   = 19 19 19
-RootGridDims = 32 32 32
-#
-#  Names
-#
-ParticlePositionName = ParticlePositions.2
-ParticleVelocityName = ParticleVelocities.2
-GridDensityName      = GridDensity.2
-GridVelocityName     = GridVelocities.2

File run/Cosmology/Inits/AMRNestedCosmology/AMRNestedCosmology_TopGrid.inits

-#
-#  Cosmology Parameters
-#
-CosmologyOmegaMatterNow      = 0.3
-CosmologyOmegaLambdaNow      = 0.7
-CosmologyOmegaBaryonNow      = 0.04
-CosmologyComovingBoxSize     = 0.3       // in Mpc/h
-CosmologyHubbleConstantNow   = 0.70      // in units of 100 km/s/Mpc
-CosmologyInitialRedshift     = 99
-
-#
-#  Power spectrum Parameters
-#
-PowerSpectrumType            = 11             // Eisenstein & Hu
-PowerSpectrumSigma8          = 0.9
-PowerSpectrumPrimordialIndex = 1.0
-PowerSpectrumRandomSeed      = -267478895
-
-#
-#  Grid info
-#
-Rank                = 3
-GridDims = 32 32 32 
-GridRefinement      = 4
-InitializeGrids     = 1
-
-#
-#  Particle info
-#
-InitializeParticles = 1
-ParticleRefinement  = 4
-ParticleDims = 32 32 32 
-
-#
-#  Overall field parameters
-#
-MaxDims = 128 128 128
-NewCenterFloat =  0.480763 0.674363 0.285945
-StartIndex = 0 0 0
-RootGridDims = 32 32 32
-
-#
-#  Names
-#
-ParticlePositionName = ParticlePositions.0
-ParticleVelocityName = ParticleVelocities.0
-GridDensityName      = GridDensity.0
-GridVelocityName     = GridVelocities.0

File run/Cosmology/MHD/MHDZeldovichPancake/MHDZeldovichPancake.enzo

-#
-# AMR PROBLEM DEFINITION FILE: Zeldovich Pancake (one grid version)
-#
-#
-#  define problem
-#
-ProblemType                = 20      // Zeldovich pancake
-TopGridRank                = 1
-TopGridDimensions          = 500 64 2
-SelfGravity                = 1       // gravity on
-TopGridGravityBoundary     = 0       // Periodic BC for gravity
-LeftFaceBoundaryCondition  = 3       // same for fluid
-RightFaceBoundaryCondition = 3
-#
-#  problem parameters
-#
-ZeldovichPancakeCentralOffset    = 0
-ZeldovichPancakeCollapseRedshift = 4
-#ZeldovichPancakeCollapseRedshift = -0.9
-
-#ZeldovichPancakeInitialTemperature = 2800
-ZeldovichPancakeInitialTemperature = 1000
-ZeldovichPancakeInitialUniformBField = 0 1e-4 0 0 # in proper Gauss 
-#
-#  define cosmology parameters
-#
-ComovingCoordinates        = 1       // Expansion ON
-CosmologyHubbleConstantNow = 0.5
-CosmologyComovingBoxSize   = 64.0    // 64 Mpc/h
-CosmologyOmegaMatterNow    = 1
-CosmologyOmegaLambdaNow    = 0
-CosmologyMaxExpansionRate  = 0.003    //
-CosmologyInitialRedshift   = 20      // start at z=20
-CosmologyFinalRedshift     = 0
-GravitationalConstant      = 1       // this must be true for cosmology
-#
-#  set I/O and stop/start parameters
-#
-#CycleSkipDataDump      = 50  
-dtDataDump             = 4.0    // 
-#
-#  set hydro parameters
-#
-HydroMethod            = 4
-Gamma                  = 1.6667
-CourantSafetyNumber    = 0.2
-PPMDiffusionParameter  = 0       // diffusion off
-DualEnergyFormalism    = 1      // use total & internal energy
-ConservativeReconstruction = 0
-ReconstructionMethod   = 0
-RiemannSolver          = 3
-Theta_Limiter          = 1.1
-Mu = 0.6
-#
-#  set grid refinement parameters
-#
-StaticHierarchy           = 0
-MaximumRefinementLevel    = 1
-RefineBy                  = 2
-CellFlaggingMethod        = 2
-MinimumOverDensityForRefinement = 2.
-FluxCorrection            = 0
-InterpolationMethod       = 1
-ConservativeInterpolation = 0
-#
-#  set some global parameters
-#
-Debug1 = 1

File run/Cosmology/MHD/MHDZeldovichPancake/MHDZeldovichPancake.enzotest

-name = 'MHDZeldovichPancake'
-answer_testing_script = None
-nprocs = 1
-runtime = 'short'
-hydro = True
-gravity = True
-AMR = True
-cosmology = True
-dimensionality = 1
-author = 'John Wise'
-max_time_minutes = 1
-fullsuite = True
-pushsuite = True
-quicksuite = True

File run/Cosmology/MHDZeldovichPancake/MHDZeldovichPancake.enzo

View file
+#
+# AMR PROBLEM DEFINITION FILE: Zeldovich Pancake (one grid version)
+#
+#
+#  define problem
+#
+ProblemType                = 20      // Zeldovich pancake
+TopGridRank                = 1
+TopGridDimensions          = 500 64 2
+SelfGravity                = 1       // gravity on
+TopGridGravityBoundary     = 0       // Periodic BC for gravity
+LeftFaceBoundaryCondition  = 3       // same for fluid
+RightFaceBoundaryCondition = 3
+#
+#  problem parameters
+#
+ZeldovichPancakeCentralOffset    = 0
+ZeldovichPancakeCollapseRedshift = 4
+#ZeldovichPancakeCollapseRedshift = -0.9
+
+#ZeldovichPancakeInitialTemperature = 2800
+ZeldovichPancakeInitialTemperature = 1000
+ZeldovichPancakeInitialUniformBField = 0 1e-4 0 0 # in proper Gauss 
+#
+#  define cosmology parameters
+#
+ComovingCoordinates        = 1       // Expansion ON
+CosmologyHubbleConstantNow = 0.5
+CosmologyComovingBoxSize   = 64.0    // 64 Mpc/h
+CosmologyOmegaMatterNow    = 1
+CosmologyOmegaLambdaNow    = 0
+CosmologyMaxExpansionRate  = 0.003    //
+CosmologyInitialRedshift   = 20      // start at z=20
+CosmologyFinalRedshift     = 0
+GravitationalConstant      = 1       // this must be true for cosmology
+#
+#  set I/O and stop/start parameters
+#
+#CycleSkipDataDump      = 50  
+dtDataDump             = 4.0    // 
+#
+#  set hydro parameters
+#
+HydroMethod            = 4
+Gamma                  = 1.6667
+CourantSafetyNumber    = 0.2
+PPMDiffusionParameter  = 0       // diffusion off
+DualEnergyFormalism    = 1      // use total & internal energy
+ConservativeReconstruction = 0
+ReconstructionMethod   = 0
+RiemannSolver          = 3
+Theta_Limiter          = 1.1
+Mu = 0.6
+#
+#  set grid refinement parameters
+#
+StaticHierarchy           = 0
+MaximumRefinementLevel    = 1
+RefineBy                  = 2
+CellFlaggingMethod        = 2
+MinimumOverDensityForRefinement = 2.
+FluxCorrection            = 0
+InterpolationMethod       = 1
+ConservativeInterpolation = 0
+#
+#  set some global parameters
+#
+Debug1 = 1

File run/Cosmology/MHDZeldovichPancake/MHDZeldovichPancake.enzotest

View file
+name = 'MHDZeldovichPancake'
+answer_testing_script = None
+nprocs = 1
+runtime = 'short'
+hydro = True
+gravity = True
+AMR = True
+cosmology = True
+dimensionality = 1
+author = 'John Wise'
+max_time_minutes = 1
+fullsuite = True
+pushsuite = True
+quicksuite = True

File run/Cosmology/SphericalInfall/SphericalInfall.enzo

View file
+#
+# AMR PROBLEM DEFINITION FILE: Spherical Infall Test Problem
+#
+#  define problem
+#
+ProblemType                = 24      // Spherical Infall
+TopGridRank                = 3
+TopGridDimensions          = 16 16 16
+SelfGravity                = 1       // gravity on
+TopGridGravityBoundary     = 0       // Periodic BCs
+LeftFaceBoundaryCondition  = 3 3 3   // but periodic for fluid
+RightFaceBoundaryCondition = 3 3 3
+#S2ParticleSize             = 3.0
+#GravityResolution          = 1.0
+#PressureFree               = 0       // turn on pressure
+#
+#  define intialization parameters
+#
+SphericalInfallInitialPerturbation = 0.5
+SphericalInfallNumberOfParticles   = 0
+SphericalInfallUseBaryons          = 1
+#SphericalInfallSubgridLeft        = 0.4375   // start of subgrid
+#SphericalInfallSubgridRight       = 0.5625   // end of subgrid
+#
+#  define cosmology parameters
+#
+ComovingCoordinates        = 1       // Expansion ON
+CosmologyHubbleConstantNow = 0.5     // h = 0.5
+CosmologyComovingBoxSize   = 25.0    // 25 Mpc/h
+CosmologyMaxExpansionRate  = 0.02    // maximum allowed delta(a)/a
+CosmologyInitialRedshift   = 99  // 
+CosmologyFinalRedshift     = 0       // stop  at z=0
+GravitationalConstant      = 1.0     // this must be true for cosmology
+CosmologyOmegaMatterNow    = 1.0
+CosmologyOmegaLambdaNow    = 0.0
+#
+#  set I/O and stop/start parameters
+#
+#StopTime               = 0.0
+#StopCycle              = 10
+dtDataDump             = 50000
+DataDumpName           = data
+#
+#  set hydro parameters
+#
+Gamma                  = 1.66667
+CourantSafetyNumber    = 0.5     // 
+PPMDiffusionParameter  = 0       // diffusion off
+DualEnergyFormalism    = 1       // use total & internal energy equations
+InterpolationMethod    = 1       // SecondOrderA
+#
+#  set grid refinement parameters
+#
+StaticHierarchy                 = 0    // dynamic hierarchy
+MaximumRefinementLevel          = 3    // use up to 3 levels
+RefineBy                        = 3    // refinement factor
+CellFlaggingMethod              = 2    // baryon overdensity
+MinimumOverDensityForRefinement = 2.0  // times the initial overdensity
+MinimumEfficiency               = 0.3  // fraction efficiency
+RefineRegionLeftEdge            = 0.2 0.2 0.2 // this stops the 'middle planes' from being
+RefineRegionRightEdge           = 0.8 0.8 0.8 //   refined (slows things down)
+#
+#  set some global parameters
+#
+GreensFunctionMaxNumber   = 10

File run/Cosmology/SphericalInfall/SphericalInfall.enzotest

View file
+name = 'SphericalInfall'
+answer_testing_script = None
+nprocs = 1
+runtime = 'short'
+hydro = True
+gravity = True
+AMR = True
+cosmology = True
+dimensionality = 3
+max_time_minutes = 1
+fullsuite = True
+pushsuite = True
+quicksuite = False

File run/Cosmology/ZeldovichPancake/ZeldovichPancake.enzo

View file
+#
+# AMR PROBLEM DEFINITION FILE: Zeldovich Pancake (one grid version)
+#
+#  define problem
+#
+ProblemType                = 20      // Zeldovich pancake
+TopGridRank                = 1
+TopGridDimensions          = 256
+SelfGravity                = 1       // gravity on
+TopGridGravityBoundary     = 0       // Periodic BC for gravity
+LeftFaceBoundaryCondition  = 3       // same for fluid
+RightFaceBoundaryCondition = 3
+#
+#  problem parameters
+#
+ZeldovichPancakeCentralOffset    = 0
+ZeldovichPancakeCollapseRedshift = 1
+#
+#  define cosmology parameters
+#
+ComovingCoordinates        = 1       // Expansion ON
+CosmologyHubbleConstantNow = 0.5
+CosmologyComovingBoxSize   = 64.0    // 64 Mpc/h
+CosmologyMaxExpansionRate  = 0.01    //
+CosmologyInitialRedshift   = 20      // start at z=20
+CosmologyFinalRedshift     = 0
+CosmologyOmegaMatterNow    = 1
+CosmologyOmegaLambdaNow    = 0
+GravitationalConstant      = 1       // this must be true for cosmology
+#
+#  set I/O and stop/start parameters
+#
+dtDataDump             = 100.0    // dump at beginning and end
+#
+#  set hydro parameters
+#
+Gamma                  = 1.6667
+CourantSafetyNumber    = 0.5
+PPMDiffusionParameter  = 0       // diffusion off
+DualEnergyFormalism    = 1       // use total & internal energy
+#
+#  set grid refinement parameters
+#
+StaticHierarchy           = 1    // static hierarchy
+RefineBy                  = 2
+#
+#  set some global parameters
+#

File run/Cosmology/ZeldovichPancake/ZeldovichPancake.enzotest

View file
+name = 'ZeldovichPancake'
+answer_testing_script = 'test_zeldovich.py'
+nprocs = 1
+runtime = 'short'
+hydro = True
+gravity = True
+cosmology = True
+dimensionality = 1
+author = 'John Wise'
+max_time_minutes = 1
+fullsuite = True
+pushsuite = True
+quicksuite = True

File run/Cosmology/ZeldovichPancake/ZeldovichPancake.png

Added
New image

File run/Cosmology/ZeldovichPancake/notes.txt

View file
+ZeldovichPancake
+----------
+
+(John Wise, July 2010)
+
+This test simulates a collapsing sinusoidal cosmological pertubation
+in one-dimension, commonly known as a Zel'dovich pancake.  This
+problem tests both the hydrodynamics and gravity solvers and the
+implementation of cosmological expansion.  The system will form a
+caustic in the center of the domain with a density and temperature
+peak.  There should be a small dip in temperature at the center of the
+broad peak.  In flat cosmology, there exists an analytical solution in
+the linear phase of collapse and is given in Zel'dovich (1970).
+
+This test runs to completion and creates 2 outputs -- the initial
+(z=20) and final (z=0) states.  There is no refinement.  Enzo v1.5 and
+v2.0 produce exactly the same results.

File run/Cosmology/ZeldovichPancake/scripts.py

View file
+from matplotlib import use; use('Agg')
+import matplotlib.pyplot as plt
+from yt.mods import *
+
+pf = load('DD0001/data0001')
+ray = pf.h.ortho_ray(0,(0,0))
+
+plt.subplot(311)
+plt.semilogy(ray['x'], ray['Density'], c='k', ls='-', marker='.', ms=5)
+plt.ylabel(r'Density (cm$^{-3}$)')
+
+plt.subplot(312)
+plt.semilogy(ray['x'], ray['Temperature'], c='k', ls='-', marker='.', ms=5)
+plt.ylabel('Temperature (K)')
+
+plt.subplot(313)
+plt.plot(ray['x'], 1e-5*ray['x-velocity'], c='k', ls='-', marker='.', ms=5)
+plt.ylabel('Velocity (km/s)')
+plt.xlabel('x')
+
+plt.savefig('ZeldovichPancake.png')

File run/CosmologySimulation/AMRCosmology/AMRCosmology.enzo

View file
+#;-*-C-*-
+
+# AMR PROBLEM DEFINITION FILE: Cosmology Simulation
+# This is a small cosmology simulation that runs to z = 0.
+# The redshift outputs can be used to create a light-cone out to z = 0.1.
+#
+# define problem
+#
+ProblemType                = 30      // cosmology simulation
+TopGridRank                = 3
+TopGridDimensions          = 32 32 32
+SelfGravity                = 1       // gravity on
+TopGridGravityBoundary     = 0       // Periodic BC for gravity
+LeftFaceBoundaryCondition  = 3 3 3   // same for fluid
+RightFaceBoundaryCondition = 3 3 3
+
+#
+# problem parameters
+#
+CosmologySimulationOmegaBaryonNow       = 0.0441
+CosmologySimulationOmegaCDMNow          = 0.2239
+CosmologySimulationDensityName          = GridDensity
+CosmologySimulationVelocity1Name        = GridVelocities
+CosmologySimulationVelocity2Name        = GridVelocities
+CosmologySimulationVelocity3Name        = GridVelocities
+CosmologySimulationParticlePositionName = ParticlePositions
+CosmologySimulationParticleVelocityName = ParticleVelocities
+CosmologySimulationNumberOfInitialGrids = 1
+CosmologySimulationUseMetallicityField  = 1
+
+#
+# cosmology parameters
+#
+ComovingCoordinates        = 1
+CosmologyOmegaMatterNow    = 0.268
+CosmologyOmegaLambdaNow    = 0.732
+CosmologyHubbleConstantNow = 0.704
+CosmologyComovingBoxSize   = 32.0
+CosmologyMaxExpansionRate  = 0.02
+CosmologyInitialRedshift   = 50
+CosmologyFinalRedshift     = 0
+GravitationalConstant      = 1
+
+#
+# I/O and stop/start parameters
+#
+dtDataDump       = 5
+RedshiftDumpName = RD
+RedshiftDumpDir  = RD
+DataDumpName     = DD
+DataDumpDir      = DD
+
+CosmologyOutputRedshift[0] = 0.100
+CosmologyOutputRedshift[1] = 0.089
+CosmologyOutputRedshift[2] = 0.078
+CosmologyOutputRedshift[3] = 0.067
+CosmologyOutputRedshift[4] = 0.057
+CosmologyOutputRedshift[5] = 0.047
+CosmologyOutputRedshift[6] = 0.037
+CosmologyOutputRedshift[7] = 0.027
+CosmologyOutputRedshift[8] = 0.017
+CosmologyOutputRedshift[9] = 0.007
+
+#
+# hydro parameters
+#
+HydroMethod                 = 0       // PPM
+Gamma                       = 1.6667
+PPMDiffusionParameter       = 0       // diffusion off
+DualEnergyFormalism         = 1       // use total & internal energy
+InterpolationMethod         = 1       // SecondOrderA
+FluxCorrection              = 1
+ConservativeInterpolation   = 1
+CourantSafetyNumber         = 0.5
+ParticleCourantSafetyNumber = 0.8
+UseMinimumPressureSupport   = 0
+
+#
+# grid refinement parameters
+#
+StaticHierarchy                       = 0
+MaximumRefinementLevel                = 5
+MaximumGravityRefinementLevel         = 5
+MaximumParticleRefinementLevel        = 5
+RefineBy                              = 2
+CellFlaggingMethod                    = 2 4
+MinimumOverDensityForRefinement       = 8.0 8.0
+MinimumMassForRefinementLevelExponent = 0.0 0.0
+MinimumEfficiency                     = 0.35
+
+#
+# microphysics parameters
+#
+MultiSpecies       = 0
+RadiativeCooling   = 1
+RadiationFieldType = 0
+
+#
+# star formation parameters
+#
+StarParticleCreation          = 1
+StarParticleFeedback          = 1
+StarMakerOverDensityThreshold = 100
+StarMakerMinimumMass          = 1e6
+StarMakerMinimumDynamicalTime = 1e6
+StarMakerMassEfficiency       = 0.1
+StarMassEjectionFraction      = 0.25
+StarMetalYield                = 0.1
+StarEnergyToThermalFeedback   = 1e-5
+StarFeedbackRadius            = 1
+StarFeedbackMaxCellStep       = 3
+
+#
+# some global parameters
+#
+GreensFunctionMaxNumber = 40
+ParallelRootGridIO      = 1
+ParallelParticleIO      = 1

File run/CosmologySimulation/AMRCosmology/AMRCosmology.enzotest

View file
+name = 'AMRCosmology'
+answer_testing_script = None
+nprocs = 2
+runtime = 'long'
+AMR = True
+hydro = True
+gravity = True
+cosmology = True
+dimensionality = 3
+author = 'Uncle Enzo'
+max_time_minutes = 120
+fullsuite = False
+pushsuite = False
+quicksuite = False

File run/CosmologySimulation/AMRCosmology/AMRCosmology.inits

View file
+#
+#  Cosmology Parameters
+#
+CosmologyOmegaMatterNow    = 0.268
+CosmologyOmegaLambdaNow    = 0.732
+CosmologyOmegaBaryonNow    = 0.0441
+CosmologyComovingBoxSize   = 32.0       // in Mpc/h
+CosmologyHubbleConstantNow = 0.704      // in units of 100 km/s/Mpc
+CosmologyInitialRedshift   = 50
+
+#
+#  Power spectrum Parameters
+#
+PowerSpectrumType            = 11             // Eisenstein & Hu
+PowerSpectrumSigma8          = 0.807
+PowerSpectrumPrimordialIndex = 0.961
+PowerSpectrumRandomSeed      = -312367047
+
+#
+#  Grid info
+#
+Rank                = 3
+InitializeGrids     = 1
+GridRefinement      = 1
+GridDims            = 32 32 32
+
+#
+#  Particle info
+#
+InitializeParticles = 1
+ParticleRefinement  = 1
+ParticleDims        = 32 32 32 
+
+#
+#  Names
+#
+ParticlePositionName = ParticlePositions
+ParticleVelocityName = ParticleVelocities
+GridDensityName      = GridDensity
+GridVelocityName     = GridVelocities

File run/CosmologySimulation/AMRCosmology/notes.txt

View file
+This is a cosmology simulation that runs to z = 0 with tabulated
+radiative cooling and conventional, non-radiative star formation and
+feedback.  It will run on 2 processors in about 40 minutes.
+
+Usage:
+./inits.exe -d AMRCosmology.inits
+mpirun -np 2 ./ring.exe pv ParticlePositions ParticleVelocities
+mpirun -np 2 ./enzo.exe -d AMRCosmology.enzo

File run/CosmologySimulation/AMRNestedCosmology/AMRNestedCosmology.enzo

View file
+#;-*-C-*-
+
+# AMR PROBLEM DEFINITION FILE: Nested Cosmology Simulation
+# This is a cosmology simulation that runs until a dense object collapses.
+#
+# define problem
+#
+ProblemType                    = 30
+TopGridRank                    = 3
+SelfGravity                    = 1
+TopGridGravityBoundary         = 0
+LeftFaceBoundaryCondition      = 3 3 3
+RightFaceBoundaryCondition     = 3 3 3
+BaryonSelfGravityApproximation = 1
+TopGridDimensions              = 32 32 32
+
+#
+# problem parameters
+#
+CosmologySimulationOmegaBaryonNow       = 0.04
+CosmologySimulationOmegaCDMNow          = 0.26
+CosmologySimulationInitialTemperature   = 140.0
+CosmologySimulationDensityName          = GridDensity
+CosmologySimulationVelocity1Name        = GridVelocities
+CosmologySimulationVelocity2Name        = GridVelocities
+CosmologySimulationVelocity3Name        = GridVelocities
+CosmologySimulationParticlePositionName = ParticlePositions
+CosmologySimulationParticleVelocityName = ParticleVelocities
+CosmologySimulationNumberOfInitialGrids = 3
+CosmologySimulationGridDimension[1]     = 32 32 32
+CosmologySimulationGridLeftEdge[1]      = 0.25 0.25 0.25
+CosmologySimulationGridRightEdge[1]     = 0.75 0.75 0.75
+CosmologySimulationGridLevel[1]         = 1
+CosmologySimulationGridDimension[2]     = 32 32 32
+CosmologySimulationGridLeftEdge[2]      = 0.375 0.375 0.375 
+CosmologySimulationGridRightEdge[2]     = 0.625 0.625 0.625
+CosmologySimulationGridLevel[2]         = 2
+
+#
+# cosmology parameters
+#
+ComovingCoordinates        = 1
+CosmologyOmegaMatterNow    = 0.3
+CosmologyOmegaLambdaNow    = 0.7
+CosmologyHubbleConstantNow = 0.70
+CosmologyComovingBoxSize   = 0.3
+CosmologyMaxExpansionRate  = 0.02
+CosmologyInitialRedshift   = 99
+CosmologyFinalRedshift     = 15
+GravitationalConstant      = 1
+
+#
+# I/O and stop/start parameters
+#
+
+dtDataDump       = 1.0
+RedshiftDumpName = RD
+RedshiftDumpDir  = RD
+DataDumpName     = DD
+DataDumpDir      = DD
+
+CosmologyOutputRedshift[0]  = 99
+CosmologyOutputRedshift[1]  = 40
+CosmologyOutputRedshift[2]  = 35
+CosmologyOutputRedshift[3]  = 30
+CosmologyOutputRedshift[4]  = 25
+CosmologyOutputRedshift[5]  = 24
+CosmologyOutputRedshift[6]  = 23
+CosmologyOutputRedshift[7]  = 22
+CosmologyOutputRedshift[8]  = 21
+CosmologyOutputRedshift[9]  = 20
+CosmologyOutputRedshift[10] = 19
+CosmologyOutputRedshift[11] = 18
+CosmologyOutputRedshift[12] = 17
+CosmologyOutputRedshift[13] = 16
+CosmologyOutputRedshift[14] = 15
+
+#
+# hydro parameters
+#
+Gamma                       = 1.6667
+PPMDiffusionParameter       = 0
+DualEnergyFormalism         = 1
+HydroMethod                 = 0
+InterpolationMethod         = 1 
+CourantSafetyNumber         = 0.4
+ParticleCourantSafetyNumber = 0.6
+UseMinimumPressureSupport   = 0
+FluxCorrection              = 1
+ConservativeInterpolation   = 0