Skip to content

Commit

Permalink
Implementing PTC and ITC more fully
Browse files Browse the repository at this point in the history
Adding test modules for PTC and IC
Fixing unit tests
  • Loading branch information
malcolm-dsider committed Apr 10, 2024
1 parent e09b3a9 commit 269aa89
Show file tree
Hide file tree
Showing 21 changed files with 4,144 additions and 3,333 deletions.
8 changes: 4 additions & 4 deletions src/geophires_x/Economics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1314,10 +1314,6 @@ def __init__(self, model: Model):
self.InputFile = ""
self.Cplantcorrelation = 0.0
self.C1well = 0.0
self.PTCElecPrice = [0.0] * model.surfaceplant.plant_lifetime.value
self.PTCHeatPrice = [0.0] * model.surfaceplant.plant_lifetime.value
self.PTCCoolingPrice = [0.0] * model.surfaceplant.plant_lifetime.value
self.PTCCarbonPrice = [0.0] * model.surfaceplant.plant_lifetime.value
sclass = str(__class__).replace("<class \'", "")
self.MyClass = sclass.replace("\'>", "")
self.MyPath = os.path.abspath(__file__)
Expand Down Expand Up @@ -2503,6 +2499,10 @@ def Calculate(self, model: Model) -> None:
model.reserv.depth.CurrentUnits = LengthUnit.KILOMETERS

# build the PTC price models
self.PTCElecPrice = [0.0] * model.surfaceplant.plant_lifetime.value
self.PTCHeatPrice = [0.0] * model.surfaceplant.plant_lifetime.value
self.PTCCoolingPrice = [0.0] * model.surfaceplant.plant_lifetime.value
self.PTCCarbonPrice = [0.0] * model.surfaceplant.plant_lifetime.value
if self.PTCElec.Provided:
self.PTCElecPrice = BuildPTCModel(model.surfaceplant.plant_lifetime.value,
self.PTCDuration.value, self.PTCElec.value, self.PTCInflationAdjusted.value,
Expand Down
2 changes: 1 addition & 1 deletion src/geophires_x_client/geophires_x_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class GeophiresXResult:
# TODO moved to power generation profile, parse from there
# 'Annual Thermal Drawdown (%/year)',
'Bottom-hole temperature',
'Well seperation: fracture height', # TODO correct typo upstream
'Well separation: fracture height',
'Fracture area',
'Fracture width',
'Reservoir volume',
Expand Down
441 changes: 228 additions & 213 deletions tests/examples/Wanju_Yuan_Closed-Loop_Geothermal_Energy_Recovery.out

Large diffs are not rendered by default.

431 changes: 223 additions & 208 deletions tests/examples/example1.out

Large diffs are not rendered by default.

419 changes: 217 additions & 202 deletions tests/examples/example10_HP.out

Large diffs are not rendered by default.

431 changes: 223 additions & 208 deletions tests/examples/example11_AC.out

Large diffs are not rendered by default.

449 changes: 232 additions & 217 deletions tests/examples/example12_DH.out

Large diffs are not rendered by default.

445 changes: 230 additions & 215 deletions tests/examples/example13.out

Large diffs are not rendered by default.

433 changes: 224 additions & 209 deletions tests/examples/example1_addons.out

Large diffs are not rendered by default.

389 changes: 202 additions & 187 deletions tests/examples/example2.out

Large diffs are not rendered by default.

467 changes: 241 additions & 226 deletions tests/examples/example3.out

Large diffs are not rendered by default.

427 changes: 221 additions & 206 deletions tests/examples/example4.out

Large diffs are not rendered by default.

411 changes: 213 additions & 198 deletions tests/examples/example5.out

Large diffs are not rendered by default.

419 changes: 217 additions & 202 deletions tests/examples/example8.out

Large diffs are not rendered by default.

435 changes: 225 additions & 210 deletions tests/examples/example9.out

Large diffs are not rendered by default.

241 changes: 241 additions & 0 deletions tests/examples/example_ITC.out

Large diffs are not rendered by default.

90 changes: 90 additions & 0 deletions tests/examples/example_ITC.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
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 PTC 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***
*************************************
Reservoir Model,1, ---Multiple Fractures reservoir model
Reservoir Depth,3, ---[km]
Number of Segments,1, ---[-]
Gradient 1,50, ---[deg.C/km]
Maximum Temperature,400, ---[deg.C]
Number of Production Wells,2, ---[-]
Number of Injection Wells,2, ---[-]
Production Well Diameter,7, ---[inch]
Injection Well Diameter,7, ---[inch]
Ramey Production Wellbore Model,1, ---0 if disabled 1 if enabled
Production Wellbore Temperature Drop,.5, ---[deg.C]
Injection Wellbore Temperature Gain,0, ---[deg.C]
Production Flow Rate per Well,55, ---[kg/s]
Fracture Shape,3, ---[-] Should be 1 2 3 or 4. See manual for details
Fracture Height,900, ---[m]
Reservoir Volume Option,3, ---[-] Should be 1 2 3 or 4. See manual for details
Number of Fractures,20, ---[-]
Reservoir Volume,1000000000, ---[m^3]
Water Loss Fraction,.02, ---[-]
Productivity Index,5, ---[kg/s/bar]
Injectivity Index,5, ---[kg/s/bar]
Injection Temperature,50, ---[deg.C]
Maximum Drawdown,1, ---[-] no redrilling considered
Reservoir Heat Capacity,1000, ---[J/kg/K]
Reservoir Density,2700, ---[kg/m^3]
Reservoir Thermal Conductivity,2.7, ---[W/m/K]

***SURFACE TECHNICAL PARAMETERS***
**********************************
End-Use Option,1, ---[-] Electricity
Power Plant Type,2, ---[-] Supercritical ORC
Circulation Pump Efficiency,.8, ---[-] between .1 and 1
Utilization Factor,.9, ---[-] between .1 and 1
Surface Temperature,20, ---[deg.C]
Ambient Temperature,20, ---[deg.C]

***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
Surface Plant Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations
Field Gathering System Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations
Exploration Capital Cost Adjustment Factor,1, ---[-] Use built-in correlations
Wellfield O&M Cost Adjustment Factor,1, ---[-] Use built-in correlations
Surface Plant O&M Cost Adjustment Factor,1, ---[-] Use built-in correlations
Water Cost Adjustment Factor,1, ---[-] Use built-in correlations


*** 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.
Inflated Bond Interest Rate,0.07, --- [-] Required if Bicycle model is selected. See manual for details.
Inflated Equity Interest Rate,0.12, --- [-] Required if Bicycle model is selected. See manual for details.
Inflation Rate,0.025, --- [-] Required if Bicycle model is selected. See manual for details.
Combined Income Tax Rate,0.392, --- [-] Required if Bicycle model is selected. See manual for details.
Gross Revenue Tax Rate,0, --- [-] Required if Bicycle model is selected. See manual for details.
Investment Tax Credit Rate,0, --- [-] Required if Bicycle model is selected. See manual for details.
Property Tax Rate,0, --- [-] Required if Bicycle model is selected. See manual for details.
Inflation Rate During Construction,0, --- [-]
Well Drilling and Completion Capital Cost Adjustment Factor,1, --- [-] Use built-in well cost correlation as is
Well Drilling Cost Correlation,1, --- [-] Use built-in well drilling cost correlation #1
Reservoir Stimulation Capital Cost,0, --- [M$/injection well] Reservoir stimulation capital cost per injection well
Surface Plant Capital Cost Adjustment Factor,1, --- [-] Use built-in surface plant cost correlation as is
Field Gathering System Capital Cost Adjustment Factor,1, --- [-] Use built-in pipeline distribution cost correlation as is
Exploration Capital Cost Adjustment Factor,1, --- [-] Use built-in exploration cost correlation as is
Wellfield O&M Cost Adjustment Factor,1, --- [-] Use built-in wellfield O&M cost correlation as is
Water Cost Adjustment Factor,1, --- [-] Use built-in water cost correlation as is
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***
***************************

Print Output to Console,1, ---[-] Should be 0 (don't print results) or 1 (print results)
Time steps per year,6, ---[1/year]
Loading

0 comments on commit 269aa89

Please sign in to comment.