diff --git a/shared/lib_geothermal.cpp b/shared/lib_geothermal.cpp index e1dc99538..3158a06e1 100644 --- a/shared/lib_geothermal.cpp +++ b/shared/lib_geothermal.cpp @@ -1538,6 +1538,7 @@ void CGeothermalAnalyzer::WellCountDecisionTable(void) production_stim_well = 0; injection_stim_well = 0; } + break; case 1: if (mo_geo_in.me_rt == HYDROTHERMAL) { production_stim_well = SWDDE; @@ -1555,6 +1556,7 @@ void CGeothermalAnalyzer::WellCountDecisionTable(void) production_stim_well = 0; injection_stim_well = 0; } + break; case 2: if (mo_geo_in.me_rt == HYDROTHERMAL) { production_stim_well = SWDDE; @@ -1568,6 +1570,11 @@ void CGeothermalAnalyzer::WellCountDecisionTable(void) production_stim_well = 0; injection_stim_well = 0; } + break; + case 3: + production_stim_well = 0; + injection_stim_well = 0; + break; } mp_geo_out->ProdWellsExploration = production_stim_well; mp_geo_out->InjWellsExploration = injection_stim_well; @@ -1597,8 +1604,9 @@ double CGeothermalAnalyzer::GetNumberOfWells(void) mp_geo_out->md_PumpWorkWattHrPerLb = GetPumpWorkWattHrPerLb(); mp_geo_out->md_NumberOfWells = mo_geo_in.md_DesiredSalesCapacityKW / netCapacityPerWell; if (mp_geo_out->md_NumberOfWells < 0) mp_geo_out->md_NumberOfWells = 0; - mp_geo_out->md_NumberOfWellsProdExp = (mp_geo_out->md_NumberOfWells > mp_geo_out->ProdWellsExploration) ? mp_geo_out->md_NumberOfWells - mo_geo_in.md_ExplorationWellsProd : 0.0; - mp_geo_out->md_NumberOfWellsProdDrilled = mp_geo_out->md_NumberOfWellsProdExp / (1 - (1 - mo_geo_in.md_StimSuccessRate) * (1 - mo_geo_in.md_DrillSuccessRate)); + mp_geo_out->md_NumberOfWellsProdExp = (mp_geo_out->md_NumberOfWells > mp_geo_out->ProdWellsExploration) ? mp_geo_out->md_NumberOfWells - mp_geo_out->ProdWellsExploration : 0.0; + double prod_well_stim_success_rate = (prod_wells_stimulated) ? mo_geo_in.md_StimSuccessRate : 0.0; + mp_geo_out->md_NumberOfWellsProdDrilled = mp_geo_out->md_NumberOfWellsProdExp / (1 - (1 - prod_well_stim_success_rate) * (1 - mo_geo_in.md_DrillSuccessRate)); double num_prod_wells_successful = mp_geo_out->md_NumberOfWellsProdDrilled * mo_geo_in.md_DrillSuccessRate; double num_prod_wells_failed = mp_geo_out->md_NumberOfWellsProdDrilled * (1 - mo_geo_in.md_DrillSuccessRate); //2. # of Injection Wells Required = # successful injection wells required in drilling phase + # successful injection wells drilled in exploration phase diff --git a/ssc/cmod_geothermal.cpp b/ssc/cmod_geothermal.cpp index 2375400d2..bbc342905 100644 --- a/ssc/cmod_geothermal.cpp +++ b/ssc/cmod_geothermal.cpp @@ -49,6 +49,7 @@ static var_info _cm_vtab_geothermal[] = { { SSC_INPUT, SSC_NUMBER, "drilling_success_rate", "Drilling success rate", "%", "", "GeoHourly", "", "", "" }, { SSC_INPUT, SSC_NUMBER, "stim_success_rate", "Stimulation success rate", "%", "", "GeoHourly", "", "", "" }, { SSC_INPUT, SSC_NUMBER, "failed_prod_flow_ratio", "Failed production well flow ratio", "", "", "GeoHourly", "", "", "" }, + { SSC_INPUT, SSC_NUMBER, "stimulation_type", "Which wells are stimulated", "0/1/2/3", "0=Injection,1=Production,2=Both,3=Neither", "GeoHourly", "?=3", "", "" }, //{ SSC_INOUT, SSC_NUMBER, "baseline_cost", "Baseline cost", "$/kW", "", "GeoHourly", "?=0", "", "" }, @@ -278,6 +279,7 @@ class cm_geothermal : public compute_module geo_inputs.md_FailedProdFlowRatio = as_double("failed_prod_flow_ratio"); geo_inputs.md_DesiredSalesCapacityKW = as_double("nameplate"); geo_inputs.md_NumberOfWells = as_double("num_wells"); + geo_inputs.md_WellsStimulated = as_integer("stimulation_type"); if ( as_integer("analysis_type") == 0) geo_inputs.me_cb = POWER_SALES; else