Open model-based analysis of a 100% renewable and sector-coupled energy system -- The case of Germany in 2050

The ambitious energy target to achieve climate-neutrality in the European Union (EU) energy system raises the feasibility question of using only renewables across all energy sectors. As one of the EU's leading industrialized countries, Germany has adopted several climate-action plans for the realistic implementation and maximum utilization of renewable energies in its energy system. The literature review shows a clear gap in comprehensive techniques describing an open modeling approach for analyzing fully renewable and sector-coupled energy systems. This paper outlines a method for analyzing the 100% renewable-based and sector-coupled energy system's feasibility in Germany. Based on the open energy modeling framework, an hourly optimization tool 'OSeEM-DE' is developed to investigate the German energy system. The model results show that a 100% renewable-based and sector-coupled system for electricity and building heat is feasible in Germany. The investment capacities and component costs depend on the parametric variations of the developed scenarios. The annual investment costs vary between 17.6 and 26.6 bn Euro/yr for volatile generators and between 23.7 and 28.8 bn Euro/yr for heat generators. The model suggests an investment of a minimum of 2.7-3.9 bn Euro/yr for electricity and heat storage. Comparison of OSeEM-DE results with recent studies validates the percentage-wise energy mix composition and the calculated Levelized Cost of Electricity (LCOE) values from the model. Sensitivity analyses indicate that storage and grid expansion maximize the system's flexibility and decrease the investment cost. The study concludes by showing how the tool can analyze different energy systems in the EU context.

• Open model-based analysis for 100% renewable and sector-coupled energy systems. • Cost-optimization tool based on Oemof to investigate Germany's energy system in 2050. • Renewable energy is sufficient for electricity and building heat in Germany in 2050.
• The ambitious energy target to achieve climate-neutrality in the European Union (EU) energy system raises the feasibility question of using only renewables across all energy sectors. As one of the EU's leading industrialized countries, Germany has adopted several climate-action plans for the realistic implementation and maximum utilization of renewable energies in its energy system. The literature review shows a clear gap in comprehensive techniques describing an open modeling approach for analyzing fully renewable and sector-coupled energy systems. This paper outlines a method for analyzing the 100% renewable-based and sector-coupled energy system's feasibility in Germany. Based on the open energy modeling framework, an hourly optimization tool 'OSeEM-DE' is developed to investigate the German energy system. The model results show that a 100% renewable-based and sector-coupled system for electricity and building heat is feasible in Germany. Variable operation and maintenance cost c carrier cost Carrier cost

Introduction
A clear rulebook was adopted for the practical implementation of the Paris Agreement in December 2018 at the United Nations Climate Conference (COP24) in Katowice, which delineated a world-wide climate action plan to mitigate climate change by reducing global warming to 1.5 • C if possible [1]. To achieve a climate-neutral society with net-zero greenhouse gas (GHG) emissions across all sectors by 2050, the European Commission endorsed a strategic long-term vision in line with the Paris Agreement for the European Union (EU) [2]. The North Sea (NS) region is a representative area to demonstrate the feasibility and plausible pathways for achieving the ambitious target of net-zero emission across all the sectors in an energy system [3]. As a leading industrialized nation of the NS region and the EU, Germany already adopted a climate action plan for the realistic implementation of extensive GHG neutrality across all the energy sectors by 2050 [4]. This ambitious energy target requires the 'reinvention' of energy systems to be technically feasible and economically viable, guarantying realistic solutions to ensure affordability, reliability, and sustainability [5].
The overcapacity of volatile generators in a 100% renewable-based energy system leads to excess energy in the electricity grid. A relatively new approach known as 'sector coupling' can efficiently use this surplus energy [6]. Sector coupling has emerged as a new concept in energy and climate policy discussions in recent years. The 'Climate Action Plan 2050 ′ and the 'Green Paper on Energy Efficiency' reflect the high political significance of sector coupling, among other things in Germany [4,7]. Sector coupling can make a decisive contribution to the achievement of ambitious climate protection goals through increased use of renewable electricity in the heating and transport sectors and industry to substitute fossil fuels.
The expansion of renewable energies in Germany will increase the need for grid expansion, particularly in local distribution grids for solar photovoltaic (PV) and onshore wind plants, and in transmission grids for offshore wind power. The current power system of Germany has many fossil fuel-based and nuclear-based power plants in Southern Germany. A gradual exit from fossil fuel and nuclear power will require shifting to renewables from offshore wind plants in Northern Germany. Therefore, there will be a need for transmission grid expansion from North to South at the same time. The transmission grid operators and the federal government of Germany have accelerated the development of Grids from Northern to Southern Germany, with 4,650 km to be constructed by 2025 [8]. Fig. 1 shows the status of grid expansion in Germany in which the expansion plan from north to south and other grids in the planning and development stages is illustrated [9].
Flexibility and sector coupling can bring renewable energies into the various energy sectors in high proportions and effectively increase  [9]. energy efficiency potentials. By adopting solutions like power-to-heat (P2H) technologies (such as electric heat pumps), and power-to-gas (P2G) technologies (such as Hydrogen storage via electrolysis), the transformation of energy between different energy sectors can be made even more independent of the supply and demand. Flexibility can be offered in various ways, for example, shifting heat pumps or electric vehicle loads in private households and even shifting the energy consumption in industries as a part of a sector-coupled network. However, the energy flow should be smartly and effectively managed between the sectors to stabilize the network operation while keeping the system flexible and efficient [10].
Although there are various models and analysis on the German energy transition towards climate neutrality, most of them focus either on specific aspects of an individual energy sector or the markets and actors linked with the energy system. A few studies outline a detailed technoeconomic analysis using 100% renewables, including multiple energy sectors. Henning and Palzer showed that a 100% renewable energy system for power and heat is technically possible, and the overall annual cost for the system will be comparable to today's price [29,30]. However, their analysis assumes that heat requirement is reduced by 60% in the building sector in the future compared to today's demand, and their analyzing tool REMod-D is not an open-source model. In another recent publication, Hansen et al. concluded that the full energy system transition towards 100% renewables by 2050 in Germany is technically and economically possible, but resource potentials such as biomass is a big challenge for this transition [31]. Hansen et al. used EnergyPLAN for their analysis, a popular free-to-use simulation tool for modeling 100% systems for all energy sectors. However, it is not possible to analyze the capacity expansion mechanism and reach an optimum solution using EnergyPLAN [89]. A literature review by the author shows a clear research gap in applying cross-sectoral holistic approaches using comprehensive open modeling techniques for analyzing 100% renewable and sector-coupled energy systems in Germany and the other countries in the NS region [3]. Therefore, based on the scope, the following research question is formulated-How feasible is it to transform towards a 100% renewable energy system for both power and building heat in Germany by 2050?
Answering the main research question raises additional questions on the overall energy mix, investment cost and capacities, the issue of grid expansion within Germany, and different flexibility aspects of the system; which formulates the following sub-research questions-1. In which capacities could such a system be implemented? 2. What are the estimated investment costs for the different system components? 3. What are the flexibility aspects of grid expansion, storage, and dispatchable loads in such a system?
The paper's main objective is to design and develop an open-source energy model and investigate the German power and heat sectors. The model analyzes different scenarios to investigate moderate to extreme conditions to determine the plausible energy mix and required investment in component-wise capacities and costs. The model considers dividing the German energy system into two sub-national regions to analyze the grid expansion from Northern to Southern Germany. It also helps to understand the underlying energy flow mechanism and different energy components' roles from national and sub-national perspectives. The heating sector analysis in this model is limited to the use of building heat, including space heating and domestic hot water demands. The present study does not consider the industrial process heating demands. The industrial process heating is planned to be included in the upgraded version of the model. Section 3 describes the model's methodology, which consists of the model's architecture and its component-wise mathematical description. Section 4 describes the details of the developed model's working mechanism and the input data used for the analysis. Section 5 describes the development of different scenarios. Section 6 presents and compares the scenario results and examines the system's details based on the research questions. Section 7 summarizes the results, discusses the limitations, model development plans, and future steps of the study, and concludes with the model's usability in a broader context.

Methodology
The optimization model follows a hybrid approach where the current technology capacities are exogenously defined, and the future investment capacities are endogenously determined. System boundaries, according to technology potentials, are set to avoid any unrealistic solution based on overestimation. The 'Open Sector-coupled Energy Model for Germany (OSeEM-DE)' is an application constructed using 'Oemof Tabular,' which is a python-based linear programming (LP) optimization tool under the open energy modeling framework (Oemof) [90].
As shown in Fig. 2, the two German sub-national energy system nodes are Northern Germany (NDE) and Southern Germany (SDE). NDE consists of Schleswig-Holstein, Lower Saxony, Bremen, Hamburg, and Mecklenburg-Vorpommern, and SDE consists of the remaining eleven states of Germany. The power exchange between NDE and SDE is possible using the transshipment approach via NDE-SDE Link. Fig. 3 illustrates the Oemof-based OSeEM-DE energy system model. The model's volatile components are Onshore wind, Offshore wind, Solar PV, and Hydro Run-of-the-River (ROR) plants. The fuel input of the Combined Heat and Power (CHP) plants comes from biomass resources. In addition to CHPs, two types of heat pumps are used to supply heat loads in the model: Air Source Heat Pump (ASHP) and Ground Source Heat Pump (GSHP). The state-of-the-art GSHPs are becoming cost-competitive compared to ASHPs and offer a more energy-efficient solution because of their use of consistent ground temperatures. The storage options are Pumped Hydro Storage (PHS), Lithium-ion (Li-ion) battery, Vanadium Redox (Redox) flow battery, Hydrogen (H 2 ) storage, and Adiabatic Compressed Air Energy Storage (ACAES). The heat storage option is Thermal Energy Storage (TES) using hot water tanks. NDE and SDE energy systems are almost identical, except that Offshore wind and ACAES components are only available in NDE.
The OSeEM-DE model uses 'Oemof Solph' [92], following the formulation described by Hilpert in [93], where the maximum potential constrains the volatile renewable sources, total biomass amount, and storage capacities. The transmission capacity between NDE and SDE and the heat storage capacities are also limited exogenously. The upper limit for the P2H technologies are subject to optimization but depends on the availability of electricity. The model uses a perfect foresight approach; hence all timesteps of the model time horizon are read by the solver at once. Therefore, the weather and the renewable supply data for the full year is known in advance. The different components of the energy system and their mathematical formulations are as follows, where x denotes the endogenous variables, and c denotes the exogenous parameters used in the model.

Bus
There are three types of buses in the energy model: electrical, heat, and fuel bus.

Load
Two types of loads are considered in the energy model: electricity and heat. The heat load consists of space heat and domestic hot water.

Volatile generator
The volatile generators in the model are onshore and offshore wind, solar PV, and hydro ROR plants. These components are connected to The endogenously obtained capacity of the generator x capacity v at every time step t must be less than or equal to the maximum capacity potential of the volatile component c capacity potential v :

Combined heat and power (CHP)
Since the model is 100% RES-based, the CHP plants use only biomass resources as fuel. Thus, biomass goes into the fuel bus, which later goes as the input of CHP, as shown in Fig. 3. The CHP runs in extraction turbine mode, as shown by (5-7), according to Mollenhauer et al. [94]. , at every time step t. (6) shows the relationship between the two output flows. c beta chp is the power loss index, which is derived using (7).

Heat pump
Oemof Solph's conversion component, which converts power to heat, is used for modeling both GSHP and ASHP. Therefore, a conversion process of one input flow x flow h,from (electricity flow from the electricity bus) and one output x flow h,to (heat flow to the heat bus) and a conversion factor c efficiency h,to (conversion efficiency i.e., coefficient of performance of the heat pump) at every time step t models all the heat pumps h ∈ H:

Storage
In addition to PHS, the other electricity storage technologies used in the model are Li-ion and Redox batteries, ACAES, and H 2 storage. Hot water-based TES is the only heat storage component in both NDE and SDE. Oemof Solph's generic storage formulations are used to model all the storage components except PHS. For all these storages s ∈ S, the mathematical model includes the input and output flows and the storage level:  (12).

Pumped hydro storage
The PHS are modeled as storage units with a constant inflow and possible spillage: Therefore, if the inflow exceeds the maximum storage capacity, spillage is possible by setting x profile phs to lower values. The spillage at time step t can therefore be defined by c profile phs (t) − x profile phs (t).

Transmission line
The electricity transmission between two energy systems via NDE-SDE Link is modeled using the transshipment approach, which facilitates simple electricity exchange (import-export) after considering a transmission loss factor. Therefore, transmission lines m ∈ M are modeled according to the following mathematical formulation: where x flow from,m indicates the flow from the supplying energy system, x flow m,to indicates the flow to the receiving energy system, and c loss m indicates the loss on transmission line m.

Costs
The   (17). The annuity c annuity is calculated using (18), which consist of the initial capital expenditure c capex , the weighted average cost of capital c WACC , and the lifetime of the investment n for the respective technology.  (20) where, c annuity s,power is the annuity cost of storage power, and c annuity s,energy is the annuity cost of storage energy. These two annuities are calculated using the formulation of (18). c FOM s is the fixed operation and maintenance cost (FOM) of energy storage.
In addition to these modeling equations, some costs are calculated and analyzed after a successful model run, based on the optimization results. The annual investment cost c AIV is calculated multiplying the annuity c annuity and the optimized capacity c optimized capacity , as shown in (21). The total investment (overnight) investment cost c TIV is calculated multiplying the capital expenditure c capex , and the optimized capacity c optimized capacity , as shown in (22). Furthermore, the Levelized Costs of Electricity c LCOE is calculated from the ratio of the Net Present Value (NPV) of total costs of over lifetime (including fixed and variable operation and maintenance costs, fuel costs, and the discount rate), and the NPV of the electrical energy produced over the lifetime, as shown in (23). c AIV = c annuity ⋅c optimized capacity (21) c TIV = c capex ⋅c optimized capacity (22) where I n indicates the initial cost of investment expenditures (same as c capex ), M n indicates the sum of all operation and maintenance expenditures (sum of c VOM and c FOM ), and F n indicates the fuel expenditure (such as the carrier cost of biomass), E n indicates the sum of all electrical energy generation, r indicates the discount rate (same as c WACC ), and n indicates the lifetime.

Objective function
The objective function is created from all instantiated objects which use all operating costs and investment costs arguments:

Model
The underlying concept of the OSeEM-DE model uses the formulation of LP and mixed-integer linear programming (MILP) from a generic object-oriented structure of 'Oemof Solph' [92]. Fig. 4 shows a summary of the OSeEM-DE model input and output.
The input data used in the model are the capacities and potentials of renewable energy-based power plants (such as wind, PV), heat generation technologies (such as CHP, heat pump), electricity and heat demands, transshipment capacity, storage capacities, and their potential. Also, operating costs (i.e., marginal cost) and the investment costs (i.e., capacity cost) for all the considered technologies are provided as input. After solving the model using open model solvers, the results are postprocessed using Oemof Tabular's post-processing scripts. The output of the model provides information on the generation mix, investment capacities according to the provided capacities and available potential, balance in each of the buses, import/export between energy systems (in this case between NDE and SDE), filling level of the storages and the shadow prices.
Python programming language is used for the model development in Fig. 5. After starting the necessary packages, input data and result directories are set up, and input data are read from external .csv files. Different scenarios are built with different datasets. The input datasets are pre-processed before importing them to the input .csv files. The energy system is created using Oemof Solph. Different components are added to the energy system using Oemof Tabular's Facade classes. Then the energy model is solved using Oemof Solph. After optimization, results are post-processed and written to several .csv files using Post-processing tool, which are later illustrated using Plots tool.

Input data: hourly profiles and capacities
The model optimizes investment and operation for a full year of historical hourly data, with 2011 chosen as the primary representative year because of its average wind conditions, high solar irradiation (representing the expected warm condition in 2050 due to climate change), slightly lower overall heating demand, and duration of maximum heating demand during the winter days [95].

Electricity and heat load
The hourly electricity load data based on the ENTSO-e statistical database [96] are obtained from the Open Power System Data (OPSD) project [97]. Hourly normalized time series are obtained from the electricity load data for both NDE and SDE energy systems based on population-based clustering. The total electricity demand for Germany in 2050, based on the representative year, is 532.77 TWh el , of which NDE accounts for 96.6 TWh el , and SDE accounts for 436.16 TWh el .
The hourly heat load data based on the When2Heat project are obtained from the OPSD project [97][98][99]. Heat demand time series for space heat and hot water for Germany are obtained separately from the When2Heat profiles and are clustered and normalized for use as inputs of the model. The total heat demand for Germany in 2050, based on the representative year, is 648. 53

Volatile generator
Normalized onshore wind profiles based on MERRA-2 datasets are obtained separately for NDE and SDE energy systems from the Renewables Ninja project [100]. Normalized offshore wind profiles based on MERRA-2 datasets are also obtained from the Renewables Ninja project [100]. Similarly, normalized solar PV profiles based on MERRA-2 datasets are obtained separately for NDE and SDE energy systems from the Renewables Ninja project [100]. Hydro inflow data for the ROR plants are obtained and normalized from the Dispa-SET project [101]. The current capacity and potential data are obtained or calculated from the Agency for Renewable Energies [102], Deutsche WindGuard [103], LIMES-EU project [104], ZNES [105], PyPSA [106][107][108][109], and ANGUS II project [110] databases. Table 1 shows the capacity and available potential data for the volatile generators in 2050.
The placement of volatile generators considers certain land limitations to account for competing land uses and minimum-distance regulations. For onshore wind, the maximum capacity density on the available area is 4 MW/km 2 , as described in the LIMES-EU project [104]. The share of suitable areas available for RES is 30% and 5% for agricultural and forest areas, respectively. Public acceptance and nature reserves limit the share of the available onshore wind installation. For offshore wind, a maximum depth of 50 m is considered, and other factors such as 55 km maximum distance to shore, placement within the exclusive economic zone [104]. Besides, only 50% of the resultant area is considered with a maximum capacity density of 6 MW/km 2 to prevent turbine installations close to the mainland and allow a shipping corridor. For solar PV, the limitations include protecting nature reserves and restricted areas listed in the Natura2000 Database, and land use types according to the CORINE Land Cover Database, as described by Hörsch et al. [109]. The efficiency of the hydro ROR plant is 90% [110].

CHP and heat pump
The amount of available biomass is calculated from the Hotmaps project [111]. For a full year, the biomass potential for Germany is 634.33 PJ. For the current capacities, it is assumed that the existing biomass and biogas power plants are converted to CHP plants by 2050. Therefore, 4.74 GW CHP in NDE and 8.86 GW CHP in SDE energy systems are assumed to be installed and fully operational by 2050. It is also assumed that the CHP's electrical and thermal efficiencies are 45%, and the condensing efficiency is 50%. The current heat pump capacities are considered zero, and their investment potentials are not constrained. However, since heat pumps are P2H devices, their investment capacities depend upon limited available power from the potentially constrained volatile generators. The COP for ASHP and GSHP are 2.3 and 3.9, respectively [110].

Storage
The capacity and maximum potential data for storage investments are described in Table 2. Data for Li-ion and Redox flow batteries, H 2 storages, and ACAES are obtained from the ANGUS II project scenarios for Germany in 2050 [110]. PHS data are obtained from the Dispa-SET project [101]. For batteries, H 2 storage, and TES, it is assumed that 18% of the total potential is available for NDE, and the rest is available for SDE.
The energy storage potentials for the batteries, H 2 storage, and ACAES investment are subject to optimization. The storage potential for the existing ACAES plant in Huntorf is 0.58 GWh el [112]. PHS's inflow data are derived from the Dispa-SET project's scaled inflow dataset and Germany's current PHS capacity [101]. PHS's storage capacities are taken from the Dispa-SET project, which is 1.7 GWh el for NDE, and 717 GWh el for SDE [101]. PHS investment is excluded because of the limited expansion capacity. A loss rate of 1% is assumed for PHS. For TES, the considered loss rate is 1.4% for TES [106,110]. The loss rate indicates the relative loss of the storage content per time unit. The roundtrip efficiencies for Li-ion, Redox, H 2 , PHS, ACAES, and TES are 92%, 80%, 46%, 75%, 73% and 81%, respectively [110]. The maximum state of charge capacity in terms of hours at full output capacities for Li-ion, Redox, H 2 , PHS, ACAES, and TES are 6.5 h, 3.3 h, 168 h, 8 h, 7 h, and 72 h, respectively [110].

Transmission line
The transmission lines in between NDE and SDE energy systems (NDE-SDE Link) are modeled as transshipment capacities. The total transmission capacity is set and varied exogenously for different scenarios. According to the IEA data for Germany, a transmission and distribution line loss of 4% is considered [113].

Input data: costs
The investment capacity costs are based on annuity and fixed operation and maintenance (O&M) costs, and the marginal costs are based on variable O&M costs, the carrier costs, and the efficiencies. The carbon

Scenarios
Three scenarios, namely Base, Conservative, and Progressive, are developed and analyzed to answer the research questions in different conditions. The volatile generator inputs remain the same in all scenarios. The existing PHS and ACAES capacities also stay the same. The variation of the other parameters for different scenarios is shown in Table 3.
Regarding weather data and demands in 2050, the model considers 2011 as the representative weather year in the base scenario, according to Brown et al. [95]. The model also investigates the change in future electricity and heat demands considering that the demand will go high if there is a higher population or low if due to increased use of efficient, innovative, and demand-responsive technologies.

Base scenario
The base scenario assumes that electricity and heating demands remain the same as the representative year (2011) in 2050. For storage, Li-ion batteries, PHS, and ACAES (NDE) are considered. The full biomass potential from forest residues, livestock effluents, and agricultural residues in Germany is used as CHP input. For the electrical storage, Li-ion and Redox batteries up to their maximum potentials are used. Besides, half of the total ACAES potential is considered for investment.

Conservative scenario
The conservative scenario assumes that the electricity demand will increase by 10% than the base scenario in 2050. The heating demand is kept the same. For the grid transmission from NDE to SDE, a reduced capacity is considered. An additional 10% of biomass import is considered on top of Germany's full potential. For storage, ACAES and Redox investment possibilities are omitted, and only Li-ion battery investment is considered.

Progressive scenario
The progressive scenario assumes that both the electricity and heat demand will reduce by 10% than in the base scenario in 2050. For the grid transmission from NDE to SDE, increased maximum capacity is considered. The maximum usage of biomass is reduced by 10%. All electrical and heat storage are optimized for investment up to their full potentials.

Sufficiency of the energy system
The model runs reached feasible solutions for all three scenarios. Fig. 6 shows examples of hourly energy supply-demand variation after cost-optimization in Germany's electricity and heat buses for the base scenario. Fig. 6 (a) shows the electricity supply using the volatile generators, CHP, and electrical storages to satisfy the electricity demand in NDE during a week in June 2050. Fig. 6 (b) shows the heat supply using heat pumps, CHP, and TES to satisfy the space heat and domestic hot water demands in SDE during a week in December 2050. Detailed scenario-wise and percentage-wise optimization results for NDE and SDE is available as supplementary material of the paper. Table 4 summarizes the results for the three scenarios in terms of energy generation.   Onshore wind and hydro ROR remain the same in all three scenarios. The change from the base scenario for the other generation technologies is summarized in Table 5. Therefore, the model results show that Germany's renewable resources are sufficient to meet its electricity and building heat demands. The model suggests maximum usage of onshore wind and hydro ROR, and the rest of the demands are met using offshore wind, solar PV, CHP, and heat pumps. The decrease of 46% in the progressive scenario indicates that reducing electricity and heating demands can heavily affect Germany's offshore wind investment. An increase in electricity export from NDE to SDE is observed in the conservative scenario, indicating the matching of SDE demand using NDE's resources. The increase in biomass usage in the conservative scenario indicates the necessity of biomass import from other countries if the electricity demand is higher. The opposite situation can be observed in the progressive scenario when the electricity and heat demands are lower than the base scenario. Also, almost all the storages, except Hydrogen, are used to their maximum capacities in the progressive scenario. Two critical observations from the model run are: 1. Without the biomass-based CHPs, and there was no feasible solution for a power-building heat coupled system. That being the case, it is evident that Germany needs to use other alternative heating technologies besides heat pumps, combined with various heat storage options, to reduce its dependency on only biomass for meeting the heat demand.

While the model prefers ACAES and batteries, it does not choose
Hydrogen for these three scenarios. The results will alter for a system with industrial process heating demand and inexpensive Hydrogen.   Fig. 7 (c), in addition to the existing 45.23 GW el capacity, the base and conservative scenarios suggest installing 188.07 GW el in the SDE energy system. Contrarily, the progressive scenario in SDE suggests a reduced solar PV installation of 172 GW el . In Northern Germany, the model suggests installing 8.65 GW el in the base scenario and 55.77 GW el in the conservative scenario. Interestingly, the progressive scenario suggests that no additional solar PV installation is necessary for NDE. In the case of Hydro ROR plants shown in Fig. 7 (d), both the NDE and SDE systems suggest capacity increment to the maximum available potentials, i.e., 0.06 GW el in NDE and 1.1 GW el in SDE, on top of the existing 4.29 GW el in Germany. Fig. 8 shows the investment costs of the volatile generators. Fig. 8 (a) shows that the annual investment cost remains the same for onshore wind (9.84 bn €/yr) and hydro ROR plants (0.19 bn €/yr). The annual investment is 7.92 bn €/yr for offshore wind, which increases in the conservative scenario (11.2 bn €/yr) and decreases in the progressive scenario (3.8 bn €/yr). For solar PV, the base scenario investment of 4.33 bn €/yr goes high in the conservative scenario (5.37 bn €/yr) and goes low in the progressive scenario (3.79 bn €/yr).  Fig. 9 compares the existing capacities and required investments for the heat generators. For CHP shown by Fig. 9 (a), in addition to the existing 13.6 GW,    Fig. 9 (b) shows a similar pattern for heat pumps (GSHP and ASHP) in Fig. 9 (b), where the base scenario requires 173.41 GW th investment, the conservative scenario requires an increased 181.86 GW th investment, and the progressive scenario requires a decreased 154.93 GW th investment in Germany.

CHP and heat pump capacity and investment.
Although the heat demand did not change in the conservative scenario, heat generator installations increases because of the following reasons: 1. Since volatile generators are already installed up to their maximum potential, increased CHP installations are required to meet the additional electricity demand; 2. Reduced grid transfer capacity minimizes the power exchange scope between the grids and hence lessens the scope of P2H conversion with power from the other energy system. This circumstance enforces the model to install additional local heat pumps in individual energy systems; 3. Heat generation in this energy system depends on both electrical (because of P2H) and heat storage. Since electrical and heat storages are reduced in the conservative scenario, supply-demand balancing requires additional heat generators.
This additional heat generator in the conservative scenario also results in surplus heat in both energy systems at different hours over the year. Nevertheless, this additional heat investment problem is minimized in the progressive scenario where we have reduced electricity and heat demands, increased grid transfer capacity, and increased electrical and heat storage. Fig. 10 shows the technology-wise investment costs of the CHPs and heat pumps for NDE and SDE and the total costs. As shown in Fig. 10 (a), the annual investment cost for CHPs in the base scenario is 8.71 bn €/yr, which increases to 9.34 bn €/yr in the conservative and decreases to 7.39 bn €/yr in the progressive scenario. Similarly, for heat pumps, the base scenario investment of 18.47 bn €/yr increases to 19.44 bn €/yr in the conservative scenario and decreases to 16.28 bn €/yr in the progressive scenario. Fig. 10 (b) compares the total investment cost for all CHPs and heat pumps. The annual investment cost for all the heat generators is 27.18 bn €/yr, which increases by 5% in the conservative scenario (28.78 bn €/yr), and decreases by 13% in the progressive scenario (23.67 bn €/yr). Fig. 11 compares the investment for all types of storage. The model does not suggest any investment in H 2 storage because of the high cost. Fig. 11 (a) and Fig. 11 (b) shows the required investment capacities of Li-ion and Redox batteries. Both batteries are used up to their maximum given potential whenever used as an input. According to Fig. 11 (a), for a total of 15.65 GW el Li-ion batteries, the total optimized energy capacity is 102 GWh el (NDE = 18.32 GWh el , SDE = 83.42 GWh el ). As shown in Fig. 11 (b), for 0.93 GW el Redox batteries in Germany, the total optimized energy capacity is 3 GWh el (NDE = 0.56 GWh el , SDE = 2.52 GWh el ) .

Storage capacity and investment.
However, the ACAES are used partially with an optimized power of 0.15 GW el and optimized energy storage of 2.5 GWh el in the base scenario, and an increased optimized capacity of 0.51 GW el and optimized energy storage of 5 GWh el in the progressive scenario, as shown in Fig. 11 (c). Fig. 11 (d) shows the usage of TES capacities up to their maximum exogenous potential, with the total optimized energy storage capacity varying in between 360 GWh th (conservative) and 720 GWh th (progressive). Fig. 12 shows the investment costs of the electrical and heat storage and the total costs. As shown in Fig. 12 (a), Li-ion batteries' annual investment cost is 1.57 bn €/yr. For Redox batteries, the base scenario's annual investment cost and the progressive scenario are 0.05 bn €/yr. In the case of ACAES, the annual investment cost is 0.01 bn €/yr in the base scenario and 0.03 bn €/yr in the progressive scenario. The annual investment cost of heat storage depends mainly upon the volume of the storage capacity, which is 1.66 bn €/yr in the base scenario for 540 GWh th . As the storage capacity goes down to 360 GWh th in the conservative scenario, the yearly investment reduces to 1.1 bn €/yr. In the progressive scenario, the annual investment again increases to 2.21 bn €/yr since the total storage capacity increases to 720 GWh th . Fig. 12 (b) shows the total investment costs for all storages. The annual investment for all storages is 3.29 bn €/yr in the base scenario, which decreases by 18% to 2.67 bn €/yr in the conservative scenario with reduced storage provisions and increases by 17% to 3.86 bn €/yr in the progressive scenario with high storage provisions.  Fig. 13 compares the energy mix results. Fig. 13 (a) shows the composition of the electricity generation mix. The total electricity generation in the base scenario is 944 TWh el , increasing to 1074 TWh el in the conservative scenario with excess demand, less storage, reduced grid capacity; and decreased to 818 TWh el in the progressive scenario with reduced demand, more storage, and increased grid capacity. The energy mix also shows that, while all three scenarios need maximum offshore wind and hydro ROR, additional solar PV, offshore wind, and CHP can supply the rest of the demand. The base scenario mix comprises 37% onshore wind, 19% offshore wind, 30% solar PV, 10% CHP, and 0.01% hydro ROR plants. The progressive scenario shows similar results: 43% onshore wind, 12% offshore wind, 31% solar PV, 11% CHP, and 0.01% hydro ROR. These results are compared and cross-validated with a study from Fraunhofer Institute for Solar Energy System (ISE) [114], which showed that an 85% renewable-based system in Germany producing 800 TWh el electricity comprises 47% onshore wind, 16% offshore wind, and 22% solar PV. According to the OSeEM-DE results, CHPs can replace the remaining 15% fossil-fuel-based generation using Germany's available biomass potential. Such a system also needs high electrification of the heating sector. Fig. 13 (b) shows that with less demand, more heat storage capacity, and more grid transfer capacity, the progressive scenario yields a reduced heat generation of 590 TWh th .

Energy mix
The heat generation results also show that heat pumps dominate the heat generation (around 80%), and biomass-CHPs cover the rest of the demand. In heat pumps, the comparatively more efficient but expensive GSHPs are preferable over less efficient and cheaper ASHPs. Though the model considers only CHPs and heat pumps, other renewable applications such as electric boiler, solar heating, biofuel heating, Hydrogen heating, and geothermal heating should be investigated to produce heat, primarily process heating in industries.
Excess generation from renewables is a challenge that needs to be solved using a combination of plausible solutions. The OSeEM-DE results show that the least amount of excess generation occurs in the progressive scenario, indicating the apparent solution of using more storage. Also, the developed model is currently an island model with no interconnection between neighboring countries. A German energy system and its neighboring countries can reduce the curtailment problem with reduced optimized generation and storage capacities. Furthermore, demand response activities and the transport sector's inclusion with electric vehicles are also needed to reduce the curtailment or utilize the excess generation. The Levelized Cost of Electricity (LCOE) is calculated from the optimization results according to (23) Fig. 14 (b) shows the increase in the total electricity transfer between NDE and SDE for increasing grid capacities. For the grid expansion from 25 GW el to 40 GW el , an increase of 2.5% (119.64 TWh el vs. 122.72 TWh el ) from NDE to SDE is observed. On the other hand, from SDE to NDE, though the transfer amount is much less compared with NDE to SDE, a sharp increment rate can be observed (0.21 TWh el vs. 6 TWh el ) when grid capacity expands.
The results for power and energy capacities for all the storage  remained constant for all grid capacities, which indicated the maximum usage of the exogenously provided potentials. Therefore, the impact on the storage capacity for the grid expansion could not be measured using this sensitivity analysis. However, the grid expansion facilitates a smoother balance between the two systems, resulting in increased electricity exchange, thus requiring less investment in offshore wind, solar PV, and heat pump installations. Therefore, the expansion of the electrical grid between Northern and Southern Germany should be considered as a promising option for supporting a 100% renewablebased sector-coupled system for Germany. However, the cost of grid expansion vs. investment in generation facilities, which has not been conducted in this research, must be investigated to reach an optimum solution and draw a conclusion.

Storage and dispatchable load.
Electrical storages and dispatchable loads (i.e., heat pumps) with heat storage tend towards flexibility and interdependence in all the scenarios. The existing hydro ROR plants and PHS help the system to balance both the short-term and longterm. Also, the biomass-fed CHPs are used as dispatchable generation resources that serve as a backup to counter the volatile generation's variability from solar PV and wind. Both Li-ion and Redox batteries act as critical storage technologies to be utilized for shorter periods. On the other hand, ACAES shows promising prospects to aid the PHS for longterm seasonal storage. The large-scale investment of heat pumps confirm the findings of Hedegaard and Münster, i.e., the individual heat pumps can have a positive contribution towards large scale wind power investments to reduce the system cost and pressure on the limited biomass potential [116]. The dispatchable heat pumps can use surplus power from the variable renewable generation, which supplements other heat generation sources and offers flexible operations. A sensitivity analysis is conducted to inspect the effect of storage expansion. For this analysis, the grid capacity is fixed at 20 GW el , and the batteries (Li-ion and Redox), H 2 storage, and TES are gradually doubled from their current maximum exogenous potential. The ACAES and PHS capacities are not expanded since spatial constraints limit their maximum potentials. As shown in Fig. 15 (a), the onshore wind, solar PV, and hydro ROR capacities do not change with the increase in storage capacities, but the offshore investment drops by 47% (55.53 GWel vs. 29.1 GWel) when the storages are doubled. Similarly, both CHP and heat pump investment decreases by 13% (62.5 GW vs. 54.32 GW) and 6% (189.87 GW th vs. 177.39 GW th ), respectively. Hence, increased storage options offer additional flexibility to curtail peak/reserve capacities for the energy system. On the other hand, electricity exchange decreases from NDE to SDE by more than 9% (113.88 GW el vs. 102.77 GW el ) when the storage capacity is doubled, as shown in Fig. 15 (b). Contrarily, the electricity transmission from SDE to NDE is almost a straight line, with a much lower value. The decrease of investment in offshore wind, CHP, and heat pumps and the reduced energy transfer from NDE to SDE indicate that storage expansion in local energy systems can be another viable flexibility option for reducing investment in generation capacities and grid expansion.
Considering the limited reserve capacity of cobalt and vanadium, expanding the battery capacities is a matter of further investigation. The sensitivity analysis for storage expansion also reveals the usage of H 2 storages in three instances (0%, 20%, and 40%) when the grid capacity was comparatively low (20 GW el ), and the other storage options were not sufficient. This result indicates the possibility of H 2 storage as another plausible alternative, especially for local energy systems, when other resources for batteries are not adequate and when the grid expansion is limited. In addition to H 2 storage, Norwegian large hydro capacities are another promising storage option for the future German energy system. This requires additional investment in interconnection capacities between Norway and Germany and is subject to policy discussions.

Summary of the analysis
The analysis shows that a 100% renewable energy system for both power and building heat sectors are feasible for moderate to extreme scenario considerations. For onshore wind and hydro ROR investments, maximum potentials should be utilized to meet the demand. In contrast, in the case of PV and offshore wind turbines, the investment capacities depend upon variation in electricity and heat demand, transmission grid expansion, available biomass potential, and storage provisions. The energy mix of such a system is composed of all the possible volatile generator resources, biomass resources, and the already existing renewable capacities. The model chooses PHS, ACAES, and batteries over relatively expensive H 2 . The results will be different when the industrial heating sector is coupled, and large-scale electrolyzers produce inexpensive H 2 .
In volatile generator investments, the scenario analysis shows that a fixed investment of 168.69 GW el onshore wind and 1.16 GW el hydro ROR plants are necessary, along with varying investments of 26.13-76.94 GW el offshore wind and 172-243.84 GW el solar PV capacities for the three developed scenarios. Onshore wind plants require an annual investment of 9.84 bn €/yr, and hydro ROR plants require a yearly investment of 0.19 bn €/yr. Offshore wind and solar PV requires varying investments in different scenarios, 3.8-11.2 bn €/yr for offshore wind and 3.79-5.37 bn €/yr for solar PV. The total cost for the volatile generators in Germany varies between 17.62 bn €/yr and 26.6 bn €/yr, which sums up to 312-450 bn € over the lifetime.
Heat generator capacities vary for CHPs between 58.26 GW th and 73.62 GW th , while the heat pump acts as a more preferred alternative heating option for buildings, requiring 154.93-181.86 GW th installations for Germany. The cost varies accordingly, for CHPs in between 7.39 bn €/yr and 9.34 bn €/yr, and the heat pumps in between 16.28 bn €/yr and 19.44 bn €/yr. Therefore, the total cost for the heat generators in Germany varies between 23.67 bn €/yr and 28.78 bn €/yr, which sums up to 316-385 bn € over the lifetime.
For storages, while partial investment is suggested for ACAES varying from 0.15 GW el to 0.51 GW el , batteries are preferred over Hydrogen storages for all three scenarios. Existing PHS and ACAES capacities are used throughout the year, and the TES are utilized to their maximum exogenous capacities. The total cost of power and storage shows that maximum investment is required for Li-ion batteries (1.57 bn €/yr) and TES storage capacities (1.1-2.21 bn €/yr). With minimum storage provision in the conservative scenario and maximum storage provision in the progressive scenario, the total cost for electrical and heat storages in Germany varies between 2.67 bn €/yr (conservative) and 3.86 bn €/yr (progressive), which sums up to around 33-48 bn € over the full lifetime.
The energy mix comparison with Fraunhofer ISE's studies suggests that a transformation towards 100%-system according to the OSeEM-DE model results is feasible by 2050, where the energy mix consists of onshore wind, solar PV, offshore wind, CHP, and hydro ROR plants. The biomass-CHP is a promising option to replace the 15% fossil-fuel-based generation of the 85% system of Fraunhofer ISE's study, and the optimized results from the OSeEM-DE model shows that the German potential is sufficient to meet this requirement. The LCOE values have been compared with another Fraunhofer ISE study, which cross-validates the model results.
The flexibility of the system was examined via sensitivity analysis of the grid and storage capacities. It is observed that with grid expansion, the cost of offshore wind, solar PV, and heat pump decreases, but the CHP investment increases slightly. On the other hand, with the gradual expansion of storage, offshore wind, CHP, heat pump investment, and energy transfer from NDE to SDE decreases. Therefore, maximum utilization of the storage usage and optimum grid expansion can provide additional flexibility to the system and decrease the overall investment cost. The cost of grid expansion vs. investment in generation and storage facilities must be investigated to reach the optimum solution. The limited capacity of battery materials should also be taken into consideration. A possible alternative storage solution is Norwegian hydro storages with the interconnection between Norway and Germany, subject to further investigation.

Limitations of the study
This study's modeling approach has five main aspects that could alter the results: Regarding the transmission modeling, the transmission lines between Northern and Southern Germany were modeled as transshipment capacities between two nodes. The internal transmission constraints are not considered, and the grid expansion's investment costs are not calculated. Therefore, the benefits of grid expansion in a sector coupled network in terms of net system cost, including the cost of transmission, could not be determined. Schlachtberger et al. showed that there could be a 'compromise grid' in-between 'today's grid' and the 'optimal grid', in a highly renewable European electricity network [108]. While optimal grid expansion can be infeasible due to social acceptance issues, the compromise grid offer the maximum benefit at an adequate amount of transmission. A similar scenario is expected in the German electricity system, which should be investigated with detailed transmission grid modeling and consider facts such as meshed networks and power handling capabilities [117].
Second, the heating sector does not include industrial heating demand (i.e., process heat). There are two main reasons: (1) model complexity of high-temperature heating applications, and (2) the availability of hourly industrial heating time series data. The industrial heating demand can be satisfied using several renewable-based approaches, including P2H technologies such as high-temperature heat pumps and electrode boilers, green Hydrogen for cement, iron, and steel production [118], and biogas-based heating. An alternative solution should be figured out in the next phase of the research to translate aggregated industrial heating demand data to hourly time series data. With the inclusion of industrial process heating demand, the feasibility of a 100% power-heat coupled system for Germany needs to be reinvestigated.
Third, the current model only considers solar PV, wind, hydro, and biomass and does not include other options such as concentrated solar power (CSP) and geothermal plants. The heating is therefore highly dependent upon the use of biomass, which is limited in potential. A model run without biomass resources as heating, using only electricitybased heat pumps, resulted in an infeasible optimization solution. The inclusion of CSP and geothermal plants and other heating technologies such as electric and electrode boilers and green Hydrogen-based heating may reduce the need for biomass-based CHPs, which should be investigated in future research works.
Fourth, only hot water-based TES was considered as a heat storage option in the model. Other storage options, such as long-term (seasonal) underground TES in boreholes or water pits, were not considered in the model. The main reason for excluding these options is the complex modeling characteristics of these types of storage. The model also simplifies the hot water storage based on simplified assumptions, such as the water inside the tank is thoroughly mixed and has a uniform temperature. Such a simplified model can offer simple and computationally feasible solutions for aggregated power systems. Nevertheless, in the case of a comprehensive analysis of energy systems, it is essential to include all the possible heat storage options with detailed modeling.
Finally, the import and export of electricity between countries, an essential part of the combined energy transition towards the EU's climate-neutrality, were not considered in the model. The inclusion of electricity trade with neighboring countries will affect the calculated investment capacities and costs. The gradual inclusion of all the EU countries is currently considered a future development step of the model.
The model results will also alter if it considers different factors such as higher work/energy ratio of electricity over combustion, elimination of upstream emissions, and policy-driven increases in end-use energy efficiency, as described by Jacobson et al. [64]. Besides, this study considered low PHS inflow values (dry season). There will be more PHS provisions for high inflow values (wet season), affecting the storage investment. The least-cost options for a 100% renewable energy system are not limited to the current OSeEM-DE model components. While this study shows one of the possible pathways for achieving decarbonization in power and building heat sectors, the result will differ when other energy sectors are coupled. There can be a different set of solutions with cheaper Hydrogen or a system with vehicle-to-grid (V2G) and demandside management (DSM). The benefits of highly renewable and sectorcoupled systems can only be realized with a combination of different solutions. For example, the concept of 'Smart Energy Systems' includes solid, gas, and liquid fuel storage, heat pumps with TES, battery electric vehicles, smart thermal grids (district heating and cooling), ICT-based smart electricity grids, smart gas grids, and other fuel infrastructures [21][22][23][24][25]31,36,37,71,119,120]. The concept of 'WWS' includes wave, tidal, geothermal, and CSP plants with the other renewable options for providing 100% energy [55,56,[59][60][61][62][63][64]80,81]. Besides, 'WWS' studies also focus on issues such as social costs and job creation. The PyPSA based studies focus on the benefits of sector-coupling and transmission expansion in a highly interconnected and renewable-based European network [95,[106][107][108][109]. The author refers to all the relevant '100% system' and 'Sector Coupling' studies since there is not a single pathway for the energy transition, but many possible pathways, with different advantages and disadvantages. The OSeEM-DE model should be seen as a tool, which can be adjusted for different scale energy systems for the EU to investigate different energy-related research questions.
The author wants to clarify that the mentioned limitations do not affect the current model's architecture. Only the results will alter with the inclusion of new technologies (e.g., transmission line, CSP, geothermal, electrode boiler, H2-heating), new costs (e.g., transmission expansion cost), new demand data (e.g., industrial heating, transport), and interconnections (e.g., between Germany and Norway). The methodology, including mathematical formulations as described in Section 3, and the development of the architecture as described in Section 4, will not change in further development. Nevertheless, the model upgrade plans, which are discussed in detail in Section 7.3, will allow the user to investigate more scenarios. For example, considering the inclusion of detailed transmission line modeling, the second version of the model (e. g., OSeEM-DE v2.0) will enable a user to investigate the case of grid expansion against sector-coupling, and the results will be different from this study. However, the previous architecture remains the same, and the only change, in this case, will be the addition of transmission model components and respective system costs to the first version of the model.

Future steps of the study
The open modeling tool OSeEM-DE paves the pathway towards modeling and analyzing plausible sector-coupled scenarios for 100% renewable-based national and sub-national energy systems. At the same time, this study shows how different energy mix options and their component-wise investment capacities and costs can be investigated using the model; hence, Germany's case can be followed for other similar regions to conduct the feasibility analysis of 100% renewablebased sector-coupled systems. The study also reveals that sensitivity analyses can help identify the system's flexibility aspects in future energy infrastructure. The following modeling plans are outlined for further development-1. Detailed transmission grid and high voltage direct current (HVDC) transmission line; 2. High-temperature industrial process heating and district heating network components; 3. Renewable technology components such as CSP, geothermal plants, and solar thermal collectors; 4. Storage components such as latent heat and chemical heat storages; 5. Transport components such as battery and fuel cell electric vehicles with the provision of V2G; and 6. DSM components.
The model results will be compared and cross-validated with similar modeling tools as described in [3]. The model will be regularly updated in GitHub [121], with source code and input data, so that other energy researchers can use the model for investigating different research questions for the renewable and sector-coupled energy systems in the EU context. According to the current study plan, the author plans to investigate the following research questions-1. Feasibility of a 100% renewable power-heat-transport coupled energy system for Germany; 2. Impact of Nordic hydro expansion on electricity cost and supply mix for the European energy system in 2050; 3. Investigation on Nordic countries' profitability as flexibility providers for the highly interconnected continental Europe using their green batteries.
In this study, the maximum capacity density on the available area is considered to be 4 MW/km 2 for onshore wind and 6 MW/km 2 for offshore wind plants, according to the LIMES-EU project [104]. Similar strategy to consider land limitations were also considered in studies by Brown et al. [106], Schlachtberger et al. [107,108], and Hörsch et al. [109]. A recent study from Enevoldsen and Jacobson estimates that the maximum output power densities are much higher for Europe,19.8 MW/ km 2 for onshore wind farms, and 7.2 MW/km 2 for offshore wind farms [122]. The updated values in output power densities directly impact the large-scale development of onshore wind power plants since significantly fewer land areas will be needed for new wind project developments. [122] also implies that the electrical infrastructure and the land acquisition costs will be lowered. Therefore, with the updated capacity density values from [122] into consideration, OSeEM-DE will have a higher value of maximum available potential as the optimization model inputs. This is particularly important for future investigations of OSeEM-DE, with industrial heat and transport demands in the model. The increased maximum potential will allow the installation of more wind turbines, with reduced investment costs, to satisfy the industrial heat and transport loads, providing additional flexibility to decarbonize the industrial heat and transport sectors.

Novelty and usability of the model
The OSeEM-DE is a comprehensive energy system model constructed using the toolbox from the framework Oemof, which includes the model generator Oemof Solph. In [123], Hilpert et al. clarified the definitions and relationship between model, model generator, and framework. Themodels represent the real-world energy systems with a specific regional focus and temporal resolution concretely and may consist of linked submodels to answer straightforward research questions. Model generators employ specific analytical and mathematical approaches by using predefined sets of equations. A framework is a structured toolbox that includes sub-frameworks, model generators, and specific models. Besides, an application can be developed using one or more framework libraries depending on scope and purpose. The Oemof libraries can be used to build different energy system models, which can be referred to as applications. Therefore, according to the definition from [123], OSeEM-DE is a model that represents the energy system of Germany with an hourly temporal resolution. The model is novel and unique for the following reasons-1. A unique feature of the OSeEM-DE model is that it allows a user to modify the model at two different levels. At the basic level, the user can use the model with simple tabular data and scripts. Therefore, the basic level user can visualize the scenario beforehand, prepare the scenario by changing input data in .csv data files to develop the scenarios, use the given Python scripts and modify them to reflect his developed scenario. On the other hand, the advanced level users can access the underlying structures, including the model generator Oemof Solph and the class Oemof Tabular Facades to enhance the analytical and mathematical formulations. The unique feature allows energy system analysis ranging from aggregated analysis (e. g., basic level analysis with low resolution) to comprehensive analysis (e.g., advanced level analysis of energy systems with high resolution) 2. The model follows a hybrid approach where the users can define current capacities exogenously, and the future investments are determined endogenously, with a limit of the maximum potential of different technologies. The unique feature allows to create different scenarios ranging from brownfield to greenfield approaches and evaluate a more holistic view of the energy system investments. 3. The use of heat pumps with storage as dispatchable loads is another unique feature of the model. OSeEM-DE uses heat pump technologies (ASHP and GSHP) combined with hot water-based heat storage (TES), which allows flexible operation of heat pumps in 100% renewable energy systems and reduces the need for electricity storage units. 4. While a previous model (REMod-D) [29,30] represented 60% of the building heat demand, OSeEM-DE presents 100% of the demand to decarbonize the building heat sector of Germany fully. Besides, OSeEM-DE is an open-source model in contrast to other models doing similar investigations. 5. The model offers extended storage provisions. The model considers Redox, H 2 , and ACAES as storage options in addition to traditional Li-ion and PHS options. The use of ACAES is unique because it is not very common to include the technology in energy models. The availability of salt caverns in Northern Germany allows a considerable potential for decentralized renewable energy storage, which is considered an essential input of the OSeEM-DE model. 6. The model considers biomass potential from forest residues, livestock effluents, and agricultural residues in Germany to use them as CHP fuels. In contrast to energy models, which rely heavily on P2H for heat decarbonization, the OSeEM-DE model uses biomass-CHPs with realistic biomass availability data from the Hotmaps project [111]. Using a combination of P2H and traditional CHPs based on renewable resources is unique and new and paves the pathway for similar future analysis. 7. The model is the first to analyze the interaction between Northern and Southern Germany to reflect on the flexibility aspects of grid expansions. A similar method can be followed for analyzing import/ export in other national energy systems.

Conclusion
One of the objectives for developing the model is to use simple scripts and tabular data sources to construct complex energy systems. For this purpose, the author used Oemof, one of the 16 tools selected based on modeling 100% renewable and sector-coupled systems in the NS region. The underlying concept is the Oemof Solph package, which is based on a graph structure at its core and provides an optimization model generator to build investment and dispatch models. While the internal architecture of Oemof Solph is comparatively complex and intended for the expert developers, the OSeEM-DE model is intended for the users who can use existing Oemof Tabular Facades, tabular .csv data files, and simple Python scripts to build the energy system. The current Facades include dispatchable generation (to allow modeling of fossil-fuel-based generation), volatile generation, storage, reservoir (for pumped hydro storage), backpressure and extraction turbines (for CHP), commodity (for limiting the amount of available fuel), conversion (for modeling transformers or heat pumps), load, link (for transshipment-based transmission), and excess (for handling the excess generation from the renewable sources in the optimization model). These classes can also be mixed with the Oemof Solph classes, which broadens the model's versatility. The implementation of these components in Oemof Solph is transparent, and the equations and logics behind the component development are also available in the documentation of Oemof Solph.
To use the OSeEM-DE model for different energy system contexts, the user needs to add or delete the relevant components, buses and substitute the input data. The simple scripting method also allows splitting up countries into several regions, which allows for comprehensive subregional analysis. For example, suppose a user wants to investigate the impacts of connecting the Norwegian pumped hydro storage to the German energy system. In that case, he can develop the OSeEM-DENO model adding the Norwegian energy system using similar scripts but different input data. In any generation that differs from the German system, the user can use the relevant Facade class to create the component and add it to the model. If there is a nuclear generation in the system, the user can write a simple script for adding the 'dispatchable' Facade class with relevant nuclear input data in the tabular file. Similarly, the model can scale up to a highly interconnected European energy system (e.g., OSeEM-EU), where each country is represented by one or several nodes. The availability of the source code and input data of the model increases transparency and reduces the user's effort to build up a different energy system for investigation.

Broader Context
The study contributes to open energy modeling challenges to analyze 100% renewable-based energy systems for integrated energy sectors. Additionally, it contributes to renewable energy utilization studies and the understanding of energy transition in the German context. The research illustrates an in-depth methodology for developing renewable and cross-sectoral energy system models and delineates a scenario-based energy system analysis technique. It advances the understanding of the integrated system's feasibility and shows the required capacities and investment for its components to stay within renewable resources' available potentials. The study reveals the possibility of using power-toheat devices such as electric heat pumps and using biomass-based combined heat and power plants to eliminate the dependency on fossil fuels for heat generation. The study also shows that grid and storage expansion impact the energy system's flexibility. To summarize, the model and the analysis technique will be useful for investigating similar energy systems, especially in the EU context. Data: Data, source codes, and results of the model is available in the following Github repository [121]: https://github.com/znes /OSeEM-DE.

Funding
This research is a part of the ENSYSTRA project which received funding from the European Union's Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No: 765515.

Declaration of Competing Interest
The author declares that he has no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.