3. Result and discussion

3.1. Elements

3.1.1. Mg

The methane production increased slowly with increasing amount of magnesium (Fig. 1). Therefore, Mg content in the mixture shows to be an important component in the fermentation process. Calculated on the basis of equation 1, the relation between Mg content and the total methane production in the mixture for a wide range of materials, is evidently linear. The same situation can be observed for the amount group of experimental data.
During fermentation process for bath technology it was observed that smaller pH cause lower methane production29, 33. But during experiment it was observed high methane production for mixture, where the initial pH was lower than it should be. The higher production caused by elements probably occurred because elements like for example magnesium allow to archaea and bacteria to increase their metabolism and create more methane before environmental start to be toxic for them.

3.1.2. Na

A relationship between Na content and the methane yield was found. It can be observed that Na content in the mixture and total methane production in the mixture, for a wide range of materials, has a linear relationship (Fig. 2). Only two points near the 1 ml/g methane production were out of the range. The different situation can be observed from the experimental data. It cannot be clearly deduced whether the sodium growth could have some influence on the methane production.

3.1.3. Ca

The observed methane production ranging from about 3.5 ml/g to about 7.5 ml/g (Fig. 3) had a linear trend. Similar to sodium, only two points near the 1 ml/g methane production were out of range. From the results, it cannot be strongly confirmed that the increase in the calcium resulted to a higher methane productivity. This is due to the high complexity of the process for the organic matter degradation.

3.2. Mathematical model

3.2.1 Archaea divisions

The amount of archaea divisions (μ) per day for bath technology and continuous technology is calculated by using below equation34:
\(\mu=\frac{0.693}{{50(1.1-W)}^{2}}\left[\frac{1}{d}\right]\)(9)
Where W is the humidity of the mixture, μ archaea divisions per day. The number 0.693, 50 come from equation which allows to calculate generation time 32 . The value 1.1 allow to check the influence of humidity. Minimum value for this influence is 0.1.

3.2.1. The pH coefficient

After new factors were careful analyzed, new equation was created, as shown in equation 10. Because it was proved that greater amount of elements in a mixture cause more production (even when pH was lower), the new equation modified a little conditions cause by pH. But before equation 10 can be calculated, first, the amount of Mg, Na, and Ca in equation 11, 12 and 13 respectively in the mixture of substrates, must be calculated. When the amount of the three elements is known, the coefficient for every element (from equation 11 to 13) can then be calculated. The values 0.25, 0.2 and 0.05 was chosen after the test and conclusions – model obtained the best results for these values. The value 3 was used to get the average from the three coefficients.
\(E_{\text{pH}}=\text{pH}+\frac{R_{\text{Mg}}+R_{\text{Na}}+R_{\text{Ca}}}{3}\)(10)\(R_{\text{Mg}}={(\text{Mg})}^{0.05}\) (11)\(R_{\text{Na}}=\left(0.25\text{Na}\right)^{0.2}\) (12)\(R_{\text{Ca}}=\left(0.25\text{Ca}\right)^{0.2}\) (13)
Where: RMg, RNa and RCaare the calculated coefficients for the elements, and EpH denotes the coefficient for modified pH value. Mg, Na and Ca is amount of magnesium, sodium and calcium in a mixture [g].
In the next step modified pH is used for calculations mass of archaea (equation 14).
\(M_{\text{pH}}=0.9e^{{-0.5\left(\left|\text{pH}-\left(7.65+E_{\text{pH}}\right)\right|\right)}^{2.89}}\)(14)
Where, M pH represents new pH coefficient. Values -0.5, 2.89 and 7.65 come from previous work34.

3.2.2. The temperature coefficient

According to results in the literature,equations for the temperature influence were modified. The optimum temperature was changed from 38oC to 37 oC for mesophilic fermentation and from 55 oC to 54 oC for termophilic fermentation34.
\(T_{\text{wsp}}=\frac{1}{1+\left(\frac{T-37}{10}\right)^{2}}T\in[25^{o}C,{47.5}^{o}C]\)(15)
\(T_{\text{wsp}}=\frac{0.9}{1+\left(\frac{T-54}{9}\right)^{2}}T\in({47.5}^{o}C,75^{o}C]\)(16)
Where, Twsp represents temperature coefficient,T represents temperature in celcious.

3.2.3. Volumetric load

The volumetric load is strictly responsible for methane creation during methane production in biogas plant, which used continuous technology. Therefore effect of volumetric load on the process was determined on basis of the available literature knowledge. In available literature it can be found that typical volumetric load range for biogas production was from 2 to 4 [gVS(L ∙ d) -1]28 . For instance in the work 3 all experiments were operated at an organic loading rate equal to [3.5 gVS (L ∙ d)]-1.
Theoretically, if volumetric load is bigger than 4, then microorganism cannot use all biomass and convert it in to methane. In the other hand, if this coefficient is lower than 2, microorganism do not have sufficient amount of organic dry matter, which can be convert in to methane.
Below equation 17 describes volumetric load influence. This equation contains organic dry matter in the biogas plant and allows to simulate the growth of archaea in a water environmental. When the amount of water in fermentator chamber is high then microorganism can growth fast35.
\(B_{r}=\frac{\sum_{j=1}^{r}\left(M_{j}\bullet\text{ITS}_{j}\bullet\text{IVS}_{j}\right)}{V}\left[\frac{g}{\text{dm}^{3}}\right]\)(17)
Where, Br represents volumetric load; IVSrepresents influent dry organic matter [%], V represents tank volume [dm3], j is a number of material, and r is a maximum number of materials.

3.2.4. Amount of carbon

The algorithm for estimation carbon amount in mixture can be described as follow (equation 18):
\(C^{g}=\frac{\sum_{i=1}^{r}\left(M_{j}\bullet I\text{TS}_{j}\bullet\text{IVS}_{j}\bullet\left(1-U_{j}^{r}\right)\bullet C_{j}^{g}\right)}{\sum_{j=1}^{r}\left(M_{j}\right)}\left[\frac{g}{g}\right]\)(18)
Where, Cg, represents initial amount of carbon in a material [%]; Ujr , represents content of non-degradable compounds [%].

3.2.5. Estimation of methane production

For biogas plants (continuous technology) methane production is almost constant during production time, therefore parameter ‘k ’ was describe by using equation 19. In this equation parameter ‘k ’ does not change during the process.
\(k=\ T_{\text{wsp}}e^{-2\left(1-M_{\text{pH}}\right)}[-\)] (19)
The typical archaea growth curve32 shows the various stages of the development of archaea but for the continuous production was prepared only one equation which simulate develop of archaea (Md ) in the real biogas plants:
\(M_{d}=\min\left(M,\mu Me^{T_{\text{wsp}}}\right)[g]\)(20)
After parameter ‘k ’ and ‘develop of archaea’ are calculated, amount of available carbon (equation 21) and production of acetic acid (equation 22) are calculated. Value 12 is the mass number of carbon (12 g mol-1). Number 2 and 6 are the numbers of carbon molecules that take part in chemical reactions (equation 6). The number 36 is 12 (12 g mol-1) multiply by 3. The number 3 was added because from chemical equation 6 it can be seen that from 3 atoms of carbon it can be produced 1 atom of acetic acid. The volumetric load ”Br” in the equation estimates amount of carbon, which archaea, processed into methane. For instance if the Br is equal to 2.5 then 100% of carbon can be processed into methane. But if the Br will be lower or higher than 2.5 then the amount of carbon, which can be used by the archaea, will be decreased.
\(C_{[i+1]}=max\left(0,\frac{C_{[i]}+\frac{C^{g}\bullet M_{d}}{12}-6k\bullet C_{[i]}}{1+\left(\frac{Br-2.5}{6}\right)^{2}}\right)[\text{mol}]\)(21)
\(H_{[i]}=\left\{\par \begin{matrix}\frac{k\frac{C^{g}\bullet M_{d}}{36}}{1+\left(\frac{Br-2.5}{6}\right)^{2}}\text{\ \ \ \ \ \ \ \ \ \ \ \ }\left[\text{mol}\right]\text{\ \ \ }C_{[i+1]}=0\\ 2k\bullet C_{\left[i+1\right]}\text{\ \ \ \ \ \ \ \ \ \ }\left[\text{mol}\right]\ \text{\ \ \ C}_{\left[i+1\right]}>0\\ \end{matrix}\right.\ \) (22)
Where, i represents process step, C represents carbon content in the substrate [mol].
Methane production in the large objects like biogas plants can be compared to the microorganism continuous culture. In this kind of culture, livings conditions for microorganism are almost constants. Therefore according to the kinetic equations, which were used for the laboratory scale 34 , it was developed equations which allow to make simulation for archaea growth in biogas plants. For the continuous technology, at the beginning (in the first step) following values: Mch [1],Ha [1], Da [1], are equal to zero since those compounds are outcome of following reactions 23, 24 and 25 are calculated:
\(M_{\text{ch}\left[i\right]}=k\left(H_{[i]}+H_{[i]}^{a}\right)\)(23)
Where, represents final methane production, H represents amount of acetic acid, Ha represents amount of acetic acid remaining after the processing.
Then it is checked how much carbon dioxide (Da [i]) and acetic acid (Ha [i] are left in the anaerobic chamber (equations 25 and 24).
\(\text{\ \ \ \ \ H}_{[i]}^{a}=H_{[i-1]}+H_{[i-1]}^{a}-k\left(H_{[i-1]}+H_{[i-1]}^{a}\right)\)(24)
\(D_{[i]}^{a}=M_{ch[i-1]}+D_{\left[i-1\right]}^{a}-k\left(M_{ch[i-1]}+D_{[i-1]}^{a}\right)\)(25)
Then total production of methane (Mch ) (equations 26 and 25) from carbon dioxide(Da [i]) bonding with hydrogen is summed up with production of methane from acid acetic (H [i]).
\(M=\sum_{i=1}^{n}\left(M_{ch[i]}+k\left(M_{ch[i]}+D_{[i]}^{a}\right)\right)\)(26)

3.3. Verification of the model

The correctness of the model was estimated with the use of the following measures: relative error of deviations (Bw) defining the difference of the results obtained from the model and tests:
\(Bw=\frac{100}{n}\sum_{i=1}^{n}\left|\frac{O_{i}-P_{i}}{O_{i}}\right|\)(27)
Then the relative root mean square error (RRMSE)36 was the next measure method, which checked the relation between the data calculated from the model, the empirical values (RRMSE and CRM test). The closer the result is to 0, the better the fit of the model to the observed values:
\(RRMSE=\frac{\left[\sum_{i=1}^{n}{\left(P_{i}-O_{i}\right)^{2}/n}\right]^{0.5}}{O}\)(28)
\(CRM=\frac{\sum_{i=1}^{n}P_{i}}{\sum_{i=1}^{n}O_{i}}\) (29)
In the case of the mean absolute error (MAE), the average value of the error produced by the model was examined (equation 30).
\(MAE=\frac{\sum_{i=1}^{n}\left(P_{i}-O_{i}\right)}{n}\) (30)
Where Pi , Oi , n andO represents the predicted data, observed data, amount of data and average from the observed data, respectively.
The group of 35 samples from the literature were examined (Table S1). First, group without the use of new equations were tested (equation from 10 – 14; Eph was equal to 0). The obtained average error was 23.8%. Then, the same group with the use of new equations were tested. The average error was 5.5% lower. Therefore, the results presented in table 1 indicate a good prediction. The value of deviations for RRMSE and CRM not greater than 0.3 which indicates a satisfactory fit of the model to the observed values. Besides in table 2, the results for the RRMSE and CRM are much better that in table 1, which indicates an improved. The same situation can be observed for the mean absolute error. Result in the table 2 (267.32) is better than in table 1 (353.44). More details about the results can be found in table S2.
In the case of biogas plants where continuous technology is used the data from pilot study was obtained27,29. For the first biogas plant the average error was smaller than 12.5% and for the second pilot biogas plant the average error was smaller than 21%. (Fig. 4 and Fig. 5).