MATHEMATICAL TOOL TO SIZE RURAL DIGESTERS

Anaerobic digesters have been highlighted due to the current energy crisis and its consequent search for alternative energy sources, allied to the intense process of livestock farming and agriculture modernization, which besides demanding a lot of energy, produces a great amount of crop and animal residues, most of the times generating sanitary problems. The aim of this work is to provide a mathematical tool to establish parameters for projects of construction of rural digesters, considering the response to energy demand, the suitability of the dimensions of the systems, yield factors and the guarantee of functionality. Non-linear optimization models, of easy resolution, for the three main types of rural digesters were formulated in this way. With the resolution of these models one can determine the height and the diameter that lead to a minimum volume for each type, so reducing the necessary amount of masonry and, consequently, diminishing the cost.


INTRODUCTION
The agriculture in Brazil has experienced an intense modernization process, and this has brought a significant increase in energy demand, volume of animal dejection, and crop residues, many times giving rise to sanitary problems.A very efficient alternative to this problem is the controlled recycling of these residues in digesters, with the consequent production of biogas and biofertilizers, which constitute a high-value energetic input for farming exploration.Digesters have demonstrated considerable socio-economic benefits worldwide.United States of America and Canada have been giving special emphasis to the development and research on anaerobic biodigestion, in addition to countries like China and India, which have extensive programs for implementing digesters.In Brazil, rural areas have recently received support to implement them.
China is the second largest energy consumer of the world and is responsible for good part of the greenhouse-effect gases that are thrown into the atmosphere, and thus has invested heavily in environmental protection projects and in the generation of renewable energy.With the adoption of this policy, the Chinese government has substantially stimulated research toward the construction, operation and efficiency of digesters (Sinton et al., 1998;Chen, 1997;Sinton et al., 2000;Martinot, 2001).
Since the 90's, India has supported projects involving studies related to the generation of renewable energy.To that effect, a series of strategies and political initiatives have been built to support research and for the generation and utilization of this type of energy, which have favored programs of sustainable development in that country.Within this context, the anaerobic digestion has acquired projection also (Naidu, 1996;Chanakya et al., 1997).The concern with issues related to the generation of renewable energy and environmental protection is global.These two subjects have much in common, because in order to meet the increasing demand for energy, many primary sources have been utilized, with preference to those that are easier to obtain.Thus, petroleum, coal and natural gas have taken a preponderant role.However, these are fossil energy sources, non-renewable and, therefore, subject to depletion.In addition, they present great environmental impact due to the formation of CO 2 and sulfur gases as they are burned or transformed.Thus, a conscientization process is developing toward people becoming familiar with techniques that will allow the rational use of energy, as well as seeking alternate sources to replace petroleum, both for energy production, raw materials and input for industrial plants.In this respect, digesters have played a very important role (Hall, 1997;Groscurth et al., 2000;Chanakya et al., 1997;Martinot, 2001;Naidu, 1996;Sinton et al., 2000).
Research involving rural digesters has been aiming at projects that are economic and have very good performance (Adeoti et al., 2000;Aburas et al., 1996;Ortolani et al., 1991).With that in mind, a study was done on the optimization of models, which is helpful in determining project parameters and minimizing costs of rural digesters, taking into account energy needs, along with the dimensioning of the systems, capacity factors, and assuring functionality, which can be an excellent analysis instrument for system designers.

BIODIGESTERS
A digester basically consists in an anaerobic fermentation tank for fresh organic materials, called substrate or biomass, yielding fuel gas composed essentially of methane (CH 4 ) and carbon dioxide (CO 2 ).This mixture is called biogas and its utilization is very diversified.In rural areas, biogas is utilized to a great extent for cooking, heating and illumination, as well as in refrigerators and incubators.Another product obtained from the biodigestion is the biofertilizer, which is the residue of organic matter fermentation.
Digesters are classified according to their complexity, and this varies from country to country, depending upon experience, availability of results to work out projects that are more adapted to each situation, technical, scientific and economic development, and different types of construction materials and raw materials available for digestion (Benincasa et al., 1991).
Biodigesters are built to satisfy distinct objectives.In India and China they are used to produce fuel critically needed in rural areas and the effluent is utilized as fertilizer.Most units are built for home use, having lowcost projects.In the United States, digesters are aimed at meeting energy production and waste treatment, especially with regard to animals in farms, allowing the manipulation of a material free of odors.(Ortolani et al., 1991;Chen, 1997).
In Brazil, digesters are referred to as "conventional" and "non-conventional", in view of the relations between the characteristics of the organic residue that is utilized as substrate and the type of reactor deemed most efficient to process it (Benincasa et al., 1991).Morga (1983) establishes the following criteria to characterize organic residues: residues having a solid biomass, as, for example, residues containing substrates not subject to pumping; residues with a semi-liquid biomass, containing substrates with a total solids concentration greater or equal to 4% (Mass/volume) and subject to pumping, and liquid biomass residues, subject to pumping, with a total solids concentration smaller than 4%.
In general, conventional digesters are considered in Brazil as those utilized to process liquid raw materials with a high content in solids, also called rural digesters, the fermentation chamber having a volume below 100 m 3 .Conventional reactors installed without any type of mechanism to reduce the retention time during which the biomass remains inside are predominant; these systems are fed discontinuously (known as Discontinuous or Batch Digesters), or fed periodically (known as Continuous-Flow Digesters).
Batch digesters are loaded at once, maintained closed for a convenient period, and the organic matter is fermented and then unloaded at a later time.It is quite a simple system with small operational requirements.Installation can be made in an anaerobic tank or in a series of tanks, depending on the biogas demand, availability and amount of raw materials to be utilized.
Continuous digesters are frequent in small and middle-size rural communities.They are an interesting option for the utilization of different plant and animal organic residues, usually requiring daily loading and residue management.The process is referred to as continuous since to every daily load corresponds a similar-volume load of fermented material.The biomass inside the digester moves through by the difference in hydraulic heat, between the substrate entering the digester and the biofertilizer coming out when unloading.Each load requires a retention time, usually between 30 to 50 days, depending whether the temperature in the environment in which the digester is placed is high or low.Continuous digesters can have their retention period reduced by the introduction of agitation and heating.One limitation of these models is that the raw material needs to be diluted.The great advantage of these digesters over the batch type is that a single unit allows a continuous supply of biogas or biofertilizer and the continuous treatment of small amounts of waste, as compared to non-conventional models.Other technical comparisons can be seen in Benincasa et al. (1991) and Ortolani et al. (1991).
The ideal temperature for anaerobic digestion, in the mesophilic range, is approximately 35 o C. In order to maintain this temperature inside the digester it is necessary to utilize a thermal insulation and heating system, especially in large-scale digesters.This is important, since in higher temperatures the reaction is faster, leading to the requirement of a smaller-volume digester which, consequently, has lower installation costs.
In small units, subject to tropical climates, digestion occurs irrespective of temperature control, Scientia Agricola, v.60, n.1, p.185-190, Jan./Mar.2003 whereas in temperate climates the drop in temperature during winter causes a marked reduction in the production of gas, definitely requiring the use of a temperature control.Under any other situation, the installation of thermal insulation and heating systems should always be the end result of cost analysis (Benincasa et al., 1991).Fry (1974) describes a method for thermal insulation in horizontal digesters; the procedure consists in coating the side walls with superimposed layers of dry dirt and asbestos.The possibility of using plastic material as insulation is also mentioned.
The form of agitation is another important factor in the process of biodigestion.Light agitation increases the velocity of digestion, differently from heavy agitation, which decreases the velocity of reaction.In digesters with capacities higher than 100 m 3 , it is necessary to install equipment to provide agitation of the contents.
This work presents results for continuous and batch digesters, with capacities below 100 m 3 .In the case of continuous digesters we focused on classical models from India and China, since they are the most suitable types for small and middle-sized rural communities.The batch digester is a system that is very simple and suitable for rural properties in which the biomass availability occurs during long periods.
The literature on rural digesters is extensive, and some papers present project suggestions and dimension definitions (Aburas et al., 1996;Chanakya et al., 1997;Ortolani et al., 1991;Adeoti et al., 2000).There is also a great concern with respect to obtaining a safe form of projects that meet certain energy needs, without over or under sizing the equipment.Ortolani et al. (1991) propose a methodology that, based on a capacity factor and on a daily energy demand, allows dimensioning systems for the Indian, Chinese and batch-type digesters.These models are very appropriate for small rural properties, since the available biomass presents high solid contents and the energy demand is low, which allows for the construction of digesters featuring fermentation chambers with volumes below 100 m 3 , where the use of agitators, inoculants and temperature controllers, which are technologies that increase their total cost, is unnecessary.
In the methodology proposed by these authors for the construction of digesters in brickwork and iron sheet, some data on energy consumption in the property (engines, illumination, cooking, heating, etc) and some initial parameters are needed, such as the internal height and diameter for the digester.Based on these data, all elements of the project can be calculated (volume and dimensions of the gasometer, sheet metal thickness, ballast, dimensions of inlet and outlet pits and internal walls when applicable, etc).At a later time the amounts of brickwork materials and sheet metal necessary for the construction of the digester that has been dimensioned will also be calculated.
Even though this is an excellent methodology, the greatest difficulty that arises in this project is estimating the initial parameters for the digester, which are obtained by trials that are usually not successful since some calculations have to be reviewed at the end of the project.Another concern is to develop projects that feature low digester construction costs, in view of the economic difficulties faced by small rural properties.
In this sense, this project contributes with a mathematical tool that, together with the methodology proposed by Ortolani et al. (1991), is able to offer excellent results for rural digester projects.This tool consists of an easy resolution non-linear programming model, where the objective is to minimize the volume of the digester, when subject to all restrictions that assure the necessary characteristics of functionality, efficiency and of satisfying the demand for biogas, thus selecting an optimal value for the initial parameters necessary in the project, avoiding trial and error.Consequently, this model will aid in implementing projects with lower costs, since this is associated to the size and type of materials that will be used in the digester.It also ensures that over or under sizing of materials will not occur.
The mathematical models presented in the following section aid in dimensioning Indian, Chinese and batch-type digesters.The specific consumptions for each biogas-consuming appliance and their utilization time during the 24 hours per day are deemed as known.With these data, it is possible to estimate the daily volume of biogas needed (in m 3 ).The idea is to work with the minimum value of the digester's gross volume, but maintaining all necessary characteristics for a good performance and for meeting the demand of the rural property.

MATHEMATICAL MODELS
The optimization consists in a mathematical technique for the best-possible performance of all available resources.In the optimization process, the Nonlinear Programming, by means of the various computing methods, is a mathematical tool utilized to achieve this better performance, consisting in modeling and solving optimization problems in a non-linear function, with or without restrictions.To solve these problems, some computing methods are utilized, the implementation of which consists in operations that involve calculations with computing details.
Even though these methods many times present great complexity in the calculations and convergence to the optimal solution, the models presented here have characteristics that facilitate their resolution.Among the Non-Linear Programming methods, the method that solves the models is the Quasi-Newton, and its convergence is guaranteed.This method can be seen in detail in appropriate literature (Luenberger, 1984;Lasdon, 1970) and its computing procedure can be found in several commercial packages, as, for example, the SAS System and MATLAB.The mathematical models for aid in the dimensioning Indian, Chinese and batch-type digesters, are now presented.
The Indian-type digester basically is comprised of a cylindrical body, gasometer, feed pit and outlet pit, (Figure 1).Ortolani et al. (1991) established a methodology for dimensioning rural digesters, without the use of agitators, heaters and temperature controllers, having the ability to meet an energy demand of up to 25 m 3 of biogas per day.To ensure functionality, they describe the essential factors for dimensioning the Indian-type digester, which are: volume of biogas needed per day; peak consumption; volume of biogas that should be stored at the beginning of each high-demand period and in the minimum-consumption period; maximum pressure necessary for the normal operation of appliances; usable and gross volumes of the digester; sheet metal thickness, volume, weight and ballast of the gasometer; level of the substrate; bottom height and usable volume of the inlet pit; height of digester's wall above the level of the substrate; positioning of the inlet and outlet pipes; height and width of the partition wall; internal diameter of upper wall and supporting base.
In the cited references, a procedure is presented and discussed for the calculation of all these factors, many of which are dependent of the gross volume of the digester.To calculate this volume the authors determine, by trial, the internal diameter (D) and height (H) of the digester, following the expressions that ensure its good performance, as discussed by the author.One difficulty presented by this method is that by the end of the calculations it is usually necessary to adjust the measures, by applying corrections to the values initially chosen for the mentioned parameters, as demonstrated below for the Ortolani et al. (1991) methodology.
A non-linear programming model that eliminates the difficulties presented in the case of Indian-type digesters, which can be easily solved by standard optimization techniques, is now proposed: where p = (π/4); D is the variable that represents the internal diameter of the digester (in m); H is the variable that represents the height of the digester (in m); x is the minimum percentage to be added to the usable volume of the digester; K is the capacity factor, which can be found in the literature for each type of feed material for the digester; B is the daily energy demand (in m 3 ) and K B represents the usable volume of the digester, which obeys the relation 2 ≤ K B ≤ 25.This model determines the values for the internal diameter D and height H, so as to minimize the volume of the digester, subject to restrictions (2) that ensure the local energy demand and the other, from (3) to ( 5), that are associated with dimensioning a system that is suitable for small rural properties, capacity factors and functionality, as discussed in Ortolani et al. (1991).
The Chinese-type model digester is comprised of a cylindrical body, two spherical domes, inlet pit, outlet pit and an inspection opening, (Figure 2).This type of digester does have an automatic effluent outlet, it operates under variable pressure, as pressure increases or decreases, produces the flowing and reflowing of the substrate through the outlet hole.These aspects establish the difference between this model and the Indian-type, and the methodology presented in Ortolani et al. (1991) is based on the volume of substrate necessary to produce biogas sufficient to meet a daily energy demand, and this is considered as the volume of the digester.The factors for dimensioning the Chinese-type digester are: capacity factor; volume of biogas needed per day; height, radius and center of the gasometer spherical dome; height, radius and center of the bottom spherical dome; height and diameter of the inlet pit; height and diameter of the outlet pit; sinking of the bottom dome in the ground and retention period.Based on these factors it is possible to determine the biogas maximum storage pressure and the volumes for the digester, cylindrical body, gasometer dome, bottom dome, daily restocking and biogas stored at maximum pressure.These calculations, as well as the calculations of other variables are made based on the height and diameter of the cylindrical body of the digester.In this case, the authors also determine this height and diameter by trial, and review the calculations if a bad choice was made.A mathematical model to determine the height and diameter of the cylindrical body of the digester is proposed below.
The objective function ( 6) of the non-linear programming problem presented ahead represents the sum of volumes of the cylindrical body and the bottom dome.This sum gives the digester volume.Therefore, we are interested in determining the height H and diameter D of the digester cylindrical body, taking into consideration the proposed relations so that the performances of the digesters are not substantially modified, ( 8) and ( 9), and to ensure that the demand is met (7).Where p 1 = (π/4); p 2 = (49π/3072); D is the diameter of the cylindrical body (in m); H is the height of the cylindrical body (in m); K is the capacity factor and B is the daily energy demand (in m 3 ).Batch-type digesters consist basically of a cylindrical body, a floating gasometer and a gasometerguiding structure.These are loaded at once and unloaded after a convenient fermentation period, produce biogas in the form of peaks, do not have an inlet or outlet pit, or a partition wall.These aspects differentiate this type of digester from the ones already presented.
Batch-type digester projects require calculations of the internal diameters of the digester and upper wall; height of the level of the substrate; diameter, idle and useful height of the gasometer; free height for gasometer displacement; digester wall height above the level of the substrate and gasometer height above the digester wall (Figure 3).
The methodology presented by Ortolani et al. (1991) takes into consideration that loading is performed only once and fermentation time is long, adapting for the continuous energy needs; for that purpose a battery of biodigesting units is adopted, based on observation of the biogas production behavior during the expected fermentation time.The minimum number of biodigesting units is given by the smallest integer value that is greater than or equal to the ratio between the serviceable fermentation period and the frequency in days when the availability of biomass occurs in the property.The volume of each digesting unit is numerically equal to the amount of substrate intended to be fed into the digester (in kg), since the substrate density under consideration is practically equal to one.In this methodology, the internal diameter of the digester and height of the substrate level are also determined by means of trials.This project proposes the calculation of these parameters by the mathematical model that follows.
where p = (π/4); D is the variable that represents the internal diameter of the digester; H is the variable that represents the height of the level of the substrate; VD is the volume of substrate that is intended to be placed into the digester (in m 3 ).The objective function (11) represents the usable volume of the biodigesting unit.The model determines height H and diameter D so as to minimize this volume, meet energy needs (12) and performance relations, from (13) to (15).Ortolani et al. (1991) illustrate their methodology for dimensioning digesters proposing a problem for each model under study.To solve them, estimates are made for the values of parameters H and D of the digester, by means of trial and error, and thus determine the measures that allow the complete execution of the project that meets the required energy needs.

APPLICATIONS
Table 1 shows, for each of the following illustrations, the comparisons between values found for parameters D and H by the trial and error method and by the mathematical models proposed in this work.For model resolution, PROC NLP of module OR in the SAS System was utilized, processed in a Pentium III-450 microcomputer with 128 MB RAM.
The proposed problem relates to the evaluation of the dimensions of an Indian-type model digester, in brickwork, with a iron sheet gasometer, that meets the daily energy needs for: cooking for 5 people, operation of a 5 HP engine for one hour, illumination during 4 hours with six 40W lamps and shower for 5 people.The working schedule for these appliances, type and dilution of raw materials to be used in the digester, capacity factor, and pressure and retention period are presented.In the case of the Chinese-type digester, it is desired to know, for the same problem previously described, the dimensions of a Chinese-type model digester, capable of supplying the required needs.In the case of the batch-type digester, it is desired to know the dimensions of a battery of batch-type digesters to be used in a property having biomass availability every 65 days, with 85.5% total solids, and with a daily need of 15 m 3 of biogas, and a peak of consumption at 10 m 3 .All data necessary for this dimensioning are presented in the application.

Table 1 -
Comparison between values found for D and H by the trial and error method and by the non-linear programming model, for Indian, Chinese and batch-type digesters.