2.2. Experimental setup and operation
The methane production from straws and animal manures were determined using a batch method based on the techniques presented by Moller et al.26. Each material was tested in duplicate using erlenmeyer flasks with a working volume of 250 mL, then kept at a mesophilic temperature 37oC. The initial ratio of VS of the substrate to inoculum (S/I) was set to 2:1. After mixing the inoculum with the materials in the erlenmeyer flasks, distilled water was added to an effective liquid volume of 200 mL. All the erlenmeyer flasks were tightly closed with rubber septa and foil after being flushed with nitrogen. In ensuring uniform mixing, the reactor contents were shaken every day with continued fermentation for a period of 35 days until no gas production was further observed. The compositions in the different batch set-ups were as follows: The initial VS loading included 15 g VS/L of grapes, millet, maize, grass, and dried straws. The pH values of the different digester were about 7. The concentrations of Mg, Na and Ca were determined by inductively coupled plasma-optical emission spectroscopy (ICPOES). The biogas volume (V1) was measured by its displacement of water. The concentration of methane was determined using a gas chromatography with the TDX-01 carbon molecular sieve packing flotation column and high-purity argon as a carrier gas with a flow rate of 35 ml/min. The peak signal was detected by Thermal Conductivity Detector (TCD). The parameters for the instrument were controlled as follows: The temperature of the injection port, the column, the hot wire and the detector was 210, 135, 175 and 155 oC, respectively. Meanwhile, the gas injection volume was 100 µL. The TS and volatile (VS)/TS of the inoculum were 3.41% and 47.91%, respectively.

2.3. Data for analysis

The necessary data needed for the analysis was obtained from the papers27-29, dissertation30 and from the current conducted experiment in this work (Table S3). The results on methane production for the batch system as well as the amount of Mg, Na and Ca in the examined materials, were retrieved from literatures26,31. For conducting analysis in these two works, the following materials were used: chicken manure CHM, cattle manure CAM, swine manure SM1 and SM2, corn straw CS and rice straw RS (Table S1). Note that, only mixture of substrates was taken into consideration in a situation where two substrates were used in a co-digestion fermentation. Then, the amount of every element was divided by the mass of the mixture. All the elemental contents were first converted to milligram of element per 1 gram of the mixture. The Mg, Na and Ca content in the mixture was established on the basis of the simple equations 1 – 3.
\(Mg=\frac{\sum_{j=1}^{r}\left(I\text{TS}_{j}\bullet\text{Mg}_{j}\bullet M_{j}\right)}{\sum_{j=1}^{r}\left(M_{j}\right)}\left[\frac{\text{mg}}{g}\right]\)(1)
\(Na=\frac{\sum_{j=1}^{r}\left(I\text{TS}_{j}\bullet\text{Na}_{j}\bullet M_{j}\right)}{\sum_{j=1}^{r}\left(M_{j}\right)}\left[\frac{\text{mg}}{g}\right]\)(2)
\(Ca=\frac{\sum_{j=1}^{r}\left(\text{ITS}_{j}\bullet\text{Ca}_{j}\bullet M_{j}\right)}{\sum_{j=1}^{r}\left(M_{j}\right)}\left[\frac{\text{mg}}{g}\right]\)(3)
Where M is the mass of influent material [g]; ITSrepresents fraction of influent dry matter [%]; Na, Mg and Ca represents the fraction of sodium, magnesium and calcium content in the dry mass of material, respectively [%]; j is a number of materials, r is a maximum number of materials.

2.4 Model assumption

2.5 Model description and setup

The below chemical reactions (reaction 4 and 5), after simplified to the reaction 6, were used as the based equation in the presenting mathematical model. The production of methane in previous stages were omitted because methane is mainly produced in the last stage (methanogenesis). These equations refer to the hydrolysis, acidogenesis and acetogenesis stages but of course it is a big simplification.
\({\text{\ \ \ \ \ }C}_{6}H_{12}O_{6}\rightarrow 2\text{CH}_{3}\text{CH}_{2}\text{OH}+{2\text{CO}}_{2}\)(4)
\(2\text{CH}_{3}\text{CH}_{2}\text{OH}+\text{CO}_{2}\rightarrow{2\text{CH}}_{3}\text{COOH}+\text{CH}_{4}\)(5)
\({6C\rightarrow 2\text{CH}}_{3}\text{COOH}\) (6)
Then the two below chemical reactions (reaction 7 and reaction 8) are used to calculate total methane production.
\(\text{CO}_{2}+4H_{2}\rightarrow\text{CH}_{4}+2H_{2}O\) (7)
\(\text{CH}_{3}\text{COOH}\rightarrow\text{CH}_{4}+\text{CO}_{2}\)(8)
The previous model based on three phases (log period, exponential phase, stationary phase 32 ) and it took into account the factors such as: temperature, pH, hydraulic retention time, mass of the substrate, humidity of the mixture, mass of available archaea, specific growth rate, volume of the fermenter, initial carbon content in the dry mass of the substrate, dry mass content in the substrate, content of organic dry matter in the dry mass, initial nitrogen content in the dry mass of the substrate and content of degradable compounds in the dry organic mass. Almost all of them mentioned factors have strong influence on the fermentation process; e.g. humidity of the mixture influence strongly the final methane production. For example, low humidity of the mixture inhibits archaea growth. New model for continuous technology based on exponential phase and additionally includes the above mentioned factors and also considered the influence of the followed factors: biogas plant working days, influent of new substrate, chamber volume and sodium, magnesium and calcium content.