Skip to content

Latest commit

 

History

History
181 lines (120 loc) · 5.98 KB

README.md

File metadata and controls

181 lines (120 loc) · 5.98 KB

Aeroplanets / Trans++: C++ implementation of the Trans* programs.

linux mac

Aeroplanets is by Guillaume Gronoff (ORCID) of NASA, a former student of Pierre-louis Blelly, Transcar author. Michael Hirsch upgraded the original autoconf build system to CMake and redid the plotting utilities. Aeroplanets is a 1-D kinetic electron transport ionization and excitation model for aurora and airglow on various planetary bodies including Earth, Venus, Mars and Titan, and has been used to help conceptualize thermospheres of exoplanets. Impact kinetics are simulated for electrons, protons, photons and cosmic rays. Transport of secondary particles and suprathermal electrons is also simulated. Aeroplanets incorporates several models including:

  • Trans4 (low energy proton model)
  • Trans-Venus-Mars

Aeroplanets production model Aeroplanets emissions model

Aeroplanets builds easily with CMake using Boost for C++. Aeroplanets can be compared with other models like Glow or Transcar.

The simulation is configured completely with XML. The runtime is similar to Transcar (3-5 minutes on a laptop). The output is text files, for which I have fast Python parsers that could dump to HDF5 etc. as desired.

Over 70 output files are created per simulation, covering:

  • production rates for numerous neutral and ion species
  • column emissions from UV to IR
  • energy grid from 1 eV..30 keV

Inputs include:

  • photon flux (photoionization)
  • proton flux (proton impact ionization)
  • electron flux (electron impact ionization) -- parameterization or read your e- flux file.

Bibliography

Aeroplanets was described in Section 2 of JGRSP 2012.

Prereqs

The build system is CMake.

  • Mac: NOTE: at the moment this might have regex.hpp error, I don't have access to MacOS for now.

    brew install cmake gcc boost lapack
    
    brew install doxygen  # optional
  • Linux

    apt install g++ gfortran liblapack-dev libboost-filesystem-dev libboost-regex-dev
    
    apt install doxygen graphviz  # optional
  • Windows: use MSYS2 or Windows Subsystem for Linux

Plotting uses Python and Matplotlib.

Build

cmake -B build

cmake --build build

Compilation can use a few GB of RAM. if this becomes an issue, try using cmake -B build -G Ninja or if you don't have Ninja, specify cmake --build build -j1

Usage

NOTE: Trans++ has a bug where if the output directory doesn't exist, the program just keeps computing, but doesn't write any output at all.

Aurora example

From the aeroplanets/build/ directory:

  1. create the output directory, or no files will be output at all despite full simulation run

    mkdir SortieAurora
  2. run sim

    ./aero1d ../data/Earth/AuroraEarthFairbanks.xml

    the output appears under SortieAurora/

Plot

Automatically iterates over all files in output directory. From the aeroplanets/utils directory:

python Plot.py build/SortieAurora/

the optional -p ~/plots parameter saves plots to ~/plots/ directory.

aeroplanets/data/Earth/SortieAuroraCompar/ is reference data to check if the compilation/computation was successful.

chem.png

colu.png

extr.png

iono.png

prod.png

Precipitation

Alfvenic aurora and other structured aurora users may be interested in configuring electron precipitation flux characteristics. This is configured in the input XML file as follows:

  1. <use_precipitation /> must exist to enable electron precipitation, and the parameters are enclosed by <precipitation> </precipitation> XML tags.
  2. Electron precipitation must be read from a file or computed by a simple parameterization.

use_model (created in math/mathflux.cpp)

  • 0: Null (none)

  • 1: Maxwellian

  • 2: Gaussian

  • 3: Dirac (pseudo-monoenergetic)

  • E0 Characteristic energy [eV]

  • entot Total flux [ergs]

  • isotro 0: non-isotropic. 1: isotropic.

  • powlaw power-law shaping 0 or 1

Plotting

Several programs related to concurrent running of large numbers of simulations are in utils/. Most users will simply use Plot.py to make line plots of text output files, using headers.

Some examples from the 1983 Venus VTS3 empirical model, valid from about 140 km - 250 km altitude, done with Venus_*.py programs.

Venus Latitude Venus Time Venus Altitude

Documentation

  1. compile docs

    doxygen Doxyfile
  2. web browser: doc/html/index.html

  3. To create /doc/latex/refman.pdf:

    cd doc/latex
    make