Practicing wastewater process engineers use mathematical models when planning, designing, optimizing, evaluating, and performing problem solving work related to proposed or existing municipal and industrial WWTPs. This paper presents the result of research on the extension of ASM2d to model GHG emission using Aquifas+ WWTP simulator. A significant increase in the number of components and processes defined in ASM2d was carried out to develop a more sophisticated mathematical model for Aquifas+. New components representing N 2 O, NO and NO 2 are introduced in the model to simulate the nitrification processes by the ammonium oxidizing bacteria (AOB), followed by NO 2 oxidation by nitrite oxidizing bacteria (NOB). The denitrification is broken up into four steps for ordinary heterotrophs (OHO) and polyphosphate accumulating bacteria (PAO) to go from nitrate to nitrite to nitric oxide to nitrous oxide and then to nitrogen gas. The physical portion of the model includes equations for diffusion of NO 2 and NO into the atmosphere. These equations are related to the type of aeration and mixing. Unlike ASM2d, which uses the same coefficient for several reactions, Aquifas+ uses a substantially larger number of coefficients, such as the ability to specify different half saturation constants for DO (K DO ) for fermenters, OHO and PAO under aerobic conditions, OHO and PAO for inhibition under anoxic conditions, and each step of AOB nitrification. A similar set of equations were constructed for the biofilm models. The mathematical technique used to invert the larger matrix of equations was improved to enable faster and accurate solutions. The faster algorithms were necessary for applying the model as a real time operations simulator and controller inside enhanced nutrient removal plants in Maryland, USA. The simulator can simultaneously optimize the plant operations for GHG emissions and effluent nutrients. Additionally, it is designed to optimize the plant for energy and chemical consumption for the biological treatment and water reuse applications at plants in developed and emerging markets.