[yt-dev] Microns & Simulation-Specific Unit Base

Axel Huebl a.huebl at hzdr.de
Thu Jan 5 04:59:49 PST 2017


Hi yt-devs!

I have a quick user-question (sorry) and a devel question:

First, how to convert to a unit like microns (10^-6 meters) or
pico-seconds? I can't find an example here [1]. I tried

  .in_units("mum")
  .in_units("mu m)
  .in_units("1.e-6 m")
  .in_units("microns")
  .in_units("micro meter")
  .in_units("micro meters")
  .in_units("micro m")
  .in_units("μm")

and only
  .in_units("1.e-6 * m")

does not fail but looks ugly.

An orthogonal question: in our domain (laser-plasma physics) unit
systems are scaled by something like the applied laser wavelength or the
plasma density (and more to make a full set).

Following again [1] I would implement something like .in_base('plasma')
or .in_base('laserplasma') but those are not scaled to "fixed" reference
quantities as the other base systems but are depending on either user input
  [ length = ("$\lambda_0$", "800 nm"),
    time   = ("$\omega_\text{pe}^{-1}$", "1.e-15 s"),
     ...]
or alternatively scalings the data file already provided. (Ok, the
symbol is always fixed per "in_base" but the value to scale with needs
to be provided.)

Is that already possible or any ideas how we could implement that?


Thanks,
Axel

[1]
http://yt-project.org/docs/dev/analyzing/units/fields_and_unit_conversion.html#data-selection-and-fields
-- 

Axel Huebl
Phone +49 351 260 3582
https://www.hzdr.de/crp
Computational Radiation Physics
Laser Particle Acceleration Division
Helmholtz-Zentrum Dresden - Rossendorf e.V.

Bautzner Landstrasse 400, 01328 Dresden
POB 510119, D-01314 Dresden
Vorstand: Prof. Dr.Dr.h.c. R. Sauerbrey
          Prof. Dr.Dr.h.c. P. Joehnk
VR 1693 beim Amtsgericht Dresden


More information about the yt-dev mailing list