diff --git a/src/geophires_x/GeoPHIRESUtils.py b/src/geophires_x/GeoPHIRESUtils.py index 64a7e8b8..4e65ed02 100644 --- a/src/geophires_x/GeoPHIRESUtils.py +++ b/src/geophires_x/GeoPHIRESUtils.py @@ -520,8 +520,9 @@ def read_input_file(return_dict_1, logger=None, input_file_name=None): # successful read of data into list. Now make a dictionary with all the parameter entries. # Index will be the unique name of the parameter. # The value will be a "ParameterEntry" structure, with name, value (optionally with units), optional comment - for line in content: - if line.startswith('#'): + for raw_line in content: + line = raw_line.strip() + if any([line.startswith(x) for x in ['#', '--', '*']]): # skip any line that starts with "#" - # will be the comment parameter continue diff --git a/tests/examples/Beckers_et_al_2023_Tabulated_Database_Coaxial_sCO2_heat.txt b/tests/examples/Beckers_et_al_2023_Tabulated_Database_Coaxial_sCO2_heat.txt index 10c23e46..40253828 100644 --- a/tests/examples/Beckers_et_al_2023_Tabulated_Database_Coaxial_sCO2_heat.txt +++ b/tests/examples/Beckers_et_al_2023_Tabulated_Database_Coaxial_sCO2_heat.txt @@ -1,10 +1,8 @@ -#GEOPHIRES v3.0 Input File -#Last modified on 2024-01-29 -#Example Description: Example 1 from "Tabulated Database of Closed-Loop Geothermal Systems Performance for Cloud-Based Technical and Economic Modeling of Heat Production and Electricity Generation" -#Koenraad Beckers Yaroslav Vasyliv Gabriela A. Bran-Anleu Mario Martinez Chad Augustine and Mark White -#Presented at the 48th Stanford Geothermal Workshop Stanford California February 6-8 2023 -#This configuration is water filled U-loop with 1 lateral for direct-use heat -#---------------------------------------------------------------------------------------- +# Example 1 from "Tabulated Database of Closed-Loop Geothermal Systems Performance for Cloud-Based Technical and +# Economic Modeling of Heat Production and Electricity Generation" +# Koenraad Beckers Yaroslav Vasyliv Gabriela A. Bran-Anleu Mario Martinez Chad Augustine and Mark White +# Presented at the 48th Stanford Geothermal Workshop Stanford California February 6-8 2023 +# This configuration is water filled U-loop with 1 lateral for direct-use heat. Is AGS, True Closed-loop Configuration, 1 @@ -30,8 +28,8 @@ Circulation Pump Efficiency, 0.8, -----[-] #same as default Capital Cost for Surface Plant for Direct-use System, 100.00, ----$/kWth #same as default Dead-state Pressure, 1e5, ---- bar -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Economic Model,4, --- Should be 1 (FCR model) 2 (Standard LCOE/LCOH model) 3 (Bicycle model) 4 CLGS. Fraction of Investment in Bonds,0.65, --- [-] Required if Bicycle model is selected. See manual for details. Inflated Bond Interest Rate,0.07, --- [-] Required if Bicycle model is selected. See manual for details. @@ -41,5 +39,5 @@ Combined Income Tax Rate,0.392, --- [-] Required if Bicycle model is selected. Gross Revenue Tax Rate,0, --- [-] Required if Bicycle model is selected. See manual for details. Reservoir Stimulation Capital Cost,0, --- [M$/injection well] Reservoir stimulation capital cost per injection well -*** Simulation Parameters *** +# *** Simulation Parameters *** Print Output to Console,1, --- [-] Should be 0 (don't print results to console) or 1 (print results to console) diff --git a/tests/examples/Beckers_et_al_2023_Tabulated_Database_Coaxial_water_heat.txt b/tests/examples/Beckers_et_al_2023_Tabulated_Database_Coaxial_water_heat.txt index 205b82ca..24962050 100644 --- a/tests/examples/Beckers_et_al_2023_Tabulated_Database_Coaxial_water_heat.txt +++ b/tests/examples/Beckers_et_al_2023_Tabulated_Database_Coaxial_water_heat.txt @@ -1,10 +1,9 @@ -#GEOPHIRES v3.0 Input File -#Last modified on 2023-04-12 -#Example Description: Example 1 from "Tabulated Database of Closed-Loop Geothermal Systems Performance for Cloud-Based Technical and Economic Modeling of Heat Production and Electricity Generation" -#Koenraad Beckers Yaroslav Vasyliv Gabriela A. Bran-Anleu Mario Martinez Chad Augustine and Mark White -#Presented at the 48th Stanford Geothermal Workshop Stanford California February 6-8 2023 -#This configuration is water filled U-loop with 1 lateral for direct-use heat -#---------------------------------------------------------------------------------------- +# Example 1 from "Tabulated Database of Closed-Loop Geothermal Systems Performance for Cloud-Based Technical and +# Economic Modeling of Heat Production and Electricity Generation" +# Koenraad Beckers Yaroslav Vasyliv Gabriela A. Bran-Anleu Mario Martinez Chad Augustine and Mark White +# Presented at the 48th Stanford Geothermal Workshop Stanford California February 6-8 2023 +# This configuration is water filled U-loop with 1 lateral for direct-use heat + Is AGS, True Closed-loop Configuration, 2, ----Coaxial End-Use Option, 2, -----direct heat @@ -30,8 +29,8 @@ Circulation Pump Efficiency, 0.8, -----[-] #same as default Capital Cost for Surface Plant for Direct-use System, 100.00, ----$/kWth #same as default Dead-state Pressure, 1e5, ---- bar -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Economic Model,4, --- Should be 1 (FCR model) 2 (Standard LCOE/LCOH model) 3 (Bicycle model) 4 CLGS. Fraction of Investment in Bonds,0.65, --- [-] Required if Bicycle model is selected. See manual for details. Inflated Bond Interest Rate,0.07, --- [-] Required if Bicycle model is selected. See manual for details. @@ -41,5 +40,5 @@ Combined Income Tax Rate,0.392, --- [-] Required if Bicycle model is selected. Gross Revenue Tax Rate,0, --- [-] Required if Bicycle model is selected. See manual for details. Reservoir Stimulation Capital Cost,0, --- [M$/injection well] Reservoir stimulation capital cost per injection well -*** Simulation Parameters *** +# *** Simulation Parameters *** Print Output to Console,1, --- [-] Should be 0 (don't print results to console) or 1 (print results to console) diff --git a/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_sCO2_elec.txt b/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_sCO2_elec.txt index 8108236c..ee3bc36a 100644 --- a/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_sCO2_elec.txt +++ b/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_sCO2_elec.txt @@ -1,10 +1,9 @@ -#GEOPHIRES v3.0 Input File -#Last modified on 2024-01-29 -#Example Description: Example 1 from "Tabulated Database of Closed-Loop Geothermal Systems Performance for Cloud-Based Technical and Economic Modeling of Heat Production and Electricity Generation" -#Koenraad Beckers Yaroslav Vasyliv Gabriela A. Bran-Anleu Mario Martinez Chad Augustine and Mark White -#Presented at the 48th Stanford Geothermal Workshop Stanford California February 6-8 2023 -#This configuration is water filled U-loop with 1 lateral for direct-use elec using sCO2 -#---------------------------------------------------------------------------------------- +# Example 1 from "Tabulated Database of Closed-Loop Geothermal Systems Performance for Cloud-Based Technical and +# Economic Modeling of Heat Production and Electricity Generation" +# Koenraad Beckers Yaroslav Vasyliv Gabriela A. Bran-Anleu Mario Martinez Chad Augustine and Mark White +# Presented at the 48th Stanford Geothermal Workshop Stanford California February 6-8 2023 +# This configuration is water filled U-loop with 1 lateral for direct-use elec using sCO2 + Is AGS, True Closed-loop Configuration, 1, ----uloop End-Use Option, 1, -----elec @@ -25,11 +24,11 @@ Electricity Rate, 0.10, ----USD/kWh Circulation Pump Efficiency, 0.8, -----[-] CO2 Turbine Outlet Pressure, 200 -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Economic Model,4, --- Should be 1 (FCR model) 2 (Standard LCOE/LCOH model) 3 (Bicycle model) 4 CLGS. Reservoir Stimulation Capital Cost,0, --- [M$/injection well] Reservoir stimulation capital cost per injection well Exploration Capital Cost, 0 -*** Simulation Parameters *** +# *** Simulation Parameters *** Print Output to Console,1, --- [-] Should be 0 (don't print results to console) or 1 (print results to console) diff --git a/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_sCO2_heat.txt b/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_sCO2_heat.txt index b78992d3..3ef8ddda 100644 --- a/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_sCO2_heat.txt +++ b/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_sCO2_heat.txt @@ -1,10 +1,9 @@ -#GEOPHIRES v3.0 Input File -#Last modified on 2023-04-12 -#Example Description: Example 1 from "Tabulated Database of Closed-Loop Geothermal Systems Performance for Cloud-Based Technical and Economic Modeling of Heat Production and Electricity Generation" -#Koenraad Beckers Yaroslav Vasyliv Gabriela A. Bran-Anleu Mario Martinez Chad Augustine and Mark White -#Presented at the 48th Stanford Geothermal Workshop Stanford California February 6-8 2023 -#This configuration is water filled U-loop with 1 lateral for direct-use heat using sCO2 -#---------------------------------------------------------------------------------------- +# Example 1 from "Tabulated Database of Closed-Loop Geothermal Systems Performance for Cloud-Based Technical and +# Economic Modeling of Heat Production and Electricity Generation" +# Koenraad Beckers Yaroslav Vasyliv Gabriela A. Bran-Anleu Mario Martinez Chad Augustine and Mark White +# Presented at the 48th Stanford Geothermal Workshop Stanford California February 6-8 2023 +# This configuration is water filled U-loop with 1 lateral for direct-use heat using sCO2 + Is AGS, True Closed-loop Configuration, 1, ----uloop End-Use Option, 2, -----direct heat @@ -31,8 +30,8 @@ CO2 Turbine Outlet Pressure, 99 #same as default Capital Cost for Surface Plant for Direct-use System, 100.00, ----$/kWth #same as default Dead-state Pressure, 1e5, ---- bar -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Economic Model,4, --- Should be 1 (FCR model) 2 (Standard LCOE/LCOH model) 3 (Bicycle model) 4 CLGS. Fraction of Investment in Bonds,0.65, --- [-] Required if Bicycle model is selected. See manual for details. Inflated Bond Interest Rate,0.07, --- [-] Required if Bicycle model is selected. See manual for details. @@ -42,5 +41,5 @@ Combined Income Tax Rate,0.392, --- [-] Required if Bicycle model is selected. Gross Revenue Tax Rate,0, --- [-] Required if Bicycle model is selected. See manual for details. Reservoir Stimulation Capital Cost,0, --- [M$/injection well] Reservoir stimulation capital cost per injection well -*** Simulation Parameters *** +# *** Simulation Parameters *** Print Output to Console,1, --- [-] Should be 0 (don't print results to console) or 1 (print results to console) diff --git a/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_water_elec.txt b/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_water_elec.txt index 19e58b33..4b709ee3 100644 --- a/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_water_elec.txt +++ b/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_water_elec.txt @@ -1,10 +1,9 @@ -#GEOPHIRES v3.0 Input File -#Last modified on 2024-01-29 -#Example Description: Example 1 from "Tabulated Database of Closed-Loop Geothermal Systems Performance for Cloud-Based Technical and Economic Modeling of Heat Production and Electricity Generation" -#Koenraad Beckers Yaroslav Vasyliv Gabriela A. Bran-Anleu Mario Martinez Chad Augustine and Mark White -#Presented at the 48th Stanford Geothermal Workshop Stanford California February 6-8 2023 -#This configuration is water filled U-loop with 1 lateral for direct-use heat using water -#---------------------------------------------------------------------------------------- +# Example 1 from "Tabulated Database of Closed-Loop Geothermal Systems Performance for Cloud-Based Technical and +# Economic Modeling of Heat Production and Electricity Generation" +# Koenraad Beckers Yaroslav Vasyliv Gabriela A. Bran-Anleu Mario Martinez Chad Augustine and Mark White +# Presented at the 48th Stanford Geothermal Workshop Stanford California February 6-8 2023 +# This configuration is water filled U-loop with 1 lateral for direct-use heat using water + Is AGS, True Closed-loop Configuration, 1 End-Use Option, 1, -----elec @@ -24,11 +23,11 @@ Ambient Temperature, 20, ----Deg.C "Dead-state temperature" Electricity Rate, 0.10, ----USD/kWh Circulation Pump Efficiency, 0.8, -----[-] -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Economic Model,4, --- Should be 1 (FCR model) 2 (Standard LCOE/LCOH model) 3 (Bicycle model) 4 CLGS. Reservoir Stimulation Capital Cost,0, --- [M$/injection well] Reservoir stimulation capital cost per injection well Exploration Capital Cost, 0 -*** Simulation Parameters *** +# *** Simulation Parameters *** Print Output to Console,1, --- [-] Should be 0 (don't print results to console) or 1 (print results to console) diff --git a/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_water_heat.txt b/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_water_heat.txt index 1ecda7d5..2bdd5f9d 100644 --- a/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_water_heat.txt +++ b/tests/examples/Beckers_et_al_2023_Tabulated_Database_Uloop_water_heat.txt @@ -1,10 +1,9 @@ -#GEOPHIRES v3.0 Input File -#Last modified on 2023-04-12 -#Example Description: Example 1 from "Tabulated Database of Closed-Loop Geothermal Systems Performance for Cloud-Based Technical and Economic Modeling of Heat Production and Electricity Generation" -#Koenraad Beckers Yaroslav Vasyliv Gabriela A. Bran-Anleu Mario Martinez Chad Augustine and Mark White -#Presented at the 48th Stanford Geothermal Workshop Stanford California February 6-8 2023 -#This configuration is water filled U-loop with 1 lateral for direct-use heat usong water -#---------------------------------------------------------------------------------------- +# Example 1 from "Tabulated Database of Closed-Loop Geothermal Systems Performance for Cloud-Based Technical and +# Economic Modeling of Heat Production and Electricity Generation" +# Koenraad Beckers Yaroslav Vasyliv Gabriela A. Bran-Anleu Mario Martinez Chad Augustine and Mark White +# Presented at the 48th Stanford Geothermal Workshop Stanford California February 6-8 2023 +# This configuration is water filled U-loop with 1 lateral for direct-use heat using water + Is AGS, True Closed-loop Configuration, 1, ---uloop End-Use Option, 2, -----direct heat @@ -30,8 +29,8 @@ Circulation Pump Efficiency, 0.8, -----[-] #same as default Capital Cost for Surface Plant for Direct-use System, 100.00, ----$/kWth #same as default Dead-state Pressure, 1e5, ---- bar -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Economic Model,4, --- Should be 1 (FCR model) 2 (Standard LCOE/LCOH model) 3 (Bicycle model) 4 CLGS. Fraction of Investment in Bonds,0.65, --- [-] Required if Bicycle model is selected. See manual for details. Inflated Bond Interest Rate,0.07, --- [-] Required if Bicycle model is selected. See manual for details. @@ -41,5 +40,5 @@ Combined Income Tax Rate,0.392, --- [-] Required if Bicycle model is selected. Gross Revenue Tax Rate,0, --- [-] Required if Bicycle model is selected. See manual for details. Reservoir Stimulation Capital Cost,0, --- [M$/injection well] Reservoir stimulation capital cost per injection well -*** Simulation Parameters *** +# *** Simulation Parameters *** Print Output to Console,1, --- [-] Should be 0 (don't print results to console) or 1 (print results to console) diff --git a/tests/examples/Fervo_Norbeck_Latimer_2023.txt b/tests/examples/Fervo_Norbeck_Latimer_2023.txt index c9c66e76..f0634694 100644 --- a/tests/examples/Fervo_Norbeck_Latimer_2023.txt +++ b/tests/examples/Fervo_Norbeck_Latimer_2023.txt @@ -1,17 +1,17 @@ ---- Case Study: Fervo Energy Whitepaper ---- Norbeck J.H. and Latimer T.M. 2023. ---- "Commercial-Scale Demonstration of a First-of-a-Kind Enhanced Geothermal System." ---- https://doi.org/10.31223/X52X0B ---- Drilling Price paper: ---- "Review Of Drilling Performance In A Horizontal EGS Development" ---- Kareem El-Sadi Brittany Gierke Elliot Howard Christian Gradl ---- https://pangea.stanford.edu/ERE/db/GeoConf/papers/SGW/2024/Elsadi.pdf ---- Looking to make: ---- gross power production of 2 to 3.5 MWe ---- production temperature of 336 degF (169 degC) ---- pumping power 500 to 1000 kW +# Case Study: Fervo Energy Whitepaper +# Norbeck J.H. and Latimer T.M. 2023. +# "Commercial-Scale Demonstration of a First-of-a-Kind Enhanced Geothermal System." +# https://doi.org/10.31223/X52X0B +# Drilling Price paper: +# "Review Of Drilling Performance In A Horizontal EGS Development" +# Kareem El-Sadi Brittany Gierke Elliot Howard Christian Gradl +# https://pangea.stanford.edu/ERE/db/GeoConf/papers/SGW/2024/Elsadi.pdf +# Looking to make: +# gross power production of 2 to 3.5 MWe +# production temperature of 336 degF (169 degC) +# pumping power 500 to 1000 kW -***Reservoir Parameters*** +# ***Reservoir Parameters*** Reservoir Model, 1 Reservoir Volume Option,1, ---Should be 1 2 3 or 4. See manual for details. Reservoir Density, 2800, per the paper phyllite + quartzite + diorite + granodiorite, @@ -27,7 +27,7 @@ Number of Segments,1 Gradient 1, 76.74, per the paper Plant Outlet Pressure, 1500 psi, per the paper -*** Wellbore Parameters*** +# *** Wellbore Parameters*** Number of Injection Wells, 1, ---[-] Number of Production Wells,1, ---[-] Well Geometry Configuration, 4, ----L @@ -49,7 +49,7 @@ Utilization Factor,.9, ---[-]Water Loss Fraction, .02x Water Loss Fraction,0.02, ---[-] Maximum Drawdown,1, ---[-] no redrilling considered -***Surfaceplant Parameters*** +# ***Surfaceplant Parameters*** Ambient Temperature, 8 degC, per the paper. Published ambient is 10.27 degC Surface Temperature, 8 degC, per the paper. Published ambient is 10.27 degC End-Use Option,1, ---electricity as the main product @@ -58,7 +58,7 @@ Power Plant Type,2, ---supercritical binary cycle End-Use Efficiency Factor,.9, ---[-] Circulation Pump Efficiency, 0.80, per the paper -*** Economic Parameters*** +# *** Economic Parameters*** Economic Model,3, ---BICYCLE Levelized Cost Model Starting Electricity Sale Price,0.15 Ending Electricity Sale Price,1.00, essentially no limit s the rate can rise continuously with inflation @@ -74,6 +74,6 @@ Investment Tax Credit Rate,0, ---[-] Required for BICYCLE model Inflation Rate During Construction, 0.05, ---[-] Property Tax Rate,0, ---[-] Required for BICYCLE model -***Other Parameters*** +# ***Other Parameters*** Print Output to Console, 1, ---Should be 1 (to print) or 0 (to not print) Time steps per year,10, ---[-] diff --git a/tests/examples/S-DAC-GT.txt b/tests/examples/S-DAC-GT.txt index b86772f2..9cf16ec8 100644 --- a/tests/examples/S-DAC-GT.txt +++ b/tests/examples/S-DAC-GT.txt @@ -1,11 +1,9 @@ -GEOPHIRES v3.0 Input File -Geothermal Combined Heat and Power Problem using a Thermal Drawdown Reservoir Model and BICYCLE Economic Model and Solid Sorbent Direct Air Capture powered by geothermal - -Based on Example 3 description: This example problem considers an EGS reservoir at 3.1km depth. -The heat is used in a combined heat and power topping cycle model with double flash as -topping cycle and electricity considered as the main product. - -But only lists those parameters that are different than their default values +# Geothermal Combined Heat and Power Problem using a Thermal Drawdown Reservoir Model and BICYCLE Economic Model and +# Solid Sorbent Direct Air Capture powered by geothermal +# Based on Example 3 description: This example problem considers an EGS reservoir at 3.1km depth. +# The heat is used in a combined heat and power topping cycle model with double flash as +# topping cycle and electricity considered as the main product. +# But only lists those parameters that are different than their default values Do S-DAC-GT Calculations, True diff --git a/tests/examples/SUTRAExample1.txt b/tests/examples/SUTRAExample1.txt index 5eb32aa5..ea027366 100644 --- a/tests/examples/SUTRAExample1.txt +++ b/tests/examples/SUTRAExample1.txt @@ -1,13 +1,8 @@ -GEOPHIRES v3.0 Input File -Created on 2023-11-03 -Last modified on 2024-01-18 -Reservoir thermal energy storage simulated with SUTRA +# Example: SUTRA: Reservoir thermal energy storage simulated with SUTRA +# This example reads in a SUTRA simulation result and calculate techno-economics of seasonal reservoir thermal energy storage. -This example reads in a SUTRA simulation result and calculate techno-economics of seasonal reservoir thermal energy storage. - - -***Subsurface technical parameters*** -************************************* +# ***Subsurface technical parameters*** +# ************************************* Reservoir Model,7, ---Reads in SUTRA result for seasonal reservoir thermal energy storage SUTRA Annual Heat File Name,Examples/annual_heat.csv, ---SUTRA file with heat stored, heat supplied and efficiency for each year SUTRA Heat Budget File Name,Examples/heat_budget.csv, ---SUTRA file with target heat and simulated heat for each SUTRA time step over lifetime @@ -25,22 +20,22 @@ Production Wellbore Temperature Drop,0, ---[deg.C] Injection Wellbore Temperature Gain,0, ---[deg.C] Reservoir Impedance,0.2, ---[GPa*s/m3] -***SURFACE TECHNICAL PARAMETERS*** -********************************** +# ***SURFACE TECHNICAL PARAMETERS*** +# ********************************** End-Use Option,2, ---[-] Direct-Use Heat Circulation Pump Efficiency,.8, ---[-] between .1 and 1 Power Plant Type,8, ---[-] Reservoir Thermal Energy Storage -***FINANCIAL PARAMETERS*** -************************** +# ***FINANCIAL PARAMETERS*** +# ************************** Plant Lifetime,30, ---[years] Economic Model,2, ---[-] Standard Levelized Cost Model Fixed Charge Rate,.05, ---[-] between 0 and 1 Inflation Rate During Construction,0, ---[-] End-Use Efficiency Factor,1, ---[-] End-Use Efficiency -***CAPITAL AND O&M COST PARAMETERS*** -************************************* +# ***CAPITAL AND O&M COST PARAMETERS*** +# ************************************* Well Drilling and Completion Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations Well Drilling Cost Correlation,1, ---[-] Use built-in correlations Reservoir Stimulation Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations @@ -52,6 +47,6 @@ Surface Plant O&M Cost Adjustment Factor,1, ---[-] Use built-in correlations Water Cost Adjustment Factor,1, ---[-] Use built-in correlations -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +# *************************** Print Output to Console,1, ---[-] Should be 0 (don't print results) or 1 (print results) diff --git a/tests/examples/Wanju_Yuan_Closed-Loop_Geothermal_Energy_Recovery.txt b/tests/examples/Wanju_Yuan_Closed-Loop_Geothermal_Energy_Recovery.txt index ba4b2602..b7dcf31d 100644 --- a/tests/examples/Wanju_Yuan_Closed-Loop_Geothermal_Energy_Recovery.txt +++ b/tests/examples/Wanju_Yuan_Closed-Loop_Geothermal_Energy_Recovery.txt @@ -1,16 +1,11 @@ ----------------------------------------------------------------------------------------- -GEOPHIRES v3.0 Input File -Geothermal Electricity Example Problem using Percentage Thermal Drawdown Model (Example X) and closed loops -Originally created by NREL on 2018-03-26 as Example 4 -Last modified on 2023-09-29 +# Example: Geothermal Electricity Example Problem using Percentage Thermal Drawdown Model and closed loops +# Description: This example problem considers a simple reservoir +# at 2 km depth with an initial production temperature of 145deg.C. The thermal drawdown +# is assumed linear at 0.5%/year. The heat is converted to electricity with a subcritical +# ORC. It is accessed by a closed loop well. -Example X Description: This example problem considers a simple reservoir -at 2 km depth with an initial production temperature of 145deg.C. The thermal drawdown -is assumed linear at 0.5%/year. The heat is converted to electricity with a subcritical -ORC. It is accessed by a closed loop well. ----------------------------------------------------------------------------------------- -*** closed loop parameters *** -**************************************** +# *** closed loop parameters *** +# **************************************** Is AGS, True Has Nonvertical Section, True Multilaterals Cased, True @@ -37,10 +32,8 @@ Number of Production Wells,1, ---[-] Number of Injection Wells,1, ---[-] - - -*** Subsurface technical parameters *** -**************************************** +# *** Subsurface technical parameters *** +# **************************************** Ramey Production Wellbore Model,0, --- Should be 0 (disable) or 1 (enable) Production Wellbore Temperature Drop,0, --- [deg.C] Production Flow Rate per Well,110, --- [kg/s] @@ -50,15 +43,15 @@ Reservoir Volume,1e9, --- [m3] (required for reservoir volume option 3 and 4 Reservoir Heat Capacity,1050, --- [J/kg/K] -*** Surface technical parameters *** -************************************ +# *** Surface technical parameters *** +# ************************************ End-Use Option,1, --- [-] Electricity Power Plant Type,1, --- [1] Subcritical ORC Circulation Pump Efficiency,0.8, --- [-] Plant Outlet Pressure, 68.95 -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Economic Model,3, --- Should be 1 (FCR model) 2 (Standard LCOE/LCOH model) or 3 (Bicycle model). Fraction of Investment in Bonds,0.65, --- [-] Required if Bicycle model is selected. See manual for details. Inflated Bond Interest Rate,0.07, --- [-] Required if Bicycle model is selected. See manual for details. @@ -69,5 +62,5 @@ Gross Revenue Tax Rate,0, --- [-] Required if Bicycle model is selected. See ma Reservoir Stimulation Capital Cost,0, --- [M$/injection well] Reservoir stimulation capital cost per injection well -*** Simulation Parameters *** +# *** Simulation Parameters *** Print Output to Console,1, --- [-] Should be 0 (don't print results to console) or 1 (print results to console) diff --git a/tests/examples/example1.txt b/tests/examples/example1.txt index 08deaa35..b91580fd 100644 --- a/tests/examples/example1.txt +++ b/tests/examples/example1.txt @@ -1,15 +1,11 @@ -GEOPHIRES v2.0 Input File -Created on 2018-06-11 -Last modified on 2024-02-28 -Geothermal Electricity Problem using a Multiple Parallel Fractures Model +# Example 1: Geothermal Electricity Problem using a Multiple Parallel Fractures Model +# This problem considers an EGS reservoir at 3km depth. +# Ramey's model is applied to simulate production wellbore heat losses. The heat +# is used in for electricity application with a reinjection temperature of 50deg.C. -Example 1 Description: This problem considers an EGS reservoir at 3km depth. -Ramey's model is applied to simulate production wellbore heat losses. The heat -is used in for electricity application with a reinjection temperature of 50deg.C. - -***Subsurface technical parameters*** -************************************* +# ***Subsurface technical parameters*** +# ************************************* Reservoir Model,1, ---Multiple Fractures reservoir model Reservoir Depth,3, ---[km] Number of Segments,1, ---[-] @@ -37,8 +33,8 @@ Reservoir Heat Capacity,1000, ---[J/kg/K] Reservoir Density,2700, ---[kg/m^3] Reservoir Thermal Conductivity,2.7, ---[W/m/K] -***SURFACE TECHNICAL PARAMETERS*** -********************************** +# ***SURFACE TECHNICAL PARAMETERS*** +# ********************************** End-Use Option,1, ---[-] Electricity Power Plant Type,2, ---[-] Supercritical ORC Circulation Pump Efficiency,.8, ---[-] between .1 and 1 @@ -46,15 +42,15 @@ Utilization Factor,.9, ---[-] between .1 and 1 Surface Temperature,20, ---[deg.C] Ambient Temperature,20, ---[deg.C] -***FINANCIAL PARAMETERS*** -************************** +# ***FINANCIAL PARAMETERS*** +# ************************** Plant Lifetime,30, ---[years] Economic Model,1, ---[-] Fixed Charge Rate Model Fixed Charge Rate,.05, ---[-] between 0 and 1 Inflation Rate During Construction,0, ---[-] -***CAPITAL AND O&M COST PARAMETERS*** -************************************* +#***CAPITAL AND O&M COST PARAMETERS*** +# ************************************* Well Drilling and Completion Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations Well Drilling Cost Correlation,1, ---[-] Use built-in correlations Reservoir Stimulation Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations @@ -66,8 +62,8 @@ Surface Plant O&M Cost Adjustment Factor,1, ---[-] Use built-in correlations Water Cost Adjustment Factor,1, ---[-] Use built-in correlations -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +#*************************** Print Output to Console,1, ---[-] Should be 0 (don't print results) or 1 (print results) Time steps per year,6, ---[1/year] diff --git a/tests/examples/example10_HP.txt b/tests/examples/example10_HP.txt index c72f4440..d1e7c5ee 100644 --- a/tests/examples/example10_HP.txt +++ b/tests/examples/example10_HP.txt @@ -1,12 +1,10 @@ -GEOPHIRES v2.0 Input File -Geothermal Combined Heat and Power Problem using a Thermal Drawdown Reservoir Model and BICYCLE Economic Model +# Example 10: Heat Pump: Geothermal Combined Heat and Power Problem using a Thermal Drawdown Reservoir Model and BICYCLE Economic Model +# This example problem considers an EGS reservoir at 3.1km depth. +# The heat is used in a combined heat and power topping cycle model with double flash as +# topping cycle and electricity considered as the main product. -Example 3 description: This example problem considers an EGS reservoir at 3.1km depth. -The heat is used in a combined heat and power topping cycle model with double flash as -topping cycle and electricity considered as the main product. - -***Subsurface technical parameters*** -************************************* +# ***Subsurface technical parameters*** +# ************************************* Reservoir Model,3, ---m/A Single Fracture Thermal Drawdown Drawdown Parameter,.00002, ---[kg/s/m2] Reservoir Depth,2.1, ---[km] @@ -34,8 +32,8 @@ Reservoir Density,3000, ---[kg/m3] Reservoir Thermal Conductivity,3, ---[W/m/K] Water Loss Fraction,0.02, ---[-] -***Surface Technical Parameters*** -********************************** +# ***Surface Technical Parameters*** +# ********************************** End-Use Option, 2, --- Direct use Power Plant Type, 6, ---[-] Heat Pump @@ -47,16 +45,16 @@ Ambient Temperature,15, ---[deg.C] Heat Pump COP, 2.8, --- [-] -***Financial Parameters*** -************************** +# ***Financial Parameters*** +# ************************** Plant Lifetime,30, ---[years] Economic Model,2, ---BICYCLE Levelized Cost Model Discount Rate, 0.05, --- [-] Required if Standard LCOE/LCOH model is selected. See manual for details. Inflation Rate During Construction,0.05, ---[-] -***Capital and O&M Cost Parameters*** -************************************* +# ***Capital and O&M Cost Parameters*** +# ************************************* Well Drilling and Completion Capital Cost Adjustment Factor,1, ---[-] use built in correlations Well Drilling Cost Correlation,1, ---[-] use built in correlations @@ -71,8 +69,8 @@ Electricity Rate,.07, ---[$/kWh] Heat Pump Capital Cost,3.74, --- [$M] -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +# *************************** Print Output to Console,1, ---Should be 1 (to print) or 0 (to not print) Time steps per year,10, ---[-] diff --git a/tests/examples/example11_AC.txt b/tests/examples/example11_AC.txt index 4e2398ed..ceb9d1cd 100644 --- a/tests/examples/example11_AC.txt +++ b/tests/examples/example11_AC.txt @@ -1,7 +1,7 @@ +# Example 11: Absorption Chiller - -***Subsurface technical parameters*** -************************************* +# ***Subsurface technical parameters*** +# ************************************* Reservoir Model,3, ---m/A Single Fracture Thermal Drawdown Drawdown Parameter,.00002, ---[kg/s/m2] Reservoir Depth,2.1, ---[km] @@ -29,8 +29,8 @@ Reservoir Density,3000, ---[kg/m3] Reservoir Thermal Conductivity,3, ---[W/m/K] Water Loss Fraction,0.02, ---[-] -***Surface Technical Parameters*** -********************************** +# ***Surface Technical Parameters*** +# ********************************** End-Use Option,2, --- Direct use Power Plant Type, 5, ---[-] Absorption Chiller Circulation Pump Efficiency,.80, ---[-] @@ -40,16 +40,16 @@ Surface Temperature,15, ---[deg.C] Ambient Temperature,15, ---[deg.C] Absorption Chiller COP, 0.72, --- [-] -***Financial Parameters*** -************************** +# ***Financial Parameters*** +# ************************** Plant Lifetime,30, ---[years] Economic Model,2, ---BICYCLE Levelized Cost Model Discount Rate, 0.05, --- [-] Required if Standard LCOE/LCOH model is selected. See manual for details. Inflation Rate During Construction,0.05, ---[-] -***Capital and O&M Cost Parameters*** -************************************* +# ***Capital and O&M Cost Parameters*** +# ************************************* Well Drilling and Completion Capital Cost Adjustment Factor,1, ---[-] use built in correlations Well Drilling Cost Correlation,1, ---[-] use built in correlations @@ -64,8 +64,8 @@ Electricity Rate,.07, ---[$/kWh] Absorption Chiller Capital Cost,3.74, --- [$M] Absorption Chiller O&M Cost,0.065, --- [$M/year] -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +# *************************** Print Output to Console,1, ---Should be 1 (to print) or 0 (to not print) Time steps per year,10, ---[-] diff --git a/tests/examples/example12_DH.txt b/tests/examples/example12_DH.txt index a4027934..2e957211 100644 --- a/tests/examples/example12_DH.txt +++ b/tests/examples/example12_DH.txt @@ -1,26 +1,12 @@ ----------------------------------------------------------------------------------------- -GEOPHIRES v2.0 Input File -Geothermal Electricity Example Problem using Percentage Thermal Drawdown Model (Example 4) -Created by Charley Walton on 2022-07-25 -Last modified on 2024-01-04 +# Example 12: District Heating: Geothermal Electricity Example Problem using Percentage Thermal Drawdown Model +# This example considers Cornell's existing district heating network assesses +# the performance of a proposed geothermal well. A known heat demand profile for the district +# is processed using the district_heat.py module See Charley Walton's SULI Research Report +# "Techno-Economic Simulations of Geothermal District Heating Systems with GEOPHIRES" for +# more details on the case study. -Description: This example considers Cornell's existing district heating network assesses -the performance of a proposed geothermal well. A known heat demand profile for the district -is processed using the district_heat.py module See Charley Walton's SULI Research Report -"Techno-Economic Simulations of Geothermal District Heating Systems with GEOPHIRES" for -more details on the case study. - -Note: The GEOPHIRES v2.0 python code scans the input file for each necessary "parameter, -value". Therefore, the user cannot change the string before the parameter value and the -comma is the required delimiter. Each parameter string may only appear once in this -input file. However, the parameters can be in any order and comments can be added -either by including extra lines or by typing it after the parameter value, separated by -a comma (see examples below). If a necessary parameter is not provided, a default value -is assumed, and a warning message is printed to the console. ----------------------------------------------------------------------------------------- - -*** Subsurface technical parameters *** -**************************************** +# *** Subsurface technical parameters *** +# **************************************** Reservoir Model,4, --- Percentage thermal drawdown model Drawdown Parameter,0.003, --- In [1/year]. Reservoir Depth,3.5, --- [km] @@ -47,8 +33,8 @@ Reservoir Density,2700, --- [kg/m3] Reservoir Thermal Conductivity,3, --- [W/m/K] -*** Surface technical parameters *** -************************************ +# *** Surface technical parameters *** +# ************************************ End-Use Option,2, --- Direct use Power Plant Type, 7, ---[-] District Heating Circulation Pump Efficiency,0.8, --- [-] @@ -68,8 +54,8 @@ District Heating Piping Cost Rate,1200, --- [$/m] used for calculating surfa District Heating Road Length,3, ---[km] supersedes model option 2 if any value is entered -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Plant Lifetime,30, --- [years] Economic Model,2, --- Should be 1 (FCR model), 2 (Standard LCOE/LCOH model), or 3 (Bicycle model). Discount Rate,0.05, @@ -85,6 +71,6 @@ Water Cost Adjustment Factor,1, --- [-] Use built-in water cost correlation Surface Plant O&M Cost Adjustment Factor,1, --- [-] Use built-in surface plant O&M cost correlation as is -*** Simulation Parameters *** +# *** Simulation Parameters *** Print Output to Console,1, --- [-] Should be 0 (don't print results to console) or 1 (print results to console) Time steps per year,3, --- [1/year] diff --git a/tests/examples/example13.txt b/tests/examples/example13.txt index b5957819..bb4e8730 100644 --- a/tests/examples/example13.txt +++ b/tests/examples/example13.txt @@ -1,12 +1,7 @@ ----------------------------------------------------------------------------------------- -GEOPHIRES v3.0 Input File -Example 13 -This example file tests redrilling due to excessive drawdown and use of cogen bottoming cycle as end-use -Created by Koenraad Beckers on 2023-11-20 ----------------------------------------------------------------------------------------- +# Example 13: This example file tests redrilling due to excessive drawdown and use of cogen bottoming cycle as end-use -*** Subsurface technical parameters *** -**************************************** +# *** Subsurface technical parameters *** +# **************************************** Reservoir Model,4, --- Percentage thermal drawdown model Drawdown Parameter,0.01, --- In [1/year]. Reservoir Depth,4, --- [km] @@ -33,8 +28,8 @@ Reservoir Density,2700, --- [kg/m3] Reservoir Thermal Conductivity,3, --- [W/m/K] -*** Surface technical parameters *** -************************************ +# *** Surface technical parameters *** +# ************************************ End-Use Option,42, --- [-] Co-gen bottoming cycle with heat the main product Circulation Pump Efficiency,0.8, --- [-] Utilization Factor,0.8, --- [-] @@ -53,8 +48,8 @@ District Heating Piping Cost Rate,1200, --- [$/m] used for calculating surfa District Heating Road Length,3, ---[km] supersedes model option 2 if any value is entered -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Plant Lifetime,30, --- [years] Economic Model,2, --- Should be 1 (FCR model), 2 (Standard LCOE/LCOH model), or 3 (Bicycle model). Discount Rate,0.05, @@ -70,6 +65,6 @@ Water Cost Adjustment Factor,1, --- [-] Use built-in water cost correlation Surface Plant O&M Cost Adjustment Factor,1, --- [-] Use built-in surface plant O&M cost correlation as is -*** Simulation Parameters *** +# *** Simulation Parameters *** Print Output to Console,1, --- [-] Should be 0 (don't print results to console) or 1 (print results to console) Time steps per year,3, --- [1/year] diff --git a/tests/examples/example1_addons.txt b/tests/examples/example1_addons.txt index d05b6148..e6e24cb7 100644 --- a/tests/examples/example1_addons.txt +++ b/tests/examples/example1_addons.txt @@ -1,3 +1,5 @@ +# Example 1 with Addons + Do AddOn Calculations, True Do Carbon Price Calculations, True @@ -65,8 +67,8 @@ Reservoir Heat Capacity,1000, ---[J/kg/K] Reservoir Density,2700, ---[kg/m^3] Reservoir Thermal Conductivity,2.7, ---[W/m/K] -***SURFACE TECHNICAL PARAMETERS*** -********************************** +# ***SURFACE TECHNICAL PARAMETERS*** +# ********************************** End-Use Option,1, ---[-] Electricity Economic Model,1, ---[-] Fixed Charge Rate Model Power Plant Type,2, ---[-] Supercritcal ORC @@ -75,14 +77,14 @@ Utilization Factor,.9, ---[-] between .1 and 1 Surface Temperature,20, ---[deg.C] Ambient Temperature,20, ---[deg.C] -***FINANCIAL PARAMETERS*** -************************** +# ***FINANCIAL PARAMETERS*** +# ************************** Plant Lifetime,30, ---[years] Fixed Charge Rate,.05, ---[-] between 0 and 1 Inflation Rate During Construction,0, ---[-] -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +# *************************** Print Output to Console,1, ---[-] Should be 0 (don't print results) or 1 (print results) Time steps per year,6, ---[1/year] diff --git a/tests/examples/example1_outputunits.txt b/tests/examples/example1_outputunits.txt index ced2a023..6045c5c2 100644 --- a/tests/examples/example1_outputunits.txt +++ b/tests/examples/example1_outputunits.txt @@ -1,3 +1,5 @@ +# Example 1 with different output units specified + Reservoir Model,1, ---Multiple, Fractures, reservoir, model Reservoir Depth,3, ---[km] Number of Segments,1, ---[-] @@ -25,8 +27,8 @@ Reservoir Heat Capacity,1000, ---[J/kg/K] Reservoir Density,2700, ---[kg/m^3] Reservoir Thermal Conductivity,2.7, ---[W/m/K] -***SURFACE TECHNICAL PARAMETERS*** -********************************** +# ***SURFACE TECHNICAL PARAMETERS*** +# ********************************** End-Use Option,1, ---[-] Electricity Economic Model,1, ---[-] Fixed Charge Rate Model Power Plant Type,2, ---[-] Supercritcal ORC @@ -35,22 +37,22 @@ Utilization Factor,.9, ---[-] between .1 and 1 Surface Temperature,20, ---[deg.C] Ambient Temperature,20, ---[deg.C] -***FINANCIAL PARAMETERS*** -************************** +# ***FINANCIAL PARAMETERS*** +# ************************** Plant Lifetime,30, ---[years] Fixed Charge Rate,.05, ---[-] between 0 and 1 Inflation Rate During Construction,0, ---[-] -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +# *************************** Print Output to Console,1, ---[-] Should be 0 (don't print results) or 1 (print results) Time steps per year,6, ---[1/year] -***Output unit conversions you wish to make*** -*************************** -Units:Bottom-hole temperature, degF, ---[This is what I want the units to be for this output parameter +# ***Output unit conversions you wish to make*** +# *************************** +Units:Bottom-hole temperature, degF, ---[This is what I want the units to be for this output parameter] --- See https://github.com/NREL/GEOPHIRES-X/issues/236 re: currency conversions. --- Units:Exploration cost,MEUR, ---[This is what I want the units to be for this output parameter --- Units:O&M Make-up Water costs, MEUR/yr +# See https://github.com/NREL/GEOPHIRES-X/issues/236 re: currency conversions. +# Units:Exploration cost,MEUR, ---[This is what I want the units to be for this output parameter +# Units:O&M Make-up Water costs, MEUR/yr diff --git a/tests/examples/example2.txt b/tests/examples/example2.txt index 87acf81c..2d338951 100644 --- a/tests/examples/example2.txt +++ b/tests/examples/example2.txt @@ -1,14 +1,10 @@ -GEOPHIRES v2.0 Input File -Created on 2018-06-11 -Last modified on 2018-06-11 -Geothermal Direct-Use Example Problem using a Linear Heat Sweep Model. +# Example 2: Geothermal Direct-Use Example Problem using a Linear Heat Sweep Model. +# This problem considers an EGS reservoir at 3km depth. +# Ramey's model is applied to simulate production wellbore heat losses. The heat +# is used in direct-use heat application with reinjection temperature of 70deg.C -Example 2 Description: This problem considers an EGS reservoir at 3km depth. -Ramey's model is applied to simulate production wellbore heat losses. The heat -is used in direct-use heat application with reinjection temperature of 70deg.C - -***Subsurface Technical Parameters*** -************************************* +# ***Subsurface Technical Parameters*** +# ************************************* Reservoir Model,2, ---Linear Heat Sweep Model Reservoir Depth,3, ---[km] @@ -33,24 +29,24 @@ Reservoir Density,3000, ---[kg/m3] Reservoir Thermal Conductivity,3.2, ---[W/m/K] Reservoir Porosity,.1, ---[-] -***Surface Technical Parameters*** -********************************** +# ***Surface Technical Parameters*** +# ********************************** End-Use Option,2, ---Direct Use Heat Circulation Pump Efficiency,.8, ---[-] Utilization Factor,.9, ---[-] End-Use Efficiency Factor,.9, ---[-] Surface Temperature,15, ---[deg.C] -***Financial Parameters*** -************************** +# ***Financial Parameters*** +# ************************** Plant Lifetime,25, ---[years] Economic Model,2, ---Standard Levelized Cost Model Discount Rate,.05, ---[-] Inflation Rate During Construction,0, ---[-] -***Capital and O&M Cost Parameters*** -************************************* +# ***Capital and O&M Cost Parameters*** +# ************************************* Well Drilling and Completion Capital Cost Adjustment Factor,1, ---[M$/well] Use built-in correlations Well Drilling Cost Correlation,1, ---[-] @@ -63,7 +59,7 @@ Surface Plant O&M Cost Adjustment Factor,1, ---[-] Use built-in correlations Water Cost Adjustment Factor,1, ---[-] Use built-in correlations Electricity Rate,.05, ---[$/kWh] -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +# *************************** Print Output to Console,1, ---should be either 0 (do not show) or 1 (show) Time steps per year,3, ---[-] diff --git a/tests/examples/example3.txt b/tests/examples/example3.txt index b355ade3..1d21c524 100644 --- a/tests/examples/example3.txt +++ b/tests/examples/example3.txt @@ -1,12 +1,10 @@ -GEOPHIRES v2.0 Input File -Geothermal Combined Heat and Power Problem using a Thermal Drawdown Reservoir Model and BICYCLE Economic Model +# Example 3: Geothermal Combined Heat and Power Problem using a Thermal Drawdown Reservoir Model and BICYCLE Economic Model +# This example problem considers an EGS reservoir at 3.1km depth. +# The heat is used in a combined heat and power topping cycle model with double flash as +# topping cycle and electricity considered as the main product. -Example 3 description: This example problem considers an EGS reservoir at 3.1km depth. -The heat is used in a combined heat and power topping cycle model with double flash as -topping cycle and electricity considered as the main product. - -***Subsurface technical parameters*** -************************************* +# ***Subsurface technical parameters*** +# ************************************* Reservoir Model,3, ---m/A Single Fracture Thermal Drawdown Drawdown Parameter,.00002, ---[kg/s/m2] Reservoir Depth,3.1, ---[km] @@ -34,8 +32,8 @@ Reservoir Density,3000, ---[kg/m3] Reservoir Thermal Conductivity,3, ---[W/m/K] Water Loss Fraction,0.02, ---[-] -***Surface Technical Parameters*** -********************************** +# ***Surface Technical Parameters*** +# ********************************** End-Use Option,31, ---CHP Topping Cycle with electricity as the main product Power Plant Type,4, ---Double-Flash @@ -45,8 +43,8 @@ End-Use Efficiency Factor,.9, ---[-] Surface Temperature,15, ---[deg.C] Ambient Temperature,15, ---[deg.C] -***Financial Parameters*** -************************** +# ***Financial Parameters*** +# ************************** Plant Lifetime,35, ---[years] Economic Model,3, ---BICYCLE Levelized Cost Model @@ -60,8 +58,8 @@ Investment Tax Credit Rate,0, ---[-] Required for BICYCLE model Property Tax Rate,0, ---[-] Required for BICYCLE model Inflation Rate During Construction,0.05, ---[-] -***Capital and O&M Cost Parameters*** -************************************* +# ***Capital and O&M Cost Parameters*** +# ************************************* Well Drilling and Completion Capital Cost Adjustment Factor,1, ---[-] use built in correlations Well Drilling Cost Correlation,1, ---[-] use built in correlations @@ -74,8 +72,8 @@ Surface Plant O&M Cost Adjustment Factor,1, ---[-] use built in correlations Water Cost Adjustment Factor,1, ---[-] use built in correlations Heat Rate,.02, ---[$/kWh] -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +# *************************** Print Output to Console,1, ---Should be 1 (to print) or 0 (to not print) Time steps per year,10, ---[-] diff --git a/tests/examples/example4.txt b/tests/examples/example4.txt index dd43ded5..38dd49f4 100644 --- a/tests/examples/example4.txt +++ b/tests/examples/example4.txt @@ -1,17 +1,10 @@ ----------------------------------------------------------------------------------------- -GEOPHIRES v2.0 Input File -Geothermal Electricity Example Problem using Percentage Thermal Drawdown Model (Example 4) -Created by NREL on 2018-03-26 -Last modified on 2018-06-12 +# Example 4: Geothermal Electricity Example Problem using Percentage Thermal Drawdown Model +# This example problem considers a simple hydrothermal reservoir +# at 2 km depth with an initial production temperature of 145deg.C. The thermal drawdown +# is assumed linear at 0.5%/year. The heat is converted to electricity with a subcritical ORC. -Example 4 Description: This example problem considers a simple hydrothermal reservoir -at 2 km depth with an initial production temperature of 145deg.C. The thermal drawdown -is assumed linear at 0.5%/year. The heat is converted to electricity with a subcritical -ORC. ----------------------------------------------------------------------------------------- - -*** Subsurface technical parameters *** -**************************************** +# *** Subsurface technical parameters *** +# **************************************** Reservoir Model,4, --- Percentage thermal drawdown model Drawdown Parameter,0.005, --- In [1/year]. Reservoir Depth,2, --- [km] @@ -38,8 +31,8 @@ Reservoir Density,2700, --- [kg/m3] Reservoir Thermal Conductivity,3, --- [W/m/K] -*** Surface technical parameters *** -************************************ +# *** Surface technical parameters *** +# ************************************ End-Use Option,1, --- [-] Electricity Power Plant Type,1, --- [1] Subcritical ORC Circulation Pump Efficiency,0.8, --- [-] @@ -47,8 +40,8 @@ Utilization Factor,0.9, --- [-] Surface Temperature,15, --- [deg.C] Ambient Temperature,15, --- [deg.C] -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Plant Lifetime,30, --- [years] Economic Model,3, --- Should be 1 (FCR model) 2 (Standard LCOE/LCOH model) or 3 (Bicycle model). Fraction of Investment in Bonds,0.65, --- [-] Required if Bicycle model is selected. See manual for details. @@ -71,6 +64,6 @@ Water Cost Adjustment Factor,1, --- [-] Use built-in water cost correlation Surface Plant O&M Cost Adjustment Factor,1, --- [-] Use built-in surface plant O&M cost correlation as is -*** Simulation Parameters *** +# *** Simulation Parameters *** Print Output to Console,1, --- [-] Should be 0 (don't print results to console) or 1 (print results to console) Time steps per year,4, --- [1/year] diff --git a/tests/examples/example5.txt b/tests/examples/example5.txt index ad35dbdf..e64ceb1f 100644 --- a/tests/examples/example5.txt +++ b/tests/examples/example5.txt @@ -1,18 +1,12 @@ ----------------------------------------------------------------------------------------- -GEOPHIRES v2.0 Input File -Geothermal Direct-Use Example Problem using User-Provided Temperature Data (Example 5) -Created by NREL on 3/26/2018-03-26 -Last modified on 2018-06-12 +# Example 5: Geothermal Direct-Use Example Problem using User-Provided Temperature Data +# This example problem considers an EGS reservoir at 3 km depth with +# bottom-hole temperature of 150deg.C. The reservoir output temperature is imported from +# the text file "ReservoirOutput.txt". Ramey's model is applied to simulate production +# wellbore heat losses. The heat is used in a direct-use heat application with reinjection +# temperature of 80deg.C. -Example 5 Description: This example problem considers an EGS reservoir at 3 km depth with -bottom-hole temperature of 150deg.C. The reservoir output temperature is imported from -the text file "ReservoirOutput.txt". Ramey's model is applied to simulate production -wellbore heat losses. The heat is used in a direct-use heat application with reinjection -temperature of 80deg.C. ----------------------------------------------------------------------------------------- - -*** Subsurface technical parameters *** -**************************************** +# *** Subsurface technical parameters *** +# **************************************** Reservoir Model,5, --- User provided reservoir output temperature data Reservoir Output File Name,Examples/ReservoirOutput.txt, --- File name with produced temperature Reservoir Depth,3, --- [km] @@ -36,8 +30,8 @@ Reservoir Density,2700, --- [kg/m3] Reservoir Thermal Conductivity,3, --- [W/m/K] -*** Surface technical parameters *** -************************************ +# *** Surface technical parameters *** +# ************************************ End-Use Option,2, --- [-] Direct-Use Circulation Pump Efficiency,0.8, --- [-] Utilization Factor,0.9, --- [-] @@ -45,8 +39,8 @@ Surface Temperature,15, --- [deg.C] Ambient Temperature,15, --- [deg.C] End-Use Efficiency Factor,0.9, --- [-] -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Plant Lifetime,30, --- [years] Economic Model,3, --- Should be 1 (FCR model) 2 (Standard LCOE/LCOH model) or 3 (Bicycle model). Fraction of Investment in Bonds,0.65, --- [-] Required if Bicycle model is selected. See manual for details. @@ -70,6 +64,6 @@ Inflation Rate During Construction,0, --- [-] Electricity Rate,0.07, --- [$/kWh] for pumping power -*** Simulation Parameters *** +# *** Simulation Parameters *** Print Output to Console,1, --- [-] Should be 0 (don't print results to console) or 1 (print results to console) Time steps per year,4, --- [1/year] diff --git a/tests/examples/example8.txt b/tests/examples/example8.txt index beda8bd3..3e1dceaa 100644 --- a/tests/examples/example8.txt +++ b/tests/examples/example8.txt @@ -1,11 +1,7 @@ -GEOPHIRES v2.0 Input File -Created on 2018-06-11 -Last modified on 2018-06-12 -Geothermal Direct-Use Heat using Multiple Parallel Fractures Model (EGS) - -Example 8 Description: This problem considers an EGS reservoir at 2.8 km depth for direct-use (Cornell conditions). -Ramey's model is applied to simulate production wellbore heat losses. The heat -is used in for direct-use heating with a reinjection temperature of 30deg.C. +# Example 8: Geothermal Direct-Use Heat using Multiple Parallel Fractures Model (EGS) +# This problem considers an EGS reservoir at 2.8 km depth for direct-use (Cornell conditions). +# Ramey's model is applied to simulate production wellbore heat losses. The heat +# is used in for direct-use heating with a reinjection temperature of 30deg.C. ***Subsurface technical parameters*** diff --git a/tests/examples/example9.txt b/tests/examples/example9.txt index 4eba7b80..6283ef7d 100644 --- a/tests/examples/example9.txt +++ b/tests/examples/example9.txt @@ -1,15 +1,11 @@ -GEOPHIRES v2.0 Input File -Created on 2018-06-11 -Last modified on 2023-11-20 -Geothermal Direct-Use Heat using Multiple Parallel Fractures Model (EGS) +# Example 9: Geothermal Direct-Use Heat using Multiple Parallel Fractures Model (EGS) +# This problem considers an EGS reservoir at 3.5 km depth for ORC electricity production (Cornell conditions). +# Ramey's model is applied to simulate production wellbore heat losses. The heat +# is used in for direct-use heating with a reinjection temperature of 60deg.C. -Example 9 Description: This problem considers an EGS reservoir at 3.5 km depth for ORC electricity production (Cornell conditions). -Ramey's model is applied to simulate production wellbore heat losses. The heat -is used in for direct-use heating with a reinjection temperature of 60deg.C. - -***Subsurface technical parameters*** -************************************* +# ***Subsurface technical parameters*** +# ************************************* Reservoir Model,1, ---Multiple Fractures reservoir model Reservoir Depth,3.8, ---[km] Number of Segments,1, ---[-] @@ -37,8 +33,8 @@ Reservoir Heat Capacity,825, ---[J/kg/K] Reservoir Density,2730, ---[kg/m^3] Reservoir Thermal Conductivity,2.83, ---[W/m/K] -***SURFACE TECHNICAL PARAMETERS*** -********************************** +# ***SURFACE TECHNICAL PARAMETERS*** +# ********************************** End-Use Option,1, ---[-] Electricity Power Plant Type, 1, ---[-] Subcritical ORC Circulation Pump Efficiency,.8, ---[-] @@ -48,15 +44,15 @@ Surface Temperature,20, ---[deg.C] Ambient Temperature,20, ---[deg.C] Electricity Rate,0.1, ---Electricity rate for pumping power [$/kWh] -***FINANCIAL PARAMETERS*** -************************** +# ***FINANCIAL PARAMETERS*** +# ************************** Plant Lifetime,30, ---[years] Economic Model,1, ---[-] Fixed Charge Rate Model Fixed Charge Rate,.05, ---[-] between 0 and 1 Inflation Rate During Construction,0, ---[-] -***CAPITAL AND O&M COST PARAMETERS*** -************************************* +# ***CAPITAL AND O&M COST PARAMETERS*** +# ************************************* Well Drilling and Completion Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations Well Drilling Cost Correlation,1, ---[-] Use built-in correlations Reservoir Stimulation Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations @@ -68,8 +64,8 @@ Surface Plant O&M Cost Adjustment Factor,1, ---[-] Use built-in correlations Water Cost Adjustment Factor,1, ---[-] Use built-in correlations -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +# *************************** Print Output to Console,1, ---[-] Should be 0 (don't print results) or 1 (print results) Time steps per year,6, ---[1/year] diff --git a/tests/examples/example_ITC.txt b/tests/examples/example_ITC.txt index c807539c..05e91b25 100644 --- a/tests/examples/example_ITC.txt +++ b/tests/examples/example_ITC.txt @@ -1,9 +1,7 @@ ---- GEOPHIRES v3 Input File ---- Created on 2024-04-12 ---- Investment Tax Credit (ITC) Example +# Example: Investment Tax Credit (ITC) -***Subsurface technical parameters*** -************************************* +# ***Subsurface technical parameters*** +# ************************************* Reservoir Model,1, ---Multiple Fractures reservoir model Reservoir Depth,5, ---[km] Number of Segments,1, ---[-] @@ -31,8 +29,8 @@ Reservoir Heat Capacity,1000, ---[J/kg/K] Reservoir Density,2700, ---[kg/m^3] Reservoir Thermal Conductivity,2.7, ---[W/m/K] -***SURFACE TECHNICAL PARAMETERS*** -********************************** +# ***SURFACE TECHNICAL PARAMETERS*** +# ********************************** End-Use Option,1, ---[-] Electricity Power Plant Type,2, ---[-] Supercritical ORC Circulation Pump Efficiency,.8, ---[-] between .1 and 1 @@ -40,8 +38,8 @@ Utilization Factor,.9, ---[-] between .1 and 1 Surface Temperature,20, ---[deg.C] Ambient Temperature,20, ---[deg.C] -***CAPITAL AND O&M COST PARAMETERS*** -************************************* +# ***CAPITAL AND O&M COST PARAMETERS*** +# ************************************* Well Drilling and Completion Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations Well Drilling Cost Correlation,1, ---[-] Use built-in correlations Reservoir Stimulation Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations @@ -53,8 +51,8 @@ Surface Plant O&M Cost Adjustment Factor,1, ---[-] Use built-in correlations Water Cost Adjustment Factor,1, ---[-] Use built-in correlations -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Plant Lifetime,30, --- [years] Economic Model,3, --- Should be 1 (FCR model) 2 (Standard LCOE/LCOH model) or 3 (Bicycle model). Fraction of Investment in Bonds,0.65, --- [-] Required if Bicycle model is selected. See manual for details. @@ -77,8 +75,8 @@ Water Cost Adjustment Factor,1, --- [-] Use built-in water cost correlation Surface Plant O&M Cost Adjustment Factor,1, --- [-] Use built-in surface plant O&M cost correlation as is Investment Tax Credit Rate,0.5, --- [-] Investment tax credit rate -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +# *************************** Print Output to Console,1, ---[-] Should be 0 (don't print results) or 1 (print results) Time steps per year,6, ---[1/year] diff --git a/tests/examples/example_PTC.txt b/tests/examples/example_PTC.txt index 3e7a3b2c..fb140a12 100644 --- a/tests/examples/example_PTC.txt +++ b/tests/examples/example_PTC.txt @@ -1,9 +1,7 @@ ---- GEOPHIRES v3 Input File ---- Created on 2024-04-12 ---- Production Tax Credit (PTC) Example +# Example: Production Tax Credit (PTC) -***Subsurface technical parameters*** -************************************* +# ***Subsurface technical parameters*** +# ************************************* Reservoir Model,1, ---Multiple Fractures reservoir model Reservoir Depth,5, ---[km] Number of Segments,1, ---[-] @@ -31,8 +29,8 @@ Reservoir Heat Capacity,1000, ---[J/kg/K] Reservoir Density,2700, ---[kg/m^3] Reservoir Thermal Conductivity,2.7, ---[W/m/K] -***SURFACE TECHNICAL PARAMETERS*** -********************************** +# ***SURFACE TECHNICAL PARAMETERS*** +# ********************************** End-Use Option,1, ---[-] Electricity Power Plant Type,2, ---[-] Supercritical ORC Circulation Pump Efficiency,.8, ---[-] between .1 and 1 @@ -40,8 +38,8 @@ Utilization Factor,.9, ---[-] between .1 and 1 Surface Temperature,20, ---[deg.C] Ambient Temperature,20, ---[deg.C] -***CAPITAL AND O&M COST PARAMETERS*** -************************************* +# ***CAPITAL AND O&M COST PARAMETERS*** +# ************************************* Well Drilling and Completion Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations Well Drilling Cost Correlation,1, ---[-] Use built-in correlations Reservoir Stimulation Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations @@ -53,8 +51,8 @@ Surface Plant O&M Cost Adjustment Factor,1, ---[-] Use built-in correlations Water Cost Adjustment Factor,1, ---[-] Use built-in correlations -*** Economic/Financial Parameters *** -************************************* +# *** Economic/Financial Parameters *** +# ************************************* Plant Lifetime,30, --- [years] Economic Model,3, --- Should be 1 (FCR model) 2 (Standard LCOE/LCOH model) or 3 (Bicycle model). Fraction of Investment in Bonds,0.65, --- [-] Required if Bicycle model is selected. See manual for details. @@ -81,8 +79,8 @@ Production Tax Credit Cooling, 0.05, --- [-] Production tax credit for electr Production Tax Credit Duration, 10, --- [-] Production tax credit for duration in years Production Tax Credit Inflation Adjusted, True, --- [-] Is the Production tax credit inflation adjusted (T/F) -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +# *************************** Print Output to Console,1, ---[-] Should be 0 (don't print results) or 1 (print results) Time steps per year,6, ---[1/year] diff --git a/tests/examples/example_SHR-1.txt b/tests/examples/example_SHR-1.txt index 84676c7e..dd6736e3 100644 --- a/tests/examples/example_SHR-1.txt +++ b/tests/examples/example_SHR-1.txt @@ -1,4 +1,4 @@ ---- Superhot Rock (SHR) Example 1 +# Example: Superhot Rock (SHR) 1 Reservoir Model, 1 Reservoir Depth, 7.5 @@ -46,4 +46,4 @@ Annual License Etc, 0 Flat License Etc, 0 Tax Relief Per Year, 2.212 ---- See relevant discussion regarding thermosiphoning: https://github.com/NREL/GEOPHIRES-X/issues/188?#issuecomment-2102937796 +# See relevant discussion regarding thermosiphoning: https://github.com/NREL/GEOPHIRES-X/issues/188?#issuecomment-2102937796 diff --git a/tests/examples/example_SHR-2.txt b/tests/examples/example_SHR-2.txt index 5c4ea7b3..77762a9f 100644 --- a/tests/examples/example_SHR-2.txt +++ b/tests/examples/example_SHR-2.txt @@ -1,4 +1,4 @@ ---- Superhot Rock (SHR) Example 2 +# Example: Superhot Rock (SHR) 2 Reservoir Model, 1 Reservoir Depth, 7.5 diff --git a/tests/examples/example_multiple_gradients.txt b/tests/examples/example_multiple_gradients.txt index bc9ad95a..f4feff93 100644 --- a/tests/examples/example_multiple_gradients.txt +++ b/tests/examples/example_multiple_gradients.txt @@ -1,9 +1,4 @@ -GEOPHIRES v3.0 Input File -Created on 2023-11-11 -Last modified on 2023-11-11 -Unit test for multiple geothermal gradients - -Description: This problem considers an EGS reservoir at 4km depth with multiple geothermal gradients. +# Example: Multiple Gradients: This problem considers an EGS reservoir at 4km depth with multiple geothermal gradients. ***Subsurface technical parameters*** diff --git a/tests/examples/example_overpressure.txt b/tests/examples/example_overpressure.txt index 8c410444..56914025 100644 --- a/tests/examples/example_overpressure.txt +++ b/tests/examples/example_overpressure.txt @@ -1,7 +1,7 @@ --- Overpressure Example +# Example: Overpressure System -***Subsurface technical parameters*** -************************************* +# ***Subsurface technical parameters*** +# ************************************* Overpressure Percentage, 155.0 Overpressure Depletion Rate, 10.0 Injection Reservoir Temperature, 101.1, degC @@ -39,8 +39,8 @@ Reservoir Heat Capacity,1000, ---[J/kg/K] Reservoir Density,2700, ---[kg/m^3] Reservoir Thermal Conductivity,2.7, ---[W/m/K] -***SURFACE TECHNICAL PARAMETERS*** -********************************** +# ***SURFACE TECHNICAL PARAMETERS*** +# ********************************** End-Use Option,1, ---[-] Electricity Power Plant Type,2, ---[-] Supercritical ORC Circulation Pump Efficiency,.8, ---[-] between .1 and 1 @@ -48,15 +48,15 @@ Utilization Factor,.9, ---[-] between .1 and 1 Surface Temperature,20, ---[deg.C] Ambient Temperature,20, ---[deg.C] -***FINANCIAL PARAMETERS*** -************************** +# ***FINANCIAL PARAMETERS*** +# ************************** Plant Lifetime,30, ---[years] Economic Model,1, ---[-] Fixed Charge Rate Model Fixed Charge Rate,.05, ---[-] between 0 and 1 Inflation Rate During Construction,0, ---[-] -***CAPITAL AND O&M COST PARAMETERS*** -************************************* +# ***CAPITAL AND O&M COST PARAMETERS*** +# ************************************* Well Drilling and Completion Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations Well Drilling Cost Correlation,1, ---[-] Use built-in correlations Reservoir Stimulation Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations @@ -68,8 +68,8 @@ Surface Plant O&M Cost Adjustment Factor,1, ---[-] Use built-in correlations Water Cost Adjustment Factor,1, ---[-] Use built-in correlations -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +# *************************** Print Output to Console,1, ---[-] Should be 0 (don't print results) or 1 (print results) Time steps per year,6, ---[1/year] diff --git a/tests/examples/example_overpressure2.txt b/tests/examples/example_overpressure2.txt index 93c0625a..6f97da40 100644 --- a/tests/examples/example_overpressure2.txt +++ b/tests/examples/example_overpressure2.txt @@ -1,7 +1,7 @@ --- Overpressure Example 2 +# Example: Overpressure System 2 -***Subsurface technical parameters*** -************************************* +# ***Subsurface technical parameters*** +# ************************************* Overpressure Percentage, 155.0 Overpressure Depletion Rate, 1.0 Injection Reservoir Temperature, 101.1, degC @@ -39,8 +39,8 @@ Reservoir Heat Capacity,1000, ---[J/kg/K] Reservoir Density,2700, ---[kg/m^3] Reservoir Thermal Conductivity,2.7, ---[W/m/K] -***SURFACE TECHNICAL PARAMETERS*** -********************************** +# ***SURFACE TECHNICAL PARAMETERS*** +# ********************************** End-Use Option,1, ---[-] Electricity Power Plant Type,2, ---[-] Supercritical ORC Circulation Pump Efficiency,.8, ---[-] between .1 and 1 @@ -48,15 +48,15 @@ Utilization Factor,.9, ---[-] between .1 and 1 Surface Temperature,20, ---[deg.C] Ambient Temperature,20, ---[deg.C] -***FINANCIAL PARAMETERS*** -************************** +# ***FINANCIAL PARAMETERS*** +# ************************** Plant Lifetime,30, ---[years] Economic Model,1, ---[-] Fixed Charge Rate Model Fixed Charge Rate,.05, ---[-] between 0 and 1 Inflation Rate During Construction,0, ---[-] -***CAPITAL AND O&M COST PARAMETERS*** -************************************* +# ***CAPITAL AND O&M COST PARAMETERS*** +# ************************************* Well Drilling and Completion Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations Well Drilling Cost Correlation,1, ---[-] Use built-in correlations Reservoir Stimulation Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations @@ -68,8 +68,8 @@ Surface Plant O&M Cost Adjustment Factor,1, ---[-] Use built-in correlations Water Cost Adjustment Factor,1, ---[-] Use built-in correlations -***Simulation Parameters*** -*************************** +# ***Simulation Parameters*** +# *************************** Print Output to Console,1, ---[-] Should be 0 (don't print results) or 1 (print results) Time steps per year,6, ---[1/year] diff --git a/tests/geophires_x_client_tests/input_comments.txt b/tests/geophires_x_client_tests/input_comments.txt new file mode 100644 index 00000000..ba3559c7 --- /dev/null +++ b/tests/geophires_x_client_tests/input_comments.txt @@ -0,0 +1,20 @@ +# comment +# foo, bar +# foo, bar, baz +# foo, bar, baz, qux corge + +Gradient 1, 69 +Reservoir Depth, 5, -- comment here +End-Use Option, 1, # another comment +Power Plant Type, 4, comments galore + +# another, comment, with, commas, down here + # comment with space + # comment with space, and comma + # comment with space, and commas, plural?! + +-- another comment style +--- three is not the charm, hopefully + +**** A legacy-but-still-supported header comment style, indeed **** +******************************************************************* diff --git a/tests/geophires_x_client_tests/test_geophires_input_parameters.py b/tests/geophires_x_client_tests/test_geophires_input_parameters.py index dc8f926a..f105f11a 100644 --- a/tests/geophires_x_client_tests/test_geophires_input_parameters.py +++ b/tests/geophires_x_client_tests/test_geophires_input_parameters.py @@ -3,6 +3,7 @@ from pathlib import Path from geophires_x_client import GeophiresInputParameters +from geophires_x_client import GeophiresXClient from tests.base_test_case import BaseTestCase @@ -44,3 +45,9 @@ def test_init_with_input_file_and_parameters(self): with open(input_params.as_file_path(), encoding='UTF-8') as f: self.assertEqual('Foo, Bar\nBaz, Qux\nBaz, Quux\nQuuz, 2\n', f.read()) + + def test_input_file_comments(self): + result = GeophiresXClient().get_geophires_result( + GeophiresInputParameters(from_file_path=self._get_test_file_path('input_comments.txt')) + ) + self.assertIsNotNone(result) diff --git a/tests/test_geophires_utils.py b/tests/test_geophires_utils.py index 62e59a62..b9f8c0c1 100644 --- a/tests/test_geophires_utils.py +++ b/tests/test_geophires_utils.py @@ -1,6 +1,8 @@ import sys import unittest +from pathlib import Path +from geophires_x import GeoPHIRESUtils from geophires_x.GeoPHIRESUtils import RecoverableHeat from geophires_x.GeoPHIRESUtils import UtilEff_func from geophires_x.GeoPHIRESUtils import _interp_util_eff_func @@ -12,6 +14,8 @@ from geophires_x.GeoPHIRESUtils import quantity from geophires_x.GeoPHIRESUtils import vapor_pressure_water_kPa from geophires_x.GeoPHIRESUtils import viscosity_water_Pa_sec +from geophires_x.Parameter import ParameterEntry +from tests.base_test_case import BaseTestCase class TestCelsiusToKelvin(unittest.TestCase): @@ -524,5 +528,23 @@ def test_close_temperature(self): self.assertAlmostEqual(result, 419.1703812859442, places=3) +class GeophiresUtilsTestCase(BaseTestCase): + def test_input_comments(self): + d = {} + GeoPHIRESUtils.read_input_file( + d, input_file_name=Path(self._get_test_file_path('geophires_x_client_tests/input_comments.txt')).absolute() + ) + self.assertIsNotNone(d) + self.assertDictEqual( + d, + { + 'Gradient 1': ParameterEntry(Name='Gradient 1', sValue='69', Comment=''), + 'Reservoir Depth': ParameterEntry(Name='Reservoir Depth', sValue='5', Comment='-- comment here'), + 'End-Use Option': ParameterEntry(Name='End-Use Option', sValue='1', Comment='# another comment'), + 'Power Plant Type': ParameterEntry(Name='Power Plant Type', sValue='4', Comment='comments galore'), + }, + ) + + if __name__ == '__main__': unittest.main()