Dynamics of fermentation models for the production of dry and sweet wine

In this work we consider two classical mathematical models of wine fermentation. The first model describes the wine-making process that is used to produce dry wine. The second model is obtained by introducing a term in the equation of the dynamics of the yeast. Thanks to this change it will be possible to inhibit the fermentation of the sugar and as a consequence a sweet wine will be obtained. We first prove the existence, uniqueness, positiveness and boundedness of solutions for both models. Then we pass to analyse the the long-time dynamics. For the second model we also provide estimates for the concentration of ethanol, nitrogen and sugar at the end of the process. Moreover, several numerical simulations are provided to support the theoretical results.

1. Introduction. Fermentation processes are present in nature and have been observed and used by people belonging to different cultures around the world since many centuries ago. In particular, it was well known that wine could be produced by leaving fruits and grains in tanks for a long time. We refer the interested readers to [2] where some historical facts involving the evolution of the achievements of the fermentation are explained.
There is a large literature dedicated to derive mathematical models of wine fermentation (see for instance [1,3,4,5,6,7,8,9] and all their references) but most of the studies focus on making simulations and comparing their results with real data and few works are dedicated to the mathematical analysis of the models. Motivated by this, we consider two different models of wine-making describing the fermentation process that takes place to obtain dry and sweet wine respectively. We will rigorously analyse the dynamics of both models focusing on qualitative and quantitative behaviour of the solutions.
Fermentation is defined as the bio-chemical process by means of which sugar present in the grape juice is transformed into alcohol or ethanol in the presence of some nutrients such as nitrogen. This transformation is possible thanks to the presence of the yeast in the must which allows to degrade the sugar into ethanol. In the case in which the initial amount of sugar is almost completely transformed into ethanol the so-called dry wine will be obtained. If some quantity of sugar persists at the end of the process then the so-called sweet wine will be produced. There are several ways to interrupt the fermentation of sugar in wine-making processes and we will follow the idea proposed in [8]. The authors consider that yeast activity is inhibited when the concentration of ethanol is greater than some fixed quantity which may depend on the grapes used in the fermentation process.
The biological device used in wine-making is a bioreactor. It is worth mentioning that there are different types of bioreactors: • the chemostat, which is a bioreactor where the substrate or nutrient is provided to the culture vessel in continuous time and the excess is also removed from the culture vessel in continuous time; • the fed-batch, which is a bioreactor where the substrate is provided to the culture vessel in continuous time but there is no material removed from there; • the batch, which is a bioreactor where the substrate is provided at the beginning of the experiment and nothing is removed before the end of the biological processes taking place there.
In this work we will focus on the batch since it is the most used by wine producers.
In the following lines we will mathematically describe the fermentation process that is used to produce dry wine. We consider a first reaction scheme where the microbial biomass or yeast grows on the presence of nitrogen, the limiting nutrient in the fermentation process, and sugar is transformed into alcohol or ethanol. More precisely, these reactions can be given by where n, x, s and e are the nitrogen, microbial biomass, sugar and ethanol concentrations respectively. The quantities k 1 and k 2 denote the yield coefficients associated to nitrogen and sugar concentrations. For simplicity, and without loss of generality, we set k 1 = k 2 = 1. From the previous scheme and thanks to Gay-Lussac-like relations, Malherbe et al (see [10]) proposed that the concentration of sugar and ethanol can be deduced from the quantity of carbon dioxide while considering that the initial concentration of ethanol and carbon dioxide are zero. The following model has been proposed in [9] in order to describe the kinetics of the above process: where x = x(t) denotes the total microbial biomass or yeast concentration in grammes per liter, n = n(t) is the nitrogen concentration in milligrammes per liter, e = e(t) is the ethanol concentration in grammes per liter and s = s(t) is the sugar concentration in grammes per liter. Moreover µ(n) is the following Monod consumption function which represents the specific growth rate for cell mass where µ max is the maximum specific growth rate of the active biomass and k n is the Monod constant for nitrogen limited growth. Moreover, the Monod consumption function describes the rate of sugar utilisation per cell where β max is the maximum specific rate of sugar utilisation and k s is the Michaelis-Menten-type constant for sugar transport across the cell membrane. Finally, the function describes the inhibition of the consumption of sugar when levels of ethanol are high and k e is the ethanol inhibition. In order to produce sweet wine it is necessary that the action of the microbial biomass is inhibited before transforming the whole concentration of sugar; a model describing this case is suggested in [8]: where the function k d (e) = ke, describes the rate of cell inactivation where k is a parameter that describes the sensitivity of yeast to ethanol. This simple innovation let to control the concentration of sugar at the end of the process. This work is organised as follows: in Section 2 we analyse the mathematical model (1)-(4) whereas in Section 3 we consider the mathematical model (6)- (9). In both cases, we first study the existence, uniqueness, positiveness and boundedness of solutions and then we analyse in detail their asymptotic behaviour. We refer the reader to [11,12] where the main required tools from the theory of ordinary differential equations can be read. For the second model we also prove that the nitrogen and sugar concentration remain bounded away from zero. Moreover, we provide a lower and upper bound for the limit value of the ethanol concentration and an upper bound for the limit value of nitrogen concentration. At the end of both sections we present some numerical simulations which support the theoretical results. Finally, in Section 4 we compare both models and provide some final comments.
2. Modeling fermentation of dry wine. In this section we consider the differential system (1)-(4). We observe that, from (1)-(2) we have that is, the sum of microbial biomass and nitrogen concentration remains constant. Moreover, from (3)-(4), we obtain from which we have that the sum of the ethanol and sugar concentration remains constant: where we have set that the initial ethanol concentration is zero. From (10) and (11), we can rewrite system (1)-(4) as a two dimensional one depending on (x, e) as follows Hence, we will study the reduced system (12)-(13). Proof. By classical theory of ODE's it is easy to obtain local existence and uniqueness of the solutions of system (12)-(13). Moreover, we observe that the positive cone X = {(x, e), x ≥ 0, e ≥ 0} is positively invariant since x = 0 is an invariant plane and on e = 0 we have  To this end, we show that the vector field on ∂B is tangent or point inside B. We consider the four sides of ∂B separately.
• Side L 1 : in this case we have e = 0 and x ∈ (0, γ). The vector field on L 1 points inside B since dx dt > 0 and de dt > 0.
• Side L 2 : in this case x = γ and e ∈ [0, λ). The set x = γ is invariant and whence we deduce that every solution of system (12)-(13) with initial value on L 2 converges to P . We notice that the case e = λ corresponds to the point P which is a fixed point.
Then, we have that solutions with initial value on L 3 converges to P . • Side L 4 : in this case x = 0 and e ∈ [0, λ). This side consists of a segment of fixed points which are unstable. In fact, for any initial value (ε, e) with ε > 0 small and e ∈ [0, λ], we have dx dt > 0 and then solutions move away from the line L 4 (see Figure 2). Then, we conclude that the set B is positively invariant. Solutions starting on B are positive, bounded and defined for all t ≥ 0. Now, we analyse the asymptotic behaviour of solutions starting on B. Since dx dt > 0 for x ∈ (0, γ) there are no periodic orbits in B. As a consequence, the interesting invariant sets on B are the unstable fixed points on the side L 4 and the fixed point P . In order to study the stability character of P we compute the eigenvalues of the Jacobian matrix: whence, since λ 1 and λ 2 are both negative, we conclude that the fixed point P is locally stable. Finally, every solution of system (12)-(13) with initial value in (0, γ] × [0, λ] converges to P and, using (1) and (11), we have that every solution of system (1)-(4) converge to (γ, 0, λ, 0).

Remark 1.
We note that the thesis of Theorem 2.1 is consistent with the real fermentation process. In this case a dry wine is obtained, the sum of the sugar and ethanol concentrations s(t) + e(t) = s(0) remains constant and the total sugar quantity is transformed into ethanol since e(t) → s(0) while s(t) → 0. Moreover, the sum of the microbial biomass and nitrogen concentrations x + n remains constant with n(t) → 0 and x(t) → n(0) + x(0).

Numerical simulations.
In this section we provide some numerical simulations for the solutions of system (1)-(4). In the first numerical experiment (see figure 3) the initial values have been set as follows: while the parameters are We observe that the total quantity of sugar concentration λ = s(0) is transformed into ethanol, as proved in (11), hence the wine obtained by this process is dry.
Moreover, the nitrogen concentration is decreasing and the microbial biomass concentration is increasing for every time. As a result, the total quantity of nitrogen n(0) is transformed into yeast, as proved in (1). In the second numerical experi-  (14) and parameters values as in (15).
ment (see figure 4) we consider the same initial data as in (14) while the values of parameters have been set as follows: In the second experiment we have increased the maximum specific growth rate of the active biomass µ max and the Monod constant for nitrogen limited growth k n . As a result, the nitrogen is consumed by the biomass faster then the nitrogen concentration becomes almost null faster. Then, one can expect a faster convergence of the microbial biomass and nitrogen concentrations to their limit values, as we observe in Figure 4.
3. Modeling fermentation of sweet wine. In this section we are interested in studying the mathematical model (6)- (9) which describes the fermentation model used to produce sweet wine. As we explained previously, this model takes into account an extra term in the equation for the microbial biomass concentration with respect to the system considered in Section 2. We will see that it will be possible to control the fermentation process in order to preserve some quantity of the sugar obtaining sweet wine.
From (8) and (9) (14) and parameters values as in (16). whence We can rewrite the state variable describing the sugar concentration as s = λ − e, then system (6)-(9) can be reduced to From now on we will denote by X = {(x, n, e) ∈ R 3 : x ≥ 0, n ≥ 0, e ≥ 0}, the positive cone. Proof. By classical theory of ODE's we obtain local existence and uniqueness of solutions. We first prove that the set C is positively invariant; this provides the positiveness of solutions. We observe that x = 0, n = 0 and e = λ are invariant planes while on e = 0 the vector field points inside C. From this argument we also have that e(t) is bounded and defined for all t ≥ 0. By equation (19) we have that n(t) is decreasing, then if n 0 ∈ C we conclude that n(t) is bounded. Moreover, from where the last inequality follows from the fact that µ(n(t)) is decreasing with respect to t. Using (21) we can write We recall that the nitrogen concentration n is decreasing and the ethanol concentration e is increasing. Thus, from (22), we have lim t→+∞ µ(n(t)) = 0.
We define the function S(t) := µ(n(t)) − ke(t), by monotonicity of S(t) and from (18) we conclude that dx dt ≤ 0, for all t > T.
This contradicts (22) and as a consequence we conclude that the biomass concentration x is bounded and defined for all t ≥ 0. Proof. We first parametrise the surface λ 1 (n, e) in the following way The tangent vectors are π x (x, n) = (1, 0, 0), and π n (x, n) = 0, 1, while the normal vector is In order to check if the vector field at λ 1 (n, e) = 0 points inside A we compute the following scalar product x.
We observe that the previous quantity is positive for every x > 0. Then, we conclude the proof by recalling that the set C is positively invariant.
The previous result will be useful to prove the following theorem concerning the asymptotic behaviour of solutions.
where n * and e * denote the limit values of the nitrogen and ethanol concentrations respectively. Such limits satisfy 0 ≤ n * ≤ n(0), and 0 < e * ≤ λ.
From Theorem 3.2, we have that the limit points are in A and as a consequence the right hand side of (24) is negative. Thus, we conclude that lim t→+∞ x(t) = 0.
As a result, every solution of system (18)-(20) with initial value in C \ {x = 0} converges to a fixed point in the plane x = 0.
More details on the asymptotic behaviour are given by the following result. Since the nitrogen concentration n remains positive and decreasing for t ≥ 0, it is possible to define a diffeomorphism from [0, +∞) to (n ∞ , n 0 ], where n 0 = n(0). Then, the microbial biomass concentration x can be expressed as a function of n: Hence, for n < n(T ) with T > 0, we have We observe that the consumption function µ satisfies Hence, from (26) we have where σ > 0. Finally, by integrating the last inequality between n ∞ and n we obtain x(n) > x(n ∞ ) − n + n ∞ + σ(log n − log n ∞ ).
Then, if n ∞ = 0 we have that x > ∞ which is a contradiction since x is bounded and this concludes the proof.

Remark 3.
In order to analyse in more detail the dynamics we have to study the asymptotic behaviour of concentrations n(t) and e(t). By the above discussion we deduce that the limit points on the (n, e)−plane are in the set delimitated by the e−axis, the line e = λ, the vertical line n = n(0) and the function e = 1 k µ(n) (see figure 5).
In the following result we obtain an equation involving the nitrogen and ethanol concentrations. from which we obtain the implicit equation (28).
As a corollary of the previous theorem, we obtain the following important result.

Theorem 3.6. The ethanol concentration e(t) does not tend to the initial sugar concentration λ.
Proof. Suppose that e(t) → λ then, by Theorem 3.5, we conclude that n(t) → 0. However, this contradicts Theorem 3.4. Hence, some quantity of sugar remains in the culture vessel of the batch at the end of the process and as a consequence sweet wine is produced.
Remark 4. Now, from (28) we can find the values (ē,n) = (e(T ), n(T )) at which the trajectories cross the curve e = 1 k µ(n). More precisely, the value ofn is given solving the following equation The previous equation can be solved numerically; the valuesē andn may serve as a lower bound for the limit value of e and as an upper bound for the limit value of n respectively.
It is natural to expect that an upper bound for the limit value of the ethanol concentration would be more useful for practitioners in order to control the quality of the sweet wine. The next result represents a useful tool for the estimation of the concentrations of ethanol and sugar at the end of the fermentation process. where Proof. We recall that the Monod consumption function µ = µ(n) is increasing respect to the nitrogen concentration n while n(t) is decreasing with respect to time. As a consequence µ(n(t)) ≤ ρ for all t ≥ 0. Since the ethanol concentration e(t) is increasing for all t ≥ 0, it is possible to define a diffeomorphism from [0, λ] to [0, +∞). Then we can express x as a function of e where R(e) = β max (λ − e)k e (k s + λ − e)(k e + e) . Now, we introduce the following system (see figure 6) and Since we are interested in finding an upper bound for the limit values of e we consider only the case in which λ > ρ k . From the previous reasoning we conclude that dx de ≤ dy de , and as a consequence x(e) ≤ y(e). By integrating (33) between zero and y we obtain where δ, α 3 , α 2 , α 1 , α have been defined before. Using that lim t→+∞ y(t) = 0 (see figure 6), we have where e * is the limit value of e(t). It remains to prove that the previous equation admits a solution in (0, λ). We first observe that since λ > ρ k then α, α 1 > 0. Consider the following function it is decreasing in [0, λ) with g(0) = 0 and lim z→λ g(z) = −∞. The function is bounded in [0, λ] with f (0) = −δy(0) and f (λ) ∈ R with sign depending on the choice of the parameters. Then, from continuity of f (z) and g(z) and from the above argument, there exists a unique z * ∈ (0, λ) such that f (z * ) = g(z * ). This proves that there exists a unique solution e * ∈ (0, λ) of equation (34) (see also figure  6).

Numerical simulations.
In this section we provide some numerical simulations of the solutions of system (6)- (9). For all presented numerical experiment we consider the following values of the parameters while the initial data are set as follows Since the key parameter, as proved before, is the sensitivity of yeast to ethanol, we will just change this parameter to observe its effect.
In the first numerical experiment (see figure 7) we have set k = 0.05. We observe that the concentration of microbial biomass is increasing, it reaches its maximum and then it decreases to zero, as proved in Corollary 1. Moreover, the ethanol concentration remains below the initial quantity of sugar due to the effect caused by the sensitivity of yeast to ethanol. From (30), we obtain e * = 6.29 < λ = 10 as upper bound for the limit of the ethanol concentration. The limit value in the numerical simulation is e * = 6.15. In the second experiment (see figure 8) we increase the sensitivity of yeast to ethanol by taking k = 0.25. In this case the maximum of the microbial biomass is reached faster. Moreover, since the sensitivity of yeast is larger than the one used in the previous experiment, the fermentation process stops before and then the limit value of the sugar concentration is larger. In addition, from (30), we obtain e * = 3.19 < λ = 10 as upper bound for the limit value of the ethanol concentration. The limit value in the numerical simulation is e * = 2.92. In the third numerical experiment (see figure 9) we consider a much larger value of the sensitivity of yeast to ethanol, that is k = 2.5. In this case, since the sensitivity of yeast is considerably larger, the inhibition of the fermentation process acts quickly. The increasing period of the biomass x is much shorter and the ethanol concentration approaches its limit value before. As a consequence the final concentration of sugar is larger. In addition, from (30) we obtain e * = 1.07 < λ = 10 as upper bound for the limit of the ethanol concentration. The limit value in the numerical simulation is e * = 0.98. In the last  Figure 9. Same parameters and initial data as in figure 7 and k = 2.5 experiment (see figure 10) we have set k = 0. Since there is no sensitivity of yeast in this case, the fermentation process takes place until the sugar concentration is close to zero. Then, the wine produced in this case is dry.

Comparison between both models.
In this section we compare the results of both models analysed in Sections 2 and 3. We recall that the two systems differ The possibility to control the fermentation process has been a challenge, from mathematical and biological point of view, for researchers from different areas. This is one of the reasons that encouraged us to study the models considered in this work. In the following lines we provide several simulations in order to compare the two models.
In the first numerical experiment (see figure 11) we consider the following values of the parameters: while initial data are set as follows In the next figures, the curves in blue are the solutions of system (1)-(4) whereas two different solutions of system (6)-(9) are plotted in yellow (with k = 0.05) and in orange (with k = 0.25) respectively. We notice that the biomass concentration is increasing for all the time in the case of solutions of system (1)-(4) while, in the rest of cases, it becomes decreasing after some time, as proved in Section 3. Moreover, for system (1)-(4), the nitrogen is almost completely consumed while the total quantity of sugar is processed into ethanol. In the case of solutions of system (6)-(9) the presence of the sensitivity of yeast k > 0 makes the sugar concentration remain positive.
In the second numerical experiments (see figure 12) the parameters are set as in (37) while initial data are set as follows In this case we observe a slower convergence, with respect to the previous experiment, of the variables to their limit values.

Conclusion.
In this work we have rigorously analysed two models for wine production. We have proved existence, uniqueness, boundedness and positiveness of solutions of both systems. Moreover, we have studied in details the asymptotic behaviour of solutions. However, the results of this work not only clarify the dynamics of the model but provide useful tools for practitioners in order to control the fermentation process and to produce wine with the desired sugar and ethanol concentrations. In particular, the bounds for the limit values of the variables and the analysis of the effects of the choice of the parameters will serve as a practical guide for wine producers.