Python code to compute VT relaxation times using a kinetic theory based definition, as developed in Kustova, E. V., and G. P. Oblapenko. "Mutual effect of vibrational relaxation and chemical reactions in viscous multitemperature flows." Physical Review E, 2016 and G. P. Oblapenko. "Calculation of Vibrational Relaxation Times Using a Kinetic Theory Approach." The Journal of Physical Chemistry A, 2018.
More specifically, it computes the either the averaging operator over all possible one-quantum VT transitions using the Forced Harmonic Oscillator model and the Variable Soft Sphere model with recent collision parameters to calculate the transition cross-sections.
The code can compute either the averaging operator avg_E_vibr, or the full relaxation time t (at a specified pressure), defined as
t = m * c_vibr / (4 * k * n * avg_E_vibr),
where m is the relaxating molecules mass, k is the Boltzmann constant, n is the number density, c_vibr is the specific heat of vibrational degrees of freedom.
The code requires Python 3, the netCDF4 library, numpy and scipy.
To install the pre-requisites:
pip install numpy
pip install scipy
pip install netCDF4
Another option is to use the Anaconda distribution, and install netCDF4 via conda install netcdf4.
The script can be run with the following optional arguments:
optional arguments:
-h, --help: show this help message and exit-t OUTPUTFILETYPE, --outputfiletype OUTPUTFILETYPEspecifies output filetype: CSV or NETCDF4 (default is "NETCDF4")-f OUTPUTFILENAME, --outputfilename OUTPUTFILENAMEspecifies output filename (or prefix in case of CSV files, a separate CSV file is created for each interaction pair)--cdfoutputfileformat CDFOUTPUTFILEFORMATFor netCDF4 output, specifies output format (default is "NETCDF4_CLASSIC")--delimiter DELIMITERFor CSV output, specifies delimiter (default is ",")--molecules MOLECULESComma-separated names of molecules for which the VT relaxation times are computed (default is "N2,O2,NO")--partners PARTNERS Comma-separated names of particles, possible collision partners (default is "N2,O2,NO,N,O,Ar")--temperaturemin TEMPERATUREMINMinimum temperature (default is 200.0)--temperaturemax TEMPERATUREMAXMaximum temperature (default is 25000.0)--vtemperaturemin VTEMPERATUREMINMinimum vibrational temperature (default is 200.0)--vtemperaturemax VTEMPERATUREMAXMaximum vibrational temperature (default is 25000.0)--dt DTTemperature step size (default is 100.0)--verbose VERBOSEIf set to true (default value), will enable some output during computation--integral_only INTEGRAL_ONLYIf set to true (default value), will compute only averaging operator and not the full relaxation time--pressure PRESSUREIf integral_only is not true, this will specify the pressure in Pascals at which the relaxation times are computed (default is 101325 Pa)
Oblapenko, G. P. Calculation of Vibrational Relaxation Times Using a Kinetic Theory Approach. The Journal of Physical Chemistry A, 2018. http://doi.org/10.1021/acs.jpca.8b09897
Kustova, E. V., and G. P. Oblapenko. Mutual effect of vibrational relaxation and chemical reactions in viscous multitemperature flows. Physical Review E, 2016. https://journals.aps.org/pre/abstract/10.1103/PhysRevE.93.033127