Introduction

In 2019, world pig production was at 1166.4 M head [1]. Pork ranked first in 2020 with 38% of total meat production of the three main types (pork, poultry, and beef), which combined constitute 90% of total meat [2]. China produces 45% of the world's pork, making it the top producer of pigs [3]. In 2020, there was a decline in production due to African swine fever, especially in China. Additionally, the COVID-19 pandemic resulted in limited production to balance supply in the face of uncertain demand [4]. Mexico occupies 13th place in the world ranking, contributing 1.2% of total meat [5]. In Mexico, pig farming is the third most crucial livestock activity after cattle and poultry, and the inventory of pigs for the year 2019 was 18.4 M heads [5].

Pig production is a source of pollution due to the large generation of manure and the consumption of grains for feed [6]. The global pig population produces 1.7 trillion tons of slurry per year [7], causing negative impacts on the environment, including greenhouse gas emissions, eutrophication, acidification, and biodiversity loss [8]. Pig manure is rich in organic and inorganic nutrients (N, P), so it can be used as fertilizer for crops [7, 9, 10]. In addition, the use of biomass as an energy source is already widely applied in sustainability issues related to the consumption of fossil fuels [11]. Alonso-Estrada et al. [12] reported the conversion of 80% of swine organic waste (SOW) into energy, ensuring the cooking of food with the fuel generated and using treated water as irrigation water, ensuring an ecological and economic benefit to the farm.

Managing manure from its generation to its last use on the ground is necessary to achieve a sustainable management direction [10]. Anaerobic digestion is an environmentally friendly process for the recycling of pig waste, which decreases the emissions of methane and nitrous oxide from manure whilst producing energy and high-quality organic fertilizers [13].

Composting is a form of resource recovery from solid waste, as the products are applied to agricultural soils and used in the generation of electrical energy. This process is gaining support globally due to the increase in demand for organically grown food using organic fertilizers [14, 15]. There is endless organic waste that is optimal for obtaining compost, especially in full-cycle pig farms, where non-conventional wastes are generated. These consist of dead animals (carcasses) and remains of placentas, remnants that are a focus of infection, producing bad odors and bad environmental elements. This type of waste can be composted if treated properly [16].

Guidoni et al. [17] evaluated the efficiency of composting dead pigs and loading agents (sawdust, slaughterhouse sludge, and stabilized compost) in different volumes for 120 days. They obtained a compost with a pH of 7.6, electrical conductivity (EC) of 3.8 mS/cm, total nitrogen (Ntot) of 6.1%, and total phosphorus (Ptot) of 3.0%, although it was toxic when applied to different tested seeds. Jeronimo-Romero et al. [18] investigated the feasibility of composting rabbit carcasses with various substrates (oat manure straw, wood manure chips, and oat straw), all with and without microbial inoculum (Streptomyces spp, Aspergillus sp, Cladosporium sp); the best results were found with the mixture of oat straw, whilst the inoculum did not show a significant difference (p > 0.05) between treatments.

Assessing sustainability is an essential facet of these waste treatment systems. Using quantitative tools such as Life Cycle Assessment (LCA) [19, 20], it has been possible to determine the environmental impact of the complete life cycle of various waste management systems. Ramírez-Islas et al. [21] reported the environmental effects of energy production from the treatment of pig manure by medium-scale anaerobic digestion. As evidenced by LCA, this treatment provides important environmental benefits in climate change, photochemical oxidation, and depletion of fossil resources, reducing emissions by 130 kg of CO2 eq and avoiding the use of 729 MJ/t of treated manure when compared to the conventional system that handles manure without treatment.

The aim of the study was to assess the environmental performance of the waste treatment system generated in a pig production farm, which was built with low-cost and easy-to-handle materials, applying the LCI. Likewise, the quality of the valuable products obtained by the treatment was determined.

Materials and methods

System boundary

The definition of the system’s limits is an essential element in the analysis of the LCI since they define all the processes to be considered [14]. The system boundary in this study was chosen to clearly and comprehensively present inputs and products in the treatment of organic pig waste, as well as providing transparent and reproducible results. The selection of the system was based on criteria focused exclusively on the treatment of waste, thus excluding everything related to pig production, since the flows of matter and energy in pig breeding and meat production have environmental effects mainly related to primary products: food production. Additionally, an evaluation of the use of the products generated on the same farm was carried out. The functional unit (FU) was established as the amount of organic waste generated per day on the pig farm.

Study site

Location and description of the farm

The pig farm is of the “Full Cycle” type with an area of 6900 m2, with 60 pig pens and an organic waste treatment area. It has an agricultural area of 19,380.7 m2. It is in Telpintla, Temascaltepec, State of Mexico, Mexico in 1849 masl, Fig. 1. The farm borders hills in the Northeast (245.89 m) and the Telpintla River in the Southwest (420.49 m). The climatological and geomorphological characteristics of the area are a temperate, sub-humid climate with rain in the summer (Cw), average annual temperatures between 18 to 22 °C, and an average annual rainfall of 700–1200 mm [22, 23]. The physiology of the location is hills and complex high mountains with glens, geology of the Neogene period and extrusive basalt igneous rock. The predominant soil is Andosol, and there is a sub-basin of the Temascaltepec River with perennial water currents. The forest vegetation in the municipality has an area of 41,892 ha, and is a transitional forest, with the main species being pine and oak. It has an area of 12,858 ha for agricultural and livestock land use [22].

Fig. 1
figure 1

Location map of the study area (19°3´59" N–100°3´6" W) scale 1:250 000, INEGI [24]. Developed using ArcMap v.10.4

The population of the farm is constantly 1240 pigs: in maternity (100 sows of 220 kg and 204 piglets from 0 to 21 days or 7 kg of weight), pre-initiation (187 piglets of 7–17 kg), initiation (187 pigs from 17 to 35 kg), growth (187 pigs of 55–78 kg), development (187 pigs of 78–110 kg), completion (187 pigs of < 110 kg) and one stallion (280 kg).

Generated waste

The main generated waste on the pig farm is slurry, which constitutes a large volume of solid and liquid waste, which is produced by the daily evacuation of all the animals. The pig pens are washed daily with river water which carries the manure and urine through pipes that lead to a pig slurry storage tank. It should be noted that, due to the level of technology implemented on the farm, the feeders are automated, and the feed is not wasted, so the slurry does not contain this type of waste.

Another generated waste on the farm is carcasses of both piglets and adults. Deaths commonly result from the crushing of sows and starvation in the case of piglets; mortality after weaning is less than 1%. The causes of death among both piglets and adults are due to quarrels between animals or gastric ulcers, as the farm is free of epizootics. Other remnants come from the farrowing of sows, such as placentas, blood, and umbilical cords; approximately eight sows give birth a week, and the approximate weight of the remains in each birth is 15 kg.

Treatment system for organic pig waste

The SOW treatment system facilities comprise an area of 557.95 m2 and are adjacent to the pig farm. The treatment system (TS) involves four subsystems: S1-slurry separation, S2-anaerobic digestion, S3-solid slurry fraction composting, and S4-dead tissue composting (Fig. 2). S1 is located under a covered area of 64.87 m2, and has a concrete tank built with a capacity of 40 m3 where the slurry is received daily, conducted by gravity by PVC pipes of 4” diameter and an extension of 55 linear meters. Using an IPASA slurry pump® model CS230F 1HP, the slurry is transferred to a cascade-type solids separator (IPASA® model SS250) at a height of 3 m.

Fig. 2
figure 2

Diagram of the swine waste treatment system that mainly includes the inputs of matter and energy, process of liquid fraction slurry (LFS) and solid fraction slurry (SFS), and output of products generated (Word)

The liquid fraction of the slurry (LFS) enters S2 by gravity to two distribution tanks of concrete with a capacity of 3 m3 each, connected to a system of six flexible bag-type anaerobic reactors (Biobolsa system®), which are 14 m long, 1.5 m wide, and 1.5 m high. At the top of the reactors, there is a valve for biogas extraction and a trap for hydrogen sulfide. Each reactor is placed within a 0.5 m deep channel coated with textile protection to prevent perforation. The solid fraction of the slurry (SFS) enters S3, an area of 39.41 m2 with a cement floor and roof. The bottom wall is complete, and the other three are half walls for ventilation. Here, the residue is stacked for static composting. In S4, composting is carried out for the waste of dead tissues, with an area of 23.14 m2, located 73.4 m away from the farm. It has nine cement reactors of 3.43 m3 capacity. It is covered with a galvanized sheet roof, and the walls have an uncovered area above the reactors for ventilation.

Energy consumption

The TS of SOW consumes electrical energy in the operation of the pump and of the solid’s separator of the slurry. To transport the sawdust used in the process of composting the tissues, as well as transferring the compost to the plots where it is applied, it uses diesel. The cost of electrical energy was calculated by the operating time of the equipment, and the fuel consumption was quantified in relation to the distances traveled and the performance of the vehicles.

Products

Production and characterization of biol

Sampling points: sample 1, taken at the beginning of the operation of the solids separator (LFS), sample 2, first biol (a product of anaerobic digestion), taken after 18 h of hydraulic retention of the biodigesters (Bi1), sample 3 corresponds to the biol after one hour of operation of the biodigesters (Bi2), and sample 4 after 2 h (Bi3). 2 L of the sample were taken in plastic containers. The temperature and EC were measured with a CONDUCTRONIC brand field meter model PC18, in situ. The samples were transported to the laboratory in containers with ice and were stored in refrigeration at 4 °C until analysis within 48 h. pH (HANNA Instrument potentiometer), chemical oxygen demand (COD), total suspended solids (TSS), Ntot, Ptot, phosphates (PO4), total potassium (Ktot), sulfates (SO4) and total and fecal coliforms (Ct, Cf) were measured according to [25].

Production and characterization of compost

Two types of compost are produced in the treatment system: The first compost is obtained from the solid fraction of slurry (C1), and the second from the treatment of carcasses (C2). The amount of C1 was calculated with the average daily weight of the solid fraction obtained over one month, whilst considering a reduction of 40% at the end of the composting treatment due to the decomposition of the materials and the loss of moisture [26]. For the composting of dead animals and piglets, they were cut into parts with an approximate size of 20 cm, whilst the remains of placentas were processed in their standard size. The waste was deposited on a 20 cm high sawdust base, on top another layer of sawdust of 10 cm was placed for three weeks; the final layer of sawdust was 15 cm. Once a reactor was finished, it was started again with a new pile for the 18 weeks that the process took to complete, obtaining the C2P1 compost. The handling of the compost piles was only one flip in the middle of the process. Subsequently, a second composting cycle was carried out using the product obtained from the composting of the previous cycle instead of sawdust, and the C2P2 compost was obtained. The amount of C2 was obtained by averaging the discarded tissue’s daily weight and sawdust for one month, whilst considering the reduction of 40% at the end of composting. Three samples of 2 kg of C1 in plastic bags were taken from three sampling points: on the surface of the compost pile (C1Ar), in the middle (C1Me, 1 m deep), and at the base (C1Ab). From C2, three samples of 2 kg were taken randomly from two reactors (C2P1 and C2P2). The samples were cold transported to the laboratory, then dried at room temperature for 15 days. A suspension was prepared with distilled water plus samples (1:5 ratio), which was used to measure the pH (HANNA Instruments 162 8521), the electrical conductivity (DR-3900 PerkinElmer conductivity meter), and the organic matter content (OM%) through calcination in a muffle. Additionally, total nitrogen was measured through the Kjeldahl Method, total phosphorus by the Olsen method, potassium with Flamometer CORNING 410C, total and fecal coliforms according to [27], and the percentage of total organic carbon (TOC%) was calculated using the Eq. 1.

$$TOC \%=\frac{\mathrm{OM }(\mathrm{\%})}{1.724}$$
(1)

Biogas production

The daily biogas production of the six anaerobic reactors was measured during the 5 h of operation (which is the entry time of the liquid fraction of the slurry) for one month, using the Metro equipment for biogas (ELSTER BK-G4 MT3059R).

Use of the products

The use of the biogas, biol, and compost obtained after the treatment of waste within the pig farm was identified through the observation and reporting of the farm owner and workers.

Efficiency of the use of biol and compost C1 as fertilizer

A comparative study was conducted to determine the efficiency of the organic fertilizers produced. The compost C1 and biol were evaluated by applying them as fertilizer to the breeding grounds of hybrid corn (Zea mays L.) brand Asgrow variety A7573 from May to September, and grass Rye Grass tetragold (Lollium multiflorum tetrapliode) brand Berentsen from October to April. Crop yields were compared in three plots of approximately 2 ha each. Plot A was fertilized with 2 t/ha of compost C1 at planting time, plot B with 2 t/ha of compost C1 at planting time and 4500 L/ha/d of biol until the harvest. Plot C was used as a control: half was planted with corn that was fertilized with 750 kg/ha of 250–90-45 NPK, applying 80% at planting and 20% at weeding. In the other part, grass was planted, 305 kg/ha of 80–60-0 NPK was applied in the sowing and 100 kg/ha of urea was applied in each cut.

In the plots, different sampling points were selected to analyze the quality of the crop soil (Fig. 3). For Plot A, there were 9 points, 7 for Plot B, and 10 for Plot C, based on the relief and shape of the land. At each point, 3 samples of 2 kg were taken in 3 depth profiles (a) 0–10 cm, (b) 10–20 cm and (c) 20–30 cm. The samples were placed in plastic bags and transported to the laboratory, where they were put in trays to dry for 15 days at room temperature.

Fig. 3
figure 3

Location of sampling points on grass and corn crop plots (19° 3´ 39 " N–100° 3´ 43" W). Google Maps satellite images, scale 1:50,000

Composite samples were formed from each plot by mixing the same depth profiles of some sampling points described in Table 1, sieving them twice with a 2 mm and 0.2 mm mesh. The moisture content (%), pH, EC, OM, Ptot, Ktot, and TOC were determined with the previously described techniques, with Ct and Cf according to [28].

Table 1 Composite samples of the plots soils with the different treatments, taken to different depth

Environment impacts

The possible impacts on water of the adjacent river were evaluated due to potential runoff or leaching from the farm and of the TS. 4 sampling points were selected: point 1: 20 m upstream of the possible discharge of slurry runoff into the river; point 2: discharge itself; point 3: 20 m downstream of the possible discharge and point 4: 40 m downstream of the possible point of discharge. In situ, T and EC were measured with the CONDRUCTONIC brand field meter model PC18. The samples were transported in containers with ice to the laboratory, where they were stored in refrigeration at 4 °C until analysis within 48 h. pH, COD, TSS, Ntot, Ptot, PO4, Ktot, SO4, Ct and Cf were measured according to [25].

Statistical analysis

Descriptive statistics were used: an Anderson–Darling normality test (p < 0.05) and a one-way ANOVA were performed to compare the results between the different sample groups, using the MINITAB Release 12.21 program.

Results and discussion

The information and data of the LCI are reported based on the FU where, daily, the pig farm produces an average of 38.5 m3 of slurry and 18 kg of tissues of dead animals and remains of placentas—waste which enters to the TS. The results of the mass and energy balance are represented in Fig. 4. The LFS and biol's physicochemical characteristics are described in Tables 2 and 3, respectively. The physicochemical characteristics of C1 and C2 are shown in Fig. 5 and are described in Section “Characterization of composts”.

Fig. 4
figure 4

Flowchart of matter and energy within the organic swine waste treatment system and use of the products generated

Table 2 Physicochemical characteristics of the liquid fraction of slurry, obtained of the subsystem slurry separation
Table 3 Physicochemical characteristics of the biol produced in the anaerobic digestion of the treatment system, in different sampling times
Fig. 5
figure 5

Average values of the physicochemical and microbiological parameters of the composts (n = 3). Figure 1a C1 = compost of the solid fraction of the slurry (SFS). Figure 1b C2 = dead tissue compost; C1Ar: superficial samples, C1Me: midpoint samples, C1Ab: deep samples. The letters on the bars indicate the significant differences found in the values obtained at the different sampling points (ANOVA; p < 0.05)

Characterization of LFS

Table 2 shows that the temperature of the LFS was, on average, 1.5 °C higher than the river water temperature (14.6 °C), reflecting the results reported by Terrero et al. [29]. The LFS was the source of nutrients for the microorganisms of the biodigester; they have optimal activity at a pH of 6.6 to 7.6. The average obtained pH was 6.7, a value which is comparable with the results reported by Antonely et al. [30] of 6.78, who proposed a negative correlation of pH with organic carbon. The electrical conductivity found from the LFS in this study was 0.55 times greater than that reported by Ávila [31] for pig slurry without separation treatment in a technical pig production system; the most probable cause for this discrepancy would be the ions concentrated by the separation process. The results obtained for PO4, TSS, total and fecal coliforms were 10.5, 5.6 and 4 times higher, respectively, than the maximum limits allowed by Mexican regulations for wastewater discharge; the PO4 was 86% lower than that reported by Corbala et al. [34], and the quantity of TSS was 93% higher than that reported by Pantelopoulos and Aronsson [32]. The COD was similar to that reported by Blanco et al. [33], which consisted of a study with a pig population of 1,300 head. The concentration of SO4, Ktot, Ptot, and Ntot are reported in Table 2, as well as the values found by other authors. LFS does not have the characteristics to be used as fertilizer.

Energy consumption

The solids separator was in use for 5 h a day, 6 days a week, and used 31 kW/d of electrical energy. This was supplied from the public grid, as the system still does not have a generator that converts biogas into electrical energy, which would allow the farm to be self-sustaining. Diesel is consumed during the transportation of sawdust from a sawmill located 30 km from the farm, as well as during the distribution of compost to plots located at 500 m. The consumption of diesel for the transport of sawdust and pigs back and forth was 20 L; therefore, the total diesel consumed was 3.2 L/d. Corbala et al. [34] propose that the fuel consumed in land transport on a 200 km journey has the highest contribution (31%) to the total formation of photochemical oxidants by nitrous oxide emissions.

Biogas

The main component of biogas is methane, which is slightly lighter than air and has an average ignition temperature of 700 °C (the flame reaches 850 °C) [37]. In this study, the anaerobic reactors are operated at ambient temperature, with an annual average of 17 °C, and a maximum of 30 °C during the rainy season in summer. Cao et al. [38] reported the highest methane production at 37 °C (20.2 L/kg VSfeed/d). Approximately 35 m3 of LFS with a content of 467.4 mg/L of TSS enter the digesters every day. In this regard, González-Arias et al. [39] indicated an increasing trend in the daily production of biogas to the higher organic load provided. The biogas generated in the reactors (35,486.0 m3/d) would be sufficient to meet the electricity needs for the operation of a motor-generator power [40] and be self-sufficient.

On the other hand, Martínez [37] expressed that each m3 of biogas represents 0.0033 barrels of oil equivalent (BOE), which is to say, 305.8 m3 of biogas have an energy content of 1 BOE. The biogas generated here, in part, is used as a burner fuel that produces hot air that is conducted by PVC pipes that ventilate the piglets' houses to maintain a temperature of 18 °C. It is also used for the cooking of food of the farmworkers, as well as substituting the use of LP gas (this last use was also reported by Nhu et al. [41]). Jury et al. [42] said that the biogas generated was injected into the natural gas network. The farm in question does not have a biogas storage system; therefore, the rest of the biogas is burned into the environment. Wang et al. [43] carried out a burning of self-produced natural gas to minimize greenhouse gas emissions, which leads to a process with fewer negative impacts on the environment.

Characterization of biol

A total of 7.7 m3 of biol per day are conducted by ditches to the farmland and are available for irrigation and organic fertilizer. The contribution of Ntot and Ptot is equivalent to 5040.4 and 7883.3 kg/year, respectively. In Table 3, it is observed that the temperature of the biol was increased by 4.3 °C in the 3 hours of observation, which can be related to the time from the first sample taken on the day to the last one, which was at noon. The pH in the biol increased by 0.7 units compared to the LFS; this change can be attributed to the hardness of the water and the production of carbonates during the anaerobic digestion of organic matter [33]. Compared with the results presented by Moretti et al. [44], the pH was slightly lower, and the EC was 2 times lower than in their study; this decrease may be due to the consumption of soluble compounds of the substrate by microorganisms [45]. Biol with an EC of up to 10 mS/cm can be used in soils with low salinity (less than 8 mS/cm) or crops resistant to this characteristic [45]. Another of the parameters that increased with the anaerobic digestion of LFS was the Ptot (21%), with values 7.8 times higher than those reported by Moretti et al. [44], in biol obtained from a 20-day anaerobic digestion process, using flow piston reactors of 3 m in diameter and 12 m in length, in Canada.

The parameters in which a lower average value was obtained in the biol than in the LFS were Ntot (78.9%), TSS (16.2%), PO4 (10.4%), and COD (9.8%). Despite obtaining a significant reduction in Ntot, the value is higher by orders of magnitude in this study compared to the value reported by other authors (Table 3). These variations can be attributed to the type of breeding, feeding, treatment, and management of manure. COD and TSS do not meet the criteria established by USEPA, which indicates a maximum of 250 mg/L and 100 mg/L respectively. This is explained by a short hydraulic retention time (18 h), a period during which the effluent rests inside the digesters each day to obtain a product of low quality. Torrens et al. [46] reported that subsequent treatment of wetlands with a reed (Phragmites australis) demonstrated a decrease of > 75% COD and > 80% TSS.

The average values of sulfates and phosphates were similar in LFS and biol, which means that a longer hydraulic retention time is necessary to obtain greater efficiency in the degradation of organic matter. Fagundes et al. [47] reported that hydraulic retention time (HRT) was the variable that demonstrated a time-dependent effect on COD removal efficiency (R2 = 0.90), whilst other authors refer to a minimum anaerobic digestion time of 30 days [47, 48].

Blanco et al. [33] similarly reported values outside the range established after the digester; however, they had a subsequent treatment of stabilization lagoon, and obtained a COD lower than 544 mg/L. Concerning Ct, the results were within limits established in NOM-003-ECOL-1997 for wastewater discharge (210 mg/L), [49]. On the other hand, the digested sludge requires a period of accumulation in the reactors of approximately two years; in this study the characterization could not be carried out.

Characterization of composts

From the mechanical separation of the slurry, the solid fraction is obtained, which is subjected to a composting process of 3 months; each day, an average of 253.6 kg is added, forming a static conical pile. This system was selected for requiring less investment (facilities and labor), taking advantage of the porosity of the substrate for the oxygenation of the process, and checking the efficiency in the quality of the final product. After the process, a daily amount of 76.3 kg of C1 was obtained: compost was used as a substitute for chemical fertilization in a plot of 2 ha. Its contribution of macronutrients is 798 kg N/year and 14.2 kg of P/year. The physicochemical characteristics of C1 are shown in Fig. 5a, where it is observed that there were significant differences in the content of Ktot (p < 0.000) and Cf (p < 0.001) between the different sample points of the compost pile. The Ktot was in 69.6 g/kg C1Me > C1Ar and 175.6 g/kg > C1Ab; this can be influenced by the best conditions for the process, mainly the temperature and pH in this zone, favoring greater microbial activity.

The fecal coliforms at all sample points were below microbiological limits (≤ 1000 MPN/g) according to different international standards [51]. The number of Cf obtained was in the following order C1Me < C1Ar < C1Ab, which ensures that the composting process was efficient for sanitizing to compost C1 and ensuring crop health and human health during handling. A nutrient imbalance may occur in compost, such as lower availability of Ntot in relation to Ptot content [52], relatively higher compared to Ktot [53, 54], or vice versa [15]. In this study, the content of Ktot was higher than the content of Ptot.

The pH is neutral in all sample piles; the manure contains a pH suitable for the process due to its high content of inorganic carbon and calcium [55]; therefore, the final product results in a pH close to neutrality. Pampuro et al. [26] presented similar results with a pH of 6.9 in compost obtained from SFS in a static composting system. The moisture content at all sampling points was lower (72.8, 7.1 and 85.7%, respectively) compared to the recommended minimum (35%) for commercial compost; this problem occurs when the materials used in composting already have a humidity close to that ideal for composting [17] between 50 and 60% [56, 57]. In addition, during composting, a large amount of water is lost, and the moisture content decreases [57]; it is necessary to monitor the process so that the compost can be kept within optimal ranges.

The OM in C1Ar was higher than C1Me and C1Ab, which could be attributed to better conditions for degradation in this area; similar results (OM 54.4%) were reported by Saez et al. [54] in SFS compost mixed with oat straw. In the same manner, 10% less OM was observed compared to the average reported by Bernal et al. [55] of 58.6% in 13 studies consisting of compost obtained from SFS. This lower value represents a significant degradation of OM, which favorably impacts plant growth and soil fertility when applied as a substitute for chemical fertilizers. The concentration of Ntot was increasing according to the position of the pile (≥ 5.9 g/kg in C1Ab), which suggests the concentration of the compound by gravity; values like the average content of Ntot were reported by other authors [15, 26, 55].

The results of compost C2 are displayed in Fig. 5b, where is observed that the pH in C2P1 is neutral; Matiz-Villamil [58] pointed out that pH can be used to demonstrate the effectiveness of the transformation of OM during the composting process, although they reported lower pH (5.98) associated with the production of secondary metabolites (organic acids). Similar pH results in C2P2 were reported by Guidoni et al. [17] (7.6) in the compost obtained from pig carcasses mixed with sawdust and pig manure (30:50:20). The content of Ntot was 30% higher in C2P1 than in C2P2; the same trend was reported by [17]; the lowest Ntot content was in compost from sawdust, stabilized compost, and dead tissues (50:30:20). The content of Ktot was similar in C2P1 and C2P2; this element is essential in the growth and development of plants [58]; they also reported 50% higher Ptot content than that found in this study. The Cf were 46.2% lower in C2P2; this could be influenced by stabilized compost used in this composting cycle.

Evaluation of biol and compost C1 as fertilizers

Agricultural practices where pig slurry is applied to farm soil could cause nitrate leaching, salinization, and contamination by heavy metals and pathogens, so it is essential to develop environmentally friendly slurry treatment systems to reduce impacts [29]. Figure 6 shows the efficiency of biol and compost C1 in the farm crop plots. A 95.4% higher yield is seen in Plot B than in Plot C (inorganic fertilizer) in corn cultivation and 86.4% for Ryegrass cultivation. Santos et al. [15] reported a higher yield in Ryegrass biomass in their treatments with soil fertilized with SFS compost and cotton residue mixture compared to biomass obtained from inorganically fertilized soil in the first harvest; this yield was due to the more excellent supply of inorganic N available to the plants by the composts. Plot A had a 49.1% higher yield for corn cultivation than Control Plot and 41.6% for Rye Grass. The total harvest of Ryegrass in the results of [15] was higher in treatment with inorganic fertilization, and yields decreased in experiments with compost; however, they reported an efficient use of nitrogen in compost treatments (37.2%) and treatment with inorganic fertilization (89.2%). One of the main limitations when using compost as organic fertilization is that the exact amount of nitrogen available to plants is not known [55]. In this study, as in other findings in agricultural soils [59, 60], the application of organic fertilizers from treated pig manure turned out to be more fertile than raw manure or inorganic fertilization.

Fig. 6
figure 6

Crop yield per plot with the different treatments (fertilizer type), PA compost C1, PB compost C1 and biol, PC inorganic fertilizer

The physicochemical soil characteristics of plots A, B, and C are shown in Tables 4, 5, and 6, respectively. Plot A recorded similar moisture, pH, and EC content at all sampling points and depth profiles. An alkaline pH (8.1) was reported by Ye et al. [60] in the soil where they applied pig manure compost. The OM was decreasing with increasing depth in all samples; Plot A-1a had a very marked peak of OM content (40%) higher than the average of the same profile in samples 2 and 3. The TOC content also followed this trend; in this regard, Ye et al. [60] confirmed that the OM and TOC of soil fertilized with pig manure compost was higher compared to the application of raw manure. The Ntot was similar in Plot A-2 and Plot A-3 following a decrease to greater depth; in Plot A-1, higher content was observed in the profile of 10–20 cm; in the same way, this sampling point obtained higher content of Ptot. Similar results in Ntot content (1.95 g/kg) were reported by [60], with 69% higher Ptot content in soil fertilized with pork manure compost.

Table 4 Physicochemical characteristics of the samples soil taken at different depths in plot A where compost C1 was applied
Table 5 Physicochemical characteristics of the samples soil taken at different depths in plot B where biol and compost C1 were applied
Table 6 Physicochemical characteristics of the soil at different depths in plot C where inorganic fertilizer was applied

Plot B-1 and Plot B-2 slightly increased their moisture content at greater depths (0.3 and 1.3%), but Plot B-3b recorded 10% lower humidity than the adjoining profiles. The pH and EC were very similar between the samples and profiles of this plot. Santos et al. [15] reported soil with a pH of 7.4 before the application of compost with a pH of 6.8. Edesi et al. [9] found that the pH of the soil did not change based on the treatment applied (without fertilization, with inorganic fertilization, with raw slurry, and with acidified slurry), remaining neutral. The OM content gradually decreased at greater depth in Plot B-1 and Plot B-2; Plot B-3 b registers 52% lower content than plot B-1a. A decreasing trend in Ntot content was observed at greater depth in all samples, also following the trend (Plot B-1 ≥ Plot B-2 ≥ Plot B-3). The highest content of Ktot was in PB-3b while the lowest was in Plot B-3c; Plot B-1 and Plot B-2 were decreasing their content to a greater depth.

Plot C-2 had lower moisture content and pH, especially in the profile of 0–10 cm; the EC had no variation between the samples and the profiles. OM content was higher for Plot C-2c and lower for Plot C-1c. The content of Ntot was higher in Plot C-1 and lower in Plot C-3; no changes were observed between the profiles. Ktot content was higher for Plot C-2b and lower for Plot C-1b.

The OM in all plots is above what is established in NOM-021-RECNAT- 2000 [61] for a crop soil (3.6–6.0%), whilst Plot A and Plot C have, on average, 8.8% each, and Plot B has the highest content (9.4%) according to the greater contribution of both C1 compost and biol. The pH range should be from 6.6 to 7.3; Plot B recorded the lowest pH in most of its sample points: Plot B-1abc, Plot B-2abc, Plot B-3ab were, on average, 6.3. All the plots were above and were established by the norm in the content of Ptot; this is due to the origin of the fertilizers applied in each of them; the biol and compost C1 are attributed to the feeding of the pigs based on sorghum, which is rich in phosphorus. The average content of Ntot was similar for Plot B and Plot C (1.18 and 1.20 g/kg, respectively), and Ptot was more significant; Plot C was 6.6% higher than Plot B, and 11.6% higher than Plot A. This indicates that the substitution of inorganic fertilizers for products obtained from the treatment of organic pig waste is feasible. In this regard, Heming [59] reported that, after two years, the P equivalent of fertilizer per ton increased by 0.49 kg/t in the soil (depth 15 cm) by applying pig manure fertilizer.

Environmental impacts

One of the most critical disadvantages, mainly for the population close to waste treatment systems, is the contamination of surface water with manure due to the possible consumption of microbiologically contaminated water [62, 63]. In Mexico, 80% of aquatic ecosystems, including bodies of water such as rivers, are under some degree of pollution. It has been detected that the primary pollutants are organic matter, nutrients (nitrogen and phosphorus), and microorganisms (fecal coliforms) [64]. The physicochemical characteristics of the river water are shown in Table 7, where it is observed that the pH value at all sampling points is neutral; in this regard, the environmental standards in water quality of the EU indicate values between 6.5 to 9.0 for water with use in agriculture [65]. COD is a parameter that reflects water pollution by the content of organic matter since it affects the decrease in the content of dissolved oxygen in water bodies with the consequent affectation of aquatic ecosystems as indicated by the Water Quality Index (ICA). The values found at the sampling points are less than 10 mg/L, so it is classified as Excellent, that is, uncontaminated according to this index. COD was not even perceived at 20 and 40 m after the possible discharge of contaminants from the organic waste treatment system. Ntot content in the river water was, on average, very low (32.5 μg/L).

Table 7 Physicochemical characteristics of river water in four sampling points, taking as reference the possible discharge site of contaminants from the farm

International Environmental Standards indicate that for agricultural water of 20 mg/L [65], concentrations less than 5 mg/L of Ntot in the water indicate that they do not present any restriction for its use as irrigation water [64]. Phosphate concentration induces eutrophication in water bodies. The values in this study were less than 0. 1 mg/L in all sampling points; in this regard, Pérez et al. [66] indicated that values greater than 2.53 mg/L of phosphates indicate a hypereutrophic condition in most of the sampling points of the high current of the Lerma River; with such a reference, we can indicate that the water of the Telpintla River has no risk of presenting any degree of eutrophication. Sulfate is present in most natural waters, and the guidelines of the Drinking Water Quality of the European Union, which are the most recent (1998), complete, and strict, suggest 250–300 mg/L of sulfate in water intended for human consumption. The values found in river water are well below these standards, despite the fact that the water is not for human consumption. In addition, all the sampling points of the water of the Telpintla River did not show contamination by total and fecal coliforms. For all the above, we can consider that the treatment system of organic pig waste has not caused any affectation by possible polluting discharges in the Telpintla River.

Conclusions

The pig farm, through the treatment of organic waste, produced 35,486.0 m3 of biogas, 7.7 m3 of biol, and 82 kg of compost per day. All the products are reused, tending to implement a circulating economy on the farm. The biogas replaced the use of LP gas for cooking food, and heating piglet cabins. The biol replaced inorganic fertilizers in growing plots. Nevertheless, the biol needs more efficient treatment, since COD and TSS do not comply with the criteria established in the regulations.

The composts proved to have good nutritional content, and to be biologically safe, which ensures the health of the crops and safeguards human health during their handling. Both biol and compost C1 showed the best yields from growing Ryegrass and corn on the plot where they were applied in combination. The water of the river and the soil of crops did not show any effect due to discharges from the pork organic waste treatment plant.

The analysis of the results allowed the identification of opportunity areas for the system redesign to be carried out and to increase its efficiency. The treatment system may serve as a model to promote the sustainable production of agri-food value chains and contribute to the mitigation of impacts on the environment and human health.