Preprint
Article

Using Python to Analyze and Model Chemical Engineering Processes: A Case Study of MSS Drying

Altmetrics

Downloads

903

Views

205

Comments

0

A peer-reviewed article of this preprint also exists.

Submitted:

11 October 2023

Posted:

12 October 2023

You are already at the latest version

Alerts
Abstract
This study investigates the use of programming language Python to analyse and model chemical engineering processes. Using municipal sewage sludge (MSS) drying as an example, the study demonstrates how Python can support analyses and model drying data. The drying process was performed on a flat plate while maintaining a uniform, parallel drying air speed of 1.15 m s-1. The Python program helped to analyse the digitalised weight measurements from each sample. The program enables sorting input data, determining the drying critical point and evaluating the first and second drying periods.
Keywords: 
Subject: Engineering  -   Chemical Engineering

1. Introduction

Municipal sewage sludge (MSS) is generated as a by-product of wastewater treatment from wastewater treatment plants (WWTP). It presents a significant challenge to urban environments due to its high-water content (around 80 % water fraction), large volume, and the presence of various contaminants [1]. Proper treatment and preparation of the MSS to be incorporated into the Circular Economy (CE) are crucial for maintaining public health, environmental sustainability, and efficient resource management [2]. Various approaches have been employed to effectively manage MSS, focusing on agricultural soil amendments (either directly or following composting), land remediation, incineration, and heat generation, producing biochar and construction composites, extraction of phosphorus and producing fertilizers. Drying usually represents one of the initial steps of these processes. Appropriate design and selection of drying technology for MSS are crucial for sustainable and economical utilization. A significant aspect of this project revolves around producing a dried MSS product with around 30 % moisture content suitable for agricultural applications. While debates persist, particularly regarding organic pollutants, numerous countries prefer utilizing MSS in agriculture due to its positive impact on soil quality, attributed to the presence of organic matter, nitrogen (2.8 - 3.8 %), and Phosphorus (2 - 4 %) content in MSS [3]. This research paper presents a comprehensive study on the design and analysis of the MSS drying process, utilizing the Python programming language to process experimental data and calculate essential drying parameters [4].
Python programming language is a versatile and widely adopted tool in scientific research due to its inherent flexibility, simplicity, and an extensive collection of libraries and frameworks. Python offers a user-friendly syntax and robust libraries for data manipulation, statistical analysis, machine learning, and visualization, enabling researchers to handle complex datasets and derive meaningful insights efficiently. Furthermore, its open-source nature facilitates collaboration and reproducibility in scientific endeavors, supporting and encouraging digitalization. In this context, the paper provides an outstanding example of interdisciplinary research, combining programming and chemical technology. Although limited literature exists on the direct use of the Python programming language for drying analysis, Python has been extensively utilised in environmental engineering and modelling, including wastewater treatment processes [5,6].
MSS drying techniques can be broadly classified according to heat transfer principle (convective, conductive, radiation or mixed), contacting (disc, thin film, drum) and transport methods (fluid bed, pneumatic, belt, screw, vacuum, and others) [7,8,9]. Resulted water vapors are usually discharged by drying gas (air or flue gases). MSS drying target different water content (< 85 % DM) declared as partial drying and complete drying (> 85 % DM) and this determine the type of dryer selected. Capacity plays important role in final decision; in Germany [9] mainly drum, belt and solar dryers are used according to capacity needed. Drying parameters reported including drying temperature (drum dryer, 85-115 °C; belt 60-70 °C and solar 10-40 °C), final moisture (< 10 % and 30-50 % with solar drying), initial moisture content (75-80 %), and various residence times, which are crucial in determining the energy efficiency and overall performance of the drying process [8]. Key decisions at equipment selection are the source of heat while it should be low-cost or even costless (e.g., solar heating). Expensive heat source usually generates a problem of high OPEX and can even overcome allowable costs. Researchers have also explored the potential of combining different drying methods to enhance efficiency and reduce energy consumption [9]. Additionally, studies have examined the environmental impact (e.g., odor emissions) of different drying methods and their implications for sustainability [10].
The drying experiment was conducted using a digitalised weighing scale, enabling continuous monitoring and recording of the MSS sample’s weight at fixed and short time intervals [11]. The novelty of this study lies in the first attempt to develop a program using the Python programming language with the aim of successfully analyzing measurements of chemical-technological processes such as drying processes in our case. This demonstrates that Python is a suitable tool for analyzing such data. This approach allowed for accurate tracking of the drying process, providing valuable insights into the behaviour of MSS under varying conditions. The experiment was carried out at a constant airspeed of 1.15 m s-1 and a temperature range of 20 to 50 °C, facilitating an exploration of the temperature’s impact on the drying process [11]. The following section provides a more detailed explanation of how the program works and the theoretical background on which all the calculations are based.

Python program explained

The Python-based programme used in this study consists of five main phases. In Stage 1, the experimental data is sorted and averaged to generate a robust dataset for analysis. Stage 2 involves conducting regression analysis on the data from the initial drying period, resulting in a linear function that represents the first drying period. Stage 3 focuses on regression analysis of the data from the second drying period, yielding an exponential function and identifies the critical drying point [12]. Stage 4 of the process involves the Python program computing drying parameters to assess the efficiency and effectiveness of the drying process. These calculated parameters are crucial for understanding various aspects and dynamics of the drying procedure. Subsequently, in Stage 5, the program performs a dual function: enable graphical visualizations of the data, facilitating a clear depiction and comprehension of the results while simultaneously exporting these results to a separate Excel file. This export function enables comprehensive data analysis and ensures that the results are readily available for further examination and utilization, thereby enhancing the reproducibility and accessibility of the research.

Use of External libraries

It is important to note that Python program leverages on external libraries to streamline data processing and analysis. These libraries include pandas for data manipulation and openpyxl for handling excel files, math for mathematical functions, matplotlib.pyplot for data visualization, numpy for numerical operations, matplotlib.mlab for additional plotting tools, sklearn.linear_model for regression analysis, and scipy.optimize for curve fitting [13].

Stage 1: Data sorting

The arrangement and categorization of empirical data is a crucial aspect of data analysis. It enables more accurate parameter calculations and results in a more comprehensible interpretation of findings. This is particularly relevant to our study, as specific estimations of drying parameters are dependent upon first derivative values. The adopted digital method of mass measurement, recording the sample at 20 - second intervals, has resulted in inaccuracies in measurement. The issue is predominantly due to the airflow from the dryer being directed parallel to the balance and sample tray, which intermittently interferes with the weighing process. The sample’s mass exhibited a steady decrease over time, indicating a trend. A disordered and inaccurate drying curve may result from the improper sorting of data, thus failing to reflect the actual process. By using correctly sorted data, we can obtain the drying rate values and curve that correspond to the derivative of the regression curve’s shape. During the initial phase of data analysis, the software processes the results by selecting a certain number of data points (N), arranging them, and computing the mean value based on a given equation.
y ¯ = y 1 + y 2 + + y n N ,
The software enables us to adjust the value of N according to our preferences. Decreasing N results in more scattered data, whereas increasing N provides more structured data that aligns better with the trend line of the drying curve. Nevertheless, exercising caution is necessary to avoid N becoming too large, as it could cause a significant deviation of the average data from the actual value. After careful analysis, we determined that an N value ranging from 5 to 10 offers an ideal balance between data smoothing and preservation of the original measurements. This method improved the accuracy of the drying process portrayal, leading to a better grasp of both the underlying mechanisms and optimization potential. Additionally, it guaranteed precise computation of the drying parameters based on initial data. Figure 1 presents a comparison of sorted and unsorted mass data over time and the first mass derivative with respect to time.

Stage 2: Linear regression of the first drying period

The first drying period, also known as the constant speed drying period, occurs at the beginning of the drying process when the drying speed is constant. During this period, there is sufficient moisture on the surface of the material and the evaporation rate is mainly determined by external conditions such as temperature, pressure, humidity and air-drying rate [14]. Since the time dependence of the mass reduction is linear, the 1st drying period can be given by eq 2:
f 1 t = k 1 t 1 + n ,
In Stage 2, the program performs regression analysis on the experimental data from the first drying period, utilising the criterion R2 > 0,99 to produce a linear function [10].
The final data point chosen by the program in Stage 2 is the crucial drying point, defined by the coordinate X ( t c , X c ), where t c represents the time of the critical point and X c is the free moisture at the critical point. This critical point marks the transition from the constant rate period to the falling rate period in the drying process.

Stage 3: Second drying period analysis

Stage 3 is based on the regression analysis of the experimental data obtained during the second drying period, which leads to an exponential function:
f 2 t = A e k 2 t 2 ,
This function characterizes the final stage of the drying process, where the rate of drying decreases over time. The program determines the critical drying point, which is defined as the boundary where the linear function from Stage 2 ends and the exponential function from Stage 3 begins [14].
The curve representing the second drying period follows an exponential function of the form of the eq 3. The exponential function captures the falling rate period of the drying process, as the rate of moisture loss decreases over time. In the following sections, we will delve deeper into the derivation and details of this exponential function, exploring its implications and applications in the context of drying processes.

Derivation of the second Drying Period’s Regression Function

To derive the regression function of the second drying period, it is necessary to first define the basic drying parameters as follows:
X t = m t m 0 m 0 ,
Where:
X t - moisture content of the substance (g g-1)
m t - mass of the sample, which varies with time (g)
m 0 - mass of the sample after drying (g)
This equation calculates the moisture content of the substance at any given time ( t ) relative to its initial moisture content ( m 0 ). The moisture content decreases as the drying process continues [14].
Free moisture:
  X f = X t   X * ,
Where:
X f - free moisture content of the substance (g g-1)
X * - equilibrium moisture content at given constant drying conditions (g g-1)
Free moisture represents the amount of moisture in the substance that exceeds its equilibrium moisture content ( X * ). During the constant-rate drying period, the free moisture is available for evaporation, and the drying process is typically limited by the external factors mentioned earlier [14].
In our analysis, we assumed that the drying process during the second drying period can be characterized as quasi-stationary diffusion. Quasi-stationary diffusion refers to a scenario where the internal moisture diffusion within the material dominates the drying process, while external factors like surface evaporation and convective heat transfer have minimal influence. This assumption enables us to concentrate on the internal moisture transport mechanisms and simplifies the mathematical modeling of the drying process during the falling rate period. Quasi-stationary diffusion has been widely utilized in drying research to describe the behavior of different materials during the falling rate period [14,15,16,17,18].
To derive a function describing the free moisture content of a material during the second drying period, we start with a simple mass balance equation, which states that the difference in water mass flow is equal to the accumulation:
Φ in -   Φ out = Accumulation ,
The mass flow of water can be expressed as:
Φ   = N A M w A ,
Where:
N A - mass flux of water (g s-1 m-2)
M w - molar mass of water (18 g mol-1)
A - surface area exposed to the drying air flow
Assuming that during the drying process, the mass flow of water originates exclusively from the material, therefore is Φ in = 0, and the accumulation is equal to the change in mass over time. The water mass balance for the material system is:
-   N A M w A = d m 1 d t = d V 1 M w C d t = V 1 M w d C d t ,
Similarly, a mass balance of water can be derived for the air system, where it is assumed that all the mass of water is transferred from the material to the air. Φ out is simplified as:
  Φ out = N A M w A = d m 0 d t = d V 0 M w C 0 d t = V 1 M w d C 0 d t ,
Assuming the concentration of water in the air remains constant, thus d C 0 / d t   = 0. The equations for the material and air systems are summed, rearranged, and the following is obtained:
- N A A = V 1 d C d t
Considering quasi-stationary diffusion and a thin film, the bulk flux can be approximated by:
N A = D AB L C   -   C 0 ,
Where:
D AB   - diffusion coefficient of water (m2 s-1)
L - film thickness (m)
Combining the above equations yields a first-order differential equation:
-   D AB A L V 1 C   -   C 0 = d C d t ,
Introducing a parameter k, where k 2 = D AB A L V 1 , the solution to the differential equation at initial conditions C 1 t c = C 1 is:
C t = C 1 C 0 e k 2 t t c + C 0 ,
Where:
t c - the critical time where the second drying period starts
C 0 - initial concentration of water in MSS
C 1 - concentration of water in the air
To determine how the moisture content of a substance, X t varies with time, we express the water concentration as:
C = m M w V ,
Combining the eq. 14 and 4:
X t = M w VC   -   m 0 m 0 ,
Expressing C and obtaining:
C = m 0 1 + X t M w V ,
Inserting the above equation into the previous one, we obtain:
m 0 1   +   X t t M w V 1 = m 0 1   + X t t c M w V 1 -   m 0 1   + X t M w V 1 e -   k 2 t   - t c   +   m 0 1   + X t M w V 1 ,
Where:
X t t - moisture content of water changing over time
X t t c - moisture content of water at point
X t - moisture content of water at infinite time
Rearranging the eq. 17:
X t t = X t t c - X t e -   k 2 t   -   t c   + X t ,
Subtracting the equilibrium humidity X * from both sides of the eq. 18:
X t t -   X * = X t t c -   X t e - k 2 t   - t c   +   X t - X * ,
Considering the assumption that the humidity of a substance at infinite time X t is equal to the equilibrium humidity   X * , the critical humidity is defined by:
X c = X t t c - X * ,
Taking into account the above equation and the assumption, we can write the final equation describing the variation in free moisture content of the material during the second drying period as a function of time [14,15,16,17,18]:
X f t = X c   e -   k 2 t   -   t c ,

Stage 4: Calculating drying parameters

In Stage 4, the program calculates the drying parameters, which serve as key indicators for evaluating the efficiency and effectiveness of the drying process [14].
These parameters are the following:
R s =   -   L s A d X d t ,
Where:
L s   - the mass of dry matter (g)
R s   - the drying rate (g m-2s-1)
A   - the area exposed to the drying air flow (m2)
Additionally, the program calculated the heat flux (q) according to the following eq.:
q =   h   A   ( T dry - T wet ) ,
Where:
q   - heat flow (W)
h   - heat transfer coefficient (W m-2K-1)
T dry - dry bulb temperature (K)
T wet - wet bulb temperature (K)
Alternatively, q was calculated as:
q = M w   N A   Δ H l , g A ,
Where:
H l , g   - latent heat of vaporisation (kJ kg-1)
By rearranging the eq. 23 and 24, we can express the heat transfer equation as follows:
h = q A T d r y     T w e t ,
The mass flux ( N A   ) was calculated using the following equation:
N A   = k y M B M A   X wet   - X dry ,
Where:
M B   - the molar mass of air (29 g mol-1)
k y   - the mass transfer coefficient (mol m-2s-1)
X wet   - wet bulb humidity (g g-1)
X dry   - dry bulb humidity (g g-1)
From eq. 26 we can derive the mass transfer coefficient:
k y = M A M B   N A   X wet   - X dry ,
The literature frequently presents the mass transfer coefficient in units of m s-1. To compute the coefficient in these units, the following expression should be used:
N A   = k y ( C w e t C d r y ) ,
Where:
k y   - mass transfer coefficient (m s-1)
C w e t   - concentration of water at wet bulb temperature (mol L-1)
C d r y   - concentration of water at dry bulb temperature (mol L-1)
An example of the derivation of the water vapour concentration equation is given by the example of the water vapour concentration at wet bulb temperature. The derivation of the dry bulb water vapour concentration is similar.
It is necessary to use the gas equation:
C w e t = P w e t R T w e t ,
Where:
R   - Gas constant (8.314 J mol-1K-1)
P w e t   - Partial vapour pressure at wet bulb temperature (kPa)
The partial pressure of water vapour can be expressed from the following equation [14]:
X w e t = M A M B P w e t P P w e t ,
Where:
P   - Atmospheric pressure (101,32 kPa)
Combine eq. 29 and 30 and highlight C w e t :
C w e t = P M B M A X w e t 1 + M B M A X w e t 1 R T w e t ,
To calculate the mass transfer coefficient in units of m s-1, we combine eq. 28 and 31 and calculate C d r y   by analogy with C w e t :
k y = N A P M B M A X w e t 1 + M B M A X w e t 1 R T w e t P M B M A X d r y 1 + M B M A X d r y 1 R T d r y ,
Once these parameters are determined, the program systematically logs and writes them to an Excel file for convenient data management and subsequent analysis [14,15,16,17,18,20]

Stage 5: Graph plotting

In stage 5, the program enhances data analysis by generating various diagrams. These include graphs that compare experimental and sorted data, plots of regression functions for the first and second drying periods against sorted data, and an overall drying curve plot that compares regression functions with experimental data. Additional diagrams depict the first derivative of humidity against time and the drying rate versus moisture content. Furthermore, a normalized drying rate curve is plotted using coordinates calculated using the following formulas [19]:
ν = R v R w ,
ξ = X   - X * X c   - X * ,
Where:
ν   - relative drying rate (dimensionless)
ξ   - characteristic moisture content (dimensionless)
These graphical representations enhance the comprehension of the drying process and can be applied at various temperature and air moisture conditions. [14].

2. Materials and Methods

The research was conducted in the laboratory of ZRS Bistra Ptuj, utilizing state-of-the-art digital equipment to ensure accurate and reliable results. Municipal sewage sludge (MSS) samples were obtained from the Ptuj municipality sewage treatment plant, ensuring that the samples were fresh and representative of the typical composition of the sludge in the region. Drying was performed on a digitized G&G electronic scale (model: JJ200B), allowing for precise measurement and data collection throughout the process. Weighing data was recorded on a computer via USB at a fixed time interval of 20 seconds, ensuring a comprehensive and consistent record of the mass changes during the drying process. The MSS was dried using a LINEA portable air heater dryer (model: LP1-0521), which provided controlled and consistent drying conditions for each experiment. The airflow was measured with an RS PRO turbine anemometer, which allowed for accurate measurement and documentation of the airflow conditions throughout the drying process. The experimental procedure involved the following steps:
  • An MSS sample was carefully distributed on a flat tray (surface area: 56.7 cm2 and precise height, L= 1.5 mm) using a levelling knife. Prior to the application of MSS, a circular metal mesh (1 mm square opening) was inserted into the tray to ensure even distribution of the sludge during the drying process due to extensive shrinkage. This step was crucial to obtain accurate and reproducible results by minimizing variations in the surface of dry MSS that could impact the drying process because of enormous shrinkage.
  • Weighing variations caused by air blowing from the dryer parallel to the sample surface were accounted for by blind measurement. The blind measurement ran for 5 minutes. Mass readings were recorded every second, and the results were used to correct weighing results for absolute error by subtracting from the data for further analysis. This step ensured that the results precisely reflected changes in mass due to the drying process rather than the influence of airflow on the weighing process.
  • Before placing the MSS sample on balance, the air flow was measured using an anemometer. Measurements help to ensure consistent drying conditions across all experiments and accurately document the conditions under which the drying occurred. Drying was conducted for 2-6 hours, depending on temperature and humidity, to ensure completion of the drying process and accurate representation of the drying behaviour of MSS under the given conditions.
  • After the drying process, the final mass of MSS and other parameters, such as relative humidity and dry bulb temperature, were recorded. The airflow was measured again to ensure consistency in drying conditions throughout the experiment. Comprehensive documentation of the experimental conditions enabled thorough analysis and interpretation of the results.
  • The entire procedure was conducted at five different drying temperatures, ranging from 20 to 50 °C, with a constant air speed of 1.15 m s-1. Throughout the drying process, relative humidity was measured, and its value was found to be highly dependent on temperature.
  • All weighing data was transferred to an Excel file, from which a Python program read the data for further analysis. This approach enabled efficient processing and analysis of the data, ensuring thorough examination and accurate interpretation of the results. Standardized data formats and widely used software tools also ensured transparency, reproducibility, and adherence to the principles outlined in the text above.

3. Results and discussion

Table 1 displays the fundamental measurements that form the basis for the software’s subsequent calculations. These measurements include the initial mass of the MSS, determined before the drying process. Additionally, we incorporated the final mass of MSS, determined at the end of the drying process, and key parameters such as dry bulb temperature, relative humidity, surface area, and airspeed. The table reveals an inverse correlation between relative humidity and temperature (as the temperature increases, relative humidity decreases). This correlation can be explained by the Clausius-Clapeyron equation.

Stage 1 results

The outcomes of stage 1 are demonstrated in Figure 3. For the sake of clarity, we have decided to show only the results of Sample 1 and Sample 5. The results of samples 2, 3, and 4 are in supplement. The graphs illustrate the changes in sample mass throughout the drying process. Each graph also shows a comparison between the sorted and unsorted data. This significant difference may not be visually apparent, but it is essential for subsequent calculations. The curves on the diagrams display a distinctive shape, indicating two distinct drying phases. The first phase is characterized by a decrease in sample mass proportional to time, while the second phase is identified by a reduction in the rate of drying. The length of the initial drying phase differs among samples due to the varying drying conditions applied to each one. Sample 1 experienced the longest first drying period phase due to being dried at 19.4 °C, while sample 5 had the shortest first drying period with a temperature of 52.4 °C (graphs for sample 2, 3 and 4 are in Supplement Figure S1).

Stage 2 results

The outcomes of 2nd stage are demonstrated in Figure 4. The graphs exhibit the linear regression of each sample from the initial drying period. The plots are remarkably similar to one another, with an R2 value of 0.996 for all of them. The equality of R2 is because the program needed to establish an upper limit on R2 as a condition for calculating the linear regression. The second stage ends, and the program enters the third stage when the R2 value of the linear regression falls below 0.996. The diagrams presented in Figure 4 indicate that the slope of the lines between sample 1 and sample 5 becomes steeper as the rate of drying in the first period increases. This leads to shorter drying times, since sample 5 has fewer experimental points on its graph as compared to the preceding samples (graphs for sample 2, 3 and 4 are in Supplement Figure S2).

Stage 3 results

The results of the stage 3 are presented in Figure 5 and Figure 6. Figure 5 displays the exponential regression of each sample during the second drying period. The variability in the results is primarily due to differences in the R2 values. In contrast to stage 2, where R2 was a fixed value, Stage 3 involves a calculated R2 value that depends on the fit of the experimental data and trend line. The diagrams reveal that some moisture content values drop below 0 towards the end of the second drying period, a theoretically impossible occurrence. The fluctuations in mass measurements recorded by the balance are due to the fan air blowing parallel to sample.
Figure 6 presents a comparison between experimental data and the composite regression function of the 1st and 2nd drying periods (graphs for sample 2, 3 and 4 are in Supplement Figures S3 and 4)

Stage 4 Results

Results from the stage 4 are presented in Figure 7 and Figure 8. Figure 6 displays how the first derivative changes over time during the drying process. These curves exhibit a critical point where the first derivative shift from being constant to non-linearly increasing. The analysis of drying requires the diagrams presented in Figure 7, where the drying rate of each sample is displayed. It is noteworthy that the calculation of drying rate curves relies on mathematical regression functions. As a result, the curves in Figure 7 and Figure 8 have a well-structured form compared to the literature on the drying of solid materials, where the presented results are solely based on experimental data and the derivation is numerically calculated. It is worth noting that a derivative curve calculated based on numerical methods will have a more irregular shape than a derivative curve calculated based on a regression function (graphs for sample 2, 3 and 4 are in Supplement Figures S5 and S6).

Stage 5 results

Figure 9 displays the normalised drying rate curves of each sample obtained from stage 5. The individual samples demonstrate some variation. Sample 1’s normalized drying rate curve shows the most deviation while the others appear to fit well. The deviation in Sample 1’s curve is primarily attributed to the fact that the equilibrium moisture content value has not been precisely determined. This value is necessary to compute the dimensionless coordinate ν.

Overall results

This section aims to present and discuss the results, which the software exports to an Excel document after analysing the data. Table 2 presents the main results of samples 1-5.
All the results of the individual parameters are shown in Figure 10 and are essential for understanding the drying process of MSS under forced convection on a flat plate surface. The heat transfer coefficient is the first of the important drying parameters shown in Figure 10a. The coefficient initially increases with temperature but stabilises as the temperature increases (around 40 °C). Its average value is 29.6 W m-2K-1. The values were also checked using an online calculator [21]. The values calculated by the calculator refer exclusively to the heat transfer coefficient of water (liquid - vapour) and are in good correlation with the calculated values. Also in comparison with other world literature [22], which states that the value of the heat transfer coefficient for convective drying of MSS at air flow 0.6 - 2.0 m s-1 and temperature 100 - 160 °C is between 21.44 - 40.92 W m-2K-1, which is very comparable with the results of the software calculations. Although we have used a slightly lower drying temperature in our case, it can be assumed that the value of the heat transfer coefficient will not vary too much due to this temperature difference.
The next important drying parameter calculated by the software is the mass transfer coefficient, calculated by eq. 32. Since the heat and mass transfer coefficients are linearly dependent on each other, the shapes of the graphs in Figure 10a are almost identical. Initially, the value of the mass transfer coefficient increases with temperature and then begins to fluctuate. It is difficult to conclude from the results whether the value really increases with temperature, but we can speak of an average value of 0.024 m s-1. This value is relatively high compared to other literature. A study [23] calculated the value of the mass transfer coefficient for convective drying at different drying air velocities and temperatures. The theoretically calculated value recorded is between 0.003 - 0.01 m s-1, which is slightly lower compared to the results calculated by Python. These are between 0.018 - 0.028 m s-1. The difference could be due to different drying conditions, especially relative humidity. In our case, the MSS was dried at relatively low relative humidity values (8.2 - 33.6 %), which allowed faster drying and consequently a higher material transfer coefficient. However, as can be seen in the article [23], the relative humidity of the drying air during the process is always above 40 %.
The following drying parameters such as critical free moisture, critical drying time, mass flux of the first drying period and heat flux of the first drying period are discussed in supplement.
The last drying parameter is the diffusion coefficient, which is calculated by Python from the exponential interpolation of the data in the 2nd drying period according to Eq:
D AB = L V 1 k 2 A ,
Where:
L - is the film thickness of 1.5 mm
Note that V 1 = A L . The equation can be simplified as follows:
D AB = L 2 k 2 ,
The calculated values of the diffusion coefficient are shown in the diagram in Figure 9 b. The values of the diffusion coefficient increase with temperature, which can be confirmed by the Arrhenius equation.
From the graph in Figure 9b the calculated values of the diffusion coefficient range between orders of magnitude -9 to -10, which is slightly lower compared to the rest of the world literature, which claims that the value of the coefficient is in the order of magnitude -8 to -9. For example, the literature gives calculated diffusion coefficient values between 5.112·10-9 - 1.229·10-8 at an average drying temperature of 40 °C. In this study, drying experiments of direct and indirect natural convection solar drying of sewage sludge were carried out in Algeria [24].
In the following study [25], in which the value of the diffusion coefficient was determined experimentally based on MMS drying in a laboratory-scale hot-air forced convection dryer, was investigated at hot-air temperatures between 100 and 160 °C and hot-air velocities of 0.6, 1.4 and 2.0 m s-1. The results of this study showed that the value of the diffusion coefficient for the second falling rate period was 1.15·10-8 to 4.40·10-8 m2 s-1.
Some scientists have shown [26] that when drying with microwave convective dryer temperatures of 40, 55 and 70 °C and air velocities of 0.5, 1 and 1.5 m s-1, the average value of the diffusion coefficient is 1.71·10-9. This value is the closest to our calculations.
To explain the deviation, it is first necessary to understand how the characteristic function (3) behaves as a function of the fit parameter k2. To illustrate this, we have presented two examples using the online graphical calculator Desmos (Figure 11).
In the example in a Figure 11a we have set k2 to 0.01 and in Figure 11b we have set k2 to half that value, i.e. 0.005. Note that the graph in Figure 11a is falling faster, while the graph in Figure 11b is flatter. The calculated diffusion coefficient in the first case is 2.25·10-8, while in the second case it is 2 times smaller, 1.25·10-8. Based on the outcomes, it can be inferred that a steeper characteristic function in the second drying period results in a reduction in the diffusion coefficient’s value. Conversely, a flatter function causes slower water diffusion from the dried material into the atmosphere. The material’s structure and drying circumstances may have contributed to the calculated diffusion coefficient’s average value of 6.67·10-10 .The drying temperature in our case is in the range of 20 - 50 °C, whereas in the literature cited above the range is 40 - 160 °C. A higher temperature therefore means a higher diffusion and diffusion coefficient (according to Arrhenius equation).

4. Conclusions

This study shows that the Python programming language is effective in analyzing and modelling chemical processes, particularly in the drying process. A successful analysis of drying data was accomplished using Python, and a program was created that could be beneficial in developing chemical processes yet on a laboratory scale. The significant drying parameters, such as the mass transfer coefficient, heat transfer coefficient, diffusion coefficient, drying rate, critical humidity, and critical drying time, were determined by the program. Furthermore, the research proves that Python is a suitable tool for modeling the drying process. The software analyzed the initial drying phase by utilizing a linear equation (eq. 2). It also automatically detects the point where the drying rate decreases, signifying the start of the second drying period. An exponential function (eq. 3), serving as a mathematical model, demonstrated exceptional conformity with the experimental data (R2 > 0,99) during this phase. Thereafter, a master curve for five different MSS samples was developed through analysis. This curve is instrumental in the planning of a drying process at different temperatures. This research showcases how Python can be a powerful tool for the analysis and modelling of chemical processes. The program devised in this research can be employed to draft and refine chemical procedures on an extensive scale. Moreover, the master curve can be utilized to blueprint the drying procedure under diverse temperatures. Furthermore, future investigations could enhance the precision of the master curve through the creation of a more advanced model or the inclusion of additional data from diverse MSS samples.

Supplementary Materials

The following supporting information can be downloaded at the website of this paper posted on Preprints.org, file name: Supplementary material EM phyton 20sep23, Figures S1 to S7 and Phyton Programme code.

Author Contributions

conceptualization, Erik Mihelič, Dušan Klinar; Methodology: Erik Mihelič, Dušan Klinar; software writing, Erik Mihelič; validation, Primož Oprčkal, Klavdija Rižnar; writing—review and editing: Dušan Klinar, Primož Oprčkal and Klavdija Rižnar. All authors have read and agreed to the published version of the manuscript.

Funding

The authors thank for the financial support from the Slovenian Research and Innovation Agency – ARIS, Project L7-3185 and Program P2-0414.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Metcalf & Edd Inc., Tchobanoglous, G., Stensel, H., Tsuchihashi, R., Burton, F., Wastewater Engineering: Treatment and Resource Recovery 5th Edition, McGraw Hill, September 3, 2013, English.
  2. Pescod, M.B. (1992). Wastewater Treatment and Use in Agriculture. FAO Irrigation and Drainage Paper No. 47. Food and Agriculture Organization of the United Nations.
  3. Gomes, L. A., Santos, A. F., Pinheiro, C. T., Góis, J. C., & Quina, M. J. (2020). Screening of waste materials as adjuvants for drying sewage sludge based on environmental, technical and economic criteria. Journal of Cleaner Production, 259, 120927. [CrossRef]
  4. Van Rossum, G., & Drake, F.L. (2009). Python 3 Reference Manual. CreateSpace.
  5. Rivillas-Ospina, G., Casas, D., Maza-Chamorro, M. A., Bolívar, M., Ruiz, G., Guerrero, R., Horrillo-Caraballo, J. M., Guerrero, M., Díaz, K., Rio, R. del, & Campos, E. (2022). APPMAR 1.0: A Python application for downloading and analyzing of WAVEWATCH III® wave and wind data. Computers & Geosciences, 162, 105098. [CrossRef]
  6. Chen, Z., Hou, Y., Liu, M., Zhang, G., Zhang, K., Zhang, D., Yang, L., Kong, Y., & Du, X. (2022). Thermodynamic and economic analyses of sewage sludge resource utilization systems integrating Drying, Incineration, and power generation processes. Applied Energy, 327, 120093. [CrossRef]
  7. Werle, S., Wilk, R.K. (2010). A review of methods for the thermal utilization of sewage sludge: The Polish perspective. Renewable Energy, 35(9), 1914-1919.
  8. Ameri, B., Hanini, S., & Boumahdi, M. (2020). Influence of drying methods on the thermodynamic parameters, effective moisture diffusion and drying rate of wastewater sewage sludge. Renewable Energy, 147, 1107–1119. [CrossRef]
  9. Schnell, M., Horst, T., & Quicker, P. (2020). Thermal treatment of sewage sludge in Germany: A review. Journal of Environmental Management, 263, 110367. [CrossRef]
  10. Havukainen, J., Saud, A., Astrup, T. F., Peltola, P., & Horttanainen, M. (2022). Environmental performance of dewatered sewage sludge digestate utilization based on life cycle assessment. Waste Management, 137, 210–221. [CrossRef]
  11. Zheng, Q., Hu, Z., Li, P., Ni, L., Huang, G., Yao, Y., & Zhou, L. (2021). Effects of air parameters on sewage sludge drying characteristics and regression analyses of drying model coefficients. Applied Thermal Engineering, 198, 117501. [CrossRef]
  12. McKinney, W. (2010). Data Structures for Statistical Computing in Python. Proceedings of the 9th Python in Science Conference, 51-56.
  13. The Python Standard Library — Python 3.11.5 documentation. (n.d.). Retrieved September 19, 2023, from https://docs.python.org/3/library/index.html.
  14. Mujumdar, A.S. (Ed.). (2006). Handbook of Industrial Drying (3rd ed.). CRC Press. [CrossRef]
  15. Zhang, H., & He, G. (2016). Existence and construction of quasi-stationary distributions for one-dimensional diffusions. Journal of Mathematical Analysis and Applications, 434(1), 171–181. [CrossRef]
  16. Senadeera, Wijitha (2009) Prediction of fluidization behaviour and a quasi-stationary approach to drying kinetics of irregular particulate food materials. In Szmyd, J, Spalek, J, & Kowalewski, T (Eds.) Proceedings of the 7th World Conference on Experimental Heat Transfer, Fluid Mechanics and Thermodynamics. AGH University of Science and Technology Press, Poland, pp. 897-904.
  17. A. Reyes, M. Eckholt & P. I. Alvarez (2005) Drying and Heat Transfer Characteristics for a Novel Fluidized Bed Dryer, Drying Technology, 22:8, 1869-1895. [CrossRef]
  18. Patrick Cattiaux. Pierre Collet. Amaury Lambert. Servet Martínez. Sylvie Méléard. Jaime San Martín. “Quasi-stationary distributions and diffusion models in population dynamics.” Ann. Probab. 37 (5) 1926 - 1969, September 2009. [CrossRef]
  19. Drying of Solid Materials; Ullmann’s Encyclopedia of Industrial Chemistry, Evangelos Tsotsas, Thomas Metzger, Volker Gnielinski, Ernst-Ulrich Schlünder, First Published: 15 September 2010. [CrossRef]
  20. James Q. Feng james.feng@bsci.com (2013) DIFFUSION-CONTROLLED QUASI-STATIONARY MASS TRANSFER FOR AN ISOLATED SPHERICAL PARTICLE IN AN UNBOUNDED MEDIUM, Chemical Engineering Communications, 200:1, 65-76. [CrossRef]
  21. Convective Heat Transfer. (n.d.). Retrieved September 19, 2023, from https://www.engineeringtoolbox.com/convective-heat-transfer-d_430.html.
  22. Huang, Y. W., Chen, M. Q., & Jia, L. (2016). Assessment on thermal behavior of municipal sewage sludge thin-layer during hot air forced convective drying. Applied Thermal Engineering, 96, 209–216. [CrossRef]
  23. Poós, T., & Varju, E. (2020). Mass transfer coefficient for water evaporation by theoretical and empirical correlations. International Journal of Heat and Mass Transfer, 153, 119500. [CrossRef]
  24. Ameri, B., Hanini, S., & Boumahdi, M. (2020). Influence of drying methods on the thermodynamic parameters, effective moisture diffusion and drying rate of wastewater sewage sludge. Renewable Energy, 147, 1107–1119. [CrossRef]
  25. Huang, Y.W., Chen, M.Q. Thin-layer isothermal drying kinetics of municipal sewage sludge based on two falling rate stages during hot-air-forced convection. J Therm Anal Calorim 129, 567–575 (2017). [CrossRef]
  26. Taghinezhad, Ebrahim & Kaveh, Mohammad & Jahanbakhshi, Ahmad & Golpour, Iman. (2020). Use of artificial intelligence for the estimation of effective moisture diffusivity, specific energy consumption, color and shrinkage in quince drying. Journal of Food Process Engineering. 43. [CrossRef]
Figure 1. Sorted vs. unsorted data: (a) mass change over time; (b) first derivative over time.
Figure 1. Sorted vs. unsorted data: (a) mass change over time; (b) first derivative over time.
Preprints 87542 g001
Figure 2. Basic parameters of the drying process
Figure 2. Basic parameters of the drying process
Preprints 87542 g002
Figure 3. Mass of MSS over time: (a); Sample 1, Tdry = 19,4 °C, Ψ = 33,6 % (b); Sample 5, Tdry = 52,4 °C, Ψ = 8,2 %.
Figure 3. Mass of MSS over time: (a); Sample 1, Tdry = 19,4 °C, Ψ = 33,6 % (b); Sample 5, Tdry = 52,4 °C, Ψ = 8,2 %.
Preprints 87542 g003
Figure 4. Regression functions of the first drying period: (a); Sample 1, Tdry = 19,4 °C, Ψ = 33,6 %(b); Sample 5, Tdry = 52,4 °C, Ψ = 8,2 %.
Figure 4. Regression functions of the first drying period: (a); Sample 1, Tdry = 19,4 °C, Ψ = 33,6 %(b); Sample 5, Tdry = 52,4 °C, Ψ = 8,2 %.
Preprints 87542 g004
Figure 5. Regression functions of the second drying period: (a); Sample 1, Tdry = 19,4 °C, Ψ = 33,6 %(b); Sample 5, Tdry = 52,4 °C, Ψ = 8,2 %.
Figure 5. Regression functions of the second drying period: (a); Sample 1, Tdry = 19,4 °C, Ψ = 33,6 %(b); Sample 5, Tdry = 52,4 °C, Ψ = 8,2 %.
Preprints 87542 g005
Figure 6. Composite function of the first and second drying periods: (a); Sample 1, Tdry = 19,4 °C, Ψ = 33,6 %(b); Sample 5, Tdry = 52,4 °C, Ψ = 8,2 %.
Figure 6. Composite function of the first and second drying periods: (a); Sample 1, Tdry = 19,4 °C, Ψ = 33,6 %(b); Sample 5, Tdry = 52,4 °C, Ψ = 8,2 %.
Preprints 87542 g006
Figure 7. First derivative functions: (a); Sample 1, Tdry = 19,4 °C, Ψ = 33,6 % (b); Sample 5, Tdry = 52,4 °C, Ψ = 8,2 %.
Figure 7. First derivative functions: (a); Sample 1, Tdry = 19,4 °C, Ψ = 33,6 % (b); Sample 5, Tdry = 52,4 °C, Ψ = 8,2 %.
Preprints 87542 g007
Figure 8. Drying curves: (a); Sample 1, Tdry = 19,4 °C, Ψ = 33,6 % (b); Sample 5, Tdry = 52,4 °C, Ψ = 8,2 %.
Figure 8. Drying curves: (a); Sample 1, Tdry = 19,4 °C, Ψ = 33,6 % (b); Sample 5, Tdry = 52,4 °C, Ψ = 8,2 %.
Preprints 87542 g008
Figure 9. Normalized drying rate curves.
Figure 9. Normalized drying rate curves.
Preprints 87542 g009
Figure 10. programme-calculated drying parameters as a function of temperature: (a); heat transfer coefficient and mass transfer coefficient (b) diffusivity coefficient.
Figure 10. programme-calculated drying parameters as a function of temperature: (a); heat transfer coefficient and mass transfer coefficient (b) diffusivity coefficient.
Preprints 87542 g010
Figure 11. Drying curves: (a); mass of MSS over time (b); regression function of first drying period.
Figure 11. Drying curves: (a); mass of MSS over time (b); regression function of first drying period.
Preprints 87542 g011
Table 1. Measured data for sample 1 – 5.
Table 1. Measured data for sample 1 – 5.
Sample mMSS,start (g) mMSS,end (g) A [cm2] Tdry
[°C]
Twet
[°C]
Ψ
[%]
Airspeed (m s-1)
1 11,24 2,09 56,74 19,4 10,5 33,6 1,15
2 11,52 1,95 56,74 22,0 10,9 22,4 1,15
3 15,81 3,02 56,74 29,0 13,7 14,8 1,15
4 12,29 2,20 56,74 44,0 20,5 10,0 1,15
5 11,34 1,99 56,74 52,4 23,8 8,2 1,15
Table 2. Programme calculated data for sample 1 – 5.
Table 2. Programme calculated data for sample 1 – 5.
Sample Na
[gs-1m-2]
q
[W]
h
[Wm-2K-1]
k y
[mol/m2s]
k y
[m s-1]
Xcrit
[g g-1]
tcrit
[h]
Dab
[m2s-1]
1 0,08 1,14 22,59 0,80 0,018 0,40 4,93 4,84E-10
2 0,14 1,96 31,06 1,07 0,025 1,07 2,60 5,04E-10
3 0,21 2,89 33,23 1,23 0,028 0,95 2,43 5,56E-10
4 0,29 3,99 29,88 1,01 0,024 1,22 1,35 7,46E-10
5 0,36 5,06 31,16 1,06 0,025 1,35 0,96 1,04E-09
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2024 MDPI (Basel, Switzerland) unless otherwise stated