Thoughts on Scales

Currently in the code we have 4 different types of 'scale' variables:

  • Computational scales which obey expected relationships (VelScale=lScale / TimeScale)
    • lScale - length scale
    • mScale - mass scale
    • rScale - density (rho) scale
    • VelScale - velocity scale
    • TimeScale - time scale
    • BScale - magnetic field scale (Gauss)
    • pScale - energy density (pressure) scale
  • Computationally scaled constants
    • ScaleGrav - G in computational units
    • ScaleC - speed of light in computational units
  • Microphysical scalings
    • TempScale = pScale/rScale * kB/ XMU
    • nScale = rScale / XMU
  • Inverse computational scales used in source routines
    • eDotScale = 1d0 / (pScale/TimeScale)
    • And then inverse scales that involve microphysical scalings
      • ScaleCool = 1d0 / (pScale/TimeScale/nScale2)
      • ChemScale = 1d0 / (nScale/TimeScale)

A computational length, density, pressure, velocity etc… derive meaning through the euler equations - however computational temperature, and computational number density are meaningless. Only the corresponding physical quantity has any meaning. This is why the microphysical scalings are not consistent with the other scales (nScale /= lScale-3) but instead are designed to give quick ways of getting physical values of Temperature and number density from computational mass density and pressure (provided XMU is the mean molecular weight mmw)

  • np = rhoc* nScale → nScale = np/rhoc=np/rhop*rScale = XMU*rScale
  • Tp = Pc/rhoc * TempScale → TempScale = rhoc * Tp/Pc=pScale*nP*XMU/rScale * Tp/np*kB*Tp = pScale*XMU/rScale/kB = pScale/nScale/kB

The problem is further complicated when XMU can vary (as occurs with multi-species gas) Then the deviation of the local value (xmu) from some fiducial value (XMU) must be added to calculate the actual number density or Temperature

  • np = rhoc*nScale*XMU/xmu
  • Tp = Pc/rhoc * TempScale * xmu/XMU = Pc/rhoc * mTempScale

And now nScale can have meaning if we store the computational number density in tracer fields - though it is still not consistent with lscale-3

  • np = nScale * nc

And if we are tracking computational number density, there is a consistency relation between computational mass density and computational number density:

  • rhoc = np / nScale / XMU * xmu = nc * xmu/XMU

Which allows us to write an expression for a modified TempScale

  • mTempScale=TempScale*xmu/XMU = TempScale*rhoc/nc

In any event I vote we

  • leave the true computational scales, as well as the microphysical scales (nScale and TempScale) as is
  • rename the inverse scales to have the Scale in front (ScaleCool, !ScaleEDot, ScaleChem)
  • and then to avoid confusion change ScaleGrav to ScaledGrav and !ScaleC to !ScaledC

Comments

No comments.