Integration of algae‐based biofuel production with an oil refinery: Energy and carbon footprint assessment

Biofuel production from algae feedstock has become a topic of interest in the recent decades since algae biomass cultivation is feasible in aquaculture and does therefore not compete with use of arable land. In the present work, hydrothermal liquefaction of both microalgae and macroalgae is evaluated for biofuel production and compared with transesterifying lipids extracted from microalgae as a benchmark process. The focus of the evaluation is on both the energy and carbon footprint performance of the processes. In addition, integration of the processes with an oil refinery has been assessed with regard to heat and material integration. It is shown that there are several potential benefits of co‐locating an algae‐based biorefinery at an oil refinery site and that the use of macroalgae as feedstock is more beneficial than the use of microalgae from a system energy performance perspective. Macroalgae‐based hydrothermal liquefaction achieves the highest system energy efficiency of 38.6%, but has the lowest yield of liquid fuel (22.5 MJ per 100 MJalgae) with a substantial amount of solid biochar produced (28.0 MJ per 100 MJalgae). Microalgae‐based hydrothermal liquefaction achieves the highest liquid biofuel yield (54.1 MJ per 100 MJalgae), achieving a system efficiency of 30.6%. Macro‐algae‐based hydrothermal liquefaction achieves the highest CO2 reduction potential, leading to savings of 24.5 resp 92 kt CO2eq/year for the two future energy market scenarios considered, assuming a constant feedstock supply rate of 100 MW algae, generating 184.5, 177.1 and 229.6 GWhbiochar/year, respectively. Heat integration with the oil refinery is only possible to a limited extent for the hydrothermal liquefaction process routes, whereas the lipid extraction process can benefit to a larger extent from heat integration due to the lower temperature level of the process heat demand.


Summary
Biofuel production from algae feedstock has become a topic of interest in the recent decades since algae biomass cultivation is feasible in aquaculture and does therefore not compete with use of arable land. In the present work, hydrothermal liquefaction of both microalgae and macroalgae is evaluated for biofuel production and compared with transesterifying lipids extracted from microalgae as a benchmark process. The focus of the evaluation is on both the energy and carbon footprint performance of the processes. In addition, integration of the processes with an oil refinery has been assessed with regard to heat and material integration. It is shown that there are several potential benefits of co-locating an algae-based biorefinery at an oil refinery site and that the use of macroalgae as feedstock is more beneficial than the use of microalgae from a system energy performance perspective. Macroalgae-based hydrothermal liquefaction achieves the highest system energy efficiency of 38.6%, but has the lowest yield of liquid fuel (22.5 MJ per 100 MJ algae ) with a substantial amount of solid biochar produced (28.0 MJ per 100 MJ algae ). Microalgae-based hydrothermal liquefaction achieves the highest liquid biofuel yield (54.1 MJ per 100 MJ algae ), achieving a system efficiency of 30.6%. Macro-algae-based hydrothermal liquefaction achieves the highest CO 2 reduction potential, leading to savings of 24.5 resp 92 kt CO 2eq /year for the two future energy market scenarios considered, assuming a constant feedstock supply rate of 100 MW algae, generating 184.5, 177.1 and 229.6 GWh biochar /year, respectively. Heat integration with the oil refinery is only possible to a limited extent for the hydrothermal liquefaction process routes, whereas the lipid extraction process can benefit to a larger extent from heat integration due to the lower temperature level of the process heat demand.

K E Y W O R D S
algae-based fuels, biorefinery, hydrothermal, lipid extraction, liquefaction, process integration In memory of Viktor Andersson who passed away on the 25th of May 2018 at the young age of 34, after a long and courageous battle against brain cancer-the present work is part of his PhD thesis that he still managed to defend despite being under the many side-effects of postsurgery treatment.

| INTRODUCTION
Biofuels can be synthesized in many ways from a variety of biomass feedstocks. One type of biomass feedstock of high interest from a medium-to long-term perspective is algae, which can be grown efficiently on nonarable land or at sea. Algal biomass can be divided into microalgae and macroalgae. Microalgae must be cultivated in discrete containers to ensure efficient harvesting, whereas macroalgae can be cultivated directly at sea. Traditionally, algaebased biofuel production routes have mainly involved lipid extraction (LE) for biodiesel production; thus, microalgae routes have been investigated to a greater extent due to their larger share of lipids. Macroalgae have become more interesting with the development of more advanced routes, such as hydrothermal liquefaction (HTL) in which a larger share of the algae feedstock including proteins and carbohydrates can be utilized in the process. HTL can utilize biomass with low dry solids contents, which is particularly useful for algae.
The present and emerging biofuel and/or biorefinery concepts are of high interest to the industrial sector, striving for more sustainable process concepts including biobased feedstocks. Given the limited nature of biomass resources, an efficient conversion is necessary, and both use of waste streams as well as industrial excess heat through process integration can help to improve process performance. Within the oil refinery industry, being a sector with a considerable amount of excess heat available, several options have been investigated to generate valueadded products and services by using the excess heat. For example, Brau et al 1 investigated process integration aspects of hydrogen production from biomass via gasification, and Johansson et al 2,3 discussed the production of Fischer-Tropsch diesel and the utilization of excess heat to decrease the operating costs of carbon capture. Algaebased fuel production is another option for heat integration with the oil refinery industry.
The present article describes a case study of the potential synergy effects that can be achieved through energy and material integration of three different algaebased biofuel routes with an oil refinery. Both microalgae and macroalgae are considered, and the concepts are evaluated in terms of CO 2eq emissions reduction potential as well as energy efficiency.

| STATE OF THE ART
There is currently an increasing interest in investigating innovative concepts for producing biofuels from algae feedstock. The focus has been mainly on microalgae, which is area efficient to cultivate and can be cultivated on nonarable land. However, problems with high water consumption, nutrient cycle and CO 2 balances have also been reported. [4][5][6] The main concern for algae cultivation is the supply of nutrients. The energy and environmental impacts of nutrient must be decreased, making use of, for example, waste streams or areas with risk for eutrophication. Also, all of the main steps in the algae process (cultivation, extraction, transportation and combustion) have been identified as potential energy bottlenecks of algae biofuels. [7][8][9] The present literature review focuses on work that presents data applicable to the modelling of HTL of microalgae and macroalgae feedstocks. The reader is referred to a previous paper 4 for further information about the biodiesel process used as reference process in the present assessment.
Biller and Ross 10 investigated the yields of oil from HTL with different biochemical contents. They found that biocrude formation followed the trend lipids>proteins> carbohydrates and that carbohydrates are the only components that benefit from using a catalyst. There are numerous papers presenting yields and compositions for HTL of different algae strains, mostly from microalgae, but also from macroalgae, the most relevant to the present work being presented in the following. Valdez et al 11 developed a kinetic model to predict the yield of biocrude, aqueous phase, gas and solids as a function of the initial composition of microalgae. Rate constants were derived for four different temperature levels. Roberts et al 12 compared the biocrude yields of macroalgae and microalgae (grown under the same conditions) and found that on a dry ashfree weight basis, the yields of biocrude were similar both in terms of energy density and elemental composition with respect to carbon, hydrogen and oxygen.
Zhang et al 13 compared anaerobic digestion and HTL as measures for energy output and nutrient recovery to be used in algae cultivation after first extracting lipids from the microalgae. They concluded that more nitrogen was recovered in the anaerobic digestion process, but HTL generated a larger recovery rate of phosphorus. They also concluded that the HTL process yielded a larger recovery rate of energy, despite the fact that the lipids were extracted from the biomass. In an earlier study, Biller and Ross 10 concluded that, in the HTL process, lipids yielded the highest conversion from biomass to biocrude.
Seasonal variations in growth and composition of Laminaria digitata and the implications for thermochemical and biochemical biofuel production routes were mapped by Adams et al. 14,15 Their results show large variations in chemical composition throughout the year with July giving the best yields for such different processes as pyrolysis and fermentation to ethanol. Raikova et al 16 analysed the effect of geographical location on biocrude yields from macroalgae HTL, stating that significant variations in composition were observed between different regions (Baltic and Atlantic), but even between sites with close proximity. Localized conditions are considered to affect HTL product composition significantly. Raikova et al 16 conclude that no single macroalgae species will be globally dominant for biorefinery concepts, but rather locally optimized species should be selected.
Tu et al 17 compared the water consumption between open pond cultivation and photobioreactors (PBR). They concluded that PBRs consume less water than open ponds, and that most of the water is required in the cultivation and harvesting steps. They also concluded that water consumption is higher for algae compared with land-cultivated biomass. Venteris et al 18 compared the water consumption of LE and HTL, and concluded that the HTL route significantly decreases the water consumption compared with LE for the same amount of fuel produced (at least 33% freshwater and 85% saline groundwater). Lardon et al 19 showed that the water consumption is 35 L H 2 O /kWh when producing biodiesel via LE, but no comparison to HTL routes was done.
There is only one study, to the authors' knowledge, that addressed the water consumption for macroalgae production. 20 It states that, for seaweed production and pretreatment within the framework of biogas and ethanol production, 5.8 L water per ton dry seaweed are consumed.
With respect to energy consumption and energy efficiency of algae-based biofuel production processes, a recent study on biodiesel and ethanol production from microalgae identified algae dewatering/drying and lipid extraction as process steps with the highest impact on energy performance for biodiesel production, resulting in a net energy deficit for the process as well as a larger carbon footprint than fossil pathways. 8 Suparmaniam et al 9 compared different technologies for microalgae cultivation and harvesting with respect to the capital and energy intensity, and identified PBRs as being superior to open pond cultivation, and proposed the use of waste biomasses as flocculation agents to improve harvesting process performance.
Energy analyses of for algae-based biofuel production routes are numerous, 21,22 but these generally do not cover energy integration opportunities such as using industrial excess heat as a heat source. Frank et al 23 compared the energy balances of the LE and HTL routes and found that a more efficient utilization of the whole algae biomass feedstock makes the HTL route more material efficient but electricity and heat generation from the HTL route for covering internal demands only lead to an electricity export of 1% of the generated electricity, whereas for the LE route 14% of the generated electricity could be exported for the base case. At biocrude yields for HTL above 0.4 g oil/g algae, the internal electricity demand could not be covered anymore, leading to electricity import. In their analysis, it was also shown that more nitrogen was present in the HTL oil compared with the lipid slurry in the LE route and that this could be a problem, given that the nutrients were produced artificially and not recycled.

| OBJECTIVES
The objectives of this article are to investigate a possible future algae-based biorefinery from a system perspective and to assess potential integration opportunities with existing oil refineries. Heat recovery from the refinery for improving the process energy efficiency as well as material integration aspects (eg, use of hydrogen from the oil refinery) are considered. HTL of both microalgae and macroalgae are assessed and compared with LE and transesterification for biodiesel production as a benchmark process. The evaluation parameters considered are the processes' energy balance and carbon footprint both on a process level as well from an energy system perspective. Comparing stand-alone operation to co-location and integration with an oil refinery, the possible benefits of process integrated biofuel production are highlighted. The process mass and energy balances are established based on published literature data and models. Another important objective of the present article is to illustrate the advantages and drawbacks between biofuel production pathways based on microalgae and macroalgae. The present ex ante evaluation of algae biorefinery concepts does not aim at presenting exact numbers for the different routes evaluated, but rather at indicating interesting development pathways to guide research and technology development. 24,25 Cost data for large-scale algae cultivation and harvesting systems are both scarce and incorporate a large level of uncertainty, as stated as by a recent study trying to quantify the techno-economic uncertainties of microalgae-based HTL. 26 Economic aspects therefore are excluded from the present article, the focus being on energy and carbon footprint analyses.

| STUDIED SYSTEMS
The following three biorefinery routes were investigated in this work: R1 Biodiesel production from microalgae via LE and transesterification. Downstream anaerobic digestion was also considered for converting the remaining carbon into biogas. R2 HTL with a microalgae feedstock. Catalytic hydrothermal gasification (CHG) was considered for converting the remaining organic carbon in the aqueous phase after HTL. The products are a biocrude similar to regular crude oil and biogas. R3 HTL with a macroalgae feedstock. Catalytic hydrothermal gasification (CHG) was considered for converting the remaining organic carbon in the aqueous phase after HTL. The products are a biocrude similar to regular crude oil, biogas and biochar.
R1 has been investigated in numerous studies and was considered as a reference process, whereas R2 and R3 are processes have only being investigated more recently.
All three processes were investigated as stand-alone processes as well as co-located with an oil refinery in order to enable energy and material integration between the two processes. An oil refinery located on the west coast of Sweden was considered for the integration study. The oil refinery has large amounts of excess heat available that can be used for heating of other processes located near the site. In this analysis, the biofuel production processes were considered as the preferred excess heat recipients. Previous studies have shown that the heat demand of algae cultivation fluctuates widely throughout the year, sometimes exceeding the amount of available excess heat. 4 In the present study algae cultivation is marine-based, and the available excess heat from the oil refinery can be used to supply the heat demand of the biofuel production process. In this article, only excess heat from the oil refinery that is currently cooled to the surroundings was considered available for use in the algae biofuel process, that is, no retrofitting to improve the refinery's energy efficiency was considered. In addition to the heat integration opportunities, there are a number of potential benefits from integrating biofuel processes with oil refineries. One option-that is considered in the present study-is to use hydrogen produced at the refinery. Even low-grade hydrogen at lower purity, that else is used for heat supply, might be considered for use within the biofuel production process.
The cultivation was assumed to be designed to generate a constant algae feedstock stream for the production process, which creates both a steady flow of biofuel to the market as well as a constant recipient of excess heat from the refinery over the year. Designing the cultivation in this manner is acknowledged to be uncertain because algae (both microalgae and macroalgae) have different growth rates during different periods of the year. A large storage capacity for algae-avoiding degradation of the biofuel process feedstock-will be necessary. The design of such a system is a question that still needs to be resolved and will affect the economic performance of the concept. Nevertheless, constant operation of the biofuel plant is important to maximize the process integration benefits and to efficiently valorize the capital investment by maximising operating hours and biofuel generation.
Cultivation and harvesting are the two most uncertain steps of the process, both in terms of data gathering for small systems and for the scale-up of the system. It was assumed that all cultivation is marine based to avoid competition with other land uses, such as food production, other biofuel feedstock, housing, and so on.
For microalgae, a system in which algae are cultivated in PBRs (plastic bags) floating on the surface was assumed. 27 The difference in density between the cultivation liquid and the sea water keeps the bags on the surface, and harvesting is performed through a pipeline system. Nutrients (including CO 2 ) must be added to the system, and for sustainable cultivation, this probably needs to be done via a natural source of nutrients (eg, wastewater) and a well-functioning safety and recycling system to avoid losses to the environment. 28,29 The electricity demand also includes the pumping of nutrients and dewatering of the algae. 27 Macroalgae were assumed to be cultivated using long lines, where the algae have been seeded in a sheltered environment and then placed in the ocean for cultivation. The algae are then harvested by ship, and up to 80% of the algae can be harvested, while 20% remains on the line. Therefore, re-seeding only has to be performed every fourth year. 30 The electricity demand in the macroalgae process is due to dewatering of the algae after harvesting and the use of a hatchery where algae are grown in a sheltered environment before they are placed in the ocean. In macroalgae cultivation, nutrients (including carbon) are taken from the ocean and can, if recycled properly, reduce eutrophication. With increased climate change, eutrophication of coastal waters is forecasted to increase. 31 Hence, the risk of nutrition depletion is considered small but must be evaluated for each case. The diesel demand of the process is due to the use of barges when planting and harvesting the algae. While microalgae can be harvested continuously through a pipeline system, the use of barges for macroalgae harvesting assumes that storage of harvested macroalgae must be implemented to ensure a constant feedstock flow to the biofuel process, but information regarding how such storage would be accomplished in practice is scarce and must be researched further. Due to seasonal variations, the need for storage can be larger during some parts of the year.
The processes were evaluated in terms of energy efficiency and carbon footprint in terms of CO 2 equivalents (CO 2eq ). Nutrient use and eutrophication potential of the biofuel routes were also investigated because all three routes have a residual slurry/solid that can be used for nutrient recovery.
The algae strains chosen (Nannochloropsis and Saccharina latissima) were the ones with most data available in literature. In the microalgae case, the tolerance to brackish-or seawater was also considered. The purpose of the present ex ante evaluation is to identify the process parameters affecting the energy efficiency and carbon footprint of the process chains most. Further studies evaluating the influence of using other strains on overall process energy efficiency and carbon footprint must be made in order to establish that these two strains are the most suitable.

| System boundaries
A major impact on the energy efficiency of algae biofuel processes stems from the cultivation of the feedstock. Furthermore, some parts of the processes have a substantial electricity demand. An expanded system boundary was therefore used in the carbon footprint analysis so as to capture emissions not taking place onsite. In this work, all nutrients (including CO 2 ) were assumed to be available. Nutrients were assumed to be recycled and re-used, with a make-up flow consisting of transported sewage sludge from a wastewater treatment plant. Transport of the sludge is omitted in this article, since it is deemed to have negligible impact. The nutrient supply is addressed in the discussion. Figure 1 illustrates the major energy and material streams as well as the system boundaries for evaluation.

| Modelling parameters and performance indicators
The three processes are inherently different, both in terms of the technical aspects and in terms of technology readiness level (TRL). Most algae research is focused on LE for biodiesel production. 7 Although the HTL route has been investigated more frequently in recent years, it is still more difficult to find data applicable to biofuel production modelling for this route than for the LE route. Matlab and Excel-based models were used to calculate the mass and energy balances of the processes based on available data. The process scale assumed was 100 MW HHV of algae biomass feedstock for the stand-alone cases. Throughout this article, algae biomass refers to the dried algae, including the moisture that is bound within the cells. For microalgae, the water content for dry substance is 7.2%, 10 and for macroalgae, it is 6.4%. 32 For the co-locating and integration with the oil refinery, the maximum possible plant size with respect to heat F I G U R E 1 Schematic illustration of energy and material flows for stand-alone and integrated processes as well as system boundaries (process [white box] and overall energy system [light grey box] level) for the evaluation of the energy and carbon footprint performance of the three algae-based biofuel routes [Colour figure can be viewed at wileyonlinelibrary.com] integration with the refinery was also identified. The overall assumptions and specifications for the different process steps are given in Table 1.
In the following sections, the three algae biofuel process concepts are described in detail.

| Lipid extraction (LE) biofuel route (R1)
The modelling of R1 is described in detail in Andersson et al 4 . The model was updated with the microalgae composition used in the present article. The algae slurry is first dried in several stages (to 20 wt%) and is pretreated in a stirred ball-mill before it enters the lipid extraction process, where butanol is used as the extracting fluid. After removal of butanol by distillation, the lipids are transesterified using methanol (MeOH) at a ratio of 6:1. 33 The by-product glycerol is fed to the digester for coprocessing with the algae residues, while the transesterified lipids are mildly hydrotreated. The lipid biofuel is assumed to be free of polar lipids and pigments which would otherwise have made more upgrading steps necessary, as described in Davis et al. 34 Heat demands are taken from Pokoo-Aikins et al. 33 The basic process layouts for R1 are outlined in Figure 2.

| Hydrothermal liquefaction (HTL) biofuel route (R2 and R3)
The HTL process model was based to a large extent on Jones et al, 35 Frank et al, 23 Valdez et al 11 and Anastasakis and Ross. 32 The process layout itself as illustrated in Figure 3 was adopted from Frank et al, 23  further developed and evaluated experimentally in Jones et al. 35 The process route consists of HTL followed by CHG with electricity and heat energy demands stated as specific values per energy unit of biofuel produced. In order to adopt the numbers to the conditions in the present work, the energy demands were recalculated to feedstock specific numbers. The original values were recalculated to be specific to dry algae mass processed. It is assumed that the electricity requirements are mostly affected by the dry algae mass processed, thereby allowing to rescale the numbers to the present processes. The same process concept was assumed for both microalgae and macroalgae, although the yields of products are different. The reaction temperature for the HTL process is 350 C, and the reaction time is 15 minutes. 11,32 For a detailed description of the process, see Jones et al. 35 The product specifications for R2 were calculated using the algae strain of Nannochloropsis, a marine microalgae with a relatively high lipid content. 10 The yields of different products were calculated using the kinetic model developed by Valdez et al. 11 The product specifications for R3 were taken for Laminaria saccharina (also known as Saccharina latissima). 32,36 The information gathered includes biocrude HHV, yield of the different products and composition of the algae.
The yields from R2 and R3 were assumed to correspond to the same retention time (15 minutes) and temperature (350 C). The yields from R3 were taken from the literature, but R2 was modelled with input from Biller and Ross. 10 Kinetic data from Valdez et al 11 were used and applied to the algae input of Biller and Ross. 10 The HTL routes for microalgae and macroalgae R2 and R3 rely on a similar process concept, but variations occur due to differences in feedstock composition, in which affects the biocrude yield. Therefore, the electricity and heat demands for the two HTL process routes differ to some extent.

| Performance indicators
The efficiency of the processes was evaluated in relation to the primary energy input necessary to generate the products. Two different definitions were applied: • Process efficiency, only accounting for energy streams related to the biofuel conversion processes: • System efficiency, taking into account all energy streams related to the algae-based biorefinery system including cultivation and harvesting: F I G U R E 3 Overview of the combined HTL and CHG processes (R2 and R3). Flowsheet adopted and modified from Frank et al 23 where i denotes the product streams, j and k denote the input streams to the biofuel production process, respectively, to the cultivation and harvesting (ie, hydrogen, methanol and diesel). _ m refers to mass flows, HHV to mass-specific higher heating values, _ W el to electric power and _ Q to heat flow. Proc denotes the biofuel production process demands, and harv denotes the cultivation/harvesting demands. f prim refers to the primary energy conversion factors for the respective energy carrier/service.
The distinction between the two efficiency definitions is made to illustrate which parts in the overall biofuel system are the major obstacles for efficient biofuel production from an energy perspective. For example, a high η process but low η system indicates necessary research efforts within the cultivation and harvesting processes to improve the viability of the overall process concept. Changes for η process between stand-alone cases and co-located plants that are integrated with the oil-refinery reveal potential process integration benefits.
The energy content (HHV) of each energy carrier was recalculated to primary energy input, accounting, for example, for the electricity generation efficiency or conversion losses during production of fuels. The base case primary energy conversion factors are found in Table 2 together with HHV values for all relevant energy streams considered in the article. For hydrogen for example the low value of 0.22 is a combination of the primary energy conversion factor for electricity and the efficiency of the electrolysis process. The values are based on Edwards et al 37 and converted from LHV to HHV basis. As algae-based biofuels are considered a future technology, their evaluation must take into account future changes within the energy system. Changing primary energy conversion factors (as given in Table 2) for specific energy carriers, it is possible to estimate the influence on the algae biofuel process efficiency for the three routes investigated. Two relevant conversion factors-f prim,el and f prim,H2 -were therefore varied in a sensitivity analysis to quantify the impact they have on the results.
The evaluation of the emission consequences (per 100 MJ algae ) for the three process routes from a system perspective (as illustrated in Figure 1) was based on Equation 3: where ΔCO 2,ff denotes the CO 2eq emissions reduction for burning a biofuel (assumed CO 2 -neutral) instead of fossil fuel, and ΔCO 2,proc denotes the CO 2eq emissions associated with the process. ΔCO 2,proc is the sum of ΔCO 2,el (CO 2eq emissions from electricity generation), ΔCO 2,heat (CO 2eq emissions from heat generation) and ΔCO 2,mat (CO 2eq emissions related to material input, such as hydrogen, methanol, or diesel). The multiple products from the processes were assumed to replace fossil alternatives, namely, diesel (biodiesel), natural gas (biogas) and coal (biochar). Alternative applications to combustion of biochar with a potentially higher market value include its use as a catalyst for transesterification 38 or as a soil enhancer, 39 but were not considered in the present analysis. As algae biofuels are a medium-to long-term solution, it is more appropriate to assess the CO 2 emissions consequences based on future energy systems and their  40 for the year 2030-"New Policy" and "Sustainable Development"-were used as input to ENPAC to create a span wherein the actual emissions can be expected to lie. The ENPAC tool allows to adjust the scenarios by making distinct choices. For example, it is possible to choose whether nuclear or wind power is available as build margin technologies, as well as whether carbon capture and storage (CCS) technology will be in place or not. The emission factors for the two scenarios that can be found in Table 3 were obtained when all of the aforementioned options were disabled. Enabling them changes the build margin technology as well as the associated emissions of certain electricity generation technologies. The consequences of these options for the evaluation of the algae biofuel processes investigated are discussed on a qualitative level in the results section. The CO 2eq consequences of replacing fossil fuel with biofuel, as well as the emissions from heat generation with a natural gas boiler (NB), must also be quantified, with the relevant emissions factors presented in Table 3. The build-margin technology for electricity generation in the "New Policy" scenario is coal-based, and natural gas combined cycle (NGCC) power for the "Sustainable Development" scenario.

| Process integration
Both heat and material integration opportunities were investigated within the present work. The possible benefits of using excess heat from a co-located oil refinery for heat integration of the biofuel process were investigated using pinch analysis to determine the minimum utility demands for the process as well as where the process has a surplus or a deficit of heat. 42 In this work, the main focus was on the use of background/foreground analysis which depicts the theoretical amount of heat from a background process (the oil refinery) that can be re-used in the foreground process (the biofuel process).
For an extensive description of the method, see Smith 43 or Klemes et al. 44 The heating and cooling demands of the three biofuel routes were mapped assuming maximal heat integration within the process. Given the heat load profile of the oil refinery, it is possible to determine the maximum scale of the biofuel process with respect to heat integration with the refinery. Excess heat can be collected from all over the refinery through a pipeline system consisting of two trunk pipelines (one feed and one return) to satisfy the heat demands of the algae biofuel process routes. 45 Regarding material integration, there are potential benefits for both the biofuel plant and the oil refinery. Refineries have complex hydrogen distribution systems, and the refinery processes require hydrogen with high purity. Hydrogen streams with purities as high as 80% to 90% are not used in the refinery processes, but are instead treated as waste streams, which go to the fuel gas system and are used for heating the processes. 46 These streams could instead be used in the upgrading of crude biofuel to biodiesel, resulting in a major impact on the energy performance of the biofuel plant. If the hydrogen waste streams from the refinery cannot be used, the biofuel production plant can still make use of the steam reformer that is often present at a refinery for hydrogen production. Steam reforming is a more efficient way of producing hydrogen than electrolysis, but as algae-based biofuel is a future system and electrolysis is the predicted hydrogen production technology in a sustainable future it is used for the standalone case. 47 The results of a sensitivity analysis regarding hydrogen production technology are presented in Section 6.2 since the choice of hydrogen production technology depends heavily on the time perspective.
For microalgae cultivation, CO 2 must be supplied. Flue gases from the refinery could supply this CO 2 . 48,49 When cultivating other plants, for example, greenhouse vegetables, natural gas is often used as a CO 2 source for enhanced crop yield. 50 This natural gas flue gas is interchangeable with industrial flue gases from a refinery. This requires a close proximity between the refinery and the algae cultivation. The flue gas is transported via pipeline to the algae cultivation where it is injected into the PBRs. Electricity Generation "Sust. Dev" 376 40,41 Heat generation (NB) 243 40,41 Diesel 266 40,41 Natural gas 224 40,41 Coal 390 40,41 Hydrogen "New Policy" 1047 37,40,41 Hydrogen "Sus. Dev" 489 37,40,41 Methanol 320 37 6 | RESULTS

| Energy balance and carbon footprint
All processes considered in the present analysis generate multiple products. R1 and R2 have two valuable productsbiodiesel and biogas-whereas R3, in addition to biodiesel and biogas, also produces biochar. The liquid biofuel production (on an HHV basis) from 100 MJ algae feedstock is largest for R2 (54.1 MJ), followed by R1 (38.4 MJ) and R3 (22.5 MJ). For R3, biochar is the dominant energy product (28.0 MJ), in addition to biodiesel (22.5 MJ) and biogas (21.6 MJ). Figure 4 illustrates the energy input and output for the three routes. The losses represented in the figures include heat losses, side streams and the remaining slurry that contains nutrients such as nitrogen and phosphor. The macroalgae-based process route R3 is the only one having a fossil diesel demand due to the harvesting by ship. For the two other processes cultivation and harvesting only requires electricity. The process and system efficiency, as well as the CO 2eq balance for the three processes investigated are illustrated in Figures 5 and 6.
Due to the low electricity demand, R3 is the only route that has a net CO 2 reduction for both scenarios. The lower electricity demand for R3 is due to lower demands on macroalgae cultivation and harvesting, but in terms of CO 2 , the difference is partly counteracted by the demand for fossil diesel in the harvesting process. On the other hand, a large impact on the CO 2 balance for R3 is due to the biochar replacing coal. When aiming at producing liquid transportation fuels, R3 is probably not the optimum process, even though it achieves the highest system efficiency and CO 2 reduction. Considering the differences between process and system efficiency, R3 differs by 13%, whereas R1 and R2 differ by 20% and 19%, respectively. That implies that cultivation and harvest have a larger impact on the decrease in efficiency and should be analysed in further detail for microalgae-based processes.
The three routes can be heat integrated to varying degrees. As heat integration only affects the heat demand of the process, all the remaining output of the processes are unchanged. The changes are most visible in the efficiency and in the process-related CO 2 emissions. Figures 5  and 6 show the size and performance for a stand-alone plant (at assumed 100 MW HHValgae feed scale), for a plant at maximum size with respect to complete heat integration-scaled to cover its complete heat demand with excess heat from the oil refinery-, as well as for a plant of 100 MW HHValgae scale that is heat integrated to the oil refinery to a maximum extent for all three routes.
The available excess heat from the oil refinery allows for heat integration of a large (350 MW algae feedstock) LE plant based on R1, whereas for the HTL routes the available heat at the necessary temperature levels limits the size of completely heat integrated plants to 35 resp 29 MW algae feedstock for R2 resp R3. Complete heat integration improves the process efficiency η process by 8.6, 2.7 and 4.9%-points for R1, R2 and R3, respectively. Assuming a 100 MW algae feedstock plant, the increase in process efficiency is less for R2 and R3 due to limits in heat integration, dropping to 1.7 resp 1.4%-points. The increase in system efficiency is less with similar trends. This is to be expected as the cultivation and harvesting are not subject to heat integration but are accounted for in the system efficiency.
The CO 2 reduction obtained from heat integration is best illustrated by the annual numbers for a 100 MW algae plant, assuming 8200 hours/year operating time (see Figure 6). A reduction of 28.5 kt CO 2eq /year is estimated to be achieved for R1, whereas R2 and R3-only allowing for heat integration of part of the process-result in minor decreases of 3.5 resp 4.3 kt CO 2eq /year comparing stand-alone and integrated biofuel processes. This applies to both energy scenarios investigated as the heat savings from integration directly translate to natural gas savings for both scenarios. Heat integration improves the process performance both from an energy and CO 2eq emission perspective, but the effect of the surrounding energy system is dominant for the carbon footprint evaluation. Integration can only improve the performance but not change a negative CO 2eq performance (positive ΔCO 2tot ) into a positive one (negative ΔCO 2tot ).
To further illustrate how the biofuel processes can be heat integrated with the refinery, a background/ foreground analysis is depicted in Figure 7 for the 100 MW algae feedstock case. The red line represents the aggregated excess heat from the refinery that is available for process integration-the background process-and does not change between the different cases. The blue line represents the heat load profile of the biofuel process pathways that are to recover the excess heat from the refinery. The overlap between the red line and the blue line represents the maximum amount of heat that can be recovered by heat integration. In order to enhance readability, the x-axis has been scaled between the different processes but represents the same background (the excess heat from the oil refinery) for all cases.
The heat integration analysis shows that R1 can be completely integrated with the refinery, basically due to the lower temperature level of the LE process. Given the excess heat load profile from the refinery, there even is potential for a larger LE process with an upper limit of 350 MW HHValgae feedstock. For R2 resp R3, only approximately 2 MW of excess heat at sufficiently high temperature are available to cover approximately 40% of the heating demand of a 100 MW HHValgae scale process. Such a limited heat integration potential can hardly motivate building an extensive heat recovery network. However, further analysis of the refinery heat data shows that all of the heat that can be recovered to R2/R3 is from a single heat source, namely, one of the chimneys. The chimney is also conveniently located close to the possible location of the biofuels production process. 45 Heat integration of process routes R2 and R3 is therefore still considered a viable option.
In addition to heat integration opportunities, there are also mass integration aspects be considered. As mentioned previously, there are co-location benefits of using CO 2 from the refinery flue gases for microalgae cultivation. Furthermore, the production of biogas from the biofuel processes can partly satisfy the natural gas F I G U R E 5 Process and system energy efficiency (η process and η system according to Equations (1) and (2)) for the three algae-biofuel process routes. The three cases represented for each route are: stand-alone (100 MW HHValgae ), maximum heat integration (for which the size is determined so as to achieve maximum possible heat integration) and 100 MW HHValgae process heat integrated to maximum extent, respectively [Colour figure can be viewed at wileyonlinelibrary.com] demand of the refinery, and the biofuel plant can benefit from large-scale fuel processing infrastructure for their produced biodiesel. Additionally, the biofuel plant can use hydrogen from the refinery to improve the process efficiency. One scenario could be if the hydrotreater within the biofuel process could use low-to mediumgrade hydrogen that is available from the refinery, but even hydrogen produced at the refinery via steam reforming could be used instead of hydrogen from electrolysis. Direct feed of the biocrude to the refinery for hydrotreatment in the refinery's equipment would be another option.

| Sensitivity analysis
The primary energy conversion factors have a large impact on both process and system efficiency. As F I G U R E 6 CO 2eq balance (according to Equation (3)) for the three algae-biofuel process routes for the two future energy scenarios-A, New Policy and, B, Sustainable Development. The three cases represented for each pathway are: stand-alone (100 MW HHValgae ), maximum heat integrated (size being a function of maximum possible heat integration) and 100 MW HHValgae process heat integrated to maximum extent, respectively. The total annual change in system CO 2eq emissions is represented for the 100 MW HHValgae cases, assuming 8200 hours annual plant operation [Colour figure can be viewed at wileyonlinelibrary.com] hydrogen is produced at the refinery and even available as low-grade product used as fuel for steam generation, it is important to investigate how the overall primary energy efficiency changes with changing conversion factor. Hydrogen via electrolysis has a low primary energy conversion factor of about 0.22 (see Table 2). Assuming steam-reforming of natural gas-common technology at the refinery investigated for co-location-the factor increases to 0.5 to 0.55 (Edwards et al 37 ). Low-grade hydrogen at too low purity for use within the refinery is currently used for steam generation, thus assuming the option of utilizing this hydrogen within the biofuel production process, using a conversion factor close to that of heating (0.63 [Edwards et al 37 ]) could even be argued for.
Even the conversion factor for electricity is an important variable to investigate, as it increases with a presumed increase share of renewables, such as wind or solar. With algae biofuels being a medium-to long-term technology, the analysis of the influence of changing conversion factor for electricity is of great interest. The dependence of these two conversion factors on the efficiency is shown in Figure 8, the lower level for both variables being the base case values for stand-alone operation (see Figure 5).
Both conversion factors noticeably affect the efficiencies. The electricity conversion factor has a higher impact on the system efficiency than the hydrogen conversion factor. For the electricity intensive microalgae cases, R1 and R2, the system efficiency is affected more than the process efficiency, whereas for R3, the process and system efficiencies are affected similarly. When changing the primary energy conversion factor for electricity to 0.9 (representing an electricity mix with very high degree of renewable energy, for example, wind power having a primary energy factor of 1) η system increases by 15, 11, resp 7%-points for R1, R2, resp R3. The microalgae-based biodiesel process (R1) has the highest system efficiency (61.9%) assuming renewable electricity from wind and an associated primary energy conversion factor of 0.9.
The process efficiency is affected more than the system efficiency when investigating the hydrogen conversion factor. The process efficiency of R2-having the highest hydrogen demand-is obviously improved most, increasing by 11%-points, assuming that all of the hydrogen supply can be covered by low-grade hydrogen from the refinery, for example, the primary energy conversion factor for hydrogen corresponding to heating (0.63 MJ H2 / MJ primary energy ). The system efficiency increases by 2%point (R1 and R3) to 4%-points (R2) for the same change in primary energy conversion factor for hydrogen.

| DISCUSSION
Previous work on algae biofuel production has focused mainly on microalgae, with macroalgae-based processes only being investigated recently. Conducting a comparative study on the suitability of microalgae and macroalgae was therefore one of the main driving forces of this work. It was shown that the macroalgae-based HTL route (R3) achieves a larger CO 2 reduction than both micro-algae-based processes (R1 and R2). This is even valid when heat integration synergies are taken into account. The lipid extraction process (R1) benefits most from heat integration but the HTL process from macroalgae leads nonetheless to a higher reduction of CO 2 emissions. A potential drawback of the macroalgaebased process is the product distribution. Because approximately 97% of transport vehicles today run on liquid fuels, refinery operators typically produce liquid fuels to ease the transition towards biofuels and to use existing infrastructure. HTL from macroalgae produces approximately 70% less F I G U R E 7 Illustrations of heat integration of the algae biofuel processes (100 MW HHValgae ) with the refinery. The overlap between the red line (the refinery hot streams that need to be cooled) and the blue line (the biofuel process) is the amount of heat that can be reused [Colour figure can be viewed at wileyonlinelibrary.com] liquid fuel compared with HTL from microalgae and 65% less compared with traditional LE. The integration of all processes with an oil refinery still has a multitude of potential benefits in addition to heat integration. As an example, at an oil refinery existing hydrogen generation infrastructuremost often methane steam reformer technology-could be used as hydrogen source for the processes. In addition, the biogas generated from the biofuel process could substitute parts of the natural gas feed to the steam reformer at the refinery. R3 also produces biochar, which is considered as an energy product in this article, but it could also have other uses. Biochar is potentially a high-value product and could be used as a catalyst in the transesterification process. 38 When comparing the energy demands of the two main process routes-LE and HTL-the major difference is the temperature levels and the resulting heat integration opportunities with the oil refinery. Again, R1 benefits to a larger extent from heat integration as the heat demand can be fully covered with excess heat. The recovered heat amounts to 45 MW for R1, compared with 2 MW for R2/R3, for a plant size of 100 MW algae .
The process scale of 100 MW algae feed might however put other limitations than heat integration on the process design. Preliminary estimates show that for a cultivation corresponding to 100 MW of microalgae biomass, an area of approximately 27 km 2 (see note 1 1 ) would be needed for cultivation. The cultivation must be near the shore because nutrients need to be pumped out via pipelines, and the cultivation must also be near the biofuel production site because microalgae have a dry solids content of approximately 5% when harvested, which would require large pipelines for transport. The need for pipelines results in logistical and spatial problems. For macroalgae, a cultivation size of approximately 54 km 2 (see note 2 2 ) would be required to generate a feedstock flow of 100 MW. Macroalgae cultivation does not have the same requirements regarding proximity to nutrients, but it is still most convenient to perform the cultivation close to the shore.
The overall system efficiency depends to a large extent on the primary energy conversion factors assumed. The lowest conversion factor is attributed to hydrogen, assumed to be produced using electrolysis in the base case. Assuming a conversion factor similar to that for heat (0.63 MJ/ MJ primary energy ) for hydrogen, results in an increase in the system efficiency of routes R2 and R3 (standalone unit) of 5%. This could be motivated if the biofuel process can make use of low-grade hydrogen currently being used for steam generation. The utilization of excess hydrogen from the refinery processes therefore has a noticeable impact on the efficiency of biofuel production. In a similar way-if integrated with a refinery-the hydrogen could be produced in a steam reformer, thus having a higher conversion rate from primary energy than electrolysis (circa 0.5 MJ/MJ primary energy ). This would result in an increase in system efficiency increase of 2% for R1 and R3, and an increase of 4% in R2. Combining heat integration and more efficient hydrogen generation would further increase the efficiency.
A larger impact on the efficiency is attributed to the electricity generation. The conversion factor used as a baseline in this article is based on a high degree of thermal electricity generation, but a realistic future conversion factor depends on many factors, such as whether to choose build margin or average electricity mix as reference, as well as the general future development in the electricity F I G U R E 8 Sensitivity analyses for the dependence of the efficiency (process efficiency for biofuel production on the electricity conversion factor f prim,el (A) and the hydrogen conversion factor f prim,H2 (B) for stand-alone biofuel plants for the three investigated pathways. Symbols represent the base case values [Colour figure can be viewed at wileyonlinelibrary.com] generation sector. The reference technology may have a higher efficiency as well as decreased specific CO 2 emissions. To account for this, the analysis included two scenarios for determining build margin technology based on input data from IEAs World Energy Outlook. Only the biofuel process based on macroalgae resulted in net CO 2 emission reduction for both scenarios. The two microalgae process routes only showed CO 2eq emission reductions for the "Sustainable Development" scenario, indicating that more stringent policy instruments for CO 2 reduction, and a less CO 2 intensive electricity generation are both necessary for these alternatives to become viable from an emission reduction perspective. Additionally, more energy-efficient cultivation and harvesting methods need to be developed because they have a larger impact on the system efficiency of the microalgae process alternatives.
With respect to CO 2 emissions from electricity generation, allowing for CCS as a technology choice within the ENPAC tool could be motivated given possible future developments (see Section 5.2). Enabling CCS as an option, it will be the build margin technology of choice for electricity generation for the "Sustainable Development" scenario. This change, however, does not alter the robustness of the different biofuel production routes. For the "Sustainable Development" scenario, a larger CO 2 reduction is obtained due to CCS-implementation, but for the "New Policy" scenario, R1 and R2 do not result in CO 2 reduction because CCS technology is not used as the build-margin technology.
There are of course more aspects in addition to energy efficiency and CO 2 consequences to algae biofuel processes that have not been quantified in this work, such as technoeconomic, other environmental, as well as social aspects. Macroalgae do not need to be supplied with nutrients in the way that microalgae do; macroalgae reduce eutrophication by removing nutrients from the ocean. When implementing cultivation corresponding to 100 MW HHValgae , the macroalgae takes up nutrients equivalent to the wastewater treatment of a city of 600 000 inhabitants. 4,51 This creates an incentive from a governmental perspective to grow algae in oceans that are heavily eutrophic, for example, the Baltic Sea. Microalgae, on the other hand, require nutrients to keep the algae growing. To maintain a sustainable cultivation, nutrients would have to be supplied from, for example, wastewater treatment. If the cultivation needs to be close to a CO 2 source, wastewater source, and a heat source to be sustainable, the number of possible locations decreases. If algae cultivation could replace some of the wastewater treatment, which would require the cultivation to be located close to a city, both the carbon and energy balances would change. 4 This creates added uncertainty regarding the effects of the cultivation of both microalgae and macroalgae on the overall system efficiency and carbon dioxide balances.

| CONCLUSIONS
The results of this study indicate that there are several potential benefits of co-locating an oil refinery and an algae-based biorefinery and that the use of macroalgae as feedstock is more beneficial than the use of microalgae from a system energy performance perspective. Some of the main findings, given the underlying assumptions used in this article, are listed below: • Due to a less energy-intensive harvesting process, the macroalgae-based route has a larger CO 2 reduction potential and a higher system energy efficiency. • The electricity demand for macroalgae cultivation and harvesting is lower (15.7 MW el for R3 compared with 40.5 MW el resp 33.9 MW el for the microalgae-based processes R1 and R2 for a 100 MW HHValgae scale process), which has a major impact on all results for efficiency and CO 2 reduction potential. • Due to high electricity consumption, the sustainability of microalgae cultivation is very dependent on the carbon intensity of electricity. • Assuming IEAs scenario for "Sustainable Development," all process routes result in a net CO 2 reduction ranging from 14.2 to 96.3 kt COeq/year for a 100 MW HHValgae scale plant. • Heat integration reduces the net energy demand for the biofuel processes; the size of a fully heat integrated plant is considerably larger for the route with lipid extraction and subsequent anaerobic digestion (R1) than for routes with HTL (R2 and R3), where rather high temperature levels of the heat demand limit the integration opportunities. • The yield of liquid biofuel is highest for the microalgae based HTL route (R2), generating 54.1 MJ of biodiesel from 100 MJ algae feedstock, making this route particular attractive for production of, for example, liquid biofuels for transport. With respect to integration with an oilrefinery, this might make this process more appealing for a refinery than macroalgae-based HTL that generates a large stream of biochar at the cost of liquid biofuel yield. • The possible utilization of waste hydrogen has a positive impact on the efficiency of all three processes, and lowgrade hydrogen from the refinery that is otherwise used as boiler fuel could therefore be used for material integration. • Future research for improving algae-based biofuel process performance should focus on cultivation and harvesting technologies; this research is important for further comparisons between microalgae and macroalgae. In particular, improved knowledge about nitrogen and phosphor balances is important to determine the environmental performance of the processes in addition to their energy performance.
• The issue of being able to supply a continuous biofuel process operating all year round with algae feedstockthat is harvested periodically-has not been addressed in this article but is an important aspect, in particular when considering integrating the biofuel plant with existing infrastructure. More research on possibilities for storage and continuous harvesting is needed to come up with solutions to this problem.