diff --git a/.gitignore b/.gitignore index 71db5ce..b582d59 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,7 @@ files/defaults/ .mypy_cache *.zip + +*.dll + +*.lib diff --git a/files/SAM_api.dll b/files/SAM_api.dll deleted file mode 100644 index 59dbb3e..0000000 Binary files a/files/SAM_api.dll and /dev/null differ diff --git a/files/SAM_api.lib b/files/SAM_api.lib deleted file mode 100644 index c4d7c2e..0000000 Binary files a/files/SAM_api.lib and /dev/null differ diff --git a/files/ssc.dll b/files/ssc.dll deleted file mode 100644 index 40b0702..0000000 Binary files a/files/ssc.dll and /dev/null differ diff --git a/files/ssc.lib b/files/ssc.lib deleted file mode 100644 index b1878de..0000000 Binary files a/files/ssc.lib and /dev/null differ diff --git a/files/sscd.dll b/files/sscd.dll deleted file mode 100644 index 09e1121..0000000 Binary files a/files/sscd.dll and /dev/null differ diff --git a/files/sscd.lib b/files/sscd.lib deleted file mode 100644 index 41d3a41..0000000 Binary files a/files/sscd.lib and /dev/null differ diff --git a/modules/Geothermal.c b/modules/Geothermal.c index b6fcebc..54339e7 100644 --- a/modules/Geothermal.c +++ b/modules/Geothermal.c @@ -1013,6 +1013,18 @@ GeoHourly_set_stim_success_rate(VarGroupObject *self, PyObject *value, void *clo return PySAM_double_setter(value, SAM_Geothermal_GeoHourly_stim_success_rate_nset, self->data_ptr); } +static PyObject * +GeoHourly_get_stimulation_type(VarGroupObject *self, void *closure) +{ + return PySAM_double_getter(SAM_Geothermal_GeoHourly_stimulation_type_nget, self->data_ptr); +} + +static int +GeoHourly_set_stimulation_type(VarGroupObject *self, PyObject *value, void *closure) +{ + return PySAM_double_setter(value, SAM_Geothermal_GeoHourly_stimulation_type_nset, self->data_ptr); +} + static PyObject * GeoHourly_get_subsurface_water_loss(VarGroupObject *self, void *closure) { @@ -1344,6 +1356,9 @@ static PyGetSetDef GeoHourly_getset[] = { {"stim_success_rate", (getter)GeoHourly_get_stim_success_rate,(setter)GeoHourly_set_stim_success_rate, PyDoc_STR("*float*: Stimulation success rate [%]\n\nThe value of the following variables depends on ``stim_success_rate``:\n\n\t - num_wells_getem\n"), NULL}, +{"stimulation_type", (getter)GeoHourly_get_stimulation_type,(setter)GeoHourly_set_stimulation_type, + PyDoc_STR("*float*: Which wells are stimulated [0/1/2/3]\n\n**Options:**\n0=Injection,1=Production,2=Both,3=Neither\n\n**Required:**\nFalse. Automatically set to 3 if not assigned explicitly or loaded from defaults."), + NULL}, {"subsurface_water_loss", (getter)GeoHourly_get_subsurface_water_loss,(setter)GeoHourly_set_subsurface_water_loss, PyDoc_STR("*float*: Subsurface water loss [%]\n\n**Required:**\nTrue\n\nThe value of the following variables depends on ``subsurface_water_loss``:\n\n\t - num_wells_getem\n"), NULL}, diff --git a/modules/GeothermalCosts.c b/modules/GeothermalCosts.c index f817869..def4bd6 100644 --- a/modules/GeothermalCosts.c +++ b/modules/GeothermalCosts.c @@ -367,6 +367,18 @@ GeoHourly_set_geotherm_cost_prod_cost_curve_welltype(VarGroupObject *self, PyObj return PySAM_double_setter(value, SAM_GeothermalCosts_GeoHourly_geotherm_cost_prod_cost_curve_welltype_nset, self->data_ptr); } +static PyObject * +GeoHourly_get_geotherm_cost_prod_req(VarGroupObject *self, void *closure) +{ + return PySAM_double_getter(SAM_GeothermalCosts_GeoHourly_geotherm_cost_prod_req_nget, self->data_ptr); +} + +static int +GeoHourly_set_geotherm_cost_prod_req(VarGroupObject *self, PyObject *value, void *closure) +{ + return PySAM_double_setter(value, SAM_GeothermalCosts_GeoHourly_geotherm_cost_prod_req_nset, self->data_ptr); +} + static PyObject * GeoHourly_get_geotherm_cost_prod_wells_drilled(VarGroupObject *self, void *closure) { @@ -379,6 +391,42 @@ GeoHourly_set_geotherm_cost_prod_wells_drilled(VarGroupObject *self, PyObject *v return PySAM_double_setter(value, SAM_GeothermalCosts_GeoHourly_geotherm_cost_prod_wells_drilled_nset, self->data_ptr); } +static PyObject * +GeoHourly_get_geotherm_cost_pump_depth(VarGroupObject *self, void *closure) +{ + return PySAM_double_getter(SAM_GeothermalCosts_GeoHourly_geotherm_cost_pump_depth_nget, self->data_ptr); +} + +static int +GeoHourly_set_geotherm_cost_pump_depth(VarGroupObject *self, PyObject *value, void *closure) +{ + return PySAM_double_setter(value, SAM_GeothermalCosts_GeoHourly_geotherm_cost_pump_depth_nset, self->data_ptr); +} + +static PyObject * +GeoHourly_get_geotherm_cost_pump_fixed(VarGroupObject *self, void *closure) +{ + return PySAM_double_getter(SAM_GeothermalCosts_GeoHourly_geotherm_cost_pump_fixed_nget, self->data_ptr); +} + +static int +GeoHourly_set_geotherm_cost_pump_fixed(VarGroupObject *self, PyObject *value, void *closure) +{ + return PySAM_double_setter(value, SAM_GeothermalCosts_GeoHourly_geotherm_cost_pump_fixed_nset, self->data_ptr); +} + +static PyObject * +GeoHourly_get_geotherm_cost_pump_per_foot(VarGroupObject *self, void *closure) +{ + return PySAM_double_getter(SAM_GeothermalCosts_GeoHourly_geotherm_cost_pump_per_foot_nget, self->data_ptr); +} + +static int +GeoHourly_set_geotherm_cost_pump_per_foot(VarGroupObject *self, PyObject *value, void *closure) +{ + return PySAM_double_setter(value, SAM_GeothermalCosts_GeoHourly_geotherm_cost_pump_per_foot_nset, self->data_ptr); +} + static PyObject * GeoHourly_get_geotherm_cost_stim_non_drill(VarGroupObject *self, void *closure) { @@ -427,6 +475,30 @@ GeoHourly_set_hp_flash_pressure(VarGroupObject *self, PyObject *value, void *clo return PySAM_double_setter(value, SAM_GeothermalCosts_GeoHourly_hp_flash_pressure_nset, self->data_ptr); } +static PyObject * +GeoHourly_get_inj_num_pumps(VarGroupObject *self, void *closure) +{ + return PySAM_double_getter(SAM_GeothermalCosts_GeoHourly_inj_num_pumps_nget, self->data_ptr); +} + +static int +GeoHourly_set_inj_num_pumps(VarGroupObject *self, PyObject *value, void *closure) +{ + return PySAM_double_setter(value, SAM_GeothermalCosts_GeoHourly_inj_num_pumps_nset, self->data_ptr); +} + +static PyObject * +GeoHourly_get_inj_pump_hp(VarGroupObject *self, void *closure) +{ + return PySAM_double_getter(SAM_GeothermalCosts_GeoHourly_inj_pump_hp_nget, self->data_ptr); +} + +static int +GeoHourly_set_inj_pump_hp(VarGroupObject *self, PyObject *value, void *closure) +{ + return PySAM_double_setter(value, SAM_GeothermalCosts_GeoHourly_inj_pump_hp_nset, self->data_ptr); +} + static PyObject * GeoHourly_get_lp_flash_pressure(VarGroupObject *self, void *closure) { @@ -499,6 +571,18 @@ GeoHourly_set_pressure_ratio_3(VarGroupObject *self, PyObject *value, void *clos return PySAM_double_setter(value, SAM_GeothermalCosts_GeoHourly_pressure_ratio_3_nset, self->data_ptr); } +static PyObject * +GeoHourly_get_pump_size_hp(VarGroupObject *self, void *closure) +{ + return PySAM_double_getter(SAM_GeothermalCosts_GeoHourly_pump_size_hp_nget, self->data_ptr); +} + +static int +GeoHourly_set_pump_size_hp(VarGroupObject *self, PyObject *value, void *closure) +{ + return PySAM_double_setter(value, SAM_GeothermalCosts_GeoHourly_pump_size_hp_nset, self->data_ptr); +} + static PyObject * GeoHourly_get_qCondenser(VarGroupObject *self, void *closure) { @@ -690,22 +774,22 @@ static PyGetSetDef GeoHourly_getset[] = { PyDoc_STR("*float*: Flash Count [(1 -2)]\n\n**Required:**\nRequired if conversion_type=1"), NULL}, {"geotherm_cost_conf_multiplier", (getter)GeoHourly_get_geotherm_cost_conf_multiplier,(setter)GeoHourly_set_geotherm_cost_conf_multiplier, - PyDoc_STR("*float*: Confirmation cost multiplier\n\n**Options:**\n?=1.2\n\n**Required:**\nRequired if calc_drill_costs=1"), + PyDoc_STR("*float*: Confirmation cost multiplier\n\n**Required:**\nRequired if calc_drill_costs=1"), NULL}, {"geotherm_cost_conf_non_drill", (getter)GeoHourly_get_geotherm_cost_conf_non_drill,(setter)GeoHourly_set_geotherm_cost_conf_non_drill, - PyDoc_STR("*float*: Confirmation non drilling costs [$]\n\n**Options:**\n?=250000\n\n**Required:**\nRequired if calc_drill_costs=1"), + PyDoc_STR("*float*: Confirmation non drilling costs [$]\n\n**Required:**\nRequired if calc_drill_costs=1"), NULL}, {"geotherm_cost_conf_num_wells", (getter)GeoHourly_get_geotherm_cost_conf_num_wells,(setter)GeoHourly_set_geotherm_cost_conf_num_wells, - PyDoc_STR("*float*: Number of confirmation wells\n\n**Options:**\n?=2\n\n**Required:**\nRequired if calc_drill_costs=1"), + PyDoc_STR("*float*: Number of confirmation wells\n\n**Required:**\nRequired if calc_drill_costs=1"), NULL}, {"geotherm_cost_expl_multiplier", (getter)GeoHourly_get_geotherm_cost_expl_multiplier,(setter)GeoHourly_set_geotherm_cost_expl_multiplier, - PyDoc_STR("*float*: Exploration cost multiplier\n\n**Options:**\n?=0.5\n\n**Required:**\nRequired if calc_drill_costs=1"), + PyDoc_STR("*float*: Exploration cost multiplier\n\n**Required:**\nRequired if calc_drill_costs=1"), NULL}, {"geotherm_cost_expl_non_drill", (getter)GeoHourly_get_geotherm_cost_expl_non_drill,(setter)GeoHourly_set_geotherm_cost_expl_non_drill, - PyDoc_STR("*float*: Exploration non drilling costs [$]\n\n**Options:**\n?=750000\n\n**Required:**\nRequired if calc_drill_costs=1"), + PyDoc_STR("*float*: Exploration non drilling costs [$]\n\n**Required:**\nRequired if calc_drill_costs=1"), NULL}, {"geotherm_cost_expl_num_wells", (getter)GeoHourly_get_geotherm_cost_expl_num_wells,(setter)GeoHourly_set_geotherm_cost_expl_num_wells, - PyDoc_STR("*float*: Number of exploration wells\n\n**Options:**\n?=2\n\n**Required:**\nRequired if calc_drill_costs=1"), + PyDoc_STR("*float*: Number of exploration wells\n\n**Required:**\nRequired if calc_drill_costs=1"), NULL}, {"geotherm_cost_inj_cost_curve", (getter)GeoHourly_get_geotherm_cost_inj_cost_curve,(setter)GeoHourly_set_geotherm_cost_inj_cost_curve, PyDoc_STR("*float*: Injection well diameter type [0/1]\n\n**Options:**\n0=LargerDiameter,1=SmallerDiameter\n\n**Required:**\nRequired if calc_drill_costs=1"), @@ -728,11 +812,23 @@ static PyGetSetDef GeoHourly_getset[] = { {"geotherm_cost_prod_cost_curve_welltype", (getter)GeoHourly_get_geotherm_cost_prod_cost_curve_welltype,(setter)GeoHourly_set_geotherm_cost_prod_cost_curve_welltype, PyDoc_STR("*float*: Production well type [0/1]\n\n**Required:**\nRequired if calc_drill_costs=1"), NULL}, +{"geotherm_cost_prod_req", (getter)GeoHourly_get_geotherm_cost_prod_req,(setter)GeoHourly_set_geotherm_cost_prod_req, + PyDoc_STR("*float*: Number of production wells required"), + NULL}, {"geotherm_cost_prod_wells_drilled", (getter)GeoHourly_get_geotherm_cost_prod_wells_drilled,(setter)GeoHourly_set_geotherm_cost_prod_wells_drilled, PyDoc_STR("*float*: Number of drilled production wells [0/1]\n\n**Options:**\n0=LargerDiameter,1=SmallerDiameter\n\n**Required:**\nRequired if calc_drill_costs=1"), NULL}, +{"geotherm_cost_pump_depth", (getter)GeoHourly_get_geotherm_cost_pump_depth,(setter)GeoHourly_set_geotherm_cost_pump_depth, + PyDoc_STR("*float*: Pump depth [ft]"), + NULL}, +{"geotherm_cost_pump_fixed", (getter)GeoHourly_get_geotherm_cost_pump_fixed,(setter)GeoHourly_set_geotherm_cost_pump_fixed, + PyDoc_STR("*float*: Fixed pump workover and casing cost [$]"), + NULL}, +{"geotherm_cost_pump_per_foot", (getter)GeoHourly_get_geotherm_cost_pump_per_foot,(setter)GeoHourly_set_geotherm_cost_pump_per_foot, + PyDoc_STR("*float*: Pump cost per foot [$/ft]"), + NULL}, {"geotherm_cost_stim_non_drill", (getter)GeoHourly_get_geotherm_cost_stim_non_drill,(setter)GeoHourly_set_geotherm_cost_stim_non_drill, - PyDoc_STR("*float*: Stimulation non drilling costs [$]\n\n**Options:**\n?=0\n\n**Required:**\nRequired if calc_drill_costs=1"), + PyDoc_STR("*float*: Stimulation non drilling costs [$]\n\n**Required:**\nRequired if calc_drill_costs=1"), NULL}, {"gross_cost_output", (getter)GeoHourly_get_gross_cost_output,(setter)GeoHourly_set_gross_cost_output, PyDoc_STR("*float*: Gross output from GETEM for cost calculations [MW]\n\n**Required:**\nTrue"), @@ -743,6 +839,12 @@ static PyGetSetDef GeoHourly_getset[] = { {"hp_flash_pressure", (getter)GeoHourly_get_hp_flash_pressure,(setter)GeoHourly_set_hp_flash_pressure, PyDoc_STR("*float*: HP Flash Pressure [psia]\n\n**Required:**\nRequired if conversion_type=1"), NULL}, +{"inj_num_pumps", (getter)GeoHourly_get_inj_num_pumps,(setter)GeoHourly_set_inj_num_pumps, + PyDoc_STR("*float*: Number of injection pumps [p]"), + NULL}, +{"inj_pump_hp", (getter)GeoHourly_get_inj_pump_hp,(setter)GeoHourly_set_inj_pump_hp, + PyDoc_STR("*float*: Injection pump power [hp]"), + NULL}, {"lp_flash_pressure", (getter)GeoHourly_get_lp_flash_pressure,(setter)GeoHourly_set_lp_flash_pressure, PyDoc_STR("*float*: LP Flash Pressure [psia]\n\n**Required:**\nRequired if conversion_type=1"), NULL}, @@ -761,6 +863,9 @@ static PyGetSetDef GeoHourly_getset[] = { {"pressure_ratio_3", (getter)GeoHourly_get_pressure_ratio_3,(setter)GeoHourly_set_pressure_ratio_3, PyDoc_STR("*float*: Suction Steam Ratio 3\n\n**Required:**\nRequired if conversion_type=1"), NULL}, +{"pump_size_hp", (getter)GeoHourly_get_pump_size_hp,(setter)GeoHourly_set_pump_size_hp, + PyDoc_STR("*float*: Production pump power [hp]"), + NULL}, {"qCondenser", (getter)GeoHourly_get_qCondenser,(setter)GeoHourly_set_qCondenser, PyDoc_STR("*float*: Condenser Heat Rejected [btu/h]\n\n**Required:**\nRequired if conversion_type=1"), NULL}, @@ -963,6 +1068,18 @@ Outputs_get_stim_total_cost(VarGroupObject *self, void *closure) return PySAM_double_getter(SAM_GeothermalCosts_Outputs_stim_total_cost_nget, self->data_ptr); } +static PyObject * +Outputs_get_total_gathering_cost(VarGroupObject *self, void *closure) +{ + return PySAM_double_getter(SAM_GeothermalCosts_Outputs_total_gathering_cost_nget, self->data_ptr); +} + +static PyObject * +Outputs_get_total_pump_cost(VarGroupObject *self, void *closure) +{ + return PySAM_double_getter(SAM_GeothermalCosts_Outputs_total_pump_cost_nget, self->data_ptr); +} + static PyGetSetDef Outputs_getset[] = { {"baseline_cost", (getter)Outputs_get_baseline_cost,(setter)0, PyDoc_STR("*float*: Baseline cost [$/kW]"), @@ -985,6 +1102,12 @@ static PyGetSetDef Outputs_getset[] = { {"stim_total_cost", (getter)Outputs_get_stim_total_cost,(setter)0, PyDoc_STR("*float*: Total stimulation well cost [$]"), NULL}, +{"total_gathering_cost", (getter)Outputs_get_total_gathering_cost,(setter)0, + PyDoc_STR("*float*: Total gathering well cost [$/kW]"), + NULL}, +{"total_pump_cost", (getter)Outputs_get_total_pump_cost,(setter)0, + PyDoc_STR("*float*: Total pumping cost [$/kW]"), + NULL}, {NULL} /* Sentinel */ }; diff --git a/stubs/stubs/Geothermal.pyi b/stubs/stubs/Geothermal.pyi index 3c5652a..801fab4 100644 --- a/stubs/stubs/Geothermal.pyi +++ b/stubs/stubs/Geothermal.pyi @@ -112,6 +112,7 @@ class Geothermal(object): startup_frac = float startup_time = float stim_success_rate = float + stimulation_type = float subsurface_water_loss = float system_use_lifetime_output = float temp_decline_max = float diff --git a/stubs/stubs/GeothermalCosts.pyi b/stubs/stubs/GeothermalCosts.pyi index c55c6a0..31db8e9 100644 --- a/stubs/stubs/GeothermalCosts.pyi +++ b/stubs/stubs/GeothermalCosts.pyi @@ -60,17 +60,24 @@ class GeothermalCosts(object): geotherm_cost_prod_cost_curve = float geotherm_cost_prod_cost_curve_welldiam = float geotherm_cost_prod_cost_curve_welltype = float + geotherm_cost_prod_req = float geotherm_cost_prod_wells_drilled = float + geotherm_cost_pump_depth = float + geotherm_cost_pump_fixed = float + geotherm_cost_pump_per_foot = float geotherm_cost_stim_non_drill = float gross_cost_output = float gross_output = float hp_flash_pressure = float + inj_num_pumps = float + inj_pump_hp = float lp_flash_pressure = float ncg_condensate_pump = float ppi_base_year = float pressure_ratio_1 = float pressure_ratio_2 = float pressure_ratio_3 = float + pump_size_hp = float qCondenser = float qRejectByStage_1 = float qRejectByStage_2 = float @@ -104,6 +111,8 @@ class GeothermalCosts(object): inj_total_cost = float prod_total_cost = float stim_total_cost = float + total_gathering_cost = float + total_pump_cost = float