## 2 Materials and Methods
### Methodology
Cash inflows comprise revenue generated from exported energy, calculated by multiplying the exported energy amount by the interconnection price, along with income from hydrogen sales, determined by multiplying the quantity of hydrogen sold (in metric tons) by its price. Conversely, cash outflows encompass expenses such as grid import costs, fuel expenses for conventional system operation, total operational and maintenance costs of the RES system (estimated as an annual percentage of the installation cost), as well as operational and maintenance (O&M) costs of the hydrogen system. Figure 17: Hydrogen produced and sold for industrial purposes, calculated in energy units. Figure 19: Total RES production rejected from the system after each hour. Figure 18: Hourly energy system’s losses attributed to electrolysis or fuel cell use. The carbon neutrality metrics are calculated through the estimation of carbon emissions produced by energy production, transport and residential heating, and carbon absorption through the island's primary cultivation. Along with the system's emissions, the island absorbs the carbon emissions at a certain rate through the natural process of carbon sequestration. According to [44], olive tree is the dominant cultivated tree in Crete, occupying an area of 142,900 ha. The same reference presents the annual absorption of CO2 from olive groves and annual emission for heating purposes in residences, while [45] presents the annual generation of CO2 for transportation within the island's road grid. The data are compiled in Table 11.  
Table 11 outlines the overall emissions attributed to electricity production for achieving net zero carbon in Crete. In the proposed simulation without hydrogen storage, emissions are estimated to amount to 920,138.9 \(\mathrm{tCO_{2}}\). The objective is to align the emissions from all three activities (electricity generation, residential heating, and transportation) with the annual absorption rate from olive groves. To achieve that goal, an optimization model is formulated, using as the model's decision variables the PV installed capacity (PVcap), WT capacity (WTcap) to be installed in order to increase the annual RES production, the capacity of the electrolyzer system (ELCAP), and the storage capacity (in energy units) of the hydrogen tank (STCAP), serving as storage method for the compressed hydrogen gas stemming from electrolysis. The installed capacity of the fuel cell is selected to be equal to the capacity of the electrolyzer. The objective is to decrease CO2 emissions from the energy system to match the disparity between emissions from heating and transportation and carbon absorption. Consequently, the objective function represents the annual CO2 emissions generated by electricity production, computed using Equation (2). The constraints encompass the positivity of decision variables and zero NPV to determine the CAPEX required for the long-term sustainability of the system. In essence, the optimization problem is structured as follows:  
\[\mathrm{min.~{}Emissions(PVcap,WTcap,ELCAP,STCAP)} \tag{5}\]  
Subject to the constraints:  
\[\mathrm{PV_{cap},WTcap,ELCAP,STCAP}\geq 0 \tag{6}\]  
\[\mathrm{NPV}=0 \tag{7}\]  
The emissions of the energy system, determined by Equation (2), rely on the values of TOTAL CONV[T]. The conditional computation of these values introduces a non-linear attribute to the objective function. The simulation is conducted within a specific scenario where the technical lower and upper limits of total conventional production are set to the minimum and maximum values observed in the time series depicted in Figure 3. Additionally, the maximum hourly power import or export through the interconnection is set at 150 MW, and the initial storage of the tank equals its capacity. The chosen fuel cell technology is the PEM fuel cell, with an overall efficiency of 60% and electrolysis efficiency of 80%.