Coder Social home page Coder Social logo

peroxy_branching's Introduction

This repository contains data and code to accompany "Fate of organic peroxy radicals in the atmosphere, combustion systems, and everywhere in between" by Mark Jacob Goldman, William H Green, and Jesse H Kroll.

The goal of this repository is to help others reproduce and build off of our work.

Structure of database

The structure of the folders in this repository are as followed:

  • code-code to generate figures
    • figure_3_4.ipynb - an IPython notebook with code to generate figures 3 and 4. Requires generating data in data\fig_4_data\
    • figure_5.ipynb - an IPython notebook with code to generate figure 5.
    • figure_6.ipynb - an IPython notebook with code to generate figure 6. Requires RMG installation to work.
    • *carter_atkinson_NO_branching.ipynb - code to calculate the branching of NO + RO2 described in Carter and Atkinson 1989 Journal of Atmospheric Chemistry
    • simulation.py - methods used to simulate reaction systems in the IPython notebooks
  • data-contains data used to make the figures
    • mechanism - cantera, chemkin, and RMG files for the mechanisms used in this work
      • merchant-full_w_NO.cti - propane model - pressure-dependent RO2
      • gamma_i_butanol.cti - butanol model - pressure-dependent RO2
      • aramcomech2_modified.cti - butane model
      • butanol_high_p.inp - butanol model at high pressure limit
      • species_dictionary_butanol.txt - file for RMG to read butanol model
    • fig_4_data - place for calculated data to generate figure 4. Data is generated by running the make_diagram.py files within this folder.
  • LICENSE - information on usage of code and data within this repository
  • Dockerfile - contains information for creating a virtual environment that can replicate the calculations in this work
  • environment.yml - contains a list of python packages used by the Dockerfile to generate the python environment

Building using Docker

A file Dockerfile contains instructions to generate an image with all the dependencies for simulating the results of the model. The instructions here were tested on Ubuntu 18.04 and Ubuntu 20.04, but will likely work on other linux distributions and operating systems. The instructions below reference unix terminal commands to generate the image and complete the calculations. You will first have to install the docker package. Once that is installed, build the docker image with:

docker build . -t peroxy

You can then create a container from the image and then launch a terminal session with it.

docker container run -it -p 8888:8888 peroxy

If you are generating figure 4, then you will have to run initial calculations. You can do this in the container by:

cd /home/paper_repo/data/fig_4_data/butanol_1bar/
python make_diagram.py
cd ../butanol_1ppb/
python make_diagram.py
cd ../propane_1ppb/
python make_diagram.py
cd ../propane_1bar/
python make_diagram.py

Figures are generated and analysis conducted within the jupyter notebooks within the code folder. To access jupyter notebooks inside the container, create and run the server with

cd /home/paper_repo/code/
jupyter notebook --ip 0.0.0.0 --port 8888 --no-browser --allow-root

You can view the notebook in your web browser on the same device as the container with the URL localhost:8888 or by copying the URL given in the terminal window and pasting it into a web browser. You can open the various notebooks and run the the code by going to Cell -> Run All. This will save the figures within the container. Plenty of online tutorials discuss more advanced usage of IPython notebooks and docker.

peroxy_branching's People

Contributors

goldmanm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.