[FLASH-USERS] dt_cosmo

Paul Ricker pmricker at illinois.edu
Wed Dec 8 15:59:59 EST 2010


Yes, that's the solution: dadt -> abs(dadt).

Paul


On Wed, 2010-12-08 at 15:36 -0500, John ZuHone wrote:
> Aaron,
> 
> Even if your universe is contracting, dt should still be greater than zero (unless you're trying to run the expansion in reverse, which it doesn't sound like you're doing). It would be better to find a consistent way to alter the cosmology routines for your purposes to ensure that dt > 0 even if dadt < 0. 
> 
> Naively, I would suppose that simply taking the absolute value would suffice, but others can correct me.
> 
> Best,
> 
> John Z
> 
> On Dec 8, 2010, at 3:32 PM, Aaron Froese wrote:
> 
> > If I setup a contracting universe, then the value of dadt becomes negative.
> > 
> >  dadt = (csm_scaleFactor - csm_oldScaleFactor) / dt
> > 
> > This makes dt_cosmo negative, generating an error.  To generalize, dt_cosmo should be calculated as
> > 
> >  if (dadt > 0) then 
> >     dt_cosmo = csm_maxScaleChange*csm_scaleFactor / dadt
> >  else if (dadt < 0) then
> >     dt_cosmo = - r*csm_scaleFactor / dadt
> >  else 
> >     dt_cosmo = HUGE
> > 
> > where r is a value between 0 and 1 that prevents the universe from collapsing to a single point in one time step.
> > Would this method cause other problems in the code?
> 

-- 
---------------------------------------------------------------------
Paul M. Ricker                                Department of Astronomy
Associate Professor   National Center for Supercomputing Applications
pmricker at illinois.edu      University of Illinois at Urbana-Champaign
http://sipapu.astro.illinois.edu/~ricker         Urbana IL 61801-3074
---------------------------------------------------------------------




More information about the flash-users mailing list