diff --git a/elm/utilities/try_import.py b/elm/utilities/try_import.py index 4d018c91..1d7b67e5 100644 --- a/elm/utilities/try_import.py +++ b/elm/utilities/try_import.py @@ -17,7 +17,7 @@ def try_import(package_name): Returns ------- - p : package + p : module imported package. """ try: @@ -26,7 +26,7 @@ def try_import(package_name): except ImportError: msg = (f'Unable to import {package_name}. ' 'Please ensure you have the package ' - 'installed and spelled correctly ' - 'before proceeding.') + 'installed. This is an extra requirement ' + 'for the package you are running') logger.warning(msg) warn(msg) diff --git a/elm/wizard.py b/elm/wizard.py index 8e9ca315..943bbd55 100644 --- a/elm/wizard.py +++ b/elm/wizard.py @@ -384,38 +384,52 @@ class EnergyWizardPostgres(EnergyWizardBase): """Interface to ask OpenAI LLMs about energy research. This class is for execution with a postgres vector database. - Connecting to the database requires the use of the psycopg2 - python package, environment variables storing the db user and - password, and the specification of other connection paremeters - such as host, port, and name. The database has the following - columns: id, embedding, chunks, and metadata. + Querying the database requires the use of the psycopg2 and + boto3 python packages, environment variables ('EWIZ_DB_USER' + and 'EWIZ_DB_PASSWORD') storing the db user and password, and + the specification of other connection paremeters such as host, + port, and name. The database has the following columns: id, + embedding, chunks, and metadata. + + This class is designed as follows: + Vector database: PostgreSQL database accessed using psycopg2. + Query Embedding: AWS titan using boto3 + LLM Application: GPT4 via Azure deployment """ + EMBEDDING_MODEL = 'amazon.titan-embed-text-v1' def __init__(self, db_host, db_port, db_name, - model=None, token_budget=3500): + db_schema, db_table, model=None, + token_budget=3500): """ Parameters ---------- - model : str - GPT model name, default is the DEFAULT_MODEL global var - token_budget : int - Number of tokens that can be embedded in the prompt. Note that the - default budget for GPT-3.5-Turbo is 4096, but you want to subtract - some tokens to account for the response budget. db_host : str Host url for postgres database. db_port : str Port for postres database. ex: '5432' db_name : str Postgres database name. + db_schema : str + Schema name for postres database. + db_table : str + Table to query in Postgres database. + model : str + GPT model name, default is the DEFAULT_MODEL global var + token_budget : int + Number of tokens that can be embedded in the prompt. Note that the + default budget for GPT-3.5-Turbo is 4096, but you want to subtract + some tokens to account for the response budget. """ boto3 = try_import('boto3') psycopg2 = try_import('psycopg2') db_user = os.getenv("EWIZ_DB_USER") db_password = os.getenv('EWIZ_DB_PASSWORD') - assert db_user is not None, "Must set user for postgres database!" - assert db_password is not None, "Must set user for postgres database!" + self.db_schema = db_schema + self.db_table = db_table + assert db_user is not None, "Must set EWIZ_DB_USER!" + assert db_password is not None, "Must set EWIZ_DB_PASSWORD!" self.conn = psycopg2.connect(user=db_user, password=db_password, @@ -497,10 +511,10 @@ def query_vector_db(self, query, limit=100): query_embedding = self.get_embedding(query) - self.cursor.execute("SELECT ewiz_kb.id, " - "ewiz_kb.chunks, " - "ewiz_kb.embedding <=> %s::vector as score " - "FROM ewiz_schema.ewiz_kb " + self.cursor.execute(f"SELECT {self.db_table}.id, " + f"{self.db_table}.chunks, " + f"{self.db_table}.embedding <=> %s::vector as score " + f"FROM {self.db_schema}.{self.db_table} " "ORDER BY embedding <=> %s::vector LIMIT %s;", (query_embedding, query_embedding, limit,), ) @@ -529,9 +543,9 @@ def make_ref_list(self, ids): placeholders = ', '.join(['%s'] * len(ids)) - sql_query = ("SELECT ewiz_kb.title, ewiz_kb.url " - "FROM ewiz_schema.ewiz_kb " - "WHERE ewiz_kb.id IN (" + placeholders + ")") + sql_query = (f"SELECT {self.db_table}.title, {self.db_table}.url " + f"FROM {self.db_schema}.{self.db_table} " + f"WHERE {self.db_table}.id IN (" + placeholders + ")") self.cursor.execute(sql_query, ids) diff --git a/tests/data/postgres_query_test.txt b/tests/data/postgres_query_test.txt new file mode 100644 index 00000000..c3507d33 --- /dev/null +++ b/tests/data/postgres_query_test.txt @@ -0,0 +1,216 @@ +(['DE-AC36-08GO28308 National Renewable Energy Laboratory 15013 Denver West Parkway Golden, CO 80401 303-275-3000 • www.nrel.gov Technical Report NREL/TP-5000-87824 March 2024 A 2023 Perspective: What Is the Value of Hybridization? Matthew Kotarbinski, Brinn McDowell, Jonty Katz, Genevieve Starke, and Nicholas Riccobono National Renewable Energy Laboratory Suggested Citation Kotarbinski, Matthew, Brinn McDowell, Jonty Katz, Genevieve Starke, Nicholas Riccobono. 2024. A 2023 Perspective: What Is the Value of Hybridization? Golden, CO: National Renewable Energy Laboratory. NREL/TP-5000-87824. https://www.nrel.gov/docs/fy24osti/87824.pdf. https://www.nrel.gov/docs/fy24osti/87824.pdf NOTICE This work was authored by the National Renewable Energy Laboratory, operated by Alliance for Sustainable Energy, LLC, for the U.S. Department of Energy (DOE) under Contract No. DE-AC36-08GO28308. Funding provided by the U.S. Department of Energy Office of Energy Efficiency and Renewable Energy Wind Energy Technologies Office. The views expressed herein do not necessarily represent the views of the DOE or the U.S. Government.', + 'Furthermore, projects in the queue have requested to come online before 2026. Though realistically, not all of these projects will end up being developed, the number of projects requesting to come online suggests a need to expedite the rate at which hybrids will be deployed in the coming years. Finally, increased policy support on the federal and state levels, such as through financial incentives within the Inflation Reduction Act and the Bipartisan Infrastructure Law, have reduced deployment barriers for hybrid facilities. 33 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. Hybridization offers a variety of technical and economic benefits. As detailed in this report, hybrid facilities have the potential to add value or alleviate concerns in the following areas (in no specific order): • Infrastructure and transmission. Sharing infrastructure and plant components can result in project cost savings. Grid-connected HPPs can benefit developers and plant owners by maximizing power production without expanded transmission, which avoids costly upgrades, extended timelines, and additional permitting. Hybrid facilities operating in an off-grid configuration can shorten timelines associated with interconnection queues from 5-8 years to 3-5 years and avoid transmission interconnection costs. • Economic and market participation.', + 'Conversion technologies have been identified as a key driver in helping decarbonize hard-to-abate industries, such as steel production and chemical processing, and are sometimes referred to as power-to-X applications. While the addition of a battery to an HES is not necessary for reaping the end-use benefits that hybridization is able to provide, storage can help with optimizing operations by ensuring consistent and reliable electricity flow into the conversion process. 4 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. 2 Current and Future Hybrid Considerations In recent years, decreasing costs of renewable generation and battery technologies, and increasing policy support have reduced barriers for deployment. The type of hybrid facility and location depends heavily on technology maturation and market drivers that will continue to factor into future deployment. The following section expands on the market drivers of hybrid development and provides a current snapshot and outlook of hybrid deployment. 2.1 Driving Market Factors Two market drivers of HPPs are the decreasing costs and increasing policy support of renewable energy generation and battery technologies.', + 'Additionally, the deployment of HPPs is likely to be further accelerated by the decline in the LCOE of PV plus storage, which is expected to decrease from $93.1/MWh in 2023 to $51.4/MWh in 2050 (-44.7%) (NREL 2023). Although HPPs are projected to increase in generation capacity, realizing the benefits and mitigating the challenges of HPP development is still essential for successful deployment. 15 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. Currently, PV-plus-storage is the most common HPP configuration. Despite PV-plus-storage making up the majority of queue, it is expected that every project will not come to fruition. Furthermore, the estimated cost declines in all renewable technology adds to the uncertainty of which configuration will become the most common. Through optimizing the configuration of HPPs for specific locations and end uses, developers and consumers of HPP electricity and byproducts can maximize the benefits associated with these respective technologies. 16 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. 3 Benefits, Challenges, and Complexities As demonstrated by the increasing development pipeline, hybrids offer many benefits that are not realized with single-technology VRE resources.', + 'As such, existing market participation rules may not realize the full capabilities of hybrid facilities to support grid functions, such as charging from the grid and ancillary services, therefore impacting revenue potential. • High-cost technology. Although renewable generation technology is cost competitive with traditional technologies, conversion technologies are still relatively expensive (Tashie-Lewis and Nnabuife 2021). The U.S. Energy Information Agency projects that the costs of these technologies will decline over time; however, upfront costs are currently a challenge for unlocking additional revenue streams (Energy Information Administration [EIA] 2022). • Design complexities. HPP and HES configurations can differ substantially depending on the intended end use. Market conditions, region-specific characteristics, as well as the facilities asset management strategy—operated for financial or technical optimization— can influence the design of a facility. Due to these factors, the developer, plant owner, or operator, need to evaluate many plant design considerations that can influence the economics of a project. • Operation and reliability. HPPs contain interfaces between different systems. As a result, system integration and reliability can be a challenge associated with plant customizability. There are also greater sensitivities to any type of connection disruption within a hybrid facility when compared to an equivalent-capacity collection of standalone single technology facilities that are all connected to the grid separately, where the loss of one connection would not affect the connection of the others.', + 'https://www.nrel.gov/docs/fy19osti/71714.pdf https://www.nrel.gov/docs/fy23osti/84327.pdf https://scenarioviewer.nrel.gov/ https://www.globalmaritimeforum.org/news/ammonia-as-a-shipping-fuel https://emp.lbl.gov/news/hybrid-power-plants-are-catching-only-some https://emp.lbl.gov/news/hybrid-power-plants-are-catching-only-some https://emp.lbl.gov/news/berkeley-lab-releases-top-10-research 38 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. Graso, Jana. 2020. “Hybrid renewable power plants make a good business case but need clearer legislation to become more widespread.â€� WindEurope. https://windeurope.org/newsroom/news/hybrid-renewable-power-plants-make-a-good-business- case/. Greco, Francesca, Sebastiaan G. J. Heijman, and Antonio Jarquin-Laguna. 2021. “Integration of Wind Energy and Desalination Systems: A Review Study.â€� Processes 9, no. 12: 2181.', + 'As HPPs and modeling capabilities continue to mature, it is anticipated that market participation rules will become more inclusive of HPPs. 3.6 Beneficiaries Although market participation and deployment remain uncertain, the benefits of hybrids can be realized by various stakeholder groups. From the procurement and development phase to operation, stakeholders all are beneficiaries of varying degrees. These groups include developers; subcontractors; plant owners and operators; grid and market operators; hard-to-abate sectors; residential and commercial consumers; and governments. Some of the benefits include: • Developers can build facilities with fewer geographic and plant characteristic restraints. • Governments have a pathway to achieve renewable electricity and decarbonization targets. • Grid operators have fewer challenges in managing and balancing the grid. • Consumers can benefit from low-cost electricity, hydrogen, and other vectors. 29 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. 3.6.1 Developers and Subcontractors Hybrid facilities can offer substantial benefits to developers when compared to traditional single- technology VRE facilities. Through the combined management of multiple technologies within one facility, developers and subcontractors can realize associated benefits by sharing resources and costs during planning and approval, site acquisition, and the construction and development stages of a facility.', + '.......................................................................................... 2 2 Current and Future Hybrid Considerations ....................................................................................... 4 2.1 Driving Market Factors .........................................................................................................', + "In our perspective, one unique way of considering the effectiveness of a policy and the technologies it favors was displayed by Fangwei Cheng. Cheng plotted the lifecycle GHG emissions reductions from various technologies compared with the levelized subsidy value that they receive from IRA, as shown in Figure 8. Since one of the main intentions of the IRA was to reduce GHG emissions, technologies with higher emissions reductions would be expected to receive higher subsidy levels. There is a correlation between these two variables for SMR, biogas-hydrogen and other technologies. However, the subsidy for electrolysis per kg of hydrogen produced is significantly more than its lifecycle emissions reduction. This is because ~95% of hydrogen currently produced is ''grey hydrogen'', made with 18 natural gas from the grid via SMR or Autothermal Reforming without CCS (Cheng 2023). IRA focused on driving a new hydrogen economy, beyond simply meeting existing hydrogen demand. Another topic of interest globally was the effect of the variability of wind and solar PV on electricity markets. While this is a question that has been considered for years, many countries are reaching VRE deployment levels that actively influence wholesale prices. This raises concern about how markets will accurately compensate players for their participation. The discussion at IEW ranged from VRE's effect on capacity markets (Holt 2023), ancillary service markets (Hyungkwan Kim 2023) and wholesale markets (Ma 2023; Du 2023).", + 'Q&A) Metals Hall 10:45 12:05 Decarbonizing Mobility [Noah Sandoval - CSM] 35 Deepak Rajagopal - UCLA and LBL Implications of energy transition for emissions, public finances, employment, and energy imports: The case of electric vehicles in India Francesco Sanvito - Delft University of Technology Is Vehicle-to-Grid a game changer in sector-coupled European energy system in 2050?', + '............. 5 2.2 Current and Future Status of Hybrid Power Plants ..................................................................... 12 2.2.1 Current Status of Hybrid Power Plants .......................................................................... 12 2.2.2 Future Status of Hybrid Power Plants ............................................................................ 13 3 Benefits, Challenges, and Complexities ................', + 'The report titled 2024 JISEA Annual Meeting: Session 4 can be summarized as follows: This is the presentation for the 2024 JISEA Annual Meeting Session 4: Workforce of the Future, which took place on February 27, 2024.', + '................................................................... 4 2.1.1 Decreasing Cost of Renewable Technologies .................................................................. 4 2.1.2 Increasing Policy Support ................................................................................................ 5 2.2 Current and Future Status of Hybrid Power Plants ................................', + 'Finally, if an existing brownfield site is converted into a hybrid facility, there are further advantages. For example, if market rules allow, projects can take advantage of existing interconnections, thus reducing project costs and associated lead times of development. 3.6.2 Owners and Plant Operators Hybridization provides various operational advantages to the owners and operators, including increased opportunities to participate in energy markets, greater incentive eligibility, and fewer curtailment risks. These benefits can increase project revenue for owners and operators. Depending on market rules and design, expanded revenue stream opportunities may be available through additional market participation (Ahlstrom 2019). For example, adding storage to a renewable generation resource allows an HPP to participate in ancillary services, such as frequency regulation. In addition, integrating energy storage into a hybrid plant, can minimize curtailment. As a result, owners can maximize their profitability by mitigating economic losses associated with curtailment. 3.6.3 Grid and Market Operators When compared to a single-technology VRE, hybridization offers system operators improved flexibility and reliability through increased grid service capabilities. Hybrid power plants can be designed to meet specific grid and market conditions, including providing baseload power, peak demand, or ancillary services more effectively, while still generating electricity. These advantages can provide greater flexibility for system operators and can mitigate grid reliability and resiliency issues.', + 'Battery technologies are also becoming more cost-effective, decreasing from $1,306/kWh in 2010 to $151/kWh in 2022. Furthermore, NREL’s Annual Technology Baseline modeling indicates that the LCOE of solar PV could decline by 52% from 2023 to 2050, and wind LCOE could decline by 37%. Similarly, the LCOE of solar PV-plus-storage configurations are anticipated to fall by 45% (NREL 2023). These declines are expected to increase the economic viability of hybrid facilities, not only achieving cost parity with but also surpassing their traditional generation counterparts. Currently, the most common hybrid plant configuration by far, in the development pipeline is PV plus storage, followed by wind-based hybrid configurations, albeit trailing further behind. Solar PV and wind-based hybrid facilities represent a growing share of future clean energy projects in the development pipeline. In 2017, HPPs made up negligible portions of the interconnection queue, but in 2021 HPP configurations accounted for 42% of solar projects and 8% of wind projects (Bolinger et al. 2022). However, deployment trends will depend on region-specific characteristics, such as local resource profiles, load demand profiles, and access to grid and transmission infrastructure. Furthermore, projects in the queue have requested to come online before 2026.', + 'Hybrid power plants have an advantage over single-technology VRE generation when considering time matching because of their ability to provide more consistent power (Esposito, Gimon, and O’Boyle 2023). 3.5.3 Market Participation Constraints Due to the novelty of hybrids, how these facilities are allowed to operate within energy markets remains uncertain. While there is increasing policy clarity, such as the various FERC orders discussed in Section 2.1.2, constraints around market design currently prevent the full value of hybrid capabilities from being realized. Some of these market participation constraints include restrictions pertaining to charging battery storage from the grid, and a hybrid facility’s ability to participate in all market structures. These constraints are variable and highly dependent on specific market and state rules. In the PJM market, an HPP that includes storage is only allowed to charge from co-located generation sources and is prevented from charging from the grid. These types of constraints limit the ability of HPPs to provide grid management and load smoothing services (FERC 2021). These limitations are often tied to the nature of grid interconnection approval processes, or limitations with how RTOs and ISOs model hybrid power plants. As HPPs and modeling capabilities continue to mature, it is anticipated that market participation rules will become more inclusive of HPPs. 3.6 Beneficiaries Although market participation and deployment remain uncertain, the benefits of hybrids can be realized by various stakeholder groups.', + 'In addition to emissions requirements for the clean hydrogen PTC, language within the IRA has led to discussions of additionality, deliverability, and time matching for existing and grid- connected facilities. Additionality dictates whether only newly constructed HESs can claim the clean hydrogen PTC, or if existing hybrid facilities can retroactively add a hydrogen production process to their facilities so that they can then claim the clean hydrogen PTC. As a result, there is uncertainty as to whether additionality rules will reduce the number of facilities that will be eligible for this incentive. Deliverability requires the direct use of local electricity resources within the same region, as input to an electrolyzer. Both the electrolyzer and electricity generation resources need to be located in the same defined regions, such as power market zones, which will dictate electricity prices. The cost of electricity impacts the downstream price of produced hydrogen, meaning that the location of an electrolyzer, and therefore its clean hydrogen PTC eligibility, can be influenced by deliverability. Finally, time matching requires the electrolyzer to match the output of real-time renewable generation. Hybrid power plants have an advantage over single-technology VRE generation when considering time matching because of their ability to provide more consistent power (Esposito, Gimon, and O’Boyle 2023). 3.5.3 Market Participation Constraints Due to the novelty of hybrids, how these facilities are allowed to operate within energy markets remains uncertain.', + "Life-cycle GHG emissions reductions from various technologies compared with the levelized subsidy value that they receive from IRA. The outlier is electrolysis, which receives a higher subsidy relative to its GHG emissions reductions than other technologies, highlighting the US government's focus on stimulating the hydrogen market (Cheng et al. 2023). Markets signals frequently influence investment decision making. Researchers voiced concern about the financing of these future investment decisions and how our grid will operate with sunk investments. For future investments, Shobe was concerned with how to procure capital-intensive technologies especially those on the earlier side of the development cycle such as bioenergy with 19 CCS. Looking at present day, power sector capital is expected to realign massively over the next few years and there is a large amount of uncertainty with which technologies other than solar and wind will be most prevalent. This leads to market uncertainty as well and uncertainty for investors and companies about which technology to invest in. If this uncertainty causes them to not invest in a clean technology after the retirement of an existing unit, it could delay reaching net zero energy targets, leading to further exacerbating climate change (Van Der Zwaan 2023). To reduce this delay, we need a new way to find promising, dependable investment opportunities and avoid stranded assets.", + '. (2022) ..................................................................................................................................... 12 Figure 3. The locations of current operating hybrid power plants as of the end of 2021. Figure from Bolinger et al. (2022) ............................................................................................................. 13 Figure 4. Capacity in interconnection queues as of the end of 2022.', + 'Presented at the International Energy Workshop, Golden, CO. Hanumante, N. 2023. “Calibrating Energy, Mass, and Money Stocks and Flows within the Human And Resources with MONEY Economic Growth Model.” Presented at the International Energy Workshop, Golden, CO. Hernandez Negron, C. 2023. A hypothesis for experience curves of related technologies with an application to wind energy, issued 2023. Holt, C. 2023. “Improving Capacity Market Models for Wholesale Electricity Market Design and Policy Analysis.” Presented at the International Energy Workshop, Golden, CO. Hylton, J. 2023. “Biofuel Byproduct as a Carbon Sequestering, Strength-Improving Additive in Concrete.” Presented at the International Energy Workshop, Golden, CO. Hyungkwan Kim, J. 2023. “Variable Renewable Energy Participation in U.S. Ancillary Services Markets: Economic Evaluation and Key Issues.” Presented at the International Energy Workshop, Golden, CO. IEA. 2022. “World Energy Outlook 2022.” IRS. 2022. “Inflation Reduction Act of 2022.” https://www.irs.gov/inflation-reduction-act-of- 2022. Jones, A. 2023. “Climate Change Impacts on Future Residential Electricity Consumption and Energy Burden.” Presented at the International Energy Workshop, Golden, CO. Kettner, C. 2023. “Transformation to a Renewable Electricity System in Austria: Insights from an Integrated Model Analysis.”', + 'Furthermore, according to analysis conducted by NREL on the combined impacts of the BIL and IRA, both together can increase clean electricity shares—which includes nuclear, fossil fuels with CCUS, and renewables—up to 71%–90% of total generation by 2030, and can increase the cumulative average annual combined deployment rate of wind and solar from 44 GW per year to 93 GW per year over the coming decade. The report concludes that both the BIL and IRA “… have the collective potential to drive substantial growth in clean electricity by 2030,â€� (Steinberg et al. 2023). The combined impact of the BIL and IRA show that policy can drive increased renewable generation deployment that could also encourage hybridization. 2.1.2.6 State-Level Policy Support Hybrid development has been broadly supported by state-level policies that incentivize the adoption of VRE technologies with energy storage. Currently, state-specific policy addresses residential- and commercial-scale projects. According to the National Conference of State Legislators, “Renewable Portfolio Standards (RPS) require that a specified percentage of the electricity utilities sell comes from renewable resourcesâ€� (2021). As a result of states requiring electricity suppliers to provide a minimum percentage of electricity sales from renewable resources to customers, the adoption of VRE resources has increased. Through states’ RPSs, there are opportunities for continued policy development that explicitly address utility-scale hybrids—which often have larger nameplate capacities or are labeled “front of the meterâ€� facilities—to further support deployment.', + 'Figure 3. The locations of current operating hybrid power plants as of the end of 2021. Figure from Bolinger et al. (2022) 2.2.2 Future Status of Hybrid Power Plants In recent years, the number of HPPs in development has grown (Seel et al. 2022). As indicated in Figure 4, HPPs have increased their share of capacity in interconnection queues. Specifically, it shows that, in 2021, HPP configurations comprised 42% solar projects and 8% wind projects. Furthermore, all of the proposed HPP projects have requested to come online before 2026, which might suggest that there will need to be an increased rate of deployment in the upcoming years (Bolinger et al. 2022). However, while HPPs consist of a large portion of the queue, not all of the projects will be built. Lawrence Berkeley National Laboratory research indicates that there are currently a variety of HPP configurations that are viable in the market today; however, the optimal configuration of HPPs will depend highly on location and time at which electricity is 14 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. discharged (Gorman 2021).', + "Citations are in reference to specific presentations given at IEW. 3 2 Keynote Speakers IEW featured six keynote speakers across three plenary sessions, with each speaker giving a 30- minute address followed by time for questions. In this section we provide a summary of the key points mentioned by each speaker. 2.1 Sonia Aggarwal and Carla Frisch The first keynote session was a panel featuring Sonia Aggarwal, the Chief Executive Officer of Energy Innovation2, and Carla Frisch, the Acting Executive Director and Principal Deputy Director of the DOE's Office of Policy3. Some of our key takeaways from their panel are summarized in Figure 2. Aggarwal and Frisch's expertise lies in federal US energy policy. They both were involved with the Bipartisan Infrastructure Law (BIL) and the Inflation Reduction Act (IRA), laws passed in 2021 and 2022 in the United States. These laws feature a long-term investment in infrastructure and the economy as well as new and reinstated tax laws, with the goal of encouraging investment in domestic energy production and manufacturing, fighting inflation and reducing CO2 emissions (The White House 2021; IRS 2022). Figure 2. Our key takeaways from Aggarwal and Frisch's keynote panel. In their panel, Aggarwal and Frisch highlighted the importance of the current happenings in our energy systems transition, especially in the US.", + 'Deployment System) CEM NREL Open Source https://www.nrel.gov/analysis/reeds/ ResStock Residential building stocks simulation model NREL Open Source https://resstock.nrel.gov/ Switch 2.0 CEM and PCM Switch Model Group Open Source https://switch-model.org/ TIMES CEM Energy Technology Systems Analysis Program (ETSAP) Open Source https://iea-etsap.org/index.php/etsap- tools/model-generators/times Another commonly discussed topic was the role of imports or interregional cooperation of both electricity and fuels, particularly in Europe. Participants noted the strong renewable energy resources in northern Africa and high demand centers in Europe. They were interested in the potential for a hydrogen backbone to transport cheap, clean but remote electricity to these demand centers. They found that by building a hydrogen backbone and allowing for power grid 11 expansion, costs could be reduced by up to 9.9%, as shown in Figure 7 (Neumann 2023, Neumann et al. 2023). Conversely, if Europe restricted hydrogen trade with its neighbors, it would acquire additional costs of up to 30 billion USD per year by 2050 (Van Der Zwaan 2023).', + 'The views expressed herein do not necessarily represent the views of the DOE or the U.S. Government. This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications. U.S. Department of Energy (DOE) reports produced after 1991 and a growing number of pre-1991 documents are available free via www.OSTI.gov. Cover Photos by Dennis Schroeder: (clockwise, left to right) NREL 51934, NREL 45897, NREL 42160, NREL 45891, NREL 48097, NREL 46526. NREL prints on paper that contains recycled content. http://www.nrel.gov/publications http://www.osti.gov/ iii This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. Preface This report provides a snapshot of the bioenergy industry status at the end of 2022. The report complements other annual market reports from the U.S. Department of Energy’s (DOE’s) Office of Energy Efficiency and Renewable Energy and is supported by DOE’s Bioenergy Technologies Office (BETO). The 2022 Bioenergy Industry Status Report focuses on data covering multiple dimensions of the bioenergy industry and does not attempt to make future market projections.', + 'These factors, over time, have driven the expansion of single-technology VRE projects and electro-chemical storage, which has helped increased hybrid deployment (Seel et al. 2022). 2.1.1 Decreasing Cost of Renewable Technologies The growth of hybrids is underpinned by the broader deployment of renewable generation, driven by cost declines in solar and wind energy. According to Lazard, the historical mean unsubsidized levelized cost of energy (LCOE) of solar PV (-84%) and wind (-66%) have decreased substantially from 2009, making them two of the most cost-competitive energy sources on the market today (Bilicic and Scroggins 2023). As a result, VRE projects have proven to be more economical than traditional power plants in many locations. According to the Annual Energy Outlook 2022, it is anticipated that levelized costs of wind and solar will continue to decrease until 2050 (EIA 2022). The combined effects of decreasing costs of renewable technologies, and various energy and emissions targets have influenced deployment trends in the United States. Renewable generation has been steadily growing, as shown in Figure 1, and has reached 21.5% of the U.S. generation share in 2022 (EIA 2021; Clark et al. 2022). Figure 1 shows the installed annual capacity from 2005 to 2021, illustrating that VRE sources such as solar and wind have increased their capacity substantially, more than tripling installed capacity since 2005.', + 'The projected utilization rate, as defined by the EIA, is “the varying amount of electricity required over time and the existing resource mix in an area where additional capacity is neededâ€� (EIA n.d.). Additionally, the related capacity value, as defined by NREL, is “the contribution of a power plant to reliably meeting demandâ€� (Madaeni, Sioshansi, and Denholm 2012). Currently, determining the proper capacity value for an HPP is a challenge because some stakeholders feel that an HPP’s value is not accurately captured with traditionally used capacity calculations. For example, the Electric Power Research Institute claims that the addition of storage to solar or wind can materially change the capacity valuation. However, the Midcontinent Independent System Operator claims that existing methods of capacity evaluation are appropriate for hybrid resources in the near term. One alternative mechanism that is currently being explored for estimating capacity values of an HPP is the effective load carrying capability. This method determines the timing of when a resource can generate electricity and when the grid is likely to need additional capacity. It can also represent the entire project portfolio rather than individual resources (FERC 2021). However, the most appropriate capacity evaluation method for HPPs is still undetermined (Awara et al. 2023). Another way in which hybrids can increase their cost competitiveness is through potential savings that are unlocked by sharing permitting and siting fees, as well as lower additional costs associated with interconnections and upgrades (Klonari et al. 2019).', + 'Studies have shown that replacing power plants with low-cost fuel inputs can allow for systemwide cost savings (Gagnon et al. 2022; Gagnon, Cowiestoll, and Schwarz 2023). Therefore, lower wholesale electricity rates can be passed down to the ratepayer, potentially saving consumers billions of dollars per year. Additionally, low-income households can benefit the most from these cost savings because they often spend a larger share of their income on electricity—this is known as the households’ “energy burdenâ€� (EERE 2018). Furthermore, the adoption of hybrids can enable the continued electrification of consumer and commercial end uses. A large driver of this electrification is the replacement of natural gas with electricity for space and water heating (White et al. 2021). NREL’s ReStock tool has indicated that continued electrification could increase required electricity generation capacity by 25% to accommodate region-specific winter demand for electrified heating (White et al. 2021). Additionally, hybrids can meet specific electricity needs for rural consumers. As previously mentioned in Section 3.3.1, off-grid small-scale hybrid facilities can operate independently of the grid, thus reducing a hybrid facility’s reliance on grid infrastructure. Such independence could 31 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. realize greater cost savings.', + 'Sergi, Brian. 2023. “Examining Supply-Side Options to Achieve 100% Clean Electricity by 2035.” Presented at the International Energy Workshop, Golden, CO. Sergij Salim, S. 2023. “Achieving Climate Target in European Residential Sector: A Review of Current Policy Target.” Presented at the International Energy Workshop, Golden, CO. 29 Shin, H. 2023. “The Role of Energy Efficiency Resource Standard in Reaching Korea’s Net Zero Goals: Impact Evaluation Using Energy System Modeling.” Presented at the International Energy Workshop, Golden, CO. Sieed, J. 2023. “Analysis of Optimal Transition in Electricity Sector of Bangladesh for Different Growth and Emission Reduction Scenarios.” Presented at the International Energy Workshop, Golden, CO. Speizer, S. 2023. “The Role of Advanced Technologies in Global Transportation Sector Decarbonization.” Presented at the International Energy Workshop, Golden, CO. Steinberg, D. 2023. “Energy, Capacity, or Negative Emissions? Decomposing Sources of Value for Generation and Negative Emissions Technologies in a Net-Zero Electricity System.” Presented at the International Energy Workshop, Golden, CO. Straw, B. 2023. “An Element of Realism: Wind Energy Development and Its Intersection with American Values, Laws and Processes Related to Sustaining Wildlife Populations and Natural Heritage.” Presented at the International Energy Workshop, Golden, CO. Tabish Parray, M. 2023.', + 'In response, nations are exploring various transportation decarbonization pathways. During IEW, speakers primarily focused on the effect of advanced transportation technology on emissions globally, the implications of preferring electric vehicles (EVs) over internal combustion engine vehicles on macroeconomic indicators and grid stability, and policy analysis related to grid infrastructure and charging station coverage for EV users. 12 On a global scale, transportation decarbonization with advanced technologies and clean fuels plays a critical role in global net-zero CO2 emissions by 2050. From a technological perspective, while biofuels and hydrogen play significant roles, particularly in the aviation and shipping sectors, electrification remains a key element for decarbonizing transportation (Speizer 2023). For example, in India, EV deployment has positive impact on GHG emissions, the total cost of ownership and imports, while reducing government revenues and employment (Rajagopal 2023). However, one of the main concerns about increasing EVs on the road is the potential strain on the electrical grid. Smart charging technology such as V1G and V2G, which provide users with flexibility in charging, has the potential to mitigate this risk by balancing the grid. V1G allows control of charging time and magnitude of power demand based on grid status. In addition to V1G smart charging property, V2G enables EVs to both charge from and discharge to the grid.', + 'https://projects.worldbank.org/en/projects-operations/project-detail/P178188. 164 Horowitz, Kelsey, et al. 2020. Capital Costs for Dual-Use Photovoltaic Installations: 2020 Benchmark for Ground-Mounted PV Systems with Pollinator-Friendly Vegetation, Grazing, and Crops. https://www.nrel.gov/docs/fy21osti/77811.pdf. 165 Full study highlighted a range of $0.07/WDC to $0.80/WDC for cost adders, but this extended range includes PV systems with tracking and other applications not considered in this study.', + 'Jones, A. 2023. “Climate Change Impacts on Future Residential Electricity Consumption and Energy Burden.” Presented at the International Energy Workshop, Golden, CO. Kettner, C. 2023. “Transformation to a Renewable Electricity System in Austria: Insights from an Integrated Model Analysis.” Presented at the International Energy Workshop, Golden, CO. Kholod, N. 2023. “Post-War Decarbonization Pathways for Ukraine: Results from an Intermodel Comparison Study.” Presented at the International Energy Workshop, Golden, CO. Liu, J. 2023. “How Will China Achieve the Carbon Peaking Target?” Presented at the International Energy Workshop, Golden, CO. 27 Lockshin, J. 2023. “Are Certain Communities Disproportionately Receiving the Benefits of Utility Investments? A Statistical Analysis of Energy Programs and Services in Los Angeles.” Presented at the International Energy Workshop, Golden, CO. Lopez, A. 2023. “Detail at Scale: Local Wind Plant Optimization for National Wind Potential Assessments.” Presented at the International Energy Workshop, Golden, CO. Ma, T. 2023. “Effects of Renewable Power Production in Wholesale Electricity Market in Time of Price Spikes: An Empirical Study on Japan’s Electricity Spot Market.” Presented at the International Energy Workshop, Golden, CO. Mallapragada, D. 2023. “The Role of Negative Emission Technologies in a Net-Zero Electricity and Hydrogen Production System.”', + 'However, now these resources can participate in the capacity, energy, and ancillary service markets under the assumption that aggregated DERs are greater than the apportioned value of individual DERs. Additionally, RTOs and ISOs have some flexibility in how the rules are designed for DERs in specific markets, as long as double counting is prevented. One of the major motivators for the creation of FERC Order 2222 was to improve wholesale power markets to allow for a wider variety of price-responsive demand, which hybrids are capable of. A few additional key motivators to the creation of FERC Order 2222 are the increase of variable renewables leading to more power system flexibility and ancillary services, and the need for power system reliability (Zhou, Hurlbut, and Xu 2021). FERC Order 2222 provides hybrid-applicable guidelines that help to: • Maintain market neutrality • Enhance market competition • Ensure smooth operation. 2.1.2.4 Inflation Reduction Act of 2022 The IRA, which was signed into law in August of 2022, is the U.S’ largest and most comprehensive clean energy bill, allocating nearly $370 billion for clean energy investments (U.S. Congress 2022; Satyapal 2022). The scope of the IRA expands beyond clean energy investments, however. The funding for clean energy is designed to decrease emissions, lower the cost of clean electricity, and reduce deployment barriers for continued clean energy production.', + '....... 13 4.2.4 Net Zero Future .............................................................................................................. 14 4.3 Technologies for a Clean Future ................................................................................................. 15 4.4 Energy Policy, Markets and Economics .....................................................', + 'https://www.aes.com/press-release/air-products-and-aes-announce-plans-invest-approximately-4-billion-build-first-mega https://www.aes.com/press-release/air-products-and-aes-announce-plans-invest-approximately-4-billion-build-first-mega https://www.energy.gov/sites/default/files/2019/10/f67/2%20Solar-Forecasting-2-Annual-Review_Ahlstrom.pdf https://www.energy.gov/sites/default/files/2019/10/f67/2%20Solar-Forecasting-2-Annual-Review_Ahlstrom.pdf https://doi.org/10.1149/2.0231915jes https://doi.org/10.1016/j.nxener.2023.100021 https://doi.org/10.2172/1836656 https://www.lazard.com/research-insights/2023-levelized-cost-of-energyplus/ https://www.lazard.com/research-insights/2023-levelized-cost-of-energyplus/ https://doi.org/10.2172/1440404 https://emp.lbl.gov/publications/hybrid-power-plants-status-operating', + 'Additional uses of zero-carbon ammonia include using it to replace bunker fuel, which can decarbonize ocean freight shipments, providing long- term energy storage in the electricity system, and offering a more cost-effective method for transporting hydrogen (Global Maritime Forum 2020; The Royal Society 2020). 3.1.3 Green Desalination for Freshwater Production HESs can also provide clean electricity for desalination processes to produce fresh water. Desalination is an energy-intensive process that, according to DOE, “removes salts and other minerals from water to make it suitable for human consumption, irrigation, or industrial uses.â€� The two most common desalination methods are thermal-based and membrane-based processes (DOE’s Office of Energy Efficiency and Renewable Energy [EERE] n.d.) Both techniques are energy-intensive, and are traditionally supported by traditional generation technologies because of their ability to provide firm power.9 Hybridization can replace traditional generation sources by providing consistent electricity by pairing VRE technologies with complementary generation profiles found with PV and wind, or by integrating with dispatchable energy storage technologies. Therefore, hybrids can provide a decarbonization pathway for freshwater production that has typically not been achieved by single-technology VRE sources or traditional energy generation sources like coal, oil, and natural gas. Because of climate change, extreme weather events like droughts are emphasizing the need for decarbonized freshwater production.', + 'We apply a 1.46 multiplier to both values. A single representative hourly profile (Figure 44) is applied to all run-of-river projects.113 Figure 44. Assumed output profile (fraction of installed capacity) for new run-of-river hydropower C.7 Biomass and Landfill Gas We assume that adequate fuel (wood) is available for up to a 50-MW plant at a fuel cost of $5– $9/MMBtu. Assumed plant costs are $7,729/kW based on the cost of a new coal plant and the price premium for biomass using the difference between coal and biomass from the ATB mid scenario. At these costs, new biomass was not competitive in initial analysis, and new biomass was dropped from further study. We did not consider landfill gas collection expansion and assumed continued operation of existing facilities at historical generation rates. C.8 Energy Storage We consider battery storage with discrete duration options of 2, 4, 6, 8, and 10 hours and assume an 85% round-trip efficiency. Figure 45 shows the assumed capital cost trajectory for new battery systems with a 15-year life. These values include all equipment for “turnkey” operation and generic substation upgrades including switchgear and transformer.114 We assume an economic life of 25 years, which requires augmentation of the battery modules in Year 15 to maintain technical performance.', + 'Compared with 2013, the relative market share for ethanol declined while biodiesel, renewable diesel, and other advanced biofuels increased. 6 One TBtu is equivalent to 0.001 quads. 2 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. Figure 1. U.S. bioenergy market (1,551 TBtu total in 2013 and 1,852 TBtu total in 2022). Source: ethanol, biodiesel, and renewable diesel: EIA (2023a; 2023b; 2023c); biopower: EIA (2023d); other advanced biofuels: EPA (2023a). Advanced biofuels include biobutanol, cellulosic fuels, heating oil, renewable jet, naphtha, and renewable natural gas, and renewable propane.7 This figure only includes the volume and electricity produced, not the associated coproducts. 7 Detailed fuel volumes are available in Appendix A. 3 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. 2 Biofuels Figure 2 shows the development of the biofuels industry from 2013 through 2022. Renewable diesel, a drop-in fuel, experienced tremendous growth in capacity and consumption in recent years due to major petroleum companies converting refineries.', + '......... 15 2.5 Renewable Diesel ........................................................................................................................ 16 2.5.1 Production, Consumption, and Capacity ........................................................................ 17 2.5.2 Renewable Diesel Trade ...................................................................', + '................................................................. 19 5.2.2 Assumed Base Scenario Retirements and Additions ..................................................... 20 5.3 Transmission ............................................................................................................................... 20 5.4 Fuel Prices ...........................', + 'Beyond utility-scale HPPs, there is also increased development potential for behind-the-meter HPPs. Both California and Hawaii have adopted policies to promote solar and storage behind-the-meter HPPs, which sets the foundation for other states to replicate this type of policy framework, as market conditions allow. In addition to technological improvements and shifting market demands, further adoption of HPPs is likely to be driven by the continuing declining costs of generation and storage technologies. NREL’s Annual Technology Baseline modeling indicates that utility-scale solar PV could decline from an LCOE of $39.2/MWh in 2023 to $18.4/MWh by 2050 in the moderate scenario. Similarly, the LCOE for land-based wind energy could decline from $29.7/MWh in 2023 to $18.8/MWh by 2050. The potential continued decreasing LCOE of solar and wind could drive continued deployment of HPPs by increasing the economic competitiveness of renewable technologies. Additionally, the deployment of HPPs is likely to be further accelerated by the decline in the LCOE of PV plus storage, which is expected to decrease from $93.1/MWh in 2023 to $51.4/MWh in 2050 (-44.7%) (NREL 2023).', + 'battery modules to the initial capital cost. In addition to capital and fixed O&M, we include a variable O&M of $2/MWh.115 Figure 45. Assumed battery cost trajectory ($2023 with a 15 year life) 115 Storage Futures cost and performance study. 0 1,000 2,000 3,000 4,000 5,000 6,000 2024 2026 2028 2030 2032 2034 2036 2038 2040 Ba tte ry C ap ita l C os t ($ 20 23 /k W - 15 y r l ife ) Year of Installation 10 Hr 8 Hr 6 Hr 4 Hr 2 Hr 87 This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications. C.9 Summary Cost and Financial Parameters for Renewable Generators and Storage Table C-2. Overnight Capital Costs (2023$/kW)', + '..................... 24 2.6.4 Biodiesel Trade .............................................................................................................. 24 2.6.5 Infrastructure .................................................................................................................. 25 2.6.6 End Use .............................', + 'Capacity ........................................................................ 21 2.6.2 Biodiesel Production Cost and Market Prices ................................................................ 23 2.6.3 Coproducts Overview ..................................................................................................... 24 2.6.4 Biodiesel Trade ...............................', + 'Renewable diesel meets the same ASTM D975 fuel quality specification as petroleum diesel. It is a drop-in fully fungible replacement for diesel and can be used in existing infrastructure and engines. Consumption grew from 295 million gallons in 2013 to nearly 1.7 billion gallons in 2022 (EIA 2023c). For years, the market was served by two large U.S. plants in Louisiana and imports. In the past 3 years, domestic production has grown significantly, largely driven by petroleum companies converting existing refineries. As of January 2023, there are 17 plants with 3 billion gallons of capacity (EIA 2023f). More plants are expected in the near term. Biodiesel production and consumption have been stable over the past decade, peaking in 2018 with slight declines from 2018 through 2022. In 2022, production and consumption were both about 1.6 billion gallons (EIA 2023b). The number of plants has been declining since 2018, and there are currently 59 plants with just over 2 billion gallons of capacity (EIA 2023g). Blends up to B5 (5% biodiesel, 95% petroleum diesel) are considered diesel fuel per ASTM D975. B20 (6% to 20% biodiesel) that meets ASTM D7467 is approved for use in various vehicles and engines. Biodiesel is also used for off-road applications such as home heating oil.', + "This raises concern about how markets will accurately compensate players for their participation. The discussion at IEW ranged from VRE's effect on capacity markets (Holt 2023), ancillary service markets (Hyungkwan Kim 2023) and wholesale markets (Ma 2023; Du 2023). Wind and solar technologies are usually at the bottom of an electricity market dispatch stack and can help drive electricity prices down due to their near zero marginal cost of generation. However, researchers at IEW found that when wind output decreases due to a winter storm, it leads to an increase in generation by gas units and therefore an increase in the spot price of liquefied natural gas. This can sometimes cause generation from coal plants to become more economic than generation from gas plants and can increase coal generation and the coal spot price. Therefore, while wind and solar are not directly setting the electricity prices, their absence during extreme events can contribute to an increase in electricity prices. With the participation of VREs expected to continue to increase, it will be important to understand how to either mitigate or respond to these oscillatory price signals. Figure 8. Life-cycle GHG emissions reductions from various technologies compared with the levelized subsidy value that they receive from IRA. The outlier is electrolysis, which receives a higher subsidy relative to its GHG emissions reductions than other technologies, highlighting the US government's focus on stimulating the hydrogen market (Cheng et al. 2023).", + 'The following sections detail how hybrid power plants specifically, can provide energy reliability and contribute to grid resiliency. 3.2.1 Energy Reliability To maintain reliability, the grid operator must match demand for electricity with supply generated at a specific frequency on a second-by-second basis. Historically, grid operators have done this with traditional power sources that not only can provide baseload power consistently, but ramp up and down quickly to meet variable demand needs. Baseload power is defined as “the minimum amount of electric power delivered or required over a given period at a steady rateâ€� (EIA n.d.). Further, the ramp rate of a power source is defined as “the speed at which a generator can increase (ramp up) or decrease (ramp down) generationâ€� (EERE 2011). VRE technologies present challenges in providing baseload power and electricity at peak demand times, due to their dependence on fluctuating resource abundance. However, HPPs that include energy storage technologies, as well as standalone storage facilities, can enable ancillary services by providing load-shifting capabilities and maintaining system frequency, which ultimately helps compensate for the challenges faced by single-technology VRE plants. Electricity generation from VRE sources is often misaligned with electricity usage and is highly dependent on the time and location of the renewable resources. Currently, during the times when the electricity load cannot be supported by VRE sources, traditional energy sources must be used to meet demand.', + 'Assumed capacity credit is 13% based on expected winter output. No other new hydropower capacity is modeled, but future work should consider new hydropower options including pumped storage hydropower.112 Figure 43 shows the location of existing and historically proposed plants as well as other locations with large hydropower potential. None of the major proposed projects was considered in this study. Only resources within 50 miles of rail lines are shown. 112 For a discussion of potential pumped storage hydropower opportunities in the Railbelt, see: https://publications.anl.gov/anlpubs/2023/07/183313.pdf. 84 This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications. Figure 43. Location of existing and potential new hydropower resources 85 This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications. For run-of-river projects, we use the 2023 ATB assumptions for “NSD 3” hydropower plants, assuming an initial capital cost of $6,936/kW and a fixed O&M of $135/kW-year. We apply a 1.46 multiplier to both values.', + 'The report titled Ad-Mat: Adaptations of Mature Manufacturing Strategies for Accelerated Redox Flow Battery Deployment can be summarized as follows: The concept of the Ad-Mat approach is to leverage existing adjacent markets across a broad scope of technologies in order to reduce the manufacturing learning curve and ultimately accelerate redox flow battery (RFB) deployment at scale. Lithium-ion batteries (LIBs) are currently the dominant energy storage technology, and they came to technological maturity under unique market conditions when there was no meaningful competition in the consumer electronic and electric vehicle (EV) space. Today, alternative chemistries that may be technologically better-suited for long-duration storage applications are experiencing a high barrier to entry. This is in large part due to the substantial bias towards the scaled-up production and supply chain that now exists for LIBs. In the case of RFBs in particular, numerous analyses have suggested that RFBs should theoretically have a much lower system cost than LIBs - however, this relies on a mature and competitive manufacturing landscape, which has been extremely challenging to achieve for both flow batteries and other LIB competitors. At the moment, LIB alternatives tend to have isolated small-scale manufacturing pathways, which preclude the economies of scale that would be required to compete with the mature LIB industry. In the present state of the industry, niche manufacturing tools and approaches have evolved to support each alternative technology, such that there is substantial replication and duplication in effort.', + 'In the present state of the industry, niche manufacturing tools and approaches have evolved to support each alternative technology, such that there is substantial replication and duplication in effort. Continuing to pursue a strategy of isolated manufacturing processes/approaches for each LIB-alternative may never allow for at-scale deployment. In order for RFBs to meaningfully compete with LIBs in the realm of LDES, a new disruptive approach based on cross-industry learning and coordination is needed - and this is exactly what our Ad-Mat concept aims to tackle. In this re-envisioned manufacturing landscape, tools and processes from mature industries can be adapted and deployed across the range of alternative energy storage technologies. Adapting tools, equipment, processes, and industrial learning from mature industries to meet the technological requirements of RFBs would open new markets for existing OEMs in adjacent industries, would prevent unnecessary duplication and re-development, would improve efficiency across the manufacturing chain, and would ultimately support reduced costs and accelerated deployment of RFBs at scale.', + 'National Renewable Energy Laboratory at www.nrel.gov/publications. ___. 2023. “FACT SHEET: President Biden to Catalyze Global Climate Action through the Major Economies Forum on Energy and Climate,â€� April 20, 2023. https://www.whitehouse.gov/briefing-room/statements-releases/2023/04/20/fact-sheet-president- biden-to-catalyze-global-climate-action-through-the-major-economies-forum-on-energy-and- climate/. U.S. Congress. 2022. H.R.5376 - Inflation Reduction Act of 2022. https://www.congress.gov/bill/117th-congress/house-bill/5376/text. U.S. Department of Energy. n.d. “Energy Independence and Security.â€� Accessed November 16, 2023. https://www.energy.gov/eere/energy-independence-and-security. ___. 2022. “DOE Announces First Loan Guarantee for a Clean Energy Project in Nearly a Decade.â€� https://www.energy.gov/articles/doe-announces-first-loan-guarantee-clean-energy- project-nearly-decade. U.S. Department of the Treasury. 2023. “U.S.', + 'Department of Energy EERS energy efficiency resource standards EIA U.S. Energy Information Administration EPA U.S. Environmental Protection Agency EPRI Electric Power Research Institute ETSAP Energy Technology Systems Analysis Program EV electric vehicle GDP gross domestic product GHG greenhouse gas IEA International Energy Agency IEW International Energy Workshop IIJA Infrastructure Investment and Jobs Act IRA Inflation Reduction Act IRENA International Renewable Energy Agency LCOE levelized cost of energy LDES long duration energy storage NEMS National Energy Modeling System NET negative emissions technology NREL National Renewable Energy Laboratory PCM production cost model PV photovoltaic USDA United States Department of Agriculture VRE variable renewable energy v Executive Summary The 41st Annual International Energy Workshop (IEW) took place in Golden, Colorado on June 13-15, 2023. Attended by over 200 researchers from academia, national laboratories, and private research firms from 21 countries, the workshop featured an assortment of innovative ideas in the power and energy systems modeling field. It focused on topics such as energy and electricity system modeling, renewable and emerging technologies, planning for a carbon-neutral future, energy policy, energy markets, energy justice and equity, and decarbonization of various sectors including buildings, industry, and transportation. We, the authors, attended or moderated nearly half of the breakout session presentations at IEW.', + 'Most of the operation of the synchronous condensers will occur during periods of significant curtailment; therefore, unused renewable energy will be used for a large fraction of this energy. 90 An example of an LM6000 gas turbine retrofit is discussed here: https://www.turbomachinerymag.com/view/spinning-reserve-commonwealth-chesapeake-gives-lm6000s-double- duty. https://www.turbomachinerymag.com/view/spinning-reserve-commonwealth-chesapeake-gives-lm6000s-double-duty https://www.turbomachinerymag.com/view/spinning-reserve-commonwealth-chesapeake-gives-lm6000s-double-duty 64 This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications. 8 Conclusions The projected prices for natural gas in the Railbelt region result in costs of generation from existing natural gas plants in the range of $70 to $80/MWh by the end of this decade, with considerable price uncertainty and potential volatility. With projected declines in the cost of wind and solar, along with the extension of federal tax credits, these resources can offer generation with stable, long-term contracts at less than the projected cost of natural gas generation in this time frame.', + 'https://a2ei.org/resources/uploads/2020/09/A2EI_Productive_Use_Report_Agricultural_Technologies.pdf. 48 BRIHLO. “PEU Market Research for Off-grid Businesses.” https://brilhomoz.com/assets/documents/BRILHO-PEU-Market- research-Off-grid-Business_Final.pdf. 49 Spring (March–July), autumn (August–November), and winter (December–February) based on ENPA designations. https://www.nrel.gov/docs/fy23osti/86631.pdf https://www.r-project.org/ https://www.nrel.gov/docs/fy18osti/71663.pdf https://www.sciencedirect.com/science/article/pii/S0306261923004956 https://a2ei.org/resources/uploads/2020/09/A2EI_Productive_Use_Report_Agricultural_Technologies.pdf https://brilhomoz.com/assets/documents/BRILHO-PEU-Market-research-Off-grid-Business_Final.pdf https://brilhomoz.com/assets/documents/BRILHO-PEU-Market-research-Off-grid-Business_Final.pdf Adapting Agrivoltaics for Solar Mini-Grids in Haiti 9 On the agriculture side, NREL utilized', + 'Ethanol plants by state, January 2023........................................................................................ 29 Figure 27. U.S. corn, ethanol, and gasoline prices. ..................................................................................... 30 Figure 28. U.S. corn grain ethanol production cost trends. ......................................................................... 30 Figure 29.', + 'Policy, Markets and Economics ...................................................................................... 17 4.5 Energy Justice and Equity ........................................................................................................... 19 5 Conclusion .......................................................................................', + 'ho re w in d O ve rn ig ht C ap ita l C os t ($ /k W ) Year AK floating AK Fixed Lwr 48 Fixed class 4 Lwr 48 Floating class 11 $0 $10 $20 $30 $40 $50 $60 $70 $80 $90 $100 2030 2032 2034 2036 2038 2040 O ffs ho re W in d LC O E/ PP A Pr ic e ( $/ M W h) Year Floating Fixed 79 This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications.', + "In addition to connection incentives ($/customer connected) for developers for PUE, the PHARES program is also exploring volumetric incentives ($/kWh) to help further incentivize the development of PUE business models. While specific values are still being determined, a small 5 HTG/kWh (~$0.015/ kWh) incentive would reduce electricity costs for the 100-kW system standard crop archetype by $110 (14,466 HTG128). 123 For some mini-grids, food vendors only plug in their freezers the night before market day when they bring their harvest into town to sell. 124 The majority of smallholder farmers in Haiti own very small plots (<0.387 ha), but local farming cooperatives can have hundreds of members, and collectively it is not unreasonable to assume that 2 ha of groundnuts are available within the cooperative. 125 Assuming a 131.5156 HTG–USD exchange rate; Banque de la République d'Haïti on February 1, 2024. https://www.brh.ht/. 126 This would include both produced and purchased groundnuts. Total annual groundnut production in Haiti is estimated at over 13 million kg or an average of over 22,700 kg for each of the 571 community sections (smallest administrative unit).", + 'In 2022, utilities had about 2,200 customers, with 13.2 MW of PV under “net metering,” of which 11 MW was residential (EIA 860). Projections for the end of 2023 (adding about 3.7 MW of distributed PV) are from ACEP Cicilio, P.; Francisco, A.; Morelli, C.; Wilber, M.; Pike, C.; VanderMeer, J.; Colt, S.; Pride, D.; Helder, N.K. Load, Electrification Adoption, and Behind-the-Meter Solar Forecasts for Alaska’s Railbelt Transmission System. Energies 2023, 16, 6117. https://doi.org/10.3390/en16176117 https://www.mdpi.com/1996-1073/16/17/6117. 47 Location represents the physical location and does not consider the regional allocation of energy from various resources, such as the share of Bradley Lake allocated to utilities outside of the HEA region.', + 'Existing Railbelt Renewable Generators Name Nameplate Capacity (MW) Type Fire Island Wind 18 Wind Eva Creek Wind 24.6 Wind Delta Wind Farm 1.9 Wind JBER 11.5 LFG Willow Solar 1 Solar Houston Solar 6 (8.5 DC Rating) Solar B.6 Electric Vehicle Adoption For the Reference scenario, we used the lowest growth level, from the “AEA continued” forecast, shown in Figure 36, which results in about 110,000 vehicles (about 20% of all vehicles in the Railbelt) in 2040 (left y-axis). Annual customer demand at the meter is shown in the right axis (before transmission and distribution [T&D] losses). Demand profiles (including additional T&D losses) for 2040 are shown in Figure 36 (bottom) and vary hourly and seasonally, based on driving patterns and demonstrating the impact of cold-weather performance.97 For other years, the profiles are scaled proportionally to the number of vehicles shown in the top of the figure.', + 'Figure 1 shows the installed annual capacity from 2005 to 2021, illustrating that VRE sources such as solar and wind have increased their capacity substantially, more than tripling installed capacity since 2005. Solar increased its capacity by 21 gigawatts (GW) in 2021, followed by wind at 17.1 GW, leading to the increased capacity of renewable energy generation on the grid (EIA 2021). 5 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. Figure 1. Fossil fuel vs. renewable energy electricity annual installed capacity from 2005 to 2021. Figure from EIA (2021). Note: GW = gigawatt In recent years, declining costs have also made energy storage technology more economically feasible, allowing for increased deployment of storage-type HPPs. The cost of lithium-ion battery packs across all sectors declined from $1,306/kilowatt-hour (kWh) in 2010 to $151/kWh in 2022 (Feldman et al. 2023). Furthermore, the additional capital expenditure (CapEx) by combining storage and solar PV averages to approximately $10/megawatt-hour (MWh)-PV for a battery sized at half the PV capacity.', + '3.6.2 Owners and Plant Operators ........................................................................................... 29 3.6.3 Grid and Market Operators ............................................................................................ 29 3.6.4 Hard-To-Abate Industries ....................................................................................', + 'be r o f E le ct ric V eh ic le s 0 50 100 150 200 250 300 12:00 AM 6:00 AM 12:00 PM 6:00 PM 12:00 AM N et E V Lo ad In cl ud in g T& D Lo ss es (M W ) Maximum EV Load Day Average Day Minimum EV Load Day 72 This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications. Table B-6. Summary of Operating Reserve Modeling Parameter Assumption Contingency 80 MW for the entire Railbelt. Provided primarily with battery energy storage systems, but some can be met using synchronized generators with a sufficiently fast response rate (full response in 60 seconds). Regulation 2% of load in Homer Electric Association (HEA) and Central. 5% of load in GVEA based on utility feedback.', + 'In states without a reformulated gasoline market, E15 typically cannot be sold in summer months due to a waiver needed for Reid vapor pressure. However, an ongoing EPA emergency fuel waiver has allowed sales of E15 nationwide year-round in 2022 and 2023 (EIA 2022). Nine midwestern states have approached EPA to address the Reid vapor pressure issue (RFA 2023b). 2.7.1 Production, Consumption, and Capacity The majority of ethanol is produced using dry-mill technology (92%); a small number of larger plants use a wet-milling process (10%) (RFA 2023b). Dry milling is a process that grinds corn grain into flour and ferments only the starch component into ethanol with coproducts of distillers grains (an animal feed substitute) and carbon dioxide. Wet-mill plants primarily produce corn grain sweeteners, along with ethanol and several other coproducts (such as corn oil and starch). Figure 23 highlights 2022 ethanol production and consumption of more than 15 billion gallons and nearly 14 billion gallons, respectively (EIA 2023a). Exports account for the difference in production and consumption. Figure 24 shows cellulosic ethanol production, which has declined in recent years. Since 2021, all cellulosic ethanol production is from bolt-on technology at existing conventional ethanol plants, which extracts the corn fiber byproduct for processing into ethanol. Adding cellulosic ethanol conversion technology to existing corn ethanol plants allows these facilities to diversify their portfolios.', + 'The United States exported 1.35 billion gallons valued at $4.1 billion in 2022, which was 8.8% of domestic production (EIA 2023p; RFA 33 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. 2023b). Exports were to 50 nations, and the United States’ three largest trading partners were Canada (37%), South Korea (12%), and the European Union (11%) (EIA 2023p). Figure 31. U.S. ethanol imports and exports. Source: EIA (2023o; 2023p) 2.7.5 Infrastructure Regulations have long accommodated the use of E10 in existing infrastructure. Blends above E10 require approvals and some specialized equipment to meet the patchwork of regulations that cover refueling infrastructure (summary in Section 2.6.5). Stations interested in selling ethanol blends can refer to Clean Cities’ Handbook for Handling, Storing, and Dispensing E85 and Other Ethanol-Gasoline Blends, which explains requirements for selling ethanol blends and provides lists of compatible and UL-listed equipment (DOE 2016).26 As of the end of 2022, E85 was available at 4,426 stations in 44 states (Figure 32, AFDC 2023b).', + '8.30 8.30 9.55 2030 1,170 1,936 7,799 8.30 8.30 9.23 2031 1,163 1,925 7,799 8.30 8.30 9.23 2032 1,156 1,917 7,799 8.30 8.30 9.23 2033 1,149 1,908 7,799 8.30 8.30 9.23 2034 1,145 1,902 7,799 8.30 8.30 9.23 2035 1,138 1,892 7,799 8.30 8.30 9.23 2036 1,131 1,885 7,799 8.30 8.30 9.23 2037 1,124 1,876 7,799 8.30 8.30 9.23 2038 1,120 1,869 7,799 8.30 8.30 9.23 2039 1,113 1,859 7,799 8.30 8.30 9.23 2040 1,107 1,852 7,799 8.30 8.30 9.23', + 'Because several hydropower units have storage, they are particularly useful for managing variability and uncertainty. Figure 24 provides an example of the response from the Bradley Lake plant during the 4-day period shown in Figure 20. In this example, the output of Bradley Lake (green) is shown along with the Railbelt-wide net load in yellow. During the early morning of November 4, renewable generation exceeds demand, resulting in very little net load to be met with hydropower or fossil generation. Bradley Lake operates at its minimum output level during this period, and the plant operates at minimum output about 40% of the time during the entire year in the 2040 Reference scenario. The rapid reduction in wind and solar output on this day requires Bradley Lake to increase output to maximum over this period, then continue to vary output in response to net load—driven by renewable output across the entire Railbelt. This kind of operation, assuming Railbelt-wide joint dispatch, may require changes to contractual agreements or other practices to minimize the costs of operating the system. 2022 Actual 48 This report is available at no cost from the National Renewable Energy Laboratory (NREL) at www.nrel.gov/publications. Figure 24.', + 'Bashar Anwar has contributed to the following publications: Can Wholesale Electricity Markets Achieve Resource Adequacy and High Clean Energy Generation Targets in the Presence of Self-Interested Actors? Article No. 122774, The interaction of wholesale electricity market structures under futures with decarbonization policy goals: A complexity conundrum, Aligning Electric Vehicle Customer Charging with Grid Needs, Assessing the Value of Electric Vehicle Managed Charging: A Review of Methodologies and Results, Modeling Investment Decisions from Heterogeneous Firms under Imperfect Information and Risk in Wholesale Electricity Markets, Unlocking the Potential of Marine Energy Using Hydrogen Generation Technologies, Marine Energy to Hydrogen Analysis Project. Bashar Anwar has worked on projects with Nongchao Guo, Matthew Kotarbinski, David Palchak, Bethany Frew, Wesley Cole, Bernard Knueven, Elaine Hale, Marty Schwarz, Sourabh Dalvi, Shibani Ghosh, Dale Jenne, Weijia Liu.', + 'Stations interested in selling ethanol blends can refer to Clean Cities’ Handbook for Handling, Storing, and Dispensing E85 and Other Ethanol-Gasoline Blends, which explains requirements for selling ethanol blends and provides lists of compatible and UL-listed equipment (DOE 2016).26 As of the end of 2022, E85 was available at 4,426 stations in 44 states (Figure 32, AFDC 2023b). As of the end of 2022, there were 2,900 stations in 30 states selling E15 (Growth Energy 2023). USDA’s HBIIP resulted in more stations offering E15 and E85 in recent years, and an additional $450 million in funding is available from the program through 2024 (USDA 2023). 26 Clean Cities’ Handbook for Handling, Storing, and Dispensing E85 and Other Ethanol-Gasoline Blends (DOE 2016) provides lists of compatible tanks, pipes, and associated underground storage tank equipment, as well as UL- listed dispensers and hanging hardware. 34 This report is available at no cost from the National Renewable Energy Laboratory at www.nrel.gov/publications. Figure 32. U.S. E85 stations. Source: AFDC (2023b) 2.7.6 End Use All 270 million U.S.-registered light-duty gasoline vehicles are able to operate on E10.', + 'Gas Systems, Renewable Electricity Futures for the United States, The Opportunities and Challenges of Sustainable Shale Gas Development, Natural Gas Scenarios in the U.S. Power Sector, The Energy-Water-Food Nexus Through the Lens of Algal Systems, Chapter 11: Renewable Energy, Interactions, Complementarities and Tensions at the Nexus of Natural Gas and Renewable Energy, Chapter 13: Prospects for Renewable Energy, Considering the Energy, Water and Food Nexus: Towards an Integrated Modelling Approach, JISEA: Joint Institute for Strategic Energy Analysis (Brochure), The Status and Prospects of Renewable Energy for Combating Global Warming, Solar Issues (Letter), Advanced Modeling of Renewable Energy Market Dynamics: May 2006, R&D Advancement, Technology Diffusion, and Impact on Evaluation of Public R&D, Strategic Energy Analysis at NREL (Presentation), Impact of Distributed Energy Resources on the Reliability of a Critical Telecommunications Facility, Regional Differences in the Price-Elasticity of Demand for Energy, Atomic Ordering and Temperature-Dependent Transient Photoconductivity in Ga0.47In0.53As, Carrier Transport in Ordered and Disordered In0.53Ga0.47As, Carrier Transport in Ordered and Disordered In0.53Ga0.47As. Doug Arent has worked on projects with Clayton Barrows, Adam Warren, Daniel Friedman, Scott Cary, Maria Curry-Nkansah, Elisa Miller-Link.', + '(Run of River) Battery - 2HR - Battery - 4HR - Battery - 6HR - Battery - 8HR - Battery - 10HR - 2024 77 35 242 225 43 71 100 128 157 2025 75 34 239 225 37 61 86 110 135 2026 74 33 236 225 35 58 81 105 128 2027 72 32 233 225 34 55 77 99 121 2028 70 31 230 225 32 53 73 93 114 2029 69 29 226 225 31 50 69 88 107 2030 67 28 223 225 29 47 65 83 101 2031 65 27 220 225 28 46 63 80 97 2032 64 26 217 225 28 44 61 77 94 2033 62 25 214 225 27 43 59 75 90 2034 61 24 210 225 26 41 56 72 87 2035 60 23 207 225 25 40 55 71 86 2036 60 23 207 225 25 40 55 69 84 2037 59 23 207 225 25 39 54 68 82 2038 59 23 207 225 24 38 53 67 81 2039 58 23 207 225 24 38 52 65 79 2040 58 22 207 225 24 37 51 64 78 C.10 New Fossil New combustion turbine (CT) generators may be constructed beginning in 2026, combined-cycle (CC) generators in', + 'The following is brief biography for Rajendra Adhikari who is a Researcher III-Software Development at the National Renewable Energy Laboratory: Rajendra Adhikari joined NREL in 2019. His background is in building energy management systems and demand response. Prior to joining NREL, he worked as the developer for the building energy management open source software (BEMOSS) at the Virginia Polytechnic Institute and State University. His PhD research focused on HVAC control for load reduction and regulation services, as well as residential demand response simulation.\xa0 Rajendra Adhikari received a Bachelor degree in Electrical Engineering from the Tribhuvan University. Rajendra Adhikari received a PhD degree in Electrical Engineering from the Virginia Polytechnic Institute and State University. Rajendra Adhikari received a Master degree in Electrical Engineering from the Virginia Polytechnic Institute and State University. Rajendra Adhikari has contributed to the following publications: ResStock 2024.2 Dataset, ResStock Dataset 2024.1 Documentation, AI-Driven Smart Community Control for Accelerating PV Adoption and Enhancing Grid Resilience, End-Use Load Profiles for the U.S. Building Stock: Methodology and Results of Model Calibration, Validation, and Uncertainty Quantification: U.S. Department of Energy (DOE), Energy Efficiency & Renewable Energy (EERE), End-Use Savings Shapes: Public Dataset Release for Residential Round 1, Load-Driven Interactions Between Energy Efficiency and Demand Response on Regional Grid Scales, Stochastic Simulation of Occupant-Driven Energy Use in a Bottom-Up Residential Building Stock Model, End-Use Load Profiles for the U.S.'], + [0.4250621660906143, + 0.590748595596872, + 0.5986817374868327, + 0.6057270601711542, + 0.6160545138607305, + 0.6165260075774919, + 0.6167875451449165, + 0.6219383781678434, + 0.6336954718609908, + 0.6341882241953021, + 0.6381906330835122, + 0.6386781284778282, + 0.6481808434170708, + 0.6533845481104463, + 0.658971857628576, + 0.6664169245438585, + 0.6733306127827381, + 0.6750773262073095, + 0.6775804975923865, + 0.679481838781598, + 0.6862576636520892, + 0.6946247093966711, + 0.6973774918416857, + 0.7068577210011145, + 0.7095624623010576, + 0.7161306779257253, + 0.7189302880379904, + 0.7195476315266681, + 0.7210457918222812, + 0.7374238061597664, + 0.7385387431459958, + 0.7399620888727071, + 0.7412353048146488, + 0.7465172791334325, + 0.7521248071001061, + 0.7529271988239788, + 0.7609391138970888, + 0.7614019535803888, + 0.7638582580265258, + 0.7645780902918535, + 0.7731278150806425, + 0.7739728764277083, + 0.7753161003711453, + 0.7789467083642894, + 0.7795798567796147, + 0.7816092870966255, + 0.7875206712683606, + 0.8037202781340378, + 0.8060952687418832, + 0.8110514712489855, + 0.8111961266133282, + 0.8153686810227585, + 0.816249058349195, + 0.8165355202470937, + 0.8169739799614024, + 0.8190579410676916, + 0.830353767435493, + 0.8372329129214016, + 0.843576558081066, + 0.848011945344439, + 0.8486029046688395, + 0.8498123370651434, + 0.861974835529751, + 0.863304711463746, + 0.8689501782790088, + 0.8794008749796309, + 0.8901788287124858, + 0.9017179817665157, + 0.9220434008084044, + 0.9237608350578255, + 0.926773483793229, + 0.9495727881793478], + ['fc83d432-ae7a-4acd-af72-f9388f722fc4', + 'ae955400-4b01-4c05-9b71-5fe00e518b0d', + '6338dd78-3c75-4288-a591-c498c93fe4bc', + 'f81c8963-7697-4dc1-9a4b-f2c8277e5ef8', + 'bf6a3279-2329-42af-8fac-5e7784af1df4', + 'e26c243a-1de6-42cd-acf3-b4140a060bf5', + 'a73b41ca-2bbc-4e10-978e-b37f3fdc1070', + '1fb8f300-5c5c-4746-b7ed-558eabe9c0c3', + '7fbfca22-dc60-4e28-9bc7-7b5fffc0ddcb', + '9314f8ad-dbdf-4932-9e56-f3d3241f9fcb', + 'a13db250-80f5-4f16-aaa5-d7a7c6193783', + '2899cea1-d0ec-4ee7-aa87-f5adb48abbb7', + 'fed13c0d-dbd4-4e2e-86d1-8fe482cb187b', + '56aa13a8-2451-4e21-9ef3-e006452de0bb', + '90d3c857-d79a-44eb-9a46-aacbcbe84e1a', + '093f64ff-6fd7-4d64-acff-65dda468f2e9', + '1c470375-d475-4944-8209-5251998c7bd9', + '53eb8d65-87fe-4ea0-86ec-3fb757fb0e8c', + '272d70a0-d32d-4cb0-b42a-7d33773f64a2', + 'f4239992-e18b-425b-bc13-97c131739fe3', + '59764b78-93c8-4a92-9d3b-87a6d504919b', + 'c4c2667d-19a0-4532-b2bb-d57fa2674ef9', + '4996e6f1-9915-47d4-8f74-dedc4de9a392', + '803b2572-2a8d-4d4d-aad0-15df2bf9c72b', + '5d6817b8-a7cf-49b3-94f6-4f17127efd0f', + '5243ef9f-1e54-4e90-b863-7144e44f7733', + 'd570f2a6-6c91-4192-946c-efdbaf11cdab', + 'ec82e49e-c3f5-4224-83f2-822e711ff6c3', + '5ad48d13-9daa-4e49-b35f-f057cbad53e2', + '810bf830-e918-4387-990f-66fbbf581db8', + '38043249-0eb2-4064-be3c-199760dcba85', + '05f94732-edf4-4b34-b915-4c61898b6a30', + '885ca13e-e6e4-4d30-9994-2f0a18b4d25f', + 'd2799516-9c10-4c62-8c34-4568b39c3a9c', + 'fd9043da-6ef3-4dec-beb2-29548f4d4b5c', + '0be9e72d-2e89-4905-8c69-e69fc4b04ecf', + '2eff2bbd-c0da-4f07-8af7-edcb74074870', + '5fd916c1-7bd0-46c8-b8dd-0e19177c3205', + '8d663ad0-f92c-4380-bfd6-c2608f11a792', + '1fe9a980-2b7b-469d-b006-d426aacd8b26', + '46d36d31-e680-483c-8677-4f7ff5255288', + '0107c400-2586-4afa-9fcb-871d8a2e5794', + '0b3c02a0-bfe8-4cf0-af85-93e4c42fed3f', + '4500f708-0b43-49dd-9c0b-b29b80c7078b', + 'cb7ac18b-a6e2-4d71-8bd2-86742e6a2048', + 'd68b340e-8483-4a3e-bfd0-841b84c6ee6e', + '4bb0d1f2-c4b8-42ac-8888-7bbd670d610a', + '704425ed-ead4-4389-a87a-36b062666d34', + '80d29a76-6bc8-498a-99c9-84b27d4d062a', + '66fc5aba-c180-4f41-ae0d-6bda0eed4d45', + 'ba775b9c-e6f0-44bd-893b-483d54a5acb7', + 'ee53dd48-9abb-4db7-8ad0-da6b9ffc4c42', + '057cdbb4-3ae6-4f5d-b262-f33e00ec6431', + '7ad8a2c4-9f17-40cc-8080-bed9e9749d8a', + '52fecd7a-4424-40f3-a8ae-67c135571721', + '8805fad1-aef6-4c7e-9ba5-de5da1a6bcd1', + 'd372755e-3e77-4986-8bde-82b38c9dc96f', + 'beaf90cc-ef62-4ab2-bbd1-e6035a48bdfe', + '4b29be97-9672-409c-83b6-aad6ab8d900e', + '2ef7259d-62a1-4328-9c02-68103562a37a', + '8ff28dd1-57a2-42cc-894b-05c97a0341ea', + '230359bf-5f62-42a5-a3da-6fc71997c90c', + '260eb5c6-09e7-48eb-a340-4d183eb91730', + '37c44583-4b52-4ee1-b44d-ee50757488ad', + 'e13bf990-d1bc-4aad-8465-043cc574d7ad', + '8b661df3-c973-4e58-af59-ef757bbf0bb2', + 'bcbd2768-14d7-46d3-9e6c-d8f2a81302e1', + '901711cd-4dc0-4b0c-a7c2-a75a2a694de6', + '70675803-f89b-4882-8558-2ddb8c9a38ed', + '9ce94cac-e535-4c89-bc7d-e24a9fc135f9', + '79e0e11a-4f15-4c48-9e11-bdc9e4d68241', + '1ebe29be-9c5a-4b8e-81c5-1c494486bba2']) \ No newline at end of file diff --git a/tests/data/postgres_ref_list.txt b/tests/data/postgres_ref_list.txt new file mode 100644 index 00000000..bf14addf --- /dev/null +++ b/tests/data/postgres_ref_list.txt @@ -0,0 +1,10 @@ +['{"parentTitle": "Adapting Agrivoltaics for Solar Mini-Grids in Haiti", "parentUrl": "https://research-hub.nrel.gov/en/publications/adapting-agrivoltaics-for-solar-mini-grids-in-haiti"} ', + '{"parentTitle": "2023 International Energy Workshop Summary (NREL Internal Use Only)", "parentUrl": "https://research-hub.nrel.gov/en/publications/2023-international-energy-workshop-summary-nrel-internal-use-only"} ', + '{"parentTitle": "A 2023 Perspective: What Is the Value of Hybridization?", "parentUrl": "https://research-hub.nrel.gov/en/publications/a-2023-perspective-what-is-the-value-of-hybridization"} ', + '{"parentTitle": "2022 Bioenergy Industry Status Report", "parentUrl": "https://research-hub.nrel.gov/en/publications/2022-bioenergy-industry-status-report"} ', + '{"parentTitle": "Bashar Anwar", "parentUrl": "https://research-hub.nrel.gov/en/persons/bashar-anwar"} ', + '{"parentTitle": "Rajendra Adhikari", "parentUrl": "https://research-hub.nrel.gov/en/persons/rajendra-adhikari"} ', + '{"parentTitle": "2024 JISEA Annual Meeting: Session 4", "parentUrl": "https://research-hub.nrel.gov/en/publications/2024-jisea-annual-meeting-session-4"} ', + '{"parentTitle": "Ad-Mat: Adaptations of Mature Manufacturing Strategies for Accelerated Redox Flow Battery Deployment", "parentUrl": "https://research-hub.nrel.gov/en/publications/ad-mat-adaptations-of-mature-manufacturing-strategies-for-acceler"} ', + '{"parentTitle": "Achieving an 80% Renewable Portfolio in Alaska\'s Railbelt: Cost Analysis", "parentUrl": "https://research-hub.nrel.gov/en/publications/achieving-an-80-renewable-portfolio-in-alaskaaposs-railbelt-cost-"} ', + '{"parentTitle": "Doug Arent", "parentUrl": "https://research-hub.nrel.gov/en/persons/doug-arent"} '] diff --git a/tests/test_postgres.py b/tests/test_postgres.py new file mode 100644 index 00000000..d2e3bd3a --- /dev/null +++ b/tests/test_postgres.py @@ -0,0 +1,65 @@ +""" +Test +""" +import os +import ast +from elm import TEST_DATA_DIR +from elm.wizard import EnergyWizardPostgres + +FP_REF_TXT = os.path.join(TEST_DATA_DIR, 'postgres_ref_list.txt') +FP_QUERY_TXT = os.path.join(TEST_DATA_DIR, 'postgres_query_test.txt') + +with open(FP_REF_TXT, 'r', encoding='utf8') as f: + REF_TEXT = f.read() + +with open(FP_QUERY_TXT, 'r', encoding='utf8') as f: + QUERY_TEXT = f.read() + +QUERY_TUPLE = ast.literal_eval(QUERY_TEXT) + +DB_HOST = ("aurora-postgres-low-stage.cluster-" + "ccklrxkcenui.us-west-2.rds.amazonaws.com") +DB_PORT = "5432" +DB_NAME = "ewiz_analysis" +DB_SCHEMA = "ewiz_schema" +DB_TABLE = "ewiz_kb" + +os.environ['AWS_ACCESS_KEY_ID'] = "dummy" +os.environ['AWS_SECRET_ACCESS_KEY'] = "dummy" +os.environ['AWS_SESSION_TOKEN'] = "dummy" + +class MockClass: + """Dummy class to mock EnergyWizardPostgres.make_ref_list()""" + + @staticmethod + def ref_call(*args, **kwargs): # pylint: disable=unused-argument + """Mock for EnergyWizardPostgres.make_ref_list()""" + return REF_TEXT + + @staticmethod + def query_call(*args, **kwargs): # pylint: disable=unused-argument + """Mock for EnergyWizardPostgres.make_ref_list()""" + return QUERY_TUPLE + + +def test_ref_list(mocker): + """Test to ensure correct response from research hub.""" + wizard = EnergyWizardPostgres(db_host=DB_HOST, db_port=DB_PORT, + db_name=DB_NAME, db_schema=DB_SCHEMA, + db_table=DB_TABLE) + + mocker.patch.object(wizard, + 'make_ref_list', MockClass.ref_call) + mocker.patch.object(wizard, + 'query_vector_db', MockClass.query_call) + + question = "What is a dummy question?" + + message = wizard.engineer_query(question)[0] + refs = wizard.engineer_query(question)[-1] + + assert len(refs) > 0 + assert 'parentTitle' in str(refs) + assert 'parentUrl' in str(refs) + assert 'research-hub.nrel.gov' in str(refs) + assert question in message