Comprehensive Techno-Economic Analysis of a Multi-Feedstock Bioreﬁnery Plant in Oil-Rich Country: A Case Study of Iran

: The high energy consumption in Iran, particularly in the transportation sector, has contami-nated large cities and jeopardized the society health. Therefore, in this study technical and economic features of the production of biodiesel plant in Iran from various wastes are investigated. Based on the Analytic Hierarchy Process (AHP) method’s ﬁndings, the southern area of Iran is selected for establishing the biodiesel plant in Iran. The bioreﬁnery, which includes three units of sewage sludge, edible waste oil and microalgae. The results of the economic evaluation show that the lowest costs of investment and production of biodiesel are related to microalgae units ($0.375/kg) and edible waste oil ($0.53/kg), respectively. Also, among all units, the lowest break even prices are related to biodiesel production ($1.17/kg) and the highest ATROR rate (29.16%) belongs to the microalgae unit. This indicates that this unit is more proﬁtable than other units and the invested cost is returned to the investor in a shorter period of time (3.43 years). On the other hand, the results of sensitivity analysis show that the highest sensitivity of changes in the selling price of biodiesel and the cost of raw materials to ATROR to the microalgae and sludge unit. Therefore, the construction of a bioreﬁnery in Iran has an economic justiﬁcation.


Introduction
Over-utilization of natural sources raises concerns about environmental change and energy, food and water securities [1]. Nowadays, over 80% of the world's energy consumption generated from fossil energies, which have brought serious health and environmental damages [2]. This issue has led to a move towards an investigation of environmentally benign and renewable-based fuels. One of these fuels is biodiesel, which can be considered as one of the fossil fuels alternative options in the transportation part [3]. Biodiesel made of methyl ester fatty acids (C16-C18) produced from vegetable feed or fats of animals under the well-known transesterification process [4]. This renewable-based fuel is widely accepted in the energy market due to its specific features, consisting high cetane number compared to diesel, low sulfur, intrinsic lubrication, positive energy balance, maximum flash point and the ability to combine with Table 1. The classification of biodisels based on their featurs [7].

Biodiesel Classification/Generation Features/Aspect/Examples
Fossil fuel

Methodology
The performed steps of this research are as follows:

Data Gathering of Various Types of Waste in Iran
Data gathering in different types of waste in Iran is extracted from official sources such as the Program and Budget Organization and the Statistics Center of Iran. After collecting data, the potential of biodiesel production from these sources is measured through various technologies and processes.

Selecting the Best Place to Build a Multi-Feed Biodiesel Production Plant in Iran by AHP Method
Plant based biodiesel feedstock alternatives in Iran: sewage sludge, waste cooking oil, waste animal fats and algae oil are evaluated and ranked based on a set of qualitative and quantitative criteria by AHP method. It needs to be highlighted that the amount of residual oils produced from agricultural products has not been addressed because of managing the fertile soil resources as well as the risk of poultry and livestock feed. The Analytic Hierarchy Process (AHP) is a hierarchical-structured MCDM method for evaluation of alternatives with respect to quantitative and qualitative criteria using pairwise comparisons. AHP method covers both quantitative and qualitative criteria, which is a critical requirement for applying in techno economic assessments. Besides, it is utilized in real decision-making problems [19]. Each element in the hierarchy is assumed independent of the others which leads to dividing decision-making issues into several levels as well as hierarchical structure. Goals and criteria determination as a two main steps for utilizing AHP is crucial in this Sustainability 2022, 14, 1017 4 of 31 simulation since they will be affected on the formation of the hierarchical structure. The first hierarchical level in the structure is defining the main purpose of the problem. Then, criteria and sub criteria should be considered to reach a meaningful result.

Techno-Economic Assessment
The profitability analysis module includes the calculation of the Fixed Investment Costs (FIC), Total Manufacturing Costs (TMC), After Tax Rate of Return (ATROR) and biodiesel Break-Even Point (BEP) and the discounted payback period. Detailed information about the equipment module costing technique used to estimate the total bare module of the plant can be found in the literature [20]. The calculations of the financial assumptions used in this study are follows: an 18% rate of interest for the capital investment, plant life span of 20 years, 9% income tax rate, construction period 2 years, 330 working days per annum. Working capital is considered as 15% of fixed capital investment. In this study, COMFAR III was used to investigate the feasibility and conduct the economic analysis. The distinctive feature of this software is its capability for facilitating organization and generating financial and economic reports. Some of the strengths of this software include high flexibility, low error rate, and careful financial sensitivity analysis [21].

The Potential of Biodiesel Production from Municipal and Industrial Sewage Sludge in Iran
According to Mesdaghinia et al. [22], the per capita sludge produced from Tehran wastewater is between 0.16 ± 0.02 and 0.11 ± 0.02 L per day. If this amount is considered for Iran, for a population of about 82.35 million people, 5410.7 million liters' sewage sludge will be obtained from Iranian municipal sewage annually. By using methanol, in the best case, the amount of lipid that can be extracted from primary and secondary sludge is 14.46 and 10.04 (% wt based on dry sludge), respectively. Since precise statistics are not available on the amount of primary and secondary municipal sewage sludge, for the primary sludge 5410.7 million liters is considered. On the other hand, the Fatty Acid Methyl Ester (FAME) yields from acid catalytic esterification-transesterification processes from extracted lipids of hexanes were 41.25% (based on lipids) for primary sludge, and 26.89% (for fat) on secondary sludge [23]. Thus, from primary sludge lipids 322.73 million liters' biodiesel is produced annually. Figure 1 presents the amount of biodiesel produced from the primary lipid sludge of municipal wastewater for provinces with a population of more than two million people. This, most of the production of biodiesel belongs to Tehran, Khorasan Razavi, and Isfahan provinces, respectively. The amount of wastewater produced from the industrial and mining sector in 2016 is estimated 2230.9 million cubic meters annually, that reaches the Iranian watersheds. Moreover, in the mining industry 4,223,851 people have worked, that the amount of industrial wastewater was 1447 lit/day per person. Regarding 14.46 wt. % lipid (based on dry sludge) from primary sludge sources, and FAME performance produced from acid catalytic esterification-transesterification processes from extracted lipids of hexanes 41.25 wt. % (based on lipids) for primary sludge, 364.56 million liters' biodiesel can be obtained from the primary sludge from industrial wastewater [23].

The Potential of Biodiesel Production from Waste Cooking Oils in Iran
Taking into account Iran's 82 million population and above-mentioned fact that the oil con sumption per capita in Iran is 20 kg annually, Iran would require an estimated amount of 1,640,000 tons of edible oil annually. Chen et al. presented a model to analyze waste production in China which is presented in Equation (1). The annual amount of Waste Oil Fats (WOF) that can be collected is expressed as follows: [24].
where , presents WOF produced in year t, denote population in year t, is urbanization rate in year t, is waste oil production per capita (kg/person) in year t. According to the statistics of the edible oil residue amount collected in 2009, and the population of approximately 72 million people in 2009, the production of residual oil per capita is 6041 kg per person. Given the urbanization rate (the urbanization rate for Iran in 2010-2015 was 2.07%), and considering Iran's population (82.35 million) in 2019, using Equation (1), the amount of WOF produced in 2019 is estimated to be 507,800.93 tons. Given the conversion efficiency of edible waste oil to biodiesel through the process of transesterification is 98% [25], and regarding Equation (1), produced biodiesel from edible waste oil is calculated 497.6 Mt (565.51 million liters). Figure 2 presents the production rate of biodiesel from edible waste oils for provinces with a population of more than two million. Most of the produced biodiesel belongs to Tehran, Khorasan Razavi, and Isfahan provinces, respectively. In this regard, it should be mentioned that due to the lack of accurate databases, amounts of edible waste produced from restaurants, hotels, caterers and selfservice centers of military, cultural and industrial centers are not considered. 13 Figure 1. Amount of biodiesel produced from the primary lipid sludge of municipal wastewater for provinces with a population of more than two million people.

The Potential of Biodiesel Production from Waste Cooking Oils in Iran
Taking into account Iran's 82 million population and above-mentioned fact that the oil con sumption per capita in Iran is 20 kg annually, Iran would require an estimated amount of 1,640,000 tons of edible oil annually. Chen et al. presented a model to analyze waste production in China which is presented in Equation (1). The annual amount of Waste Oil Fats (WOF) that can be collected is expressed as follows: [24].
where WOF t , presents WOF produced in year t, P t denote population in year t, U t is urbanization rate in year t, W t is waste oil production per capita (kg/person) in year t.
According to the statistics of the edible oil residue amount collected in 2009, and the population of approximately 72 million people in 2009, the production of residual oil per capita is 6041 kg per person. Given the urbanization rate (the urbanization rate for Iran in 2010-2015 was 2.07%), and considering Iran's population (82.35 million) in 2019, using Equation (1), the amount of WOF produced in 2019 is estimated to be 507,800.93 tons. Given the conversion efficiency of edible waste oil to biodiesel through the process of transesterification is 98% [25], and regarding Equation (1), produced biodiesel from edible waste oil is calculated 497.6 Mt (565.51 million liters). Figure 2 presents the production rate of biodiesel from edible waste oils for provinces with a population of more than two million. Most of the produced biodiesel belongs to Tehran, Khorasan Razavi, and Isfahan provinces, respectively. In this regard, it should be mentioned that due to the lack of accurate databases, amounts of edible waste produced from restaurants, hotels, caterers and self-service centers of military, cultural and industrial centers are not considered.

Figure 2.
The production rate of biodiesel from edible waste oils for provinces with a population of more than two million.

The Potential of Biodiesel Production from Poultry Waste in Iran
The weight of live poultry for this number of active broilers is approximately 2,540,000 tons. For poultry, 41.4% of its total weight is not consumed and is slaughter waste (the weight of poultry is estimated to be 1.8 to 1.9 kg before slaughter), 12% of this slaughter waste is fat [26]. Taking into account that the conversion efficiency of fat to biodiesel through the process of transesterification that is 98%, and considering poultry weight (2540 thousand tons), and poultry waste of its total weight (41.4%), as well as residual fat content (12%), the biodiesel amount that can be produced from poultry waste is calculated to be 123 Mt (139.77 million liters). Table 2 presents the biodiesel production of poultry waste from provinces with an annual capacity of more than 90,000 tons. Most of the biodiesel produced from chicken waste belongs to Mazandaran, Golestan, and Khorasan Razavi provinces, respectively.  Figure 2. The production rate of biodiesel from edible waste oils for provinces with a population of more than two million.

The Potential of Biodiesel Production from Poultry Waste in Iran
The weight of live poultry for this number of active broilers is approximately 2,540,000 tons. For poultry, 41.4% of its total weight is not consumed and is slaughter waste (the weight of poultry is estimated to be 1.8 to 1.9 kg before slaughter), 12% of this slaughter waste is fat [26]. Taking into account that the conversion efficiency of fat to biodiesel through the process of transesterification that is 98%, and considering poultry weight (2540 thousand tons), and poultry waste of its total weight (41.4%), as well as residual fat content (12%), the biodiesel amount that can be produced from poultry waste is calculated to be 123 Mt (139.77 million liters). Table 2 presents the biodiesel production of poultry waste from provinces with an annual capacity of more than 90,000 tons. Most of the biodiesel produced from chicken waste belongs to Mazandaran, Golestan, and Khorasan Razavi provinces, respectively. The number of slaughterhouses in Iran has been reported at 385 units in 2015, in which 476,000 tons of livestock being slaughtered. The fat content of cows, sheep, and goats is considered 32.67, 0.5 and 0.3 kg, respectively [27]. The carcass weight of slaughtered sheep, goats, cows, buffaloes and camels was 184, 37, 245, 5 and 5 thousand tons, respectively. And the average weight of each sheep, goat, cow, buffalo, and camel was 19.75, 14.6, 191.8, 170.27 and 206.6 kg, respectively. Therefore, given the amount of fat, carcass weight, and the weight of each cattle, the annual production of fat from livestock in Iran can be estimated at 0.42 million tons. It should be noted that due to the lack of accurate statistics, the amount of camel and cow fat is considered equivalent to fat content of a cow. Due to the high conversion efficiency of fat to biodiesel about 98% through the process of transesterification 416 Mt (472.72 million liters) of biodiesel is produced from animal fat. Figure 3 presents the five major Iranian provinces producing biodiesel from animal waste. , x FOR PEER REVIEW 7 of 32 goats is considered 32.67, 0.5 and 0.3 kg, respectively [27]. The carcass weight of slaughtered sheep, goats, cows, buffaloes and camels was 184, 37, 245, 5 and 5 thousand tons, respectively. And the average weight of each sheep, goat, cow, buffalo, and camel was 19.75, 14.6, 191.8, 170.27 and 206.6 kg, respectively. Therefore, given the amount of fat, carcass weight, and the weight of each cattle, the annual production of fat from livestock in Iran can be estimated at 0.42 million tons. It should be noted that due to the lack of accurate statistics, the amount of camel and cow fat is considered equivalent to fat content of a cow. Due to the high conversion efficiency of fat to biodiesel about 98% through the process of transesterification 416 Mt (472.72 million liters) of biodiesel is produced from animal fat. Figure 3 presents the five major Iranian provinces producing biodiesel from animal waste. The fishing and aquaculture rate in Iran is 1,093,719 tons annually that can be considered as a suitable source for biodiesel production. Generally, the fat content of fish waste is 50% [28]. If the conversion of animal fat to biodiesel is considered 98% [29], 213.6 Mt (242.72 million liters) of biodiesel from fish waste will be produced. Table 3 presents the amount of biodiesel produced from fish waste in Iran. According to Table 3, the highest biodiesel production from fishing is in Sistan and Baluchestan (55.69 million liters) and Hormozgan (53.89 million liters) provinces. Mazandaran, Khuzestan, and Gilan provinces have the highest share of biodiesel production in aquaculture. Generally, biodiesel production from fishing and aquaculture resources has the highest potential in Sistan and Baluchestan (58.52 million liters), Hormozgan (56.82 million liters) and Khuzestan (27.55 million liters), respectively.  The fishing and aquaculture rate in Iran is 1,093,719 tons annually that can be considered as a suitable source for biodiesel production. Generally, the fat content of fish waste is 50% [28]. If the conversion of animal fat to biodiesel is considered 98% [29], 213.6 Mt (242.72 million liters) of biodiesel from fish waste will be produced. Table 3 presents the amount of biodiesel produced from fish waste in Iran. According to Table 3, the highest biodiesel production from fishing is in Sistan and Baluchestan (55.69 million liters) and Hormozgan (53.89 million liters) provinces. Mazandaran, Khuzestan, and Gilan provinces have the highest share of biodiesel production in aquaculture. Generally, biodiesel production from fishing and aquaculture resources has the highest potential in Sistan and Baluchestan (58.52 million liters), Hormozgan (56.82 million liters) and Khuzestan (27.55 million liters), respectively. The southern coast of Iran extends for 2437 km along the Persian Gulf to the Oman Sea, providing suitable areas for microalgae cultivation [30]. Recently, more than 347 species of algae have been identified on the southern coast of Iran [31]. In Khuzestan and Hormozgan provinces, there are 5 and 23 suitable locations for algae cultivation, respectively. According to feasibility studies, the southern coast of Iran has a production potential for 540,000 tons of algae annually. Green algae contain more than 50 wt. % of fat [32]. Using the following equation, the yield of biocrude oil produced by the HTL process can be calculated [33]: Here Y, B and L represent the yields of biocrude oil, algae biomass, and algae lipid fraction, respectively. Using this equation, 265,950 thousand tons of biomass was obtained from algae. The biodiesel yield of Botryococcus microalgae using two-step transesterification is more than 84%. The main fatty acid of biodiesel contains 27.3% of methyl palmitate, 18.7% of methyl oleate, 18.6% of methyl elaidate, and 7% of methyl stearate [34]. Botryococcus algae could be a viable option for the biofuel industry in the future [35]. Therefore, with the given conversion efficiency of Botryococcus microalgae into biodiesel 224 Mt (254.54 million liters) of biodiesel can be made from microalgae.

The Potential of Biodiesel Production from Macroalgae
More than 20,000 hectares of Anzali Wetland in Iran are full of Azolla. Steps of converting Azolla to biodiesel are such as lipid extraction, hydrothermal treatment, hydrothermal liquefaction, and the pyrolysis process. The annual production of Azolla bio-oil through Sustainability 2022, 14, 1017 9 of 31 pyrolysis and HTL-based processes are 13.2 and 20.2 tons per hectare, respectively. Moreover, it is also anticipated that the annual lipid production of Azolla is 1.68 tons per hectare which will be increased to 82 tons per hectare if the plant grows under normal situations. The efficiency of this oil was dramatically higher than soybean (0.44 tons per hectare), sunflower (0.78 tons per hectare), rapeseed (1.17 tons per hectare), and palm oil (6.0 tons per hectare). However, it is lower than the productivity of microalgae (up to 73 tons per hectare for Nannochloropsis sp.) [36]. Therefore, considering the biodiesel yield of algae which is 84% [34], and taking into account the amount of Azolla lipid (8 tons per hectare) [36] and the area covered by the Anzali Wetland (20,000 hectares), biodiesel production from Azolla would be 134.4 Mt (152.72 million liters).

Selecting the Best Location for Establishing the Biodiesel Factory
Many studies were analyzed to find out the right determining factors in choosing the best location for the biodiesel production plant. In the end, a combination of factors has been extracted from the text and tables of the papers, which are summarized in Table 4. Job creation The manpower required for the use of technology [37,42,48] Moreover, the southern area (Hormozgan province), southwest area (Khuzestan and Bushehr provinces), and northern area (Tehran, Gilan, and Alborz provinces) as three under evaluation areas were selected because of their high potential for accessing to the raw materials and the short distances petrochemical plants ( Figure 4). (up to 73 tons per hectare for Nannochloropsis sp.) [36]. Therefore, considering the biodiesel yield of algae which is 84% [34], and taking into account the amount of Azolla lipid (8 tons per hectare) [36] and the area covered by the Anzali Wetland (20,000 hectares), biodiesel production from Azolla would be 134.4 Mt (152.72 million liters).

Selecting the Best Location for Establishing the Biodiesel Factory
Many studies were analyzed to find out the right determining factors in choosing the best location for the biodiesel production plant. In the end, a combination of factors has been extracted from the text and tables of the papers, which are summarized in Table 4. Job creation The manpower required for the use of technology [37,42,48] Moreover, the southern area (Hormozgan province), southwest area (Khuzestan and Bushehr provinces), and northern area (Tehran, Gilan, and Alborz provinces) as three under evaluation areas were selected because of their high potential for accessing to the raw materials and the short distances petrochemical plants ( Figure 4). After introducing the target, indicators, and options, it is needed to utilize the analytic hierarchy tree (AHT). The extracted AHT for this study has been illustrated in Figure  5. After introducing the target, indicators, and options, it is needed to utilize the analytic hierarchy tree (AHT). The extracted AHT for this study has been illustrated in Figure 5.

Pair Comparison between Parameters and Targets
The steps of AHP are explained below. To pair comparison between parameters and targets, it is needed to perform the parameters pair comparison matrix (A) [49]. In order to assess the weight of the criteria, the following paired comparison matrix was created (Equation (3)), where represents the relative significance of Factor i in comparison with Factor j, which is determined using a pairwise comparison method. For pairwise comparison, we used the measured values of the 9 quantities shown in Table 5. Table 5. Comparative comparison of indicators [49].

ute Importance
Very High Importance High Importance Weak Importance Same Importance The pair comparison matrix has been reported in Table 6. After providing the pair comparison matrix (A), it is needed to compare the weights of indicators.
The mentioned comparison is carried out by arithmetic average and geometric mean, total row, and column method, ordinary least squares technique and minimum logarithmic squares methods. In current investigation, the arithmetic average method is utilized to compare between weights of indicators. The normalization of columns is applied to find the weight of each indicator. The elements of matrix A were normalized using Equation (4) [50]. The normalized values of each indicator have been listed in Table 7.

Pair Comparison between Parameters and Targets
The steps of AHP are explained below. To pair comparison between parameters and targets, it is needed to perform the parameters pair comparison matrix (A) [49]. In order to assess the weight of the criteria, the following paired comparison matrix was created (Equation (3), where P ij represents the relative significance of Factor i in comparison with Factor j, which is determined using a pairwise comparison method. For pairwise comparison, we used the measured values of the 9 quantities shown in Table 5. The pair comparison matrix has been reported in Table 6. After providing the pair comparison matrix (A), it is needed to compare the weights of indicators. The mentioned comparison is carried out by arithmetic average and geometric mean, total row, and column method, ordinary least squares technique and minimum logarithmic squares methods. In current investigation, the arithmetic average method is utilized to compare between weights of indicators. The normalization of columns is applied to find the weight of each indicator. The elements of matrix A were normalized using Equation (4) [50].
The normalized values of each indicator have been listed in Table 7. To obtain the relative importance of each criterion (W * i ), Equation (5) was applied.
These values are presented in Table 8. To determine the incompatibility rate (IR) of each indicator it is needed to calculate the weight summation vector (W i ) and the compatibility vector (CV). The criteria weight summation vector, was calculated using Equation (6): Compatibility vector is determined by the result of dividing by W i to W * i . Table 9 show the values of CV [36]. Another parameter that needs to be calculated is the Inconsistency Index (I.I). This parameter is determined by Equation (7) in which λ max is the arithmetic average of each element in the CV and n shows the number of indicators [49]. The Inconsistency Ratio (IR) of each indicator is determined by Equation (8). In this equation, the IIR means the Inconsistency Index of Random that has been indicated for each indicator based on Table 10 [49]. According to the above equation, The Inconsistency Ratio (IR) is equal to 0.01899, which is less than 0.1, so there is consistency in pairwise comparisons (no need to revise pairwise comparisons).

Pair Comparison between Options and Indicators
The problem of the current study consists of three options and four indicators that need to provide a 3 × 4 pair comparison matrix [49]. Table 11 provides a pair comparison and IIR index for each indicator. To find the best area based on the AHP method, it is needed to calculate the final weight of any option (V). To determine the mentioned factor, Equation (9) is applied to each indicator. Regarding Equation (9), the final weight (V) of each area is calculated by multiplying the comparative weight matrix of options (W k ) by weight matrix of indicators (W * i ) [49]. This calculation has been showed in Equation (9) as following: Based on this equation the final weights of nominated areas are measured and according to the final result, the highest value of this parameter demonstrates the best location for establishing the plant. Based on the calculations, and the final weights of nominated areas, the southern area of Iran has the highest weight (0.604). As a result, based on the AHP method, the southern area of Iran is the best location for establishing the multi-feed biodiesel plant in comparison to other nominated areas.

Biodiesel Production Process from Sewage Sludge
In this section, a biodiesel plant with an annual production capacity of 5683 tons of biodiesel from sewage sludge is investigated. To this end, an urban wastewater treatment plant (WWTP) is considered for feeding raw sewage sludge into the biodiesel plant. This eliminates the costs of transportation of raw sludge to the biodiesel plant. The goal of the proposed process is to improve biodiesel production from sewage sludge by eliminating the sludge water removal (highly energy-consuming), drying, and heating processes in the lipid extraction process. A mix of M-palmitate and M-oleate was chosen to show the biodiesel product. Also, palmitic acid representing the content of FFA, triolein representing the glycerides, and saturated fatty acid ester representing the non-saponifiable lipids (palmitate ester) were chosen. The reason for choosing palmitic acid is the presence of this acid in sludge lipids and consequently in the produced biodiesel.
In order to anticipate the physical and chemical properties of the chemical components (for instance, high-density solutions containing 95% of sulfuric acid) [51,52]., the PRSV equation of state was used as the thermodynamic fluid package. The Peng-Robinson versions are the best options for assessing the vapor-liquid equilibrium of common and uncommon liquid solutions [53]. Using the PRSV allows for a precise prediction of the properties of relatively non-ideal systems. In addition, it is used to finely separate the aqueous systems containing methanol and glycols, as well as hydrocarbons in the second liquid phases. The process simulation is run in two stages using the existing technologies. In the first stage, lipids are extracted from the liquid raw sludge (containing 96% of water) and the second stage involves the acid-catalyzed esterification/transesterification process. In the following section, both stages will be explained in detail.

Lipid Extraction from Liquid Primary Sludge
The primary sludge is mixed with acid before extraction and then lipid is extracted using continuous stirred-tank reactors (CSTR-reactor I, II). Hexane was used as a solvent in the countercurrent system ( Figure 6). The operational data was borrowed from the test results of [51]. In order to determine the optimized number of stages (number of trays) to achieve the most economically efficient results, different items such as the sludge PH, residence time in the extraction stage, and the sludge to hexane ratio (depending on the amount of hexane consumed) are modeled.
In this study, the feedstock solvent and extraction solvent flow rates are assumed unchanged and the concentration of solutes are given as the weight ratios of the solute to the feed solvent, extraction solvent in the raffinate and the extract phases, respectively. The raffinate phase is comprised of the remaining biomass and over 96% of water which can be recycled in the WWTP to eventually be used as a substrate for biogas production by anaerobic digestion. This process is widely used in urban WWTPs to prevent new waste sludge. As shown earlier, extracted sludge is easily digested anaerobically with the remaining lipids, producing biogas that preserves a similar composition, meaning methane content (from the excess raw sludge) [51]. Moreover, the extract is sent to an equilibriumflash separator (Separation Tower II) in which over 99% of the hexane is recovered and will be recycled in the extraction unit.

Biodiesel Production
An acid-catalyzed reaction system was proposed for the production of FAME using methanol as a reactant. In Reactor I, two reactions occur. In the first section, which is the acid esterification of the FFA, FAME, and water are produced. In the second reaction, which is the acid transesterification reaction of triglycerides, FAME and glycerol are produced. The product flow is sent to the Decanter where they are separated by a two-phase water wash. The light phase was used to remove hexane and methanol from the biodiesel produced. The heavy phase involves water, methanol, a small amount of glycerol (as a byproduct of the transesterification process), and the acid used as a catalyst. In order to recover the methanol, the heavy phase is neutralized in Reactor II by adding potassium hydroxide. The valuable byproduct of this reaction is potassium sulfate.

Biodiesel Production
An acid-catalyzed reaction system was proposed for the production of FAME using methanol as a reactant. In Reactor I, two reactions occur. In the first section, which is the acid esterification of the FFA, FAME, and water are produced. In the second reaction, which is the acid transesterification reaction of triglycerides, FAME and glycerol are produced. The product flow is sent to the Decanter where they are separated by a two-phase water wash. The light phase was used to remove hexane and methanol from the biodiesel produced. The heavy phase involves water, methanol, a small amount of glycerol (as a byproduct of the transesterification process), and the acid used as a catalyst. In order to recover the methanol, the heavy phase is neutralized in Reactor II by adding potassium hydroxide. The valuable byproduct of this reaction is potassium sulfate.
Then, the neutralized stream is sent to Distillation Tower II where 79% of methanol is recovered there. Since the produced biodiesel contains non-saponifiable lipids, we use a slight crystallization process to break the biodiesel into a fluid with a low melting point and a solid part with a high melting point (e.g., sterols and/or waxes) to obtain FAME with over 98% of density. In particular, traditional crystallization has two stages. The first stage involves crystallization under a totally controlled cooling rate with slight agitation and the second stage includes separation with filtration.

Biodiesel Production Process from Edible Oil Waste and Animal Fat
In this part of the supercritical two-stage technique, methanol was used without a catalyst to produce biodiesel from WCO. The scheme of the mentioned plant has been depicted in Figure 7 [25]. Salehi et al. [25] used RK-ASPEN thermodynamic model to determine the coefficients of the material activity in the liquid phase. Among the advantages of this method are the elimination of catalysts, elimination of separation and neutralization units, and the significant time decrease in the reaction time. These benefits led to a reduction in the production cost, but it also has drawbacks such as toxicity and high energy consumption. The simulation of the above-mentioned process is as follows.
First, triolein (feedstock: waste cooking oil) and water are mixed with a water-to-oil molar ratio of 20:1, and then the mixture is compacted to 17 atm. It is then sent to the Heat Exchanger II to reach a temperature of 270 • C. The output stream is then relocated from the Heat Exchanger II to the hydrolysis reactor (Reactor I) where triolein is converted to oleic acid through a hydrolysis reaction. Methanol (methanol-to-oil molar ratio of 20:1) is heated in Heat Exchanger II to 270 • C and then is compacted to 27 atm. In the next stage, this stream is mixed with Reactor I output stream and is sent to the esterification reactor (Reactor II). Due to the esterification reaction, 98% of oleic acid is converted to FAME. The esterification reactor output is sent to Distillation Tower I with six theoretical stages and a reflux ratio of 2. Biodiesel with 98.47 wt. % is obtained from the upper part of the tower. In order to obtain glycerol with high purity, the lower stream of Distillation Tower I is sent to Distillation Tower II. The number of theoretical stages and the reflux ratio of this tower is similar to Distillation Tower I. Glycerol with 99.40 wt. % is obtained for the lower part of this tower. Furthermore, the upper stream of this tower is sent to the separation tower to recycle the methanol and water.

Biodiesel Production Process from Microalgae
An industrial source that emits flue gas (such as a power plant) can be employed to separate CO2 from the flue gas and to improve algae growth for biodiesel production. An alternative process for diesel production using algae cultivation is investigated in this section and its technical and economic feasibility is examined. This system constitutes two main sections. The first section (upstream process) is aimed at separating the CO2, cultivating algae, and producing lipids. The second section (downstream process) includes several steps including lipid pretreatment, transesterification, separation, and biodiesel

Biodiesel Production Process from Microalgae
An industrial source that emits flue gas (such as a power plant) can be employed to separate CO 2 from the flue gas and to improve algae growth for biodiesel production.
An alternative process for diesel production using algae cultivation is investigated in this section and its technical and economic feasibility is examined. This system constitutes two main sections. The first section (upstream process) is aimed at separating the CO 2 , cultivating algae, and producing lipids. The second section (downstream process) includes several steps including lipid pretreatment, transesterification, separation, and biodiesel synthesis.

Feedstock Composition
The algae species selected for cultivation should have certain properties so that the flue gas can be used as a CO 2 source. A number of species were found to meet the criteria for using flue gas to grow them. One is Chlorella, a single-cell green alga. The dry weight of the Chlorella oil is usually between 28% and 32% [55] but may reach to as high as 55% if grown heterotrophically [56]. Due to reasons such as potential ease of use and available data for its growth, harvesting, and extraction, Chlorella is selected for this simulation. The assumed wt. % of FFA content is 0.05 so there is no need for the pretreatment stage. In this study, the temperature is set at 60 • Celsius, methanol is used as alcohol, NaOH acts as a catalyst, and the methanol-to-oil molar ratio is set at 6:1. Also, NRTL and RK-Soave thermodynamic models are utilized in the simulation FAME and Glycerol Separation Sodium hydroxide with 1 wt. %, methanol, and algae oil (99.95 wt. %) are fed into Reactor I. In order to maximize the efficiency, two transesterification reactions are employed. The transesterification products, which include fatty acid methyl esters (FAME) and glycerol, are cooled from 60 • C to 33.3 • C in Reactor I and then are pumped into Decanter I where FAME and byproducts are separated (Figure 8). The biodiesel and glycerol produced in Reactor II undergo a more intensive separation process in Decanter II. Because of the unmixability of the biodiesel and glycerol and the gravity difference, they are separated at a temperature lower than the reaction temperature and atmospheric pressure. Since the glycerol phase is much heavier than the biodiesel phase, they can be separated with the help of gravity (glycerol is deposited in the bottom of the pot). and glycerol, are cooled from 60 °C to 33.3 °C in Reactor I and then are pumped into Decanter I where FAME and byproducts are separated ( Figure 8). The biodiesel and glycerol produced in Reactor II undergo a more intensive separation process in Decanter II. Because of the unmixability of the biodiesel and glycerol and the gravity difference, they are separated at a temperature lower than the reaction temperature and atmospheric pressure. Since the glycerol phase is much heavier than the biodiesel phase, they can be separated with the help of gravity (glycerol is deposited in the bottom of the pot).

Methanol Recovery
Biodiesel constitutes the major part of light products, which is separated in Decanter II, heated up to 60 °C and then sent to Distillation Tower II with theoretical stages of 6, a total condenser, and a kettle reboiler so that methanol can be separated from biodiesel phase through the overhead as vapor and recycled. The reflux ratio is considered 1.5 in Figure 8. Simulation of a biodiesel production unit from microalgae [57].

Methanol Recovery
Biodiesel constitutes the major part of light products, which is separated in Decanter II, heated up to 60 • C and then sent to Distillation Tower II with theoretical stages of 6, a total condenser, and a kettle reboiler so that methanol can be separated from biodiesel phase through the overhead as vapor and recycled. The reflux ratio is considered 1.5 in order to achieve a satisfactory separation of methanol and other components.

Alkali Removal
The end effluents from Distillation Tower II are cooled down to 25 • C and then are sent to Decanter III to neutralize the excess sodium hydroxide with hydrogen chloride. Hydrogen chloride is added to remove the residual sodium hydroxide catalyst and destroy any soap that might have been formed through the reverse saponification reaction. By neutralizing the stream before the water wash stage we can lower the water consumption for biodiesel purification and minimize the possibility of emulsion formation when adding washing water to the biodiesel.

Water Washing (FAME Purification)
After being separated from other components (such as sodium hydroxide and triglyceride), biodiesel is sent to Decanter IV where it undergoes purification by slow washing with warm water and becomes free from any residual catalyst, salt, methanol, free glycerol, and soap. To meet the ASTM D 6751 specifications, the produced biodiesel should have a wt. % of 99.65. The discharging effluents from the water wash process can be recycled.

Glycerol Purification
The glycerol stream is heated to 60 • C after separation in Decanter I and then is sent to Distillation Tower I with five theoretical stages, a total condenser, and a kettle reboiler. The residual biodiesel comes out of the overhead column as vapor and the glycerol comes out through the bottom of the walls and cools down eventually. The produced glycerol can be commercially used as a byproduct.

Economic Evaluation of the Construction of a Biodiesel Production Plant from Various Types of Waste
In this section, different factors are discussed to evaluate the economic aspect of each process, including fixed investment cost (FIC), total manufacturing cost (TMC), after-tax rate of return (ATROR), and biodiesel break-even point (BEP).
We have updated the results of Magdalena Olkiewicz's study [54] according to the Chemical Engineering Index to estimate the investment and plant construction cost. These results are provided in Tables 12 and 13. Extrapolation of the purchase costs to other capacities and scales is based on the scaling factor rule: where cost A and cost B represent the purchase costs of a unit operation with size or capacity size A and size B. n is the corresponding scaling factor for the equipment. According to Table 12, the total investment cost for the construction of a biodiesel production unit from sewage sludge is $9.86 million. Regarding the total investment cost, the extraction step is responsible for 54 % of the total investment followed by purification, recovery and reaction (Table 12). On the other hand, according to Figure 9a, the largest share of the total investment cost belongs to the cost of tanks (33%), mixer units (26%), respectively. The lowest cost of equipment is for pumps (1%).  Total Manufacturing Cost The total cost of biodiesel production from sewage sludge is presented in Table 13. According to this table the unit cost of biodiesel production is 0.567$ per kg. With respect to manufacturing cost, the extraction step is also the most expensive, representing 51% of the total, while purification, reaction and recovery account for 23%, 19% and 7%, respectively (Table 13). On the other hand, maintenance costs (25%) and cooling have the highest and lowest share of production costs, respectively (Figure 9b). After maintenance costs (19%), the largest share of production costs belongs to operating costs (18%).  The results of this economic evaluation of biodiesel production from sewage sludge show that the proposed direct lipid extraction from liquid sludge is the costlier stage for investment as well as in terms of process manufacturing. Accordingly, any improvement in the lipid extraction stage will have a dramatic positive effect on the final profitability and consequently on the final price of the produced biodiesel.

Fixed Investment Costs
The cost of fixed equipment for biodiesel production unit based on the non-catalytic supercritical process was updated by Malkovich et al. [58] and Yan Cao et al. [59] The details are presented in Table 14.

Total Manufacturing Cost
The total cost of biodiesel production from sewage sludge is presented in Table 13. According to this table the unit cost of biodiesel production is 0.567$ per kg.
With respect to manufacturing cost, the extraction step is also the most expensive, representing 51% of the total, while purification, reaction and recovery account for 23%, 19% and 7%, respectively (Table 13). On the other hand, maintenance costs (25%) and cooling have the highest and lowest share of production costs, respectively (Figure 9b). After maintenance costs (19%), the largest share of production costs belongs to operating costs (18%).
The results of this economic evaluation of biodiesel production from sewage sludge show that the proposed direct lipid extraction from liquid sludge is the costlier stage for investment as well as in terms of process manufacturing. Accordingly, any improvement in the lipid extraction stage will have a dramatic positive effect on the final profitability and consequently on the final price of the produced biodiesel.

Economic Evaluation of Biodiesel Production from Edible Waste Oil Fixed Investment Costs
The cost of fixed equipment for biodiesel production unit based on the non-catalytic supercritical process was updated by Malkovich et al. [58] and Yan Cao et al. [59] The details are presented in Table 14.   Figure 10a shows the share of each equipment in the total cost of purchasing equipment as a percentage. According to this figure, the highest and lowest share of equipment costs are oil storage tanks (24%) and glycerin (1%), respectively. After oil storage tank, the largest share of equipment costs is related to biodiesel storage tank (22%).  Figure 10a shows the share of each equipment in the total cost of purchasing equipment as a percentage. According to this figure, the highest and lowest share of equipment costs are oil storage tanks (24%) and glycerin (1%), respectively. After oil storage tank, the largest share of equipment costs is related to biodiesel storage tank (22%).

Total Manufacturing Cost
The flow rate of the raw material and the amount of catalyst, water, and electricity were taken from the results of Salehi's study [25]. These results are shown in Table 15. According to this table, the waste cooking oil cost amounts to $2.044 million which is the highest among the production costs. Therefore, feedstock cost plays the biggest part in the total manufacturing cost. According to Figure 10b and Table 15, methanol cost stands at $1.773 million, which is a big share of the total manufacturing cost compared to other processes. The reason for this is the high molar ratio of methanol to oil.   One of the advantages of this process is the non-use of catalysts, which reduces the costs of purchasing catalysts and separation. In Iran, energy and labor prices are comparatively inexpensive. As a consequence, these costs have no significant effect on TMC as shown in Table 15. According to Table 15, the cost of biodiesel production by the noncatalytic two-stage methanol supercritical process method is $0.530/kg.

Fixed Investment Costs
The scale-up information and capital costs for each unit operation for harvesting and dewatering has been presented in Table 16. According to

Total Manufacturing Cost
The flow rate of the raw material and the amount of catalyst, water, and electricity were taken from the results of Salehi's study [25]. These results are shown in Table 15. According to this table, the waste cooking oil cost amounts to $2.044 million which is the highest among the production costs. Therefore, feedstock cost plays the biggest part in the total manufacturing cost. According to Figure 10b and Table 15, methanol cost stands at $1.773 million, which is a big share of the total manufacturing cost compared to other processes. The reason for this is the high molar ratio of methanol to oil. One of the advantages of this process is the non-use of catalysts, which reduces the costs of purchasing catalysts and separation. In Iran, energy and labor prices are comparatively inexpensive. As a consequence, these costs have no significant effect on TMC as shown in Table 15. According to Table 15, the cost of biodiesel production by the non-catalytic two-stage methanol supercritical process method is $0.530/kg.

Economic Evaluation of Biodiesel Production from Microalgae Fixed Investment Costs
The scale-up information and capital costs for each unit operation for harvesting and dewatering has been presented in Table 16. According to Table 16, the total investment cost to build a biodiesel production unit from microalgae is $927.68 million. Also, based on Figure 11a, the highest and lowest share of equipment costs are related to pumps (20%) and glycerin storage tank (1%), respectively. After pumps, the largest share of equipment costs belongs to heat exchangers (14%), but it should be noted that the total cost of biodiesel and glycerin towers (16%) is more than the cost of heat exchangers.     According to Table 16, the total investment cost to build a biodiesel production unit from microalgae is $927.68 million. Also, the highest and lowest share of equipment costs are related to pumps (20%) and glycerin storage tank (1%), respectively (Figure 11a). After pumps, the largest share of equipment costs belongs to heat exchangers (14%), although it should be noted that the total cost of biodiesel and glycerin towers (16%) is more than the cost of heat exchangers.

Total Manufacturing Cost
The feasible outputs and specific energy requirement of unit operations has been reported in Table 17. Based on Table 17, prices for electricity, natural gas, and steam are presumed to be $0.11, $0.044, and $0.055, per KW/h [60], respectively. Labor costs are calculated based on Iran's minimum wage in 2020. According to Table 17, the total cost of biodiesel production from microalgae is estimated at $99.669 million, and the unit cost of biodiesel production is $0.543 per kilogram. According to Figure 11b, the highest and lowest share of production costs are related to algal costs (32%) and water consumption, respectively. After algae, the largest share of production costs belongs to the purchase costs of methanol (31%) and sodium hydroxide catalyst (10%), respectively.

Break-Even Prices
The break-even price of biodiesel production is calculated based on Equation (11). These values are presented for all units in Table 18. The break-even price of biodiesel production of microalgae unit is lower than other units, which indicates that this unit is more profitable than other units. where:

ATROR
A summary of the economic results of all units is presented in Table 19. According to this table, ATROR biodiesel production units from edible waste oil and microalgae is more than the discount rate in Iran (18%), which indicates the economic justification of these units. In other words, the mentioned units have a good profitability. It should be noted that the biodiesel production unit from sewage sludge has no economic justification for investment due to its lower ATROR in comparison with the discount rate. Among all units, the highest percentage of ATROR belongs to the microalgae unit. In general, biorefinery has a good profit margin, so the construction of biorefinery in Iran has economic justification. Since the price of glycerin includes only about 5% of sales revenue of all units, so the effect of this item on sales revenue is ignored and only the sensitivity of the effect of biodiesel price on ATROR is analyzed. The results of the sensitivity analysis of the effect of biodiesel price on ATROR for all units are shown in Figure 12. Accordingly, the highest and lowest impact of biodiesel price on ATROR belongs to microalgae and sludge units, respectively. Since the price of glycerin includes only about 5% of sales revenue of all units, so the effect of this item on sales revenue is ignored and only the sensitivity of the effect of biodiesel price on ATROR is analyzed. The results of the sensitivity analysis of the effect of biodiesel price on ATROR for all units are shown in Figure 12. Accordingly, the highest and lowest impact of biodiesel price on ATROR belongs to microalgae and sludge units, respectively.

Sensitivity Analysis of the Effect of Biodiesel Production Cost on ATROR
The highest share of the production cost of sludge unit is related to maintenance items (25%), operating force (19%) and total raw materials (18%), respectively. Also, the largest share of production cost of edible waste oil unit, belongs to edible waste oil (39%), methanol (34%) and maintenance (10%), respectively. On the other hand, the largest shares of the cost of microalgae production are algae items (32%), methanol (31%) and NaOH (10%). As mentioned before, the cost of biodiesel production of all units consists of different items, so to facilitate sensitivity analysis, only the effect of the most important item, the cost of raw materials (sludge, edible waste oil and algae), methanol and catalysts (NaOH and HCl) are applied to the ATROR. The results of raw material's cost sensitivity analysis on ATROR for all units are shown in Figure 13. As shown in Figure 13, the maximum and lowest cost impact of raw materials on ATROR belong to microalgae and sludge units, respectively.

Sensitivity Analysis of the Effect of Fixed Investment Cost on ATROR
The cost of purchasing equipment for sludge units, edible waste oil and microalgae units is 39.5%, 51.7% and 50.5% of the total fixed investment cost, respectively. As a result, a major share of the total cost of fixed investment is allocated to the cost of purchasing

Sensitivity Analysis of the Effect of Biodiesel Production Cost on ATROR
The highest share of the production cost of sludge unit is related to maintenance items (25%), operating force (19%) and total raw materials (18%), respectively. Also, the largest share of production cost of edible waste oil unit, belongs to edible waste oil (39%), methanol (34%) and maintenance (10%), respectively. On the other hand, the largest shares of the cost of microalgae production are algae items (32%), methanol (31%) and NaOH (10%). As mentioned before, the cost of biodiesel production of all units consists of different items, so to facilitate sensitivity analysis, only the effect of the most important item, the cost of raw materials (sludge, edible waste oil and algae), methanol and catalysts (NaOH and HCl) are applied to the ATROR. The results of raw material's cost sensitivity analysis on ATROR for all units are shown in Figure 13. As shown in Figure 13, the maximum and lowest cost impact of raw materials on ATROR belong to microalgae and sludge units, respectively. equipment, so only the impact of this item on ATROR is examined and the impact of other items on ATROR is ignored. As shown in Figure 14, the maximum and minimum impact of equipment purchase cost on ATROR belongs to the units of sludge and edible waste oil, respectively.

Sensitivity Analysis of the Effect of Fixed Investment Cost on ATROR
The cost of purchasing equipment for sludge units, edible waste oil and microalgae units is 39.5%, 51.7% and 50.5% of the total fixed investment cost, respectively. As a result, a major share of the total cost of fixed investment is allocated to the cost of purchasing equipment, so only the impact of this item on ATROR is examined and the impact of other items on ATROR is ignored. As shown in Figure 14, the maximum and minimum impact of equipment purchase cost on ATROR belongs to the units of sludge and edible waste oil, respectively. equipment, so only the impact of this item on ATROR is examined and the impact of other items on ATROR is ignored. As shown in Figure 14, the maximum and minimum impact of equipment purchase cost on ATROR belongs to the units of sludge and edible waste oil, respectively.

Sensitivity Analysis of the Effects of Sales Revenue and Fixed Production and Investment Costs on ATROR
This section analyzes the sensitivity of the effects of total sales revenue and total production costs and fixed investment on the ATROR bio-refinery. To analyze the sensitivity of the total revenue from sales and production costs and fixed investment is considered. The results of this sensitivity analysis are shown in Figure 15. As shown in Figure 15, the highest and lowest impacts on ATROR belong to sales revenue items and fixed investment costs, respectively.
Sustainability 2022, 14, x FOR PEER REVIEW 28 o of the total revenue from sales and production costs and fixed investment is consider The results of this sensitivity analysis are shown in Figure 15. As shown in Figure 15, highest and lowest impacts on ATROR belong to sales revenue items and fixed investm costs, respectively.

Conclusions
• Among all types of waste, municipal and industrial wastewater sludge (687.29 m lion liters) has the highest potential of biodiesel production in terms of quantity, e of gathering and collection, and cost. waste cooking oil (565.51 million liters) a animal fat (472.72 million liters) are in the next rankings. Generally, Iran can prod 2515.27 million liters of biodiesel annually from different types of fats derived fr wastes.

•
The analytic hierarchy process (AHP) method was utilized to determine the best cation for establishing the biodiesel production plant. From various criteria, f which are biomass resource availability, investment cost, land use and job creat were chosen. Moreover, three areas of Iran (southern, southwest and northern are were nominated. After considering all options and indicators and based on the A method's findings, the southern area of Iran is selected for establishing the biodie plant in Iran.
A biorefinery, which includes three units of sewage sludge, edible waste oil and croalgae, economic evaluation and sensitivity analysis for all units and the whole bio finery are performed in COMFAR software. The results are as follow: • Fixed investment value: The highest and lowest investment costs per unit of prod tion belong to the units of sewage sludge ($1.735/kg) and microalgae ($0.375/kg), spectively.

•
Production costs: The highest and lowest production costs are related to wastewa sludge units ($0.567/kg) and edible waste oil ($0.530/kg), respectively. • The highest and lowest break even prices of biodiesel production belong to sew sludge units ($5.957/kg) and microalgae ($1.168/kg), respectively, indicating that microalgae unit is more profitable than other units.

Conclusions
• Among all types of waste, municipal and industrial wastewater sludge (687.29 million liters) has the highest potential of biodiesel production in terms of quantity, ease of gathering and collection, and cost. waste cooking oil (565.51 million liters) and animal fat (472.72 million liters) are in the next rankings. Generally, Iran can produce 2515.27 million liters of biodiesel annually from different types of fats derived from wastes.

•
The analytic hierarchy process (AHP) method was utilized to determine the best location for establishing the biodiesel production plant. From various criteria, four which are biomass resource availability, investment cost, land use and job creation were chosen. Moreover, three areas of Iran (southern, southwest and northern areas,) were nominated. After considering all options and indicators and based on the AHP method's findings, the southern area of Iran is selected for establishing the biodiesel plant in Iran.
A biorefinery, which includes three units of sewage sludge, edible waste oil and microalgae, economic evaluation and sensitivity analysis for all units and the whole biorefinery are performed in COMFAR software. The results are as follow: • Fixed investment value: The highest and lowest investment costs per unit of production belong to the units of sewage sludge ($1.735/kg) and microalgae ($0.375/kg), respectively. • Production costs: The highest and lowest production costs are related to wastewater sludge units ($0.567/kg) and edible waste oil ($0.530/kg), respectively.
• The highest and lowest break even prices of biodiesel production belong to sewage sludge units ($5.957/kg) and microalgae ($1.168/kg), respectively, indicating that the microalgae unit is more profitable than other units.

•
The highest and lowest ATROR belong to microalgae units (29.16%) and sewage sludge (10.33%), respectively. In other words, the microalgae unit is more profitable than other units and the invested cost is returned to the investor in a shorter period of time (3.43 years). On the other hand, due to having ATROR lower than the discount rate (18% in Iran), the sewage sludge unit has no economic justification for investment.

•
The results of sensitivity analysis show that the highest and lowest impact of biodiesel price on ATROR belongs to microalgae and sludge units, respectively. Also, the highest and lowest impact of raw material cost on ATROR belongs to microalgae and sludge units, respectively. On the other hand, the highest and lowest impact of equipment purchase cost on ATROR is related to sludge and edible waste oil units, respectively.

•
The results of the sensitivity analysis of total sales revenue, total production costs and fixed investment on ATROR Biorefinery indicate that the highest and lowest impact on ATROR belong to sales revenue items and fixed investment costs, respectively.
In general, biorefinery provides a good profit margin of 27.92% due to its ATROR, so that the invested cost is returned to the investor in a period of 3.58 years. Therefore, the construction of biorefinery in Iran should have economic justification.