Adding some species handler helpers

#719 Merged at a10dc67
  1. MattT

This is the first step toward a better species system. It includes a periodic table and a chemical formula parser. The tests demonstrate some basic usage, but it is not really intended to be user-facing.

The next step will be implementing automatic species detection and creation of appropriate fields.

UPDATE 1: Adding chemical formula parser.

UPDATE 2: Adding species field plugin, using it for Enzo.

UPDATE 3: Missed one change.

UPDATE 4: To match my updated YTEP pull request, I have changed the electron specification to be De, and I've added D to the periodic table. This is open for discussion.

UPDATE 5: Fixing conflict.

UPDATE 6: De => El

UPDATE 7: Removing known_species_masses function.

Comments (13)

  1. MattT author

    Of course I forgot about D, which is an isotope and not supported by this. @brittonsmith , @ngoldbaum , @devinsilvia , do you think it should be implemented as a fake element in the periodic table?

    1. Britton Smith

      D is common enough in astro that we should probably include it. This also exposes the fact that we do not handle isotopes, but one thing at a time.

  2. Britton Smith

    So, does this now already work with Enzo's multispecies fields? If so, can you provide an example of this? Also, looks like there is a minor merger conflict.

  3. Britton Smith

    Maybe I missed the window to discuss this, but why "De" for the electron instead of "e" or "e_m1"?

      1. Britton Smith

        Ok, I see. I'm not sure I understand specifically why "De," though. Both "E" and "El" are also available.

        1. MattT author

          I agree with that. I don't know why I didn't use "El" but I like it better than "De". I will update this PR and the YTEP.

          1. Britton Smith

            Ok, great. I think De is an enzo-ism, since DeNum is the electron density field index. Old habits die hard.