Introduction

Disasters, including pandemics like COVID 19, prove the importance of food security, especially in arid regions that lack freshwater resources. Thus, a relentless quest for a sustainable agriculture system producing food with reduced consumption of water is a vital priority [1]. Within this context, greenhouse agriculture emerges as an ideal option that has shown a good adaptation to climate change while intending to reduce energy and water consumption making it hence a sustainable option for food production [2]. However, it is mandatory to control and maintain the microclimatic parameters inside the greenhouse at the desired ranges for optimal plant growth by maximizing the photosynthetic and ensuring the irrigation requirements too. Maintaining an optimal relative humidity level in the greenhouses ensures optimal plant transpiration and less water irrigation needs.

Mpusia [3] suggested that water consumption in greenhouses can reduce by up to 50% compared to the outdoor conventional farming. Fernandes et al. [4] estimated that ensuring the required humidity inside greenhouse results in a 60–80% reduction in water consumption compared to the irrigation within outside fields. The average value of the main parameters required for crop growth includes a relative humidity within the range of 60 to 90%, an air temperature within the temperature range of 10 to 30 °C [5, 6], a carbon dioxide concentration in the range of 700–900 μmol mol−1 [7] and a sufficient flow of photosynthetic photons inside the greenhouse. Humidity is the hardest controlling variable in a greenhouse, and even the most advanced equipment cannot entirely control the humidity levels because it fluctuates with air temperature changes, the plant transpiration, which adds an extra steam to the air, and the solar radiation too [8]. High inside air humidity induces many agricultural issues such as leaf and root diseases, slow but permanent drying of the substrate, plant stress, and loss of quality and yield. Besides, the plants tend to be weaker and stretched [9]. Consequently, more pesticides must be used to counteract these diseases and stress. Conversely, if the humidity level is too low, the plant's growth is affected and it takes much longer to reach the desired size. Hence, whether the humidity is too high or too low, it is not favorable for the plant’s growth [10].

Several systems are integrated into greenhouse in order to provide the desired microclimate by heating, cooling, or giving sufficient CO2 and artificial lighting, in some cases [11]. Seawater greenhouses SWGH are becoming more and more popular nowadays. They consist in supplying fresh water and cooling the greenhouse inside air in one structure. Besides the greenhouse structure, the SWGH unit includes two humidifiers (evaporators) and one condenser (dehumidifier) placed in the greenhouse [12]. However, many authors argue that this type of integrated greenhouse SWGH is not economically profitable. Furthermore, they can neither cover the total irrigation need nor do they maintain the greenhouse humidification requirements in the desired ranges for a convenient growth of the plant [13]. Therefore, several modifications of the SWGH have been proposed in the literature. Farrell et al. [14] investigated a sustainable integrated greenhouse that encompasses a dehumidification desalination system, a reverse osmosis system, a reverse electrodialysis apparatus, and a dehumidification desalination system in an attempt to generate freshwater to cover the irrigation load of the greenhouse, cool the greenhouse inside environment to adequate temperatures while being energy self-sufficient using the electric energy produced by the reverse electrodialysis apparatus.

The authors show that producing a part of the irrigation needs by the reverse osmosis powered by the reverse electrodialysis apparatus ensures an economically efficient system. Akrami et al. [15] developed a zero liquid discharge desalination system coupled with an agricultural greenhouse. They demonstrated the feasibility of using wicked solar still, HDH and a rainwater storage to ensure the needed irrigation water. Their findings show that the greenhouse they develop may be autonomous for its water requirement under different climates and in different countries. Radhwan [16] developed a stepped solar still for heating and humidifying an agriculture greenhouse. The performances of the still parameters were analyzed and presented. The results show that the average daily efficiency of the still is approximately 63%; and the total daily yield is approximately 4.92 l/m2. Zamen et al. [17] suggested integrating and enhancing humidification–dehumidification unit (HDH) into an SWGH system, including a direct contact dehumidifier and a solar water heater. Results show a freshwater production of 450 L per day for a greenhouse area of 200 m2. Salah et al. [18] studied the design performance of a new integrated self-sufficient agricultural greenhouse with transparent solar stills (TSS) on the roof to be self-sufficient in irrigation by using both excess solar energy via direct solar desalination in the TSS and the humidification–dehumidification (HDH) process as two sources for water production. The results reveal that system can only generate a maximum of 2.44 l/m2 of fresh water on the coldest day, indicating a requirement to install additional solar stills if more water is needed.

Most studies in this field have focused on using a desalination system that can be operated with renewable energy [19, 20] to show that this system is economically viable. However, most of these systems are greenhouse dependent and therefore they work only during the greenhouse growing seasons.

The present research focuses on studying the feasibility of new proposed integrated saltwater greenhouse where an independent solar HDH desalination unit is coupled with an agriculture greenhouse. The characteristics of the proposed system that make its unicity are the independence of the HDH unit from the greenhouse which makes it more flexible to choose the HDH system and its dimensions and operates throughout the year. The HDH system is composed of a modified solar still operating with solar energy as humidifier and packed bad condenser as a dehumidifier. In order to make the HDH system simple and economically viable, some modifications are made to the solar still compared to the conventional solar still. Water forced evaporation is achieved by injecting air and water into the solar still, where the hot saline water is pulverized on the top, and the air is forced from the bottom, coming in indirect contact with the hot water, the produced humid air may be directed totally or partially to the agriculture greenhouse or the condenser to produce freshwater. Furthermore, a control system is developed and used to drive the humid air part directed to the greenhouse and to control the whole system. Finally, the dehumidification is undergone in a packed bad condenser.

The main objective of this work is to study the performances of the proposed system using a comprehensive unsteady-state mathematical model of the several parts that constitute the system. The greenhouse model is experimentally evaluated using a real-scale greenhouse, and the simulation result of the whole model, driven by the developed control system, will permit to evaluate its performance in terms of ensuring the greenhouse humidification and irrigation needs.

Experimental

The integrated greenhouse considered in this study is composed of two independent but coupled main subsystems: the HDH and the greenhouse itself. The HDH subsystem encompasses mainly a condenser and solar stills (Fig. 1). Furthermore, a control auxiliary system is used to drive the whole system to meet the desired condition for the plant growing in the greenhouse. Contrary to the classical systems, here the humid air from the solar still may completely or partially be redirected to the greenhouse. The control system will manage the quantity of humid air at the solar still outlet. It will give the necessary to set the desired humidity in the greenhouse and the rest of the humid air will be redirected to the packed bed condenser to produce freshwater for the irrigation needs of the greenhouse plants.

Fig. 1
figure 1

Process schematic of HDH desalination system integrated into a greenhouse

In the following section (“The HDH subsystem” and “The greenhouse subsystem” sections) the HDH and the greenhouse considered subsystems in the present work are described.

The HDH subsystem

The irrigation water production is based on the well-known humidification and dehumidification (HDH) process. The humidification operation is ensured by a solar-powered and double-sloped desalination solar still where the saltwater is pulverized at the top of the still, as shown in Fig. 2. It is noted that the high of this solar still may be limited to a maximum of 60 cm. Compared to classic stills, pulverizing the saltwater enhances the surface contact between the pulverized droplets and the crossing flow of the inside blown air, and hence increases their mass and heat transfers.

  • To ensure the dehumidification process, a packed bed direct contact condenser is used. In fact, this recently developed condensation technology shows more efficient results and is currently undergoing a dynamic growing trend of interest and actual use [21]. Further details of the solar still working conditions are as follows:

  • The sprayed saltwater water is continuously recirculated from the basin that stands at the bottom of the still where it is directly heated by the solar radiation.

  • The ambient air is blown in the still and comes into contact with the droplets of the sprayed saltwater, which increases its relative humidity level and temperature. The humidified air is extracted at the top of the solar still. Then, a part of the extracted humidified air enters the greenhouse to create the suitable humidity and temperature environment for the plant’s growth, while the rest is redirected to the condenser to produce freshwater. The control auxiliary that drives the extracted humidified air flows is programmed to give the priority to covering the humidification needs of the greenhouse.

  • In the irrigation water tank, the produced freshwater may be mixed with a saline water to obtain the desired salinity for the irrigation water of the greenhouse plants. In the present study, to achieve a desired salinity of the irrigation water of 1.6 g/l for cucurbit crop, the produced freshwater is mixed with a saline groundwater with a salinity of 3 g/l.

The considered HDH system for the further simulations is constituted to four solar stills with an area of 16 m2 for each one, and by a condenser with a cross-section area of 0.36 m2. The latter includes a 1 m height polypropylene packing bed. The density, specific heat and void fraction of the packed bad are 850 kg/m3, 2350 J/kg K, and 87.5%, respectively. The condenser is cooled by a deep groundwater with an incoming temperature assumed to be 15 °C for January and February and at 20 °C for the rest of the considered early crop season.

Fig. 2
figure 2

Schematic diagram of the solar still of the HDH desalination system: (1)-transparent cover, (2)-sprayer, (3)-saline water, (4)-absorber, (5)-insulation layer

The greenhouse subsystem

The considered greenhouse in this work is a real-scale multi-span greenhouse type situated in El Hamma in south Tunisia. It is used both for the experimental validation of the developed models and for the simulation of the whole integrated system. It was constructed in East–West directions with a footprint of 500 m2. Its dimensions include a length of 31 m, a width of 19.2 m and a height of 4 m. Cucurbit crops are cultivated in this greenhouse during two crop seasons: the early season from January to May, and a late season from Sept to December. Hygrometer Digital temperature sensors are used to measure the inside and outside air temperature and the relative humidity. The variation of air parameters as a function of time is recorded using an acquisition chain every 30 min.

A hydroponics system distributes the required irrigation load in a mass flow rate assumed to be equivalent to 110% of the mass rate of the evapotranspiration of the plants [22]. This water supply is assumed to be achieved between 8:00 a.m. and 6:00 p.m., and there is no water supply out of this period.

The Irrigation Load Coverage (ILC) of the whole system is its capability of covering the irrigation load. The ILC is computed irrespective of the fact that a part of the humidified air may be directly introduced into the greenhouse. Hence, considering that the irrigation need of the greenhouse crop corresponds to 110% of the evapotranspiration, the ILC is calculated as follows:

$${\mathrm{Irrigation}}\, {\mathrm{Load}}\, {\mathrm{Coverage}}= \frac{{\mathrm{mass}}\, {\mathrm{of}}\,{\mathrm{condensate}}\, {\mathrm{recovered}}\, {\mathrm{by}}\, {\mathrm{the}}\, {\mathrm{condenser}}}{{\mathrm{mass}}\,{ \mathrm{of}}\, {\mathrm{evapotranspirated}}\, {\mathrm{water}}\,{\mathrm{vapour}}*1.1 }*100$$

Mathematical modeling

Modeling is an effective way to examine the functioning of a system under various conditions. In order to model the integrated greenhouse system, mass and energy balance equations are formulated for each part, i.e. mainly for the solar still, the agriculture greenhouse and the condenser. The unsteady state global model leads to coupled differential equations that have been numerically solved using the fourth-order Runge Kutta method and a dedicated Matlab® code has been developed. The whole system behavior is simulated using this developed model.

The greenhouse model

The inside microclimate of the greenhouses is represented by the inside air temperature and its relative humidity, and results from complex mechanisms involving several heat and mass exchange processes of the soil, the air and the crop and of the greenhouse cover, as shown in Fig. 3. It depends strongly on the external conditions on the solar radiation and on the feeding air [22]. Furthermore, the water vapor plays a key role in this microclimate, and hence its mass balance is involved in the greenhouse models. It hence appears that the greenhouse global model is constituted by four energy balance equations and by at least one mass balance when the soil and the plant’s mass balances are not considered.

Fig. 3
figure 3

Schematic of the greenhouse and its exchange with surroundings

These balances are presented below in “Greenhouse cover temperature” and “Plant temperature” sections assuming the following assumptions:

  1. (a)

    The air and the topsoil temperatures are uniform in the greenhouse.

  2. (b)

    The crop temperature depends only on the solar radiation and the air temperature inside the greenhouse.

  3. (c)

    Soil temperature at 0.5 m depth is constant throughout the year.

  4. (d)

    No evaporation occurs from the soil.

  5. (e)

    Radiation energy is neither absorbed, emitted nor diffused by the inside air.

Greenhouse cover temperature

The energy balance equation for the greenhouse cover in unsteady state conditions is given by [22]:

$$\begin{aligned}{\rho }_{\mathrm{c}}{cp}_{\mathrm{c}}{x}_{\mathrm{c}}\frac{\mathrm{d}{T}_{\mathrm{c}}}{\mathrm{d}t}&={\alpha }_{\mathrm{c}}I\left(1+{\tau }_{\mathrm{c}}\left(1-{\alpha }_{\mathrm{s}}\right)\right)+\frac{-{\varepsilon }_{\mathrm{c}}\gamma {{T}_{\mathrm{c}}}^{4}{A}_{\mathrm{c}}+{\alpha }_{\mathrm{ct}}\gamma {{T}_{\mathrm{sky}}}^{4}{\varepsilon }_{\mathrm{sky}}{A}_{\mathrm{c}}+\varepsilon _{\mathrm{s}}\gamma {{T}_{\mathrm{s}}}^{4}{\alpha }_{\mathrm{ct}}{A}_{\mathrm{s}}}{{A}_{\mathrm{s}}}\\ &\quad-{h}_{\mathrm{c}(\mathrm{c}-\mathrm{a})}\left({T}_{\mathrm{c}}-{T}_{\mathrm{am}}\right)+{h}_{\mathrm{c}(\mathrm{c}-\mathrm{i})}\left({T}_{\mathrm{c}}-{T}_{\mathrm{i}}\right)\end{aligned}$$
(1)

where Tsky [23] is the so-called sky temperature. \({h}_{\mathrm{c}(\mathrm{c}-\mathrm{a})}\) is the convective heat transfer coefficient between the cover and the exterior ambient air and \({h}_{\mathrm{c}(\mathrm{c}-\mathrm{i})}\) is the convection heat transfer coefficient between the cover and the inside air [24].

The sky temperature and these two convection coefficients were computed using the followings equations [25]:

$${T}_{\mathrm{sky}}=0.0552\left({{T}_{\mathrm{am}}}^{1.5}\right)$$
(2)
$${h}_{\mathrm{c}(\mathrm{c}-\mathrm{a})}=7.2+3.8v$$
(3)
$${h}_{\mathrm{c}(\mathrm{c}-\mathrm{i})}=1.75{\left|{T}_{\mathrm{c}}-{T}_{\mathrm{i}}\right|}^{1/3}$$
(4)

Greenhouse inside air temperature

The unsteady air state temperature inside the greenhouse obeys the following equation that describes the energy balance:

$$\begin{aligned}{\rho }_{\mathrm{a}}{cp}_{\mathrm{a}}H\frac{\mathrm{d}{T}_{\mathrm{i}}}{\mathrm{d}t} &=-{h}_{\mathrm{c}(\mathrm{s}-\mathrm{i})}\left({T}_{\mathrm{i}}-{T}_{\mathrm{s}}\right)-\frac{{\rho }_{\mathrm{a}}G{cp}_{\mathrm{a}}\left({T}_{i}-{T}_{\mathrm{am}}\right)}{3600{A}_{\mathrm{s}}}\\ &\quad-{h}_{\mathrm{c}(\mathrm{c}-\mathrm{i})}\left({T}_{\mathrm{c}}-{T}_{\mathrm{i}}\right)+{P}_{\mathrm{p}}\mathrm{LAI} {h}_{\mathrm{c}(\mathrm{p}-\mathrm{i})}({T}_{\mathrm{p}}- {T}_{\mathrm{i}})\end{aligned}$$
(5)

where \({h}_{\mathrm{c}(\mathrm{s}-\mathrm{i})}\) and \({h}_{\mathrm{c}(\mathrm{p}-\mathrm{i})}\) are respectively the convective heat transfer coefficients between the inside air and the topsoil and between the inside air and the plants and are calculated by [23]:

$${h}_{\mathrm{c}(\mathrm{s}-\mathrm{i})}=1.75{\left|{T}_{\mathrm{s}}-{T}_{\mathrm{i}}\right|}^{1/3}$$
(6)
$${h}_{\mathrm{c}(\mathrm{p}-\mathrm{i})}=1.4{\left(\frac{\left|{T}_{\mathrm{p}}-{T}_{\mathrm{i}}\right|}{{L}_{\mathrm{cl}}}\right)}^{0.25}$$
(7)

Plant temperature

As stated in the general assumptions, the plant temperature is estimated directly from the interior air temperature Ti and the global solar radiation I using the multiple linear regression model proposed by Wang and Deltour [26]:

$$T_\mathrm{p}=-2.05+1.01{T}_{\mathrm{i}}+0.00425{\tau }_{\mathrm{c}}I$$
(8)

Greenhouse soil temperature

The soil energy balance leads to the following differential equation [27]:

$$\begin{aligned} {\rho }_{\mathrm{s}}{cp}_{\mathrm{s}}{x}_{\mathrm{s}0}\frac{\mathrm{d}{T}_{\mathrm{s}}}{\mathrm{d}t}&={\alpha }_{\mathrm{s}}I{\tau }_{\mathrm{c}}+{h}_{\mathrm{c}(\mathrm{s}-\mathrm{i})}\left({T}_{\mathrm{i}}-{T}_{\mathrm{s}}\right)-{k}_{\mathrm{s}0}\left({T}_{\mathrm{s}}-{T}_{\mathrm{s}0}\right) \\ &\quad -\frac{{\alpha }_{\mathrm{s}}\gamma {\varepsilon }_{\mathrm{s}}{S}_{\mathrm{s}}{{T}_{\mathrm{c}}}^{4}-{\varepsilon }_{\mathrm{s}}\gamma {{T}_{\mathrm{s}}}^{4}{S}_{\mathrm{s}}}{{S}_{\mathrm{s}}} \end{aligned}$$
(9)

where Ts0 is the soil temperature at a depth of 0.5 m

Greenhouse inside air humidity

The mass balance of the water vapor of the greenhouse inside air leads to the following differential equation [25]:

$$\begin{aligned}{l}_{\mathrm{v}}H\frac{\mathrm{d}{e}_{\mathrm{i}}}{\mathrm{d}t} &=E\lambda -{\frac{{L}_{\mathrm{v}}}{{{\rho }_{\mathrm{a}}cp}_{\mathrm{a}}} {\mathrm{Le}}^\frac{1}{3}}h_{\mathrm{si}}\left({e}_{\mathrm{i}}-{e}_{\mathrm{s}}^{*}\right)-{\frac{{L}_{\mathrm{v}}}{{{\rho }_{\mathrm{a}}cp}_{\mathrm{a}}} {\mathrm{Le}}^\frac{1}{3}}h_{\mathrm{ci}}\left({e}_{\mathrm{i}}-{e}_{\mathrm{c}}^{*}\right)\frac{{ S}_{\mathrm{c}}}{{ A}_{\mathrm{S}}}\\ &\quad -G{f}_{\mathrm{g}}\frac{{l}_{\mathrm{v}}}{{ A}_{\mathrm{S}}}({e}_{\mathrm{i}}- {e}_{\mathrm{e}})\end{aligned}$$
(10)

where is the evapotranspiration rate given by Penman–Monteith [28]:

$$E\lambda =\frac{\delta Rn+\left(\frac{2\mathrm{LAI}{\rho }_{\mathrm{A}}{C}_{\mathrm{A}}}{{r}_{\mathrm{e}}}\right)\mathrm{VPD}}{\gamma \Big(1+\left(\frac{\delta }{\gamma }\right)+\left(\frac{{r}_{\mathrm{i}}}{{r}_{\mathrm{e}}}\right)}$$
(11)

The solar still model

The solar still bottom part consists of a simple insulated basin filled with the salt water and of a galvanized plate which constitutes the still’s absorber. The still is double-sloped with two glass cover and includes several water nozzles set up at the top. A fan blows the ambient air at the bottom of the still to create a crossing flow and also counter-current with the falling saltwater droplets. The air and the sprayed water are in close contact in such a way that the mass transfer is enhanced inducing a rapid enhancement of the relative humidity of the air. The humid air is extracted at the upper opposite side regarding the still feeding air. It was proven in a former study [29] that this enhanced solar still is more efficient than the simple stills.

Glassed cover temperature

The still top glassed covers temperature obeys the following equation that describes their energy balance:

$$\begin{aligned}{m}_{\mathrm{g}}{C}_{\mathrm{pg}}\frac{\mathrm{d}{T}_{\mathrm{g}}}{\mathrm{d}t}&=I{\alpha }_{\mathrm{g}}{A}_{\mathrm{g}}+\left[0.09\sigma \left({T}_{\mathrm{w}}^{4}-{T}_{\mathrm{g}}^{4}\right)+{h}_{\mathrm{e}(\mathrm{w}-\mathrm{g})}\left({T}_{\mathrm{w}}-{T}_{\mathrm{g}}\right)+{h}_{\mathrm{c}(\mathrm{w}-\mathrm{g})}\left({T}_{\mathrm{w}}-{T}_{\mathrm{g}}\right)\right]{A}_{\mathrm{b}}\\ &\quad -\left[{h}_{\mathrm{c}(\mathrm{g}-\mathrm{a})}{(T}_{\mathrm{g}}-{T}_{\mathrm{amb}})+{h}_{\mathrm{r}(\mathrm{g}-\mathrm{sky})}{(T}_{\mathrm{g}}-{T}_{\mathrm{sky}})\right]{A}_{\mathrm{g}} \end{aligned}$$
(12)

The Dunkle model is used to calculate the convective hc(w–g), evaporative he(w–g), and radiative hr(g–sky) heat transfer coefficients between water and the glassed covers [30, 31].

$${h}_{\mathrm{e}(\mathrm{w}-\mathrm{g})}=\frac{{M}_{\mathrm{e}}}{{M}_{\mathrm{a}}}\frac{{L}_{\mathrm{v}}}{cpa} {h}_{\mathrm{c}(\mathrm{w}-\mathrm{g})}\frac{\left({P}_{\mathrm{w}}-{P}_{\mathrm{g}}\right)}{\left({T}_{\mathrm{w}}-{T}_{\mathrm{g}}\right)}$$
(13)
$${h}_{\mathrm{c}(\mathrm{w}-\mathrm{g})}=0.884{\left[\left({T}_{\mathrm{w}}-{T}_{\mathrm{g}}\right)+\frac{\left({P}_{\mathrm{w}}-{P}_{\mathrm{g}}\right){T}_{\mathrm{w}}}{268.{10}^{3}-{P}_{\mathrm{w}}}\right]}^{1/3}$$
(14)

where Pw: saturation vapour pressure at water temperature Tw, Pg: saturation vapour pressure at glassed cover temperature Tg.

$$\begin{aligned}{P}_{\mathrm{w}}&=\mathrm{exp}\left(25.217-\frac{5144}{{T}_{\mathrm{w}}}\right)\\ {P}_{\mathrm{g}}&=\mathrm{exp}\left(25.217-\frac{5144}{{T}_{\mathrm{g}}}\right)\end{aligned}$$
(15)
$${h}_{\mathrm{r}(\mathrm{g}-\mathrm{sky})}=\frac{7.803.{10}^{-3}[{T}_{\mathrm{g}}^{4}+{T}_{\mathrm{sky}}^{4}]}{{T}_{\mathrm{g}}-{T}_{\mathrm{sky}}}$$
(16)

The convective heat transfer coefficient between the cover and the ambient exterior air is given by [25]:

$${h}_{\mathrm{c}(\mathrm{g}-\mathrm{a})}=5.7+3.8V$$
(17)

Saltwater temperature

The following equation gives the energy balance for the saltwater in the still’s basin:

$$\begin{aligned} {m}_{\mathrm{w}}{C}_{\mathrm{pw}}\frac{\mathrm{d}{T}_{\mathrm{w}}}{\mathrm{d}t}&=\left[{{\tau }_{\mathrm{g}}\alpha }_{\mathrm{w}}I+{h}_{\mathrm{c}(\mathrm{b}-\mathrm{w})}({T}_{\mathrm{b}}-{T}_{\mathrm{w}})-{h}_{\mathrm{c}(\mathrm{w}-\mathrm{g})}{A}_{\mathrm{b}}({T}_{\mathrm{w}}-{T}_{\mathrm{g}}) \right. \\ & \left. \quad -0.09\sigma \left({T}_{\mathrm{w}}^{4}-{T}_{\mathrm{g}}^{4}\right)-{h}_{\mathrm{e}(\mathrm{w}-\mathrm{g})}({T}_{\mathrm{w}}-{T}_{\mathrm{g}}) -{h}_{\mathrm{e}(\mathrm{w}-\mathrm{a})}\left({T}_{\mathrm{w}}-{T}_{\mathrm{a}}\right)\right]{A}_{\mathrm{b}} \end{aligned}$$
(18)

The convection heat transfer coefficient between the salt water and the absorber plate is computed from the following relations [32]:

$${h}_{\mathrm{c}(\mathrm{b}-\mathrm{w})}=\frac{{k}_{\mathrm{w}}}{{x}_{\mathrm{w}}} \quad \mathrm{ Ra}<{10}^{4}$$
(19)
$${h}_{\mathrm{c}(\mathrm{b}-\mathrm{w})}=0.54\frac{{k}_{\mathrm{w}}{\mathrm{Ra}}_{\mathrm{w}}^{1/4}}{{x}_{e}} \quad\mathrm{ Ra}={10}^{4}{-}{10}^{7}$$
(20)
$${h}_{\mathrm{c}(\mathrm{b}-\mathrm{w})}=0.14\frac{{k}_{\mathrm{w}}{\mathrm{Ra}}_{\mathrm{w}}^{1/3}}{{x}_{\mathrm{w}}} \quad\mathrm{ Ra}={10}^{7}{-}{10}^{11}$$
(21)

The evaporative heat transfer between the sprayed water and the air is given by [29]:

$$\begin{aligned}{h}_{\mathrm{e}(\mathrm{w}-\mathrm{a})}&=-12.20 - 0.060 G + 0.000923 L+ 0.3152 {T}_{\mathrm{w}} + 26.32 Z + 0.00668 {G }^{2}\\ &\quad + 0.000264 GL+ 0.00760 G{T}_{\mathrm{w}} - 0.6228 GZ - 0.493 {T}_{\mathrm{w}}Z \end{aligned}$$
(22)

Still inside air temperature

The following equation gives the energy balance for the still inside air:

$${m}_{\mathrm{a}}{C}_{\mathrm{pa}}\frac{\mathrm{d}{T}_{\mathrm{a}}}{\mathrm{d}t}={h}_{\mathrm{e}(\mathrm{w}-\mathrm{a})}\left({T}_{\mathrm{w}}-{T}_{\mathrm{a}}\right)-G{C}_{\mathrm{pa}}\left({T}_{\mathrm{a}}-{T}_{\mathrm{amb}}\right)$$
(23)

Absorber temperature

The following equation gives the energy balance for the still’s absorber [33]:

$${m}_{\mathrm{b}}{C}_{\mathrm{pb}}\frac{\partial {T}_{\mathrm{b}}}{\partial t} = \left({\tau }_{\mathrm{g}}{\tau }_{\mathrm{w}}{\alpha }_{\mathrm{b}}I- {h}_{\mathrm{c}(\mathrm{b}-\mathrm{w})}{A}_{\mathrm{b}}\left({T}_{\mathrm{b}}-{T}_{\mathrm{w}}\right)- {U}_{\mathrm{b}}\left({T}_{\mathrm{b}}-{T}_{\mathrm{is}}\right)\right){A}_{\mathrm{b}}$$
(24)

where the heat loss coefficient through the absorber is found from [32]:

$$U_{{\text{b}}} = \left( {\frac{{x_{{{\text{is}}}} }}{{k_{{{\text{is}}}} }} + \frac{1}{{h_{{{\text{c}}({\text{g}} - {\text{a}})}} }}} \right)^{ - 1}$$
(25)

Insulation temperature

To reduce heat loss through the still’s basin, a thermal insulation is used. The following equation gives the energy balance for the insulation:

$${m}_{\mathrm{is}}{C}_{\mathrm{pis}}\frac{\partial T_{\mathrm{is}}}{\partial t} ={U}_{\mathrm{b}}\left({T}_{\mathrm{b}}-{T}_{\mathrm{is}}\right)-{U}_{\mathrm{is}}{A}_{\mathrm{b}}\left({T}_{\mathrm{is}}-{T}_{\mathrm{a}}\right)$$
(26)

where the heat loss coefficient through the insulation is [32]:

$$\begin{aligned} {U}_{\mathrm{is}}&={\left(\frac{{e}_{\mathrm{b}}}{{k}_{\mathrm{b}}}+\frac{{e}_{\mathrm{is}}}{{k}_{\mathrm{is}}}+\frac{1}{{h}_{\mathrm{c}(\mathrm{is}-\mathrm{a})}}\right)}^{-1}\\ {h}_{\mathrm{c}(\mathrm{is}-\mathrm{a})}&={h}_{\mathrm{c}(\mathrm{g}-\mathrm{a})} \end{aligned}$$
(27)

Still inside air humidity

The following equation gives the mass balance for the air humidity inside the still:

$${m}_{\mathrm{a}}\frac{\mathrm{d}{y}_{\mathrm{a}}}{\mathrm{d}t}={k}_{\mathrm{m}}.a\left({y}_{\mathrm{w}}-{y}_{\mathrm{a}}\right)-G\left({y}_{\mathrm{a}}-{y}_{0}\right)$$
(28)

The mass transfer between the water and the air is given by [29]:

$$\begin{aligned}{k}_{\mathrm{m}}.a &={10}^{-3}\left(-6.9 + 2.221 G- 0.00040 L - 0.023 {T}_{\mathrm{w}}+ 0.4 Z - 0.01777{ G}^{2}\right. \\ & \left. \quad + 0.000159 GL+ 0.00699 G{T}_{\mathrm{w}}- 1.060 GZ\right) \end{aligned}$$
(29)
$${y}_{\mathrm{w}}=0.62.\frac{{P}_{\mathrm{w}}}{{P}_{\mathrm{atm}}-{P}_{\mathrm{w}}}; \quad {P}_{\mathrm{w}}=25.317-\frac{5144}{{T}_{\mathrm{w}}}$$
(30)

The packed bed direct contact condenser model

In the used packed bad direct contact condenser [33], the cooling liquid and the humid air are in direct close contact in co-current flows. The heat is removed by the condensing cooling water (Fig. 4) that is sprayed over the cross-section on the top of the packing bed at the level where the humid air is injected. Following Li et al. [33], a two-fluid model is used where the energy and mass balance conservation unsteady state conditions are applied to a differential control volume leading to the humidity of the air and of the respective temperature of the air, the water and the packed bed material according to the vertical axis (z-axis). Air and water vapor are modelled as ideal gases, and heat losses are neglected.

Fig. 4
figure 4

Schematic representation of the dehumidification system

Air humidity in the condenser

The conservation of mass applied to the liquid and vapor phases of the control volume is given by the following equation [34, 35]:

$$\frac{\mathrm{d}w}{\mathrm{d}z}= \frac{\mathrm{d}{T}_{\mathrm{a}}}{\mathrm{d}z}\frac{P}{P-{P}_{\mathrm{sat}}\left({T}_{\mathrm{a}}\right)}w\left(b-2c{T}_{\mathrm{a}}+3d{T}_{\mathrm{a}}^{2}\right)$$
(31)

where Psat(T) is the saturation pressure related to temperature T. This pressure is computed as [33]:

$${P}_{\mathrm{sat}}\left(T\right)=a\mathrm{ exp}(bT-c{T}^{2}+d{T}^{3})$$
(32)

where empirical constants are: a = 0.611379, b = 0.0723669, c = 2.78793 10–4, d = 6.76138 10–7.

Condenser cooling water temperature

The conservation of energy applied to the cooling water of the control volume is given by the following equation [34, 35]:

$$\frac{\mathrm{d}{T}_{\mathrm{l}}}{\mathrm{d}z}=\frac{G}{L}\frac{\mathrm{d}w}{\mathrm{d}z}\frac{\left({L}_{\mathrm{v}}-{H}_{\mathrm{l}}\right)}{{C}_{\mathrm{pl}}}+\frac{Ua({T}_{\mathrm{l}}-{T}_{\mathrm{a}})}{{C}_{\mathrm{pL}}L}$$
(33)

where the mass and heat transfer coefficients are given by [36, 37]:

$${k}_{\mathrm{l}}=0.0051{{\mathrm{Re}}_{\mathrm{l}}}^\frac{2}{3} {{\mathrm{Sc}}_{\mathrm{l}}}^{-0.5} {\left(a{d}_{\mathrm{P}}\right)}^{0.4}{\left(\frac{{\mu }_{\mathrm{l}}g}{{\rho }_{\mathrm{w}}}\right)}^\frac{1}{3}$$
(34)
$$k_{{\text{a}}} = C{\text{Re}}_{{\text{a}}}^{0.7} {\text{Sc}}_{{\text{a}}}^{\frac{1}{3}} \left( {ad_{{\text{P}}} } \right)^{ - 2} aD_{{\text{a}}} \quad \left\{ {\begin{array}{*{20}l} {C = 5.23} \hfill & {{\text{For}}\;\;\;d_{{\text{P}}} > 0.015} \hfill \\ {C = 2} \hfill & {{\text{For}}\;\;\;d_{{\text{P}}} \le 0.015} \hfill \\ \end{array} } \right.$$
(35)
$$U=\left({U}_{\mathrm{l}}^{-1}+{U}_{\mathrm{a}}^{-1}\right)^{-1}$$
(36)
$${U}_{\mathrm{l}}={k}_{\mathrm{l}}{\left({\rho }_{\mathrm{w}}{C}_{\mathrm{pw}}\frac{{k}_{\mathrm{l}}}{{D}_{\mathrm{l}}}\right)}^\frac{1}{2}$$
(37)
$${U}_{\mathrm{a}}={k}_{\mathrm{a}}{{\left({\rho }_{\mathrm{a}}{C}_{\mathrm{pa}}\right)}^\frac{1}{3}\left(\frac{{K}_{\mathrm{a}}}{{D}_{\mathrm{a}}}\right)}^\frac{2}{3}$$
(38)

Condenser inside air temperature

The conservation of energy applied to the air/vapor mixture over a differential e-control volume leads to the following equation [33]:

$$\frac{\mathrm{d}{T}_{\mathrm{a}}}{\mathrm{d}z}=\frac{-1}{\left(1+w\right)}\frac{\mathrm{d}w}{\mathrm{d}z}\frac{{h}_{\mathrm{l}}\left({T}_{\mathrm{a}}\right)}{{C}_{\mathrm{pa}}}+\frac{Ua\left({T}_{\mathrm{l}}-{T}_{\mathrm{a}}\right)}{{C}_{\mathrm{pa}}G\left(1+w\right)}$$
(39)

The condensation rate in the condenser is calculated as:

$${m}_{\mathrm{cond}}=G({w}_{\mathrm{in}}-{w}_{\mathrm{out}})$$
(40)

Lv, cp, and ρ are calculated as a function of the temperature.

The control auxiliary system model

The idea behind the controller proposed in this study is to maintain the desired humidity inside the greenhouse. A control model was added to the set of above-developed equation for the integrated greenhouse. The only variable of the control model was the humid air mass flows ratio. The latter is the ratio between the flow directed to the greenhouse and the total flow at outlet solar. It was noticed that this ratio is zero during the nighttime since there is no fair flow directed to the greenhouse.

The various steps involved in the simulation process are presented in the scheme of Fig. 5. First, the meteorological data, air and water flow rates were introduced in the solar still model as inputs. Three parameters can be controlled, the water and air mass flow rates and the sprayer height inside the solar still. These parameters were set when the humidity of air, at the outlet solar still, reaches the optimal value. At this level, in order to regulate the humidity inside the greenhouse, the flux of humid air will be introduced in the greenhouse model as input. The exterior climate conditions parameters are also introduced into the greenhouse model.

Fig. 5
figure 5

The proposed control scheme for the integrated greenhouse system

The coupled equations [Eqs. (1) to (40)] of the whole model of the integrated saltwater greenhouse are solved through a Runge Kutta procedure using a unique code developed under Matlab® software. The models resolution outcome is, among others, the humidity value in the greenhouse over 24 h.

Then, control action is taken as follows: If the humidity inside the agricultural greenhouse is less than 60%, the regulation performs the suitable action on tree control parameters, i.e. the water and the airflow rates inside the solar still and the humid air ratio, that permit the greenhouse humidity to be equal or superior to 60%. While giving the priority to satisfying the humidity set point of the greenhouse, the control system directs the rest of the humid air to the packed bed condenser to produce freshwater for the irrigation needs of the greenhouse plants. This supervisory action is repeated every 6 min.

Results and discussions

At first, the model of the greenhouse is validated through the cucurbit experimental greenhouse of El Hamma. Then the numerical models of the greenhouse and of the solar still are run to obtain the functioning parameters of the whole integrated system. Finally, the ability of the proposed system to supply the greenhouse irrigation water requirements and the greenhouse air humidity level are studied.

Validation of the greenhouse model

The greenhouse model accuracy was evaluated by comparing the predicted and the measured air temperature and humidity data for three non-successive days covering the cucurbit crop first season. These typical days are January 1st, March 1st and May 1st.

The fit average relative error (Fig. 6) doesn’t exceed 15%. The model applies better to the data during the night than during the day. This is related to the more complex day energy balances, and to the fact that the irrigation operations occur only during the daytime.

Fig. 6
figure 6

Comparison of predicted air temperature inside greenhouse with experimental results

Air relative humidity is the most difficult challenging parameter to estimate as stated by several authors [8, 9]. Figure 7 shows the good performance of the model over the 24 h simulation period over the three simulated days with a fit average relative error that doesn’t exceed 15%. This figure shows that the hourly air humidity is less during the daytime than the nighttime due to the greenhouse day–night air temperature difference (Fig. 6) on the one hand, and the fact that the plant transpiration varies between the day and the night [38] on the other hand.

Fig. 7
figure 7

Comparison of predicted air humidity inside greenhouse with experimental results

The accordance with the predicted results with the experimental data using the R2, the RMSE and the MAPE factors show that the proposed model estimates the inside greenhouse temperature and humidity by R2 0.97–0.98 and by RMSE 1–2 °C for the temperature and R2 of 0.84–0.96 and RMSE of 3–5% for the humidity and a MAPE of 4–7%.

Evaluation of the HDH system components

The simulation results are presented in the following “Solar still simulation results” and “The condenser simulation results” sections.

Solar still simulation results

Figure 8 depicts the effect of the modified solar still parameters on the saltwater evaporated rate. As shown in the figure, at a constant spray height, the evaporated water increases with the increase of the ratio between the sprayed saltwater mass flow rate and the blown air mass flow rate. Nevertheless, this increase declines when the ratio value increases. This is due to less difference between the air actual humidity and the value of its saturation humidity when the water mass flow rate is high. Furthermore, this figure shows that increasing the spraying height decreases the water evaporated rate for constant air and water flow rates. This is explained by the fact that the mass and heat transfer coefficients drop with the increase of the spraying height [29], although the contact time between air and water rises with the increase of height, the temperature of pulverized water decreases all along the way. Figure 8 shows also that the attained values of the water evaporated rate per day are higher than those reached in conventional solar stills [30].

Fig. 8
figure 8

Effect of water mass flow rate to air mass flow rate ratio in solar still on irrigation load coverage for different spray height (1 May)

The condenser simulation results

The simulation of the condenser operation was performed by varying the cooling water temperature and flow rate and by varying the humid air mass flow rate. Figure 9 shows that, at constant cooling water temperature and a constant humid air mass flow rate, increasing the cooling water flow rate enhances the freshwater production and consequently boosts the irrigation load coverage. However, above a cooling water flow rate value of 7 kg/s m2, the freshwater production rising trend decreases. Figure 9 also shows that, reducing the condenser cooling water temperature resulted in a very significant increase in condenser water production and consequently an increase in the irrigation load coverage.

Fig. 9
figure 9

Effect of the cooling water temperature and flow rate on the freshwater production by the condenser (1 May)

Thus, to cover both the total irrigation needs and the air humidification requirements of the greenhouse, an appropriate water mass flow has to be chosen according to the water temperature to reduce the pumping costs.

Evaluation of the greenhouse needs meeting and the performance of the control system

Humidity inside the greenhouse

The control system is used to set the greenhouse humidity at the desired levels that allow the best conditions for plants growth. Figure 8 shows the humid air ratio effect supplied in the greenhouse on the humidity inside the greenhouse.

The control system is used to set the greenhouse humidity at the desired levels that allow the best conditions for the plants growth. It acts on the humid air mass flow ratio between the flow directed to the greenhouse and the total flow at outlet of solar stills (Fig. 1).

The control and the whole system results are presented for the chosen day of March 1st. Figure 10 shows the humid air ratio effect on the humidity inside the greenhouse. It is shown that when the supplied humid air ratio increases, the inside air humidity enhances. With 100% of humid air ratio, the humidity can be set at a level up to 80% throughout the day. Figure 10 also reveals that during the nighttime, the humidity remains at high levels without any humid air supply. So, as showed in Fig. 10, by the curve related to the case of no air supplying the green house, the regulation will be performed just during the day period and will have to start with the beginning of the decrease of humidity at 9:00 am until it reaches its minimum at 1:00 p.m. The control is set to maintain a humidity level inside the greenhouse at a level that is superior to 60% through the 24 h of the day. This level is sufficient for the optimal plant growth [5, 6]. In fact, enhancing this inside required humidity minimum level induces higher supply of humid air ratio to the greenhouse and consequently decreases the humid air mass flow directed to the condenser to produce freshwater for irrigation. Figure 11 depicts the timely variation for the day of March 1st the humid air ratio provided by the control/regulation system to permit the greenhouse humidity to be maintained at a humidity level of a minimum of 60% is zero during the nighttime and it reaches a maximum of 58% at nearly 12:30 a.m. and at 20:00 p.m.

Fig. 10
figure 10

Effect of humid air ratio on greenhouse indoor humidity (1 March)

Fig. 11
figure 11

Regulation profile of the humid air ratio fed the greenhouse (1 March)

The greenhouse requirement covering evaluation

The innovation in this work consists in the fact that the proposed system is a 100% autonomous; it provides both the optimal greenhouse microclimate and irrigation needs. However, these two objectives are closely related to each other because they depend on outdoor weather conditions, solar radiation intensity, and plant evapotranspiration. Therefore; it would impossible to study or control each parameter separately. Furthermore, the developed model [Eqs. (1) to (40)] shows the close relationship between these parameters.

Setting all the input parameters at their own optimal values, the simulations achieved in this section aim at studying the air humidity in the greenhouse and the irrigation water production with its related ILC ratio. For the conducted simulations, the respective values at which the parameters are set are as follow the spraying height at 0.4 m, the air mass flow at 0.035 kg/s m2, spraying the water flow rate at 1.9 kg/s m2, the cooling water temperature at 15 °C for January and February and at 20 °C for the other season months, and the cooling water flow rate at 7 kg/s m2.

Figure 12 shows the effect of the integration of the HDH system with the greenhouse structure over the early cucurbit season cultivation (Jan–May). The results are given for five representative days that are the first days of the month January to May.

Fig. 12
figure 12

Effect of greenhouse integration on irrigation load coverage over early crop season

For February, 1st, the day with the lowest values in terms of temperature and solar radiation, as the air at the outlet of the solar still is not saturated and therefore the condensation efficiency is weak, the proposed system with the chosen stills dimensions can cover only 70% of the irrigation needs as shown in Fig. 12. However, it monitors the greenhouse humidity successfully and actually ensures that it exceeds 60% during the day as shown in Fig. 13.

Fig. 13
figure 13

Greenhouse humidity regulation over early crop season

For March, 1st, that is the most unfavorable day in terms of humidity level, the system sets the greenhouse at its just necessary humidity level as shown in Fig. 13. On this same day, the system covers more than 200% of the needed irrigation water.

For May 1st, the hottest day among the three, the system permits the humidity continuous adjustment to a value that is always greater than 60%, and at the same time, it covers more than 300% of the greenhouse irrigation needs. It can be concluded thus that the chosen input parameters in this section are convenient.

Notice that one may extend the still surface to cover 100% of the greenhouse even during the day of February, 1st, but in this case, the produced irrigation water will be greater than the value calculated above for the days March 1st and May 1st.

Figure 14 compares the condenser freshwater hourly production during the cucurbit cultivation season, taking into account the humidity regulation, i.e. the part of the humid air that is supplied to the greenhouse. The maximum productivity is reached when the solar irradiation is the highest, and the freshwater production period is between 8:00 a.m. and 8:00 p.m.

Fig. 14
figure 14

Hourly condenser productivity for three defined days

One may also notice that during the closed periods of the greenhouse, i,e out of the cultivation seasons, the proposed system can produce only fresh water and store it for the use in the following season during the low production periods. Storing the freshwater permits the reduction of the dimension of the HDH subsystem as well as the cost too.

Further simulation of the whole along the Jan-May cultivation seasons shows that the proposed system offers 460 m3 of irrigation water with a salinity of 1.6 g/l. This total amount of irrigation water production represents more than 200% of the greenhouse irrigation requirement.

Integrated system energy efficiency

The energy efficiency of a desalination process is defined as the ratio between the energy used to produce a unit of mass of drinking water and that required by a distillation system. For a solar-powered desalination system, energy efficiency is determined by the following equation [39]:

$$\eta = \frac{{m}_{\mathrm{dist}}*{L}_{\mathrm{v}}}{{S}_{\mathrm{abs}}*E}$$

with mdist is the mass flow rate of the distillate (kg/s), Lv is the latent heat of vaporization (kJ/kg), Sabs is the surface the solar still’s absorber (m2) and E is the global solar irradiation (W/m2). The energy efficiency of a HDH desalination system translates the efficiency in producing pure water.

The variation of energy efficiency during the cucurbit cultivation for the solar still and all the HDH system is presented in Table 1. The best efficiency was achieved on the hottest day May 1st for both systems and the lowest was achieved on the coldest day February 1st for the solar still. However, the lowest efficiency for the overall HDH system was achieved on March, 1st, which corresponds to the most unfavorable day in terms of humidity level. This shows that the solar still efficiency is strongly linked to the density of solar flux and that the HDH efficiency is also affected by the humidity level.

Table 1 Integrated system energy efficiency

Conclusion

The main objective of this work is to study a novel integrated saltwater greenhouse concept that provides the greenhouse microclimate and irrigation requirement in arid regions with saline groundwater. Findings show that the proposed system covers the humidity requirements of the greenhouse during all these typical days with a set point of 60% as the minimum air humidity level in the greenhouse. With the HDH system chosen dimension, the irrigation needs are satisfied for these days except for February 1st for which the irrigation covering ratio is only 70%.

However, it was noticed that extending the solar still surface permits covering the irrigation need at a level of 100% even during February 1st. During the considered cultivation season of cucurbit, the irrigation production of the system covers more than 200% of the greenhouse water irrigation needs. As the proposed HDH is independent of the greenhouse, the produced fresh water during the inter-seasonal can be stored as to serve the bad days. The water storage may reduce the dimension of the HDH subsystem while satisfying all the microclimate and irrigation needs of the greenhouse.

The current study can be further improved by implementing temperature model regulation. In addition, optimization efforts must be taken to improve the HDH system especially when an inter-seasonal freshwater storage is considered. Later studies involving various locations and crop types can reveal the potential effectiveness of the suggested integrated greenhouse under various climates and world regions. Furthermore, the proposed system's functioning and installation cost need to be studied and optimized regarding the location region and the desired crops.