Generated from /asc/asci2/site/flashcode/secure/release_4p6/source/physics/Cosmology/Cosmology_unitTest.F90 with ROBODoc v4.99.8 on Mon Oct 14 13:16:06 2019


[Functions] source/physics/Cosmology/Cosmology_unitTest





  Cosmology_unitTest(integer, intent(IN)  :: fileunit,
                     logical, intent(INOUT)  :: perfect)


  This unit test checks the generation of cosmological redshifts and scaling 
  factors, by comparing them to an analytical solution, ensuring that the 
  Friedmann equation is solved reasonably accurately, and that the redshift
  generated and time reported from the redshift is also reasonably accurate.

  Presently, the tests are run with a tolerance of 10e-6 vs the analytical

  The tests are run under these conditions:
  OmegaMatter = 1.0
  OmegaLambda = 0.0
  OmegaBaryon = 1.0
  OmegaRadiation = 0.0
  HubbleConstant(H0) = 1.62038e-18

  The cosmological scaling factor is related to the time by the equation:

   a(t) = (t/t0)**(2/3)
   where t0 = 2/(3 * H0)
   and is related to the cosmolgical redshift by the 
   equation z(t) = (1/a(t)) - 1
   The test case then iterates over time starting at the time given by a 
   redshift of 50 and generates a number of uniform dt steps.The test will 
   then check the agreement of scaling factor, redshift and time and see 
   if the scaling factor is solved correctly and ensure that nothing 
   pathological is going on in solving for the current redshift or 
   converting from the current redshift to time.


   fileunit : This is the file unit number passed in by Driver_evolveFlash
              This goest to the "unitTest_xxxx" output file

   perfect : true if the test was completed within tolerances.  


  This test is presently run over 10000 steps running from z=50 to 0.
  Shrinking the timestep will increase the accuracy, unless the redshift 
  ever goes below zero.  The results of doing this in this code are 
  not well defined, and it will show a very large amount of error.