From a6eca2d85ca85d2e96b313f48b22cc5ce7cb2d26 Mon Sep 17 00:00:00 2001 From: Matt Prilliman <54449384+mjprilliman@users.noreply.github.com> Date: Thu, 16 Jan 2025 17:01:56 -0600 Subject: [PATCH] Add surface costs output from costs for input to O&M --- shared/lib_geothermal.cpp | 1 + ssc/cmod_geothermal_costs.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/lib_geothermal.cpp b/shared/lib_geothermal.cpp index 8c3af5b2d..35c3c04d4 100644 --- a/shared/lib_geothermal.cpp +++ b/shared/lib_geothermal.cpp @@ -824,6 +824,7 @@ double CGeothermalAnalyzer::GetInjectionPumpWorkft(void) double injection_pump_head_psi = -excess_pressure + reservoir_buildup + mo_geo_in.md_AdditionalPressure; mo_geo_in.md_InjWellPressurePSI = injection_pump_head_psi; double injection_pump_head_ft = injection_pump_head_psi * 144 / InjectionDensity(); + if (injection_pump_head_ft < 0) injection_pump_head_ft = 0; double P_inject_bottomhole_used = injection_pump_head_psi + bottom_hole_pressure; //double pump_inj_hp = (injection_pump_head_ft * (flowRateTotal() / mo_geo_in.md_RatioInjectionToProduction / 2500) / (60 * 33000)) / mo_geo_in.md_GFPumpEfficiency; //mp_geo_out->md_InjPump_hp = pump_inj_hp; diff --git a/ssc/cmod_geothermal_costs.cpp b/ssc/cmod_geothermal_costs.cpp index de14aae56..b69f75127 100644 --- a/ssc/cmod_geothermal_costs.cpp +++ b/ssc/cmod_geothermal_costs.cpp @@ -124,6 +124,7 @@ static var_info _cm_vtab_geothermal_costs[] = { { SSC_OUTPUT, SSC_NUMBER, "total_pump_gathering_cost", "Total pump and field gathering system cost", "$", "", "GeoHourly", "?", "", "" }, { SSC_OUTPUT, SSC_NUMBER, "pump_only_cost", "Production pump cost per well", "$/well", "", "GeoHourly", "?", "", "" }, { SSC_OUTPUT, SSC_NUMBER, "pump_cost_install", "Production pump installation cost", "$/well", "", "GeoHourly", "?", "", "" }, + { SSC_OUTPUT, SSC_NUMBER, "total_surface_equipment_cost", "Total surface equipment cost", "$", "", "GeoHourly", "?", "", "" }, var_info_invalid }; @@ -907,7 +908,7 @@ class cm_geothermal_costs : public compute_module double prod_wells_failed = as_double("num_wells_getem_prod_failed"); double gathering_cost_total = piping_cost_per_well * (num_prod_wells + inj_wells_drilled + prod_wells_failed); assign("total_gathering_cost", var_data(static_cast(gathering_cost_total))); - + assign("total_surface_equipment_cost", var_data(static_cast(gathering_cost_total + injection_pump_cost))); double indirect_pump_gathering_cost = (total_pump_cost + gathering_cost_total) * (1.0 / (1 - 0.12) - 1); assign("indirect_pump_gathering_cost", var_data(static_cast(indirect_pump_gathering_cost)));