Skip to content

Commit

Permalink
Merge branch 'develop' into trough_UI_callback
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorbrown75 committed Nov 29, 2023
2 parents cfdc07c + a7c0c9e commit e8c2879
Show file tree
Hide file tree
Showing 485 changed files with 299,554 additions and 114,936 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ jobs:
- name: Install wxWidgets
run: |
wget -q https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.0/wxWidgets-3.2.0.tar.bz2
tar jxf wxWidgets-3.2.0.tar.bz2
cd wxWidgets-3.2.0
./configure --prefix=$HOME/wx-3.2.0 --enable-shared=no --enable-stl=yes --enable-debug=no --with-gtk=2 --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin --without-libjbig --without-liblzma --without-gtkprint --with-libnotify=no --with-libmspack=no --with-gnomevfs=no --with-opengl=yes --with-sdl=no --with-cxx=11
wget -q https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.3/wxWidgets-3.2.3.tar.bz2
tar jxf wxWidgets-3.2.3.tar.bz2
cd wxWidgets-3.2.3
./configure --prefix=$HOME/wx-3.2.3 --enable-shared=no --enable-stl=yes --enable-debug=no --with-gtk=2 --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin --without-libjbig --without-liblzma --without-gtkprint --with-libnotify=no --with-libmspack=no --with-gnomevfs=no --with-opengl=yes --with-sdl=no --with-cxx=11
make -j2 all install
sudo ln -s $HOME/wx-3.2.0/bin/wx-config /usr/local/bin/wx-config-3
ls $HOME/wx-3.2.0/bin
sudo ln -s $HOME/wx-3.2.3/bin/wx-config /usr/local/bin/wx-config-3
ls $HOME/wx-3.2.3/bin
wx-config-3 --cflags
- name: Add wxWidgets to path
run: echo ${HOME}/wx-3.2.0/bin >> $GITHUB_PATH
run: echo ${HOME}/wx-3.2.3/bin >> $GITHUB_PATH

- name: Checkout lk
uses: actions/checkout@v2
Expand Down Expand Up @@ -219,14 +219,14 @@ jobs:
- name: Install wxWidgets
run: |
wget -q https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.0/wxWidgets-3.2.0.tar.bz2
tar jxf wxWidgets-3.2.0.tar.bz2
cd wxWidgets-3.2.0
./configure --prefix=$HOME/local/wx-3.2.0/Release --enable-stl=yes --enable-shared=no --disable-debug_flag --with-cocoa --enable-universal_binary=x86_64,arm64 --enable-unicode --enable-webview --disable-mediactrl --with-cxx=11 --with-macosx-version-min=10.15 --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin
wget -q https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.3/wxWidgets-3.2.3.tar.bz2
tar jxf wxWidgets-3.2.3.tar.bz2
cd wxWidgets-3.2.3
./configure --prefix=$HOME/local/wx-3.2.3/Release --enable-stl=yes --enable-shared=no --disable-debug_flag --with-cocoa --enable-universal_binary=x86_64,arm64 --enable-unicode --enable-webview --disable-mediactrl --with-cxx=11 --with-macosx-version-min=10.15 --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin
make clean
make -j4
make install
ln -s $HOME/local/wx-3.2.0/Release/bin/wx-config /usr/local/bin/wx-config-3
ln -s $HOME/local/wx-3.2.3/Release/bin/wx-config /usr/local/bin/wx-config-3
wx-config-3 --cflags
- name: Checkout lk
Expand Down
31 changes: 3 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The desktop version of SAM for Windows, Mac, or Linux builds from the following

* [LK](https://github.com/nrel/lk) is a scripting language that is integrated into SAM. SAM's user interface uses LK to calculate values to display on input pages. The user interface includes a script editor that allows users to write their own scripts from the user interface.

* [wxWidgets](https://www.wxwidgets.org/) is a cross-platform graphical user interface platform used for SAM's user interface, and for the development tools included with SSC (SDKtool) and LK (LKscript). The current version of SAM uses wxWidgets 3.1.5.
* [wxWidgets](https://www.wxwidgets.org/) is a cross-platform graphical user interface platform used for SAM's user interface, and for the development tools included with SSC (SDKtool) and LK (LKscript).

* [WEX](https://github.com/nrel/wex) is a set of extensions to wxWidgets for custom user-interface elements developed specifically for SAM, LK script, and DView.

Expand All @@ -28,39 +28,14 @@ This repository, **SAM**, contains the code for SAM's user interface that assign

The SAM repository also includes [two libraries](https://github.com/NREL/SAM/tree/develop/Sandia) from Sandia National Laboratories, [stepwise](https://dakota.sandia.gov/content/packages/stepwise), and [LHS](https://dakota.sandia.gov/content/packages/lhs), which are distributed as part of the Dakota platform, licensed under [LGPL](https://www.gnu.org/licenses/lgpl-3.0.en.html).

# Quick Steps for Building SAM
# Building SAM

For detailed build instructions see the [wiki](https://github.com/NREL/SAM/wiki) with specific instructions for:
For build instructions see the [wiki](https://github.com/NREL/SAM/wiki) with specific instructions for:

* [Windows](https://github.com/NREL/SAM/wiki/Windows-Build-Instructions)
* [Mac](https://github.com/NREL/SAM/wiki/Mac-Build-Instructions)
* [Linux](https://github.com/NREL/SAM/wiki/Linux-Build-Instructions)

These are the general quick steps you need to follow to set up your computer for developing SAM:

1. Set up your development tools:

* Windows: Visual Studio 2019 Community or other editions available at https://www.visualstudio.com/.
* Mac: Apple Command Line Tools, available at https://developer.apple.com/download/more/ (requires Apple ID and password).
* Linux: g++ compiler available at [https://gcc.gnu.org](https://gcc.gnu.org/) or installed via your Linux distribution.

2. Download the wxWidgets 3.1.5 source code for your operating system from https://www.wxwidgets.org/downloads/.

3. Build wxWidgets.

5. In Windows, create the WXMSW3 environment variable on your computer to point to the wxWidgets installation folder, or in MacOS and Linux, create the dynamic link `/usr/<USERNAME>/local/bin/wx-config-3` to point to `/path/to/wxWidgets/bin/wx-config`.

6. As you did for wxWidgets, for each of the following projects, clone (download) the repository, build the project, and then (Windows only) create an environment variable pointing to the project folder. Build the projects in the following order, and assign the environment variable for each project before you build the next one:

<table>
<tr><th>Project</th><th>Repository URL</th><th>Windows Environment Variable</th></tr>
<tr><td>LK</td><td>https://github.com/NREL/lk</td><td>LKDIR</td></tr>
<tr><td>WEX</td><td>https://github.com/NREL/wex</td><td>WEXDIR</td></tr>
<tr><td>SSC</td><td>https://github.com/NREL/ssc</td><td>SSCDIR</td></tr>
<tr><td>SAM</td><td>https://github.com/NREL/SAM</td><td>SAMNTDIR</td></tr>
<tr><td>Google Test</td><td>https://github.com/google/googletest</td><td>GTEST</td></tr>
</table>

# Contributing

If you would like to report an issue with SAM or make a feature request, please let us know by adding a new issue on the [issues page](https://github.com/NREL/SAM/issues).
Expand Down
7 changes: 3 additions & 4 deletions api/api_autogen/data_structures.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ static std::unordered_map<std::string, std::string> config_to_cmod_name = {
{"DishStirling", "Tcsdish"},
{"DSGLIPH", "LinearFresnelDsgIph"},
{"DSLF", "TcslinearFresnel"},
{"DSPT", "TcsdirectSteam"},
{"EmpiricalTrough", "TcstroughEmpirical"},
{"ETES", "EtesElectricResistance"},
{"PTES", "EtesPtes"},
Expand All @@ -191,17 +190,17 @@ static std::unordered_map<std::string, std::string> config_to_cmod_name = {
{"GeothermalPower", "Geothermal"},
{"HighXConcentratingPV", "Hcpv"},
{"HostDeveloper", "HostDeveloper"},
{"ISCC", "Tcsiscc"},
{"LCOECalculator", "Lcoefcr"},
{"LCOHCalculator", "IphToLcoefcr"},
{"LeveragedPartnershipFlip", "Levpartflip"},
{"MerchantPlant", "MerchantPlant"},
{"MEtidal", "METidal"},
{"MEwave", "MEWave"},
{"MEwaveBattery", "MEWaveBattery"},
{"MSLF", "TcsMSLF"},
{"MSLF", "FresnelPhysical"},
{"MSLFIPH", "FresnelPhysicalIph"},
{"MSPT", "TcsmoltenSalt"},
{"MSPTV2", "TcsmoltenSalt"},
{"MSPTIPH", "MsptIph"},
{"None", "None"},
{"PhysicalTrough", "TroughPhysical"},
{"PhysicalTroughIPH", "TroughPhysicalProcessHeat"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"reserves_interest": 1.25,
"salvage_percentage": 0,
"state_tax_rate": [7.000000],
"system_capacity": 31512.4
"system_capacity": 31448.9
},
"SystemCosts": {
"om_capacity": [175.000000],
Expand All @@ -66,7 +66,7 @@
"om_fixed_escal": 0,
"om_production": [0.000000],
"om_production_escal": 0,
"total_installed_cost": 1.33019e+08
"total_installed_cost": 1.31e+08
},
"LandLease": {
},
Expand Down Expand Up @@ -227,14 +227,14 @@
"SystemOutput": {
"degradation": [0.000000],
"gen": [0.000000],
"system_capacity": 31512.4
"system_capacity": 31448.9
},
"ElectricityRates": {
"en_electricity_rates": 0,
"rate_escalation": [0.000000]
},
"Recapitalization": {
"system_recapitalization_cost": 3.93029e+07,
"system_recapitalization_cost": 3.7765e+07,
"system_use_recapitalization": 1
},
"TimeOfDelivery": {
Expand All @@ -243,7 +243,7 @@
"UtilityBill": {
},
"ConstructionFinancing": {
"construction_financing_cost": 1.23708e+07
"construction_financing_cost": 1.2183e+07
},
"OtherCapitalCosts": {
"cost_dev_fee_percent": 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
"fracture_length": 1000,
"fracture_spacing": 50,
"fracture_width": 175,
"geotherm_cost_inj_cost_curve_welldiam": 0,
"geotherm_cost_inj_cost_curve_welltype": 0,
"geotherm_cost_inj_prod_well_ratio": 0.75,
"geotherm_cost_prod_cost_curve_welldiam": 0,
"geotherm_cost_prod_cost_curve_welltype": 0,
"geothermal_analysis_period": 25,
"hc_ctl1": 0,
Expand All @@ -50,7 +52,7 @@
"nameplate": 30000,
"num_fractures": 6,
"num_wells": 3,
"num_wells_getem": 6.14888,
"num_wells_getem": 5.84949,
"pb_bd_frac": 0.013,
"plant_efficiency_input": 80,
"prod_well_choice": 0,
Expand Down Expand Up @@ -175,7 +177,7 @@
"ui_calculations_only": 0,
"well_diameter": 10,
"well_flow_rate": 70,
"wet_bulb_temp": 15
"wet_bulb_temp": 0
},
"AdjustmentFactors": {
"adjust_constant": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
"fracture_length": 1000,
"fracture_spacing": 50,
"fracture_width": 175,
"geotherm_cost_inj_cost_curve_welldiam": 0,
"geotherm_cost_inj_cost_curve_welltype": 0,
"geotherm_cost_inj_prod_well_ratio": 0.5,
"geotherm_cost_prod_cost_curve_welldiam": 0,
"geotherm_cost_prod_cost_curve_welltype": 0,
"geothermal_analysis_period": 30,
"hc_ctl1": 0,
Expand All @@ -50,7 +52,7 @@
"nameplate": 30000,
"num_fractures": 6,
"num_wells": 3,
"num_wells_getem": 4.31952,
"num_wells_getem": 4.08881,
"pb_bd_frac": 0.013,
"plant_efficiency_input": 80,
"prod_well_choice": 0,
Expand Down Expand Up @@ -175,7 +177,7 @@
"ui_calculations_only": 0,
"well_diameter": 12.25,
"well_flow_rate": 110,
"wet_bulb_temp": 15
"wet_bulb_temp": 0
},
"AdjustmentFactors": {
"adjust_constant": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
"fracture_length": 1000,
"fracture_spacing": 50,
"fracture_width": 175,
"geotherm_cost_inj_cost_curve_welldiam": 0,
"geotherm_cost_inj_cost_curve_welltype": 0,
"geotherm_cost_inj_prod_well_ratio": 0.75,
"geotherm_cost_prod_cost_curve_welldiam": 0,
"geotherm_cost_prod_cost_curve_welltype": 0,
"geothermal_analysis_period": 25,
"hc_ctl1": 0,
Expand All @@ -50,7 +52,7 @@
"nameplate": 30000,
"num_fractures": 6,
"num_wells": 3,
"num_wells_getem": 4.13225,
"num_wells_getem": 3.92045,
"pb_bd_frac": 0.013,
"plant_efficiency_input": 80,
"prod_well_choice": 0,
Expand Down Expand Up @@ -175,7 +177,7 @@
"ui_calculations_only": 0,
"well_diameter": 12.25,
"well_flow_rate": 110,
"wet_bulb_temp": 15
"wet_bulb_temp": 0
},
"AdjustmentFactors": {
"adjust_constant": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
"fracture_length": 1000,
"fracture_spacing": 50,
"fracture_width": 175,
"geotherm_cost_inj_cost_curve_welldiam": 0,
"geotherm_cost_inj_cost_curve_welltype": 0,
"geotherm_cost_inj_prod_well_ratio": 0.75,
"geotherm_cost_prod_cost_curve_welldiam": 0,
"geotherm_cost_prod_cost_curve_welltype": 0,
"geothermal_analysis_period": 25,
"hc_ctl1": 0,
Expand All @@ -50,7 +52,7 @@
"nameplate": 30000,
"num_fractures": 6,
"num_wells": 3,
"num_wells_getem": 6.14888,
"num_wells_getem": 5.84949,
"pb_bd_frac": 0.013,
"plant_efficiency_input": 80,
"prod_well_choice": 0,
Expand Down Expand Up @@ -175,7 +177,7 @@
"ui_calculations_only": 0,
"well_diameter": 10,
"well_flow_rate": 70,
"wet_bulb_temp": 15
"wet_bulb_temp": 0
},
"AdjustmentFactors": {
"adjust_constant": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
"fracture_length": 1000,
"fracture_spacing": 50,
"fracture_width": 175,
"geotherm_cost_inj_cost_curve_welldiam": 0,
"geotherm_cost_inj_cost_curve_welltype": 0,
"geotherm_cost_inj_prod_well_ratio": 0.5,
"geotherm_cost_prod_cost_curve_welldiam": 0,
"geotherm_cost_prod_cost_curve_welltype": 0,
"geothermal_analysis_period": 30,
"hc_ctl1": 0,
Expand All @@ -50,7 +52,7 @@
"nameplate": 30000,
"num_fractures": 6,
"num_wells": 3,
"num_wells_getem": 4.31952,
"num_wells_getem": 4.08881,
"pb_bd_frac": 0.013,
"plant_efficiency_input": 80,
"prod_well_choice": 0,
Expand Down Expand Up @@ -175,7 +177,7 @@
"ui_calculations_only": 0,
"well_diameter": 12.25,
"well_flow_rate": 110,
"wet_bulb_temp": 15
"wet_bulb_temp": 0
},
"AdjustmentFactors": {
"adjust_constant": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
"fracture_length": 1000,
"fracture_spacing": 50,
"fracture_width": 175,
"geotherm_cost_inj_cost_curve_welldiam": 0,
"geotherm_cost_inj_cost_curve_welltype": 0,
"geotherm_cost_inj_prod_well_ratio": 0.75,
"geotherm_cost_prod_cost_curve_welldiam": 0,
"geotherm_cost_prod_cost_curve_welltype": 0,
"geothermal_analysis_period": 25,
"hc_ctl1": 0,
Expand All @@ -50,7 +52,7 @@
"nameplate": 30000,
"num_fractures": 6,
"num_wells": 3,
"num_wells_getem": 4.13225,
"num_wells_getem": 3.92045,
"pb_bd_frac": 0.013,
"plant_efficiency_input": 80,
"prod_well_choice": 0,
Expand Down Expand Up @@ -175,7 +177,7 @@
"ui_calculations_only": 0,
"well_diameter": 12.25,
"well_flow_rate": 110,
"wet_bulb_temp": 15
"wet_bulb_temp": 0
},
"AdjustmentFactors": {
"adjust_constant": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
"fracture_length": 1000,
"fracture_spacing": 50,
"fracture_width": 175,
"geotherm_cost_inj_cost_curve_welldiam": 0,
"geotherm_cost_inj_cost_curve_welltype": 0,
"geotherm_cost_inj_prod_well_ratio": 0.75,
"geotherm_cost_prod_cost_curve_welldiam": 0,
"geotherm_cost_prod_cost_curve_welltype": 0,
"geothermal_analysis_period": 25,
"hc_ctl1": 0,
Expand All @@ -50,7 +52,7 @@
"nameplate": 30000,
"num_fractures": 6,
"num_wells": 3,
"num_wells_getem": 4.13225,
"num_wells_getem": 4.25798,
"pb_bd_frac": 0.013,
"plant_efficiency_input": 80,
"prod_well_choice": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"defaults": {
"SimpleLCOE": {
"annual_energy": 0,
"capital_cost": 1.75639e+08,
"capital_cost": 1.74415e+08,
"fixed_charge_rate": 0.098,
"fixed_operating_cost": 4.97452e+06,
"fixed_operating_cost": 4.93987e+06,
"variable_operating_cost": 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"defaults": {
"SimpleLCOE": {
"annual_energy": 0,
"capital_cost": 1.49331e+07,
"capital_cost": 1.52173e+07,
"fixed_charge_rate": 0.108,
"fixed_operating_cost": 1.36208e+06,
"variable_operating_cost": 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"defaults": {
"SimpleLCOE": {
"annual_energy": 0,
"capital_cost": 4.07204e+08,
"capital_cost": 4.04642e+08,
"fixed_charge_rate": 0.108,
"fixed_operating_cost": 5.43132e+06,
"variable_operating_cost": 0
Expand Down
Loading

0 comments on commit e8c2879

Please sign in to comment.