CET 97 DOI: 10.3303/CET2297040 Paper Received: 7 July 2022; Revised: 21 September 2022; Accepted: 29 September 2022 Please cite this article as: Chee W.C., Ho W.S., Bong C., Hashim H., Wong K.Y., Zubir M.A., Lim L.K., 2022, Mathematical Modelling for Organic Waste Resources Targeting and Optimization using Carbon-to-Nitrogen Ratio, Chemical Engineering Transactions, 97, 235-240 DOI:10.3303/CET2297040 CHEMICAL ENGINEERING TRANSACTIONS VOL. 97, 2022 A publication of The Italian Association of Chemical Engineering Online at www.cetjournal.it Guest Editors: Jeng Shiun Lim, Nor Alafiza Yunus, Jiří Jaromír Klemeš Copyright © 2022, AIDIC Servizi S.r.l. ISBN 978-88-95608-96-9; ISSN 2283-9216 Mathematical Modelling for Organic Waste Resources Targeting and Optimization using Carbon-to-Nitrogen Ratio Wan Choy Cheea, Wai Shin Hoa,*, Cassendra P.C. Bonga, Haslenda Hashima, Keng Yinn Wongb, Muhammad Afiq Zubira, Lek Keng Lima aFaculty of Chemical and Energy Engineering, Universiti Teknologi Malaysia (UTM), Skudai, Johor, Malaysia bFaculty of Mechanical Engineering, Universiti Teknologi Malaysia (UTM), Skudai, Johor, Malaysia hwshin@utm.my Organic waste is one of the major components found in solid waste disposal. The increasing production of solid wastes reflects the great potential of organic wastes as one of the green energy resources. The organic wastes can be used to generate green energy resources such as biomethane via designated bioprocesses. Each bioprocess is unique and requires an optimum range of carbon-to-nitrogen ratio to obtain the optimum production energy resources. The composition of organic wastes varies across different origins and different types. A non-linear programming mathematical model was developed to allocate the resources and satisfy the carbon-to-nitrogen ratio among the sources and sinks via General Algebraic Modelling System. The objective function of the model is to minimize the utilization of external supply to reduce the necessary of transporting external resources from a distant location. To satisfy a biomethane digester demanding daily 40 kg/d feedstock with carbon-to-nitrogen ratio of 28.1, 193.387 kg/week of external supplies were required to mix with 2212.572 kg/week of organic waste locally available to produce 115.2 m3 CH4/d. A biogas storage with capacity of 52.86 m3 was determined from the model. A storage with a capacity of 689.43 m3 was identified to store the unutilized corn stover but the storage does not show practical usage as the daily accumulation of corn stover increases from day 1 to day 7, where the unutilized organic waste will be disposed at the end of the week due to unavoidable composition change during biodegradation. The results obtained from the developed mathematical mode can be a preliminary analytic tool that provides governments, agencies and industries intended to invest and contribute to the green and sustainable waste management sectors. 1. Introduction According to World Bank, the estimated annual waste production will reach 2.59 Bt by 2030 (Kaza et al., 2018). Open dumps and landfills are the most common waste management methods that are being practiced worldwide. With 44 % of the total global waste composition, food and green wastes ranked at the top across a variety of waste categories. The methane emissions resulting from the decomposition of food waste in the open landfills worsen the greenhouse effect as it was being recognized as a greenhouse gas that is 84 times more potent than CO2 when released into the atmosphere for the first 20 y (Etminan et al., 2016). The conversion of organic wastes to biomethane via anaerobic digestion is a promising method to deal with the disposal of organic waste at the open landfills. According to Kalaiselvan et al. (2022), the process of converting organic waste to value-added products required to meet with the optimum operating condition and parameters such as temperature, pressure, pH, organic loading rates and carbon-to-nitrogen (C/N) ratio. Co-digestion is an effective method to adjust the C/N ratio of the feedstock required by biomethane production (Siddiqui et al., 2011). Mixing multiple organic wastes with different quality (C/N ratio) and quantity (daily availability) to satisfy the quality and quantity parameters demanded by biomethane is a crucial and complex task. Mathematical optimization was being performed on optimizing the biogas production and utilization that focus on the mode of transportation and purification pathways (Mohtar et al., 2021). Graphical Pinch Analysis (Chee et al., 2022) and cascade table analysis (Ho et al., 2012) were done to determine the biogas storage and organic waste storage (Chee et al., 2021). The fluctuation of daily availability for multiple supplies has not been tested 235 to satisfy the demand side in previous studies with the support of storage system. It is significant and crucial to fill the gap as multiple supply will form a complex mass balance that is not easily solved via graphical method within a short period of time. A mathematical model will be developed as a powerful preliminary study tool that is able to handle multiple supply streams while determining the mass flowrate allocation from each supply to demand side, the capacity of biogas storage and organic waste storage. The outcome of this study will provide a vision for the decision makers such as governments, agencies and industries that intend to contribute to green and sustainable waste management sectors. 2. Case study In this study, the organic wastes locally available (OWLA) were valorized into biomethane as a renewable energy source to sustain the energy demand of an illustrated case study with 50 houses in an urban area. The average electricity demand during weekends and weekdays was 25.8 kWh/d and 21.9 kWh/d (Ahmed et al., 2017). A microscale biomethane digester that operates on continuous feed and continuous production mode is demanding daily feedstock mixture with a C/N ratio of 28.1, from the results of mixing multiple organic supply from OWLA (e.g., dairy manure, i1, swine manure, i2, kitchen waste, i3, rice straw, i4, and corn stover, i5) with the backup supply from external sources, ES (e.g., chicken manure, ix1, vinegar waste, ix2 and rice husk, ix3). The daily availability for each OWLAs and energy demand fluctuated and the trends were assumed to be repeating weekly. The biomethane was expected to produce four weeks after the feedstock mixtures were fed into the biomethane digester. To ensure the daily production of biomethane was able to meet the daily energy demand, a biomethane storage tank and storage tank for each OWLA were required. A set of illustrative daily energy demands for 50 houses and the daily OWLA availability were listed in the second column of Table 5 and Table 1. In this study, Monday was denoted as first day of the week, Day 1 and Sunday was the last day of the week, Day 7. The daily availability of OWLA, as shown in Table 1, is denoted as the ultimate total mass flowrate, UTMFi (kg/d), where the term ultimate, U indicates the total solid percentage, TS % and volatile solid percentage, VS % of each organic waste are considered in that mass flowrate and the term total, T indicates all the elemental compositions (C, H, O, N and other components) are considered in that mass flowrate. The daily mass flowrate demanded by the biomethane digester, MFj (kg/d), as in Table 2 only accounted for the mass flowrate of C, Cj (kg/d) and N, Nj (kg/d). In this study, the term with subscript “i”, “ix”, “j”, “ij”, “ixj”, “(d)” representing OWLA, ES, demand, OWLA to demand, ES to demand and daily-related detonation. The subscript “source” represents that term substitutable with “i” and “ix”. The superscript “element” indicates the term is substitutable with the individual elemental composition, “C”, “H”, “O”, “N”, and “others” that representing carbon, hydrogen, oxygen, nitrogen, and other compositions. Table 1: Daily availability of OWLA for a week Organic waste locally available, OWLA (i) Daily availability, UTMFi(d) (kg/d) Day 1 Day 2 Day 3 Day 4 Day 5 Day 6 Day 7 Dairy manure (i1) 78 76 84 89 88 79 76 Swine manure (i2) 23 27 30 28 29 21 26 Kitchen waste (i3) 129 141 137 122 146 149 145 Rice straw (i4) 60 55 56 54 60 59 57 Corn stover (i5) 100 116 109 113 120 102 118 Table 2: Daily demand of biomethane feedstock Demand, D (j) Daily availability, MFj, (kg/d) Day 1 Day 2 Day 3 Day 4 Day 5 Day 6 Day 7 Biomethane (j1) 40 40 40 40 40 40 40 Table 3: Elemental compositions of OWLA Organic waste locally available, OWLA (i) C/N ratio C (%) H (%) O (%) N (%) Others (%) TS (%) VS (%) Dairy manure (i1) 13.4 37.6 5.1 28.9 2.8 25.6 38.5 28.8 Swine manure (i2) 15.8 34.8 4.7 30.3 2.2 28 30.4 22 Kitchen waste (i3) 20.3 52.9 7.9 22.5 2.6 14.1 26.3 22.7 Rice straw (i4) 44.1 39.7 5.4 38.2 0.9 15.8 92.9 81.6 Corn stover (i5) 54 43.2 5.9 40.2 0.8 9.9 84.9 76.9 236 Table 4: Elemental compositions of ES External supply, ES (ix) C/N ratio C (%) H (%) O (%) N (%) Others (%) TS (%) VS (%) Chicken manure (ix1) 10.6 35.9 5.1 30.5 3.4 25.1 25.9 19.5 Vinegar waste (ix2) 22.9 43.6 6.1 39.7 1.9 8.7 92.4 84.8 Rice husk (ix3) 103.5 41.4 4.9 35.3 0.4 18 90.2 74.3 3. Methodology 3.1 Calculate the equivalent CH4 demand for 50 houses According to Suhartini et al. (2019), 10 kWh of energy is equivalent to 1 m3 of CH4. The daily electricity demand, DE(d) (kWh) of 50 houses was converted to the equivalent amount of CH4 demand, DCH4(d) (m3 CH4) by multiplying with the energy-methane factor, Fe-CH4 (0.1 m3 CH4/kWh) as shown in the third column of Table 5 via Eq(1). DCH4(d) = DE(d)× Fe-CH4 (1) 3.2 Perform cascade analysis to determine the biogas storage capacity Biogas storage was required to ensure the fluctuating daily CH4 demand was satisfied with the limited daily OWLA availability. The capacity of the biogas storage tank was calculated via cascade table analysis as illustrated in Table 5. The biodigester was assumed to have a steady daily production of methane, PCH4(d) (m3 CH4/d), calculated by averaging the DCH4(d) (m3 CH4/d), for a week via Eq(2) where Nday is the number of days in a week, 7 d. The net daily methane available, NCH4(d) (m3 CH4/d) was calculated by deducting the value of DCH4(d) from PCH4(d) as shown in Eq(3). The daily cumulative methane, CCH4(d) (m3 CH4/d) was calculated via Eq(4). The CO2 and NH3 gases were produced as side products during anaerobic digestion in the biomethane digester. The daily stoichiometric production of CO2 and NH3 were calculated via Bushwell’s Equation as in Eq(5). PCH4(d) = ∑ Dd CH4(d) Nday (2) NCH4(d) = PCH4(d) - DCH4(d) (3) CCH4(d+1) = CCH4(d) + NCH4(d+1) (4) CcHhOoNn + �C- h 4 - o 2 + 3n 4 � H2O → � c 2 + h 8 - o 4 - 3n 8 � CH4 + � c 2 - h 8 + o 4 + 3n 8 � CO2 + n NH3 (5) Table 5: Cascade table analysis to determine the methane storage capacity Time (d) DE(d) (kWh) DCH4(d) (m3 CH4) PCH4(d) (m3 CH4) NCH4(d) (m3 CH4) CCH4(d) (m3 CH4) Day 1 1,113 111.3 115.2 3.9 3.9 Day 2 1,080 108.0 115.2 7.2 11.1 Day 3 1,076 107.6 115.2 7.6 18.7 Day 4 1,110 111.0 115.2 4.2 22.9 Day 5 1,107 110.7 115.2 4.5 27.4 Day 6 1,279 127.9 115.2 -12.7 14.7 Day 7 1,299 129.9 115.2 -14.7 0 3.3 Mathematical formulation To obtain the stoichiometric production of CO2 and NH3, the general chemical formula of the daily biomethane feedstock mixtures needs to be determined. Unfortunately, the inconsistency of the daily OWLA creates numerous possible combinations of the feedstock mixtures and results in different theoretical production of CH4, CO2 and NH3. An NLP mathematical model was developed based on the mass balance principle to perform the mass flowrate allocation from OWLA and ES to satisfy the daily biomethane feedstock mass flowrate. During the mass balance, the carbon-to-nitrogen (C/N) ratio required by the anaerobic digestion process was one of the critical parameters affecting the optimum yield of biomethane gas. In this study, the daily supply of OWLA is limited and found within the studied area, whereas the ES availability is abundant but located far away from the studied area. The daily mass flowrate required by the biomethane digester, UTMFj(d) (kg/d) is satisfied by 237 mixing the daily OWLA, UTMFij(d) (kg/d) and ES, UTMFixj(d) (kg/d) supply as a feedstock mixture as shown in Eq(6). A mathematical NLP model was developed with the objective function to minimize the utilization of UTMFixj(d) as shown in Eq(7). To obtain the UTMFixj(d), the mass balance at the supply and demand side had to be done. For the mass balance at the OWLA and ES supply sides, the illustrated mass flowrate were included all the elemental compositions, the TS % and VS %. The individual mass flowrate for each of the elemental compositions in the OWLA and ES supply, MFsource element (kg/d) can be calculated via Eq(8), where the term Elementsource % represents the elemental composition percentage. The inequality constraint during the mass flowrate allocation from OWLA and ES supply sides to demand sides is as in Eq(9), where the Allosourcej(d) element (kg/d) represents the daily mass flowrate allocation from supply to demand side. UTMFj(d) = UTMFij(d) + UTMFixj(d) (6) Objective function = Min ∑ ∑ UTMFixj(d)ixjd (7) MFsource element = UTMFsource element % × Elementsource % × TSsource % × VSsource % (8) MFsource(d) element ≥ Allosourcej(d) element (9) Before performing mass balance at the demand side, the individual elemental composition mass flowrate need to be calculated. In this study, the illustrative daily demand mass flowrate, MFj (kg/d) only comprised of C and N compositions. The individual C, Cj (kg/d) and N, Nj (kg/d) mass flowrate for demand side were calculated as in Eq(10) and Eq(11), where the C/Nj is the C/N ratio required by the demand side. Despite the illustrated MFj only comprised of Cj and Nj, the mass balance for the rest of the elemental composition will also need to be calculated to make the case study more practicable. The mass balance of individual elemental compositions at the demand side were calculated via Eq(12), where the term “X” can be substituted with the individual elemental compositions. Before determining the individual elemental composition (e.g., H, O and other components) mass flowrate allocation from a supply source (e.g., OWLA and ES) to demand, the fraction of utilization from each source, Frsourcej(d) needs to be calculated by dividing the daily mass flowrate allocation of C with the daily mass flowrate available of C via Eq(13). The Allosourcej(d) element for H, O and other components from OWLA and ES to the demand side were calculated via Eq(14). The ultimate mass flowrate allocation of OWLA, UAlloOWLA(d) element (kg/d) and ES to demand side, UAlloES(d) element (kg/d) was calculated by dividing Allosourcej(d) element with the TSsource % and VSsource % as shown in Eq(15). The ultimate total mass flowrate allocation from supply to demand, UTMFij(d) and UTMFixj(d) was calculated via Eq(16). Cj(d)=MFj(d)× C/Nj(d) C/Nj(d)+1 (10) Nj(d) = MFj(d) − Cj(d) (11) Xj(d) = Xij(d) + Xixj(d) (12) Frsourcej(d)= Allosourcej(d) C MFsourcej(d) C (13) Allosourcej(d) element = Fr sourcej(d) × MFsourcej(d) element (14) UAllosourcej(d) element = Allosourcej(d) element TSsource% × VSsource% (15) UTMFsourcej(d) = � (UAllosourcej(d) C + UAllosourcej(d) H +UAllosourcej(d) O +UAllosourcej(d) N +UAllosourcej(d) others ) d (16) After all the individual elemental composition mass flowrate of demand side, Xj (kg/d) were identified, the corresponding molar number of the elemental composition, Emolej(d) (mole/d) for element C, c, H, h, O, o and N, n will be determined via Eq(17), where the Emw (kg/kmole) is the individual elemental composition molecular weight. The general chemical formula for the biomethane feedstock based on the daily OWLA and ES mixing 238 was identified and the theoretical production of CH4, (TPCH4, ml/g VS), CO2, (TPCO2, ml/g VS), and NH3 (TPNH3, ml/g VS) were calculated via Eq(18), Eq(19) and Eq(20). The theoretical-actual production factor, FTA was calculated by dividing the CCH4 in the biogas storage tank with the TPCH4. The daily accumulation of byproduct, CO2, ACCCO2 (m3/d) and NH3, ACCCO2 (m3/d) in the biogas storage tank was calculated by multiplying with the FTA as shown in Eq(21) and Eq(22), where the subscript “byproduct” is substitutable with the byproduct CO2 and NH3. The daily total biogas accumulation, ACCbiogas(d) (m3/d) was calculated by adding the ACCbyproduct(d) with CCH4(d) as shown in Eq(23). The finalized capacity for the biogas storage will be determined based on the greatest daily biogas accumulated within a week. The daily accumulation of OWLA, ACCOWLA(d) (kg/d) was calculated via Eq(25). The finalized capacity for each of the OWLA storage, StorageOWLA (m3) will be determined via Eq(26) based on the greatest ACCOWLA(d) within a week. Emolej(d)= xj Emw (17) TPCH4(d) = 22.4 × 1000 × ( c2 + h 8 - o 4 - 3n 8 ) 12c+h+16o+14n (18) TPCO2(d) = 22.4 × 1000 × ( c2 - h 8 + o 4 + 3n 8 ) 12c+h+16o+14n (19) TPNH3(d) = 22.4 × 1000 × n 12c+h+16o+14n (20) FTA= CCH4(d) TPCH4 (21) ACCbyproduct(d) = TPbyproduct(d) × FTA(d) (22) ACCbiogas(d) = CCH4(d) + ACCCO2(d) + ACCNH3(d) (23) Storagebiogas = Max ACCbiogas(d) (24) ACCOWLA(d) = ACCOWLA(d-1) + UTMFi(d) – UTMFij(d) (25) StorageOWLA= Max ACCOWLA(d) (26) 4. Results and discussions The allocation of OWLA and ES mass flowrates to the demand side as shown in Table 6 were obtained by translating the equations aforementioned into programming language via General Algebraic Modeling System (GAMS, 2022) software using BARON solver to solve the non-linear programming (NLP) problem. Table 6: The mass flowrate of OWLA and ES supply that allocated to satisfy the demand side Organic wastes Mass flowrate allocation to demand side, UTMFij(d) / UTMFixj(d) (kg/d) Day 1 Day 2 Day 3 Day 4 Day 5 Day 6 Day 7 Dairy manure (i1) 78 76 84 89 88 79 76 Swine manure (i2) 23 27 30 28 29 21 26 Kitchen waste (i3) 129 141 137 122 146 149 145 Rice straw (i4) 60 55 56 54 60 59 57 Corn stover (i5) 9.165 13.809 14.471 16.66 11.798 10.606 12.063 Vinegar waste (ix2) 29.629 29.062 26.824 27.691 24.255 27.486 28.44 The objective function shows that among the three given ES, 193.387 kg/d of vinegar wastes (ix2) was required to mix with OWLA to satisfy the demand stream. The theoretical production of biomethane fluctuated between 0.486 to 0.489 m3 CH4/kg VS, which was affected by the combination of the OWLA and ES based on the daily availability. The biomethane digester that daily feeds on 40 kg/d of feedstock mixture with C/N ratio of 28.1 and produces 115.2 m3 CH4/d requires biogas storage with a capacity of 52.86 m3. Based on the greatest 239 ACCOWLA(d), only one OWLA supply, i5 required storage with a capacity of 689.43 m3. The storage is not necessary for OWLA i5 because the daily supply mass flowrate is greater than the daily usage mass flowrate for every day. The unutilized OWLA that accumulated in the storage will be disposed of at the end of the week so that the storage will not overflow. The resource optimization tools developed from this study applicable to remote area such as rural and island by maximize the utilization organic waste found locally to produce sustainable electricity for daily use, with the support of resource storages. The mathematical model able to allocate the resources based of different input of the fluctuated supply and demand data, and identify the capacity of the storages for OWLA and biomethane required. 5. Conclusion The inconsistency of daily OWLA supply will lead to a different combination of organic waste resources allocation, affecting the composition of feedstock mixture, theoretical biogas production, biogas storage and OWLA storage capacity. The installation of OWLA storage is not practical when the daily accumulation of unutilized OWLA in the storage is increasing from day to day. The OWLA storage is not required when the OWLA that is not participating in the mixing of organic waste supply to form feedstock. The unutilized OWLA that accumulated in the storage will eventually being disposed of at the end of the week because the composition of the organic waste might change due to biodegradation during storage for a long period of time. In future, environmental analysis such as carbon emission reduction and economic analysis related to the implementation of ES storage will be done. New heuristics related to OWLA and ES wastes utilization priority, transportation and storing will also be developed and discussed in future works. The optimized utilization of organic waste to produce green and sustainable value-added products such as biomethane production and compositing. The methods developed in this study can advise and provide insight to government, agencies or parties that intend to maximize the potential value of the resources. Acknowledgments The authors would like to acknowledge the research grants from Universiti Teknologi Malaysia with grant no. Q.J130000.21A2.05E75, R.J130000.7951.4S150, R.J130000.7851.5F321, and Q.J130000.2851.00L51. References Ahmed M.S., Mohamed A., Homod R.Z., Shareef H., Khalid K., 2017, Awareness on energy management in residential buildings: A case study in Kajang and Putrajaya, Journal of Engineering Science and Technology, 12(5), 1280–1294. Chee W.C., Ho W.S., Angel Mah X.Y., Klemeš J.J., Fan Y.V, Cassendra Bong P.C., Wong K.Y., Hashim H., Wan Alwi S.R., Muis Z.A., 2022, Maximizing the valorization of organic waste locally available via carbon- to-nitrogen ratio Supply Composite Curve shifting, Journal of Cleaner Production, 362, 132389. Chee W.C., Ho W.S., Hashim H., Muis Z.A., Angel Mah X.Y., Cassendra Bong P.C., Ho X., 2021, Design of biomethane and organic waste storages for anaerobic digestion, Chemical Engineering Transactions, 89, 397–402. Etminan M., Myhre G., Highwood E.J., Shine K.P., 2016, Radiative forcing of carbon dioxide, methane, and nitrous oxide: A significant revision of the methane radiative forcing, Geophysical Research Letters, 43(24), 12614-12623. GAMS, 2022, General Algebraic Modeling System V24.7.4, GAMS Software, Washington C.V., U.S.A. Ho W.S., Hashim H., Hassim, M.H., Muis Z.A., Shamsuddin N.L.M., 2012, Design of distributed energy system through Electric System Cascade Analysis (ESCA), Applied Energy, 99, 309–315. Kalaiselvan N., Glivin G., Bakthavatsalam A.K., Mariappan V., Premalatha M., Raveendran P.S., Jayaraj S., Sekhar S.J., 2022, A waste to energy technology for Enrichment of biomethane generation: A review on operating parameters, types of biodigesters, solar assisted heating systems, socio economic benefits and challenges, Chemosphere, 293, 133486. Kaza S., Yao L., Bhada-Tata P., Woerden F.Van, 2018, What a Waste 2.0: A Global Snapshot of Solid Waste Management to 2050, World Bank Group. Mohtar, A., Ravi A., Ho W.S., Chee W.C., 2021, Mathematical optimisation of biogas production and utilisation, Chemical Engineering Transaction, 83(2017), 445–450. Siddiqui Z., Horan N.J., Anaman K., 2011, Optimization of C:N ratio for co-digested processed industrial food waste and sewage sludge using the BMP test, International Journal of Chemical Reactor Engineering, 9(9),4. Suhartini S., Lestari Y.P., Nurika I., 2019, Estimation of methane and electricity potential from canteen food waste, International Conference on Green Agro-industry and Bioeconomy 18–20 September, Universitas Brawijaya, East Java Indonesia, 230(1), 012075. 240 040.pdf Mathematical Modelling for Organic Waste Resources Targeting and Optimization using Carbon-to-Nitrogen Ratio