Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add GeothermalCosts eqns #1271

Merged
merged 6 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ssc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ set(SSC_SRC
cmod_generic_system-builder.h
cmod_geothermal.cpp
cmod_geothermal_costs.cpp
cmod_geothermal_eqns.cpp
cmod_geothermal_eqns.h
cmod_geothermal_costs_eqns.cpp
cmod_geothermal_costs_eqns.h
cmod_grid.cpp
cmod_grid.h
cmod_hcpv.cpp
Expand Down Expand Up @@ -195,7 +195,7 @@ else()
cmod_financial_eqns.cpp
cmod_windpower_eqns.cpp
cmod_utilityrate5_eqns.cpp
cmod_geothermal_eqns.cpp)
cmod_geothermal_costs_eqns.cpp)
set_source_files_properties(${SRC_UNUSED_VARS} PROPERTIES COMPILE_FLAGS -Wno-unused-variable)
endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "vartab.h"

#include "cmod_geothermal_eqns.h"
#include "cmod_geothermal_costs_eqns.h"
#pragma warning(disable: 4297) // ignore warning: 'function assumed not to throw an exception but does'

bool getem_om_cost_calc(ssc_data_t data)
Expand Down
26 changes: 18 additions & 8 deletions ssc/cmod_geothermal_eqns.h → ssc/cmod_geothermal_costs_eqns.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,26 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
extern "C" {
#endif

static const char* getem_om_cost_calc_doc =
"Calculates the cable length in an ME array\\n"
static const char* getem_om_cost_calc_doc =
"Calculate annual O&M costs for geothermal power plants \\n\\n"
"Input: var_table with key-value pairs\\n"
" 'devices_per_row' - double [-]\\n"
" 'device_spacing_in_row' - double [m]\\n"
" 'number_rows' - double [-]\\n"
" 'row_spacing' - double [m]\\n"
" 'cable_system_overbuild' - double [%]\\n"
" 'gross_output': double [MW]\\n"
" 'conversion_type': double [-]\\n"
" 'baseline_cost': double [$] \\n"
" 'ppi_base_year': double [-] \\n"
" 'cwflow': double [kg/s] \\n"
" 'drilling_cost': double [$] \\n"
" 'field_gathering_system_cost': double [$] \\n"
" 'GF_flowrate': double [kg/s] \\n"
" 'num_wells': double [-] \\n"
" 'water_loss': double [%] \\n"
" 'total_installed_cost': double [$] \\n"
" 'pump_cost_install': double [$] \\n"
" 'pump_only_cost': double [$] \\n"
" 'pump_type': double [-] \\n"
" 'pump_depth': double [m] \\n"
"Output: key-value pairs added to var_table\\n"
" 'inter_array_cable_length' - double [m]\\n";
" 'total_getem_om_cost': double [$]";

SSCEXPORT bool getem_om_cost_calc(ssc_data_t data);

Expand Down
4 changes: 2 additions & 2 deletions ssc/ssc_equations.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "cmod_financial_eqns.h"
#include "cmod_utilityrate5_eqns.h"
#include "cmod_analysisperiodchange_eqns.h"
#include "cmod_geothermal_eqns.h"
#include "cmod_geothermal_costs_eqns.h"

/**
* Returns true if completed successfully. For failures, query the "error" string that has been assigned to the `data`.
Expand Down Expand Up @@ -139,7 +139,7 @@ static ssc_equation_entry ssc_equation_table [] = {

// Geothermal
{"getem_om_cost_calc", getem_om_cost_calc,
"geothermal", getem_om_cost_calc_doc,
"GeothermalCosts", getem_om_cost_calc_doc,
false, true},

// CSP
Expand Down
Loading