RadLib
|
Radlib is an open-source library for computing radiation properties for gases and soot in so-called participating media. The radiation properties computed currently include the absorption coefficient \(\kappa_j\) and weight factors \(a_j\) for use in global models for solution of the radiative transport equation:
\[\frac{dI_j}{ds} = \kappa_jI_j - \kappa_ja_jI_b,\]
where \(I_j\) is the intensity of the \(j^{th}\) gas, and \(s\) is a path length. Three models are implemented:
A common application of radiative heat transfer in participating media is combustion in flames and fires. Combustion is a complex process with many physical phenomena. Understanding and implementing the various physical processes is a challenge, and having access to open-source, documented code libraries to facilitate modeling of these process is important. In particular, the relatively new RCSLW model is accurate, but somewhat complex and time consuming to implement and verify. This library provides straightforward access to this model and others.
Radlib is written in C++ and includes a Python interface written in Cython and a Fortran interface. Examples are provided of heat flux and/or volumetric heat source in one-dimensional configurations. A one-dimensional solver based on ray tracing is used in these configurations. Seven examples from three papers are provided with the code and these can be run using the Jupyter notebook run_and_plot_examples.ipynb
included in the examples/python
folder. These examples include comparison to line-by-line data from the corresponding references and the implemented codes have been validated against these references. The examples are described in run_and_plot_examples.ipynb
. In addition, a simple interface code is provided in C++, Python, and Fortran to demonstrate initializing the library and calling it for a given gas state.
The Planck Mean model is a simple model consisting of curve fits to temperature of absorption coefficients for CH4, CO2, CO, H2O, and soot. These are combined to a single absorption coefficient for a single gas (with \(a=1\)). The model is commonly applied to combustion problems because if its simplicity and low computational cost, but it is inaccurate unless applied to optically thin gases with relatively small radiative losses.
There are a number of WSGG models that have been published. A particularly attractive version is that by Bordbar et al. (2020) [2], which is an extension of an earlier paper by Bordbar et al. (2014) [1]. This model uses four gray and one clear gas, accounts for arbitrary compositions of CO2 and H2O. The model was extended here to include soot (under Bordbar's guidanance) by adding a single mean soot absorption coefficient to each of the \(\kappa_j\) and leaving the \(a_j\) unchanged. Example ex_Sb1 demonstrates the accuracy of the model with soot.
The RCSLW model is an implementation of the model published by Solovjov et al. (2017) [3]. This is a highly accurate model that improves on the SLW model by relaxing the need of a reference gas. The model can accommodate an arbitrary number of gases and treats arbitrary compositions of CO2, H2O, CO, and soot.
The code is intended to be built on Linux and MacOS systems, (or the Linux subsystem for Windows). The build directory includes a readme file that describes the build and installation process. Required software includes:
To build the code, the user creates and enters a top-level build
directory, then runs
The top-level CMakeLists.txt
file has build options that can be set at the top of the file. These options can also be set at the command line, for instance
The default installation directory is radlib/installed
, but this can be changed through the CMAKE_INSTALL_PREFIX
variable.
To run the python interface, the PYTHONPATH environment variable needs to be updated to include the Python module location. This is detailed upon successful installation of the code, for instance:
A Code Ocean capsule is available that provides a fully executable version of the code.
A Youtube video is provided that demonstrates downloading, installing, and running the examples.