Biomethane is a real alternative to natural gas and a clean way to valorize biogas obtained from organic waste in landfills or manure. It can be used as fuel in vehicles and boilers or injected in natural gas grid. Nevertheless, in Spain, biogas and biomethane are starting to be considered as an alternative to natural gas. A good way of promoting these renewable energies is supporting small and cheap treatment plants near to the place where the biogas is produced and where the biomethane can be used on-site, fostering the circular economy. an easily usable simulation tool for selecting the best sequence of unit operations for treating biogas has been designed. modelized operations are absorption (with water, chemical and physical), pressure swing adsorption, membranes and dehydration. A step to determine if the biomethane obtained is suitable to be injected into the grid according to current Spanish regulation has been developed. To complete the design, a conventional simulation software can be used. The tool gives information about costs, consumptions and environmental impact of each selection. Pollutants modelled are those more common in biogas coming from manure although other contaminants hardly removable are considered: CO2, CH4, NH3, SH2, CO2, O2, N2, H2O and siloxanes. unit operations have been modelled separately, and operating conditions can be easily modified by user. Some alarms have been settled to help user to make a correct selection. With this solution, a compromise between cost (compared to commercial solutions) and accuracy is met. This tool was used as a first step to design a flexible and portable prototype for treating small flows of biogas as those produced in livestock which has been later built and is on operation. This kind of solutions could help the deployment of biomethane in Spain and help installations to reduce its emissions by valorizing a residue.
biomethane, circular economy, simulation tool
 European Parliament, «Fact Sheets on the European Union - European Parliament,» 06 July 2021. [En línea]. Available: https://www.europarl.europa.eu/factsheets/en/sheet/70/renewable-energy.
 Boletín Oficial del Estado, BOE, Resolución de 21 de diciembre de 2012, de la Dirección General de Política Energética y Minas, por la que se modifica el protocolo de detalle PD-01 "Medición, Calidad y Odorización de Gas" de las normas de gestión técnica del sistema gasista, 2013.
 Boletín Oficial del Estado, Resolución de 8 de octubre de 2018, de la Dirección General de Política Energética y Minas, por la que se modifican las normas de gestión técnica del sistema NGTS-06, NGTS-07 y los protocolos de detalle PD-01 y PD-02, 2018.
 Boletín Oficial del Estado, Resolución de 25 de marzo de 2021, conjunta de la Dirección General de Política Energética y Minas y de la Oficina Española de Cambio Climático por la que se publica [...] la versión final del Plan Nacional Integrado de Energía y Clima 2021–2030, 2021.
 P. A., «Biogas cleaning,» de The Biogas Handbook Science. Production and applications, Woodhead Publishing, 2013, pp. 329–341.
 P. T. H. C. T. D. Bauer F., «Biogas upgrading - technology overview, comparison and perspectives for the future,» Biofuels, Bioproducts & Biorefining, 7, pp. 499–511, 2013.
 B. W. Beil Michael, «Biogas upgrading to biomethane,» de The Biogas Handbook, Woodhead Publishing Limited, 2013, p. Capítulo 15.
 IEA BIOENERGY, «Task 24: Energy from biological conversion of organic waste».
 P. N. Kadam R, «Recent advancement in biogas enrichment and its applications,» Renewable and Sustainable Energy Reviews, 73, pp. 892–903, 2017.
 R. G. P. K. M. V. V. K. Kapoor, «Evaluation of biogas upgrading technologies and future perspectives: a review,» Environmental Science and Pollution Research, 2019.
 N. R. Kohl A., Gas Purification, Houston: Gulf Publishing Company, 1997.
 J. D. S. P. Niesner J., «Biogas Upgrading Technologies: State of Art Review in European Region,» Chemical Engineering Transactions, 35, pp. 517–522, 2013.
 D. M. V. H. Ryckebosch E., «Techniques for transformation of biogas to biomethane,» Biomass & Bioenergy, 35, pp. 1633–1645, 2011.