Skip to main content

pyvap 0.1.1: kinetic model of particle evaporation

https://img.shields.io/pypi/v/pyvap.svg https://travis-ci.org/awbirdsall/pyvap.svg?branch=master

pyvap models evaporation of components from a multicomponent spherical particle. The model follows the treatment of Maxwellian flux given in Atmospheric Chemistry & Physics by Seinfeld and Pandis. The model is written in Python 3, with Scipy’s ode solver.

Usage

Example code to model the evaporation of an equimolar mixture of polyethylene trimer and hexamer (PEG-3 and PEG-6) in a particle with starting radius 5 micron, and create a figure of the output:

import pyvap
import matplotlib.pyplot as plt
import numpy as np

# define model parameters
peg3 = {"name": "PEG-3",
        "Dg": 5.95e-6,
        "M": 0.1502,
        "rho": 1108.0,
        "cinf": 0,
        "p298": 6.68e-2,
        "delh": 78.3e+3}
peg6 = {"name": "PEG-6",
        "Dg": 4.26e-6,
        "M": 0.2823,
        "rho": 1180.0,
        "cinf": 0,
        "p298": 3.05e-5,
        "delh": 102.1e+3}
cmpds = [peg3, peg6]
# equimolar mixture of PEG-3 and PEG-6
comp = [0.5, 0.5]
r_init = 5e-6 # starting radius, m
time = 2*60*60 # integration time, s
numpts = 2000 # number of points to integrate
temp = 298 # K

# run model
model = pyvap.analyze_evap(cmpds, comp, r_init, time, numpts, temp,
                           makefig=True)

# display generated figure during, e.g., interactive ipython session
plt.show()

# save generated figure
evap_fig, (evap_ax0, evap_ax1) = model["evap_fig"]
evap_fig.savefig("evaporation.png")

# save csv of evaporation model output (no. of molecules of each component,
# at each timestep)
np.savetxt("evaporation.csv", model["evap_a"], delimiter=",")

Installation

Install using pip.

Install from PyPI:

pip install pyvap

Install most recent Github commit (stability not guaranteed):

pip install git+https://github.com/awbirdsall/pyvap

Dependencies

Tested on Python 2.7 and 3.5.

Requires numpy, scipy, and matplotlib>=1.5 (automatically handled if using pip to install). I recommend using conda to install the Scipy stack on a Windows machine if pip is having issues.

Running the tests requires pytest.

Testing

Tests are located in the tests/ subfolder and can be run using pytest. Tests also require numpy.

Development

Posting issues or pull requests to the github page is welcome!

Metadata

Release files for pyvap 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyvap 0.1.1
File Size Uploaded Provenance Actions
pyvap-0.1.1.tar.gz 7.7 kB Without provenance Details for pyvap-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyvap 0.1.1
File Interpreter ABI Platform Actions
pyvap-0.1.1-py3-none-any.whl Python 3 none any Details for pyvap-0.1.1-py3-none-any.whl

Total release size: 17.5 kB

Release files / pyvap-0.1.1.tar.gz

Download URL pyvap-0.1.1.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
624d415616079d01d70f1cf886470b05b16c4a37bde4ee3ca7e54b2adcbd26bd
BLAKE2b-256 checksum
How to use checksums
49f655b8c999d712468f8aad64572313aa593a2b258e6450dd71a23f8d6440a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyvap-0.1.1-py3-none-any.whl

Download URL pyvap-0.1.1-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b14e63a39c63bc474c20be9b6a1f520775f68ae55d68261e61c60851fb6b3cd
BLAKE2b-256 checksum
How to use checksums
04b18a058a3061963d1f9f7ecd0a886ac94467f950e527098d07270b4972b571
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pyvap 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page