# ASALI: Documentation

**ASALI** is an open-source code developed for **engineers**, **chemists** and **students** working on the modeling of gas phase mixture. From one side, thanks to its user-friendly interface, **ASALI** is very helpful for those approaching the modeling of gas phase mixture for the first time. On the other side, it allows more expert users in performing detailed simulations without losing time in coding their own models.

**Latest release:** 1st November, 2019

**1. Introduction**

Let's go straight to the point! Asali main features are:

- Estimation of thermodynamic/transport properties of ideal gas mixture
- Linear regression of thermodynamic/transport properties of ideal gas mixture
- Evaluation of thermodynamic equilibrium of ideal gas mixture
- Estimation of vacuum properties based of gas kinetic theory
- Modeling catalytic reactors
- Matlab and Octave interface for thermodynamic and transport properties

If you are interested in more details regarding models implemented in Asali have a look at the following paragraph; if not, jump to section number 2 for the installation instructions.

### 1.1 Thermodynamic and transport properties

The thermodynamic and transport properties evaluated by Asali are:

- Thermal conductivity
- Viscosity
- Binary and mixture diffusivity
- Enthalpy
- Entropy
- Specific heat at constant pressure

Asali can be considered as a powerful user-friendly interface of Cantera, thus all the transport and thermodynamic properties are estimated following the approach implemented in Cantera. The transport properties are evaluated with the standard gas kinetic theory *(Curtiss, Charles F., and Joseph O. Hirschfelder. "Transport properties of multicomponent gas mixtures." The Journal of Chemical Physics 17.6 (1949): 550-555.)*. The thermodynamic properties of each species are based on the NASA parameters and calculated according to the approach proposed by Gordon and McBride *(Gordon, S., and B. J. McBride. "Technical Report SP-273." NASA Special Publication (1971))*. Moreover, thermodynamic properties of the gaseous mixture are estimated by applying the Gibbs theorem.

### 1.2 Linear regression

This feature of Asali applies a least square fit to derive *easy-to-handle* functions of thermodynamic/transport properties. In particular, Asali estimates the thermodynamic/transport properties by using Cantera and derives exponential or linear functions describing these properties as a function of temperature.

### 1.3 Thermodynamic equilibrium

Cantera calculates also the thermodynamic equilibrium of ideal gas mixtures. Therefore, Asali exploits this feature to evaluate the equilibrium at constant temperature or at constant pressure. For more information have a look at Cantera user's guide.

### 1.4 Vacuum properties

The vacuum properties estimated by Asali are:

- Knudsen number
- Mean gas velocity
- Mean free path length
- Diffusivity

These properties are estimated according to the standard gas kinetic theory *(Curtiss, Charles F., and Joseph O. Hirschfelder. "Transport properties of multicomponent gas mixtures." The Journal of Chemical Physics 17.6 (1949): 550-555.)*. In particular, the diffusivity value is estimated considering both the viscous regime and the rarefied regime according to the Knudsen number.

### 1.5 Catalytic reactors

Different catalytic reactor models are implemented in Asali:

- Batch reactor model
- Continuous stirred tank reactor model (CSTR)
- 1D Pseudo-homogeneous plug flow reactor model (PFR)
- 1D Heterogeneous plug flow reactor model
- Pressure drops

First of all, the transport and thermodynamic properties used by Asali in the reactor models are based on Cantera. Therefore the user can select either the `Default transport/thermodynamic properties`

or `Load CANTERA kinetic/properties file`

to performe a detailed simulations of catalytic reactors. However, since in most of the engineering problems, the transport and thermodynamic properties are considered constant, Asali allows users implement their own constant transport and thermodynamic properties. To enable this feature choose `User defined constant properties`

option in the kinetic scheme window selection.

Secondly, from a kinetic point of view, all reactor models implemented in Asali handle micro-kinetic, homogeneous (gas phase) or user defined kinetic schemes. In particular, the micro-kinetic or homogeneous (gas phase) schemes must be written in Cantera format. Moreover, for those users who want to implement their own reaction rates, Asali has a user-friendly interface allowing them write their own kinetic scheme.

Finally, the 1D Pseudo-homogeneous plug flow reactor model can be solved in transient and steady state mode, allowing a deep understading and analysis of the reactor behaviour.

The `Pressure drops`

option is a calculator of pressure drops for different reactor geometries (e.g. honeycomb, packed bed) based on state-of-the-art correlations.

### 1.6 Catalytic pellets

Different catalytic pellet geometries are implemented in Asali:

- Slab
- Sphere
- Cylinder

These models handle transport and thermodynamic properties from Cantera or by using `User defined constant properties`

. The diffusion coefficient inside the pellet is described by using a *reduction coefficient* or an *epsi-tau model*.

From a kinetic point of view, all pellet models implemented in Asali handle micro-kinetic, user defined kinetic schemes and homogeneous reactions.

### 1.7 Matlab and Octave version

Despite Matlab has become one of the most used tool at engineering classes (along with its open-source version: Octave), not so many thermodynamic and transport properties database are available for these softwares. One of the most popular is Cantera. However, coupling Cantera with Matlab is quite challenging for not expert coders and it requires lots of effort. For this reason, Asali has its own Matlab interface, which is more user-friendly than Cantera's one.

**2. Installation instructions**

Asali is based on different open-source codes:

- Cantera: estimation of thermodynamic and transport properties based on the kinetic gas theory and NASA database
- Eigen libraries: linear system solver and handling of numerical issues
- Sundials libraries: IDA and CVODE solvers for Ordinay Differentional Equation (ODE) and Differential and Algebraic Equation (DAE) systems
- Gtkmm: gnome based graphical interface
- Gnuplot: command-line driven graphing utility

Asali has been tested on Ubuntu 16.04 LTS, Ubuntu 18.04 LTS, Windows 10, Windows 8 and Debian Wheezy. If your Operating System (OS) is not one of them, please send us an email: ste.rebu@outlook.it

### 2.1 Linux OS

##### 2.1.1 Pre-requisites installation

The Linux based external libraries can be installed by typing these commands:

`sudo apt-get update`

`sudo apt-get install scons git python3-ruamel.yaml python3-yaml g++ gfortran python libboost-dev cython python-dev python-numpy python-numpy-dev python-setuptools python3 python3-dev python3-setuptools python3-numpy cython3`

`sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1`

##### 2.1.2 How to install Gtkmm libraries

Gtkmm can be downloaded with the following command:

`sudo apt-get install libgtkmm-3.0-dev`

More details can be found at: https://www.gtkmm.org/en/

##### 2.1.3 How to install Gnuplot

Gnuplot can be installed with the following command:

`sudo apt-get install gnuplot`

Details can be found at: http://gnuplot.info/

##### 2.1.4 How to install Cantera

Cantera can be downloaded with the following command:

`git clone https://github.com/Cantera/cantera.git`

To install Cantera type the following commands from the cantera folder:

`scons build system_sundials=n`

`sudo scons install`

More details can be found at: https://cantera.org/install/compiling-install.html

##### 2.1.5 How to install ASALI

To install Asali modify the `compiled.sh`

file by changing the environmental variable `CANTERA`

with the path of you Cantera installation (usually `/usr/local/`

). Once you have changed the environmental variable, run the following commands:

`./compile.sh`

To run Asali:

`./Asali`

### 2.2 Windows OS

To install Asali on Windows just `double click`

on `Asali-Setup.exe`

and follow the instructions.

### 2.3 Matlab and Octave

The Matlab and Octave version of Asali does not need installation. Just download `database.mat`

and `Asali.m`

and save them in your working folder. An example, showing how to access the thermodynamic and transport properties, is represented in `example.m`

.

*ASALI is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ASALI is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.*