From b173cf1107ba07d40bebbf6838395004e503e133 Mon Sep 17 00:00:00 2001 From: misi9170 Date: Tue, 7 May 2024 14:01:48 -0600 Subject: [PATCH] Add example files. --- .../100MW_1axis_pvsamv1.json | 970 ++++++++++++++++++ examples/simple_hybrid_plant/amr_input.inp | 163 +++ examples/simple_hybrid_plant/bash_script.sh | 18 + .../simple_hybrid_plant/floris_runscript.py | 14 + .../hercules_input_000.yaml | 71 ++ .../hercules_runscript_windsolarstorage.py | 52 + 6 files changed, 1288 insertions(+) create mode 100644 examples/simple_hybrid_plant/100MW_1axis_pvsamv1.json create mode 100644 examples/simple_hybrid_plant/amr_input.inp create mode 100755 examples/simple_hybrid_plant/bash_script.sh create mode 100644 examples/simple_hybrid_plant/floris_runscript.py create mode 100644 examples/simple_hybrid_plant/hercules_input_000.yaml create mode 100644 examples/simple_hybrid_plant/hercules_runscript_windsolarstorage.py diff --git a/examples/simple_hybrid_plant/100MW_1axis_pvsamv1.json b/examples/simple_hybrid_plant/100MW_1axis_pvsamv1.json new file mode 100644 index 00000000..45943570 --- /dev/null +++ b/examples/simple_hybrid_plant/100MW_1axis_pvsamv1.json @@ -0,0 +1,970 @@ +{ + "transformer_no_load_loss": 0, + "transformer_load_loss": 0, + "en_snow_model": 0, + "system_capacity": 100002.58266599999, + "use_wf_albedo": 1, + "use_spatial_albedos": 0, + "albedo": [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ], + "albedo_spatial": [ + [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ], + [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ], + [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ], + [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ], + [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ], + [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ], + [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ], + [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ], + [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ], + [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ], + [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ], + [ + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001, + 0.20000000000000001 + ] + ], + "irrad_mode": 0, + "sky_model": 2, + "inverter_count": 30, + "enable_mismatch_vmax_calc": 0, + "calculate_rack_shading": 0, + "calculate_bifacial_electrical_mismatch": 1, + "subarray1_nstrings": 15354, + "subarray1_modules_per_string": 21, + "subarray1_mppt_input": 1, + "subarray1_tilt": 0, + "subarray1_tilt_eq_lat": 0, + "subarray1_azimuth": 180, + "subarray1_track_mode": 1, + "subarray1_rotlim": 45, + "subarray1_shade_mode": 0, + "subarray1_gcr": 0.29999999999999999, + "subarray1_slope_tilt": 0, + "subarray1_slope_azm": 0, + "subarray1_monthly_tilt": [ + 40, + 40, + 40, + 20, + 20, + 20, + 20, + 20, + 20, + 40, + 40, + 40 + ], + "subarray1_shading_en_string_option": 0, + "subarray1_shading_string_option": 0, + "subarray1_shading_en_timestep": 0, + "subarray1_shading_en_diff": 0, + "subarray1_shading_diff": 0, + "subarray1_soiling": [ + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5 + ], + "subarray1_rear_soiling_loss": 0, + "subarray1_rack_shading": 4, + "subarray1_mismatch_loss": 2, + "subarray1_diodeconn_loss": 0.5, + "subarray1_dcwiring_loss": 2, + "subarray1_tracking_loss": 0, + "subarray1_nameplate_loss": 0, + "subarray2_enable": 0, + "subarray3_enable": 0, + "subarray4_enable": 0, + "subarray2_track_mode": 0, + "subarray3_track_mode": 0, + "subarray4_track_mode": 0, + "subarray1_electrical_mismatch": 0, + "dcoptimizer_loss": 0, + "acwiring_loss": 1, + "transmission_loss": 0, + "subarray1_mod_orient": 0, + "subarray1_nmodx": 7, + "subarray1_nmody": 2, + "subarray1_backtrack": 0, + "module_model": 1, + "module_aspect_ratio": 1.4904397705544932, + "spe_area": 0.74073999999999995, + "spe_rad0": 200, + "spe_rad1": 400, + "spe_rad2": 600, + "spe_rad3": 800, + "spe_rad4": 1000, + "spe_eff0": 19, + "spe_eff1": 19, + "spe_eff2": 19, + "spe_eff3": 19, + "spe_eff4": 19, + "spe_reference": 4, + "spe_module_structure": 0, + "spe_a": -3.5600000000000001, + "spe_b": -0.074999999999999997, + "spe_dT": 3, + "spe_temp_coeff": -0.5, + "spe_fd": 1, + "spe_vmp": 30, + "spe_voc": 36, + "spe_is_bifacial": 0, + "spe_bifacial_transmission_factor": 0.012999999999999999, + "spe_bifaciality": 0.69999999999999996, + "spe_bifacial_ground_clearance_height": 1, + "cec_area": 1.631, + "cec_a_ref": 2.5776400000000002, + "cec_adjust": 22.909199999999998, + "cec_alpha_sc": 0.0037352700000000002, + "cec_beta_oc": -0.175619, + "cec_gamma_r": -0.38600000000000001, + "cec_i_l_ref": 6.0537299999999998, + "cec_i_mp_ref": 5.6699999999999999, + "cec_i_o_ref": 8.3604300000000002e-11, + "cec_i_sc_ref": 6.0499999999999998, + "cec_n_s": 96, + "cec_r_s": 0.30812, + "cec_r_sh_ref": 500.06900000000002, + "cec_t_noct": 46, + "cec_v_mp_ref": 54.700000000000003, + "cec_v_oc_ref": 64.400000000000006, + "cec_temp_corr_mode": 0, + "cec_is_bifacial": 0, + "cec_bifacial_transmission_factor": 0.012999999999999999, + "cec_bifaciality": 0.69999999999999996, + "cec_bifacial_ground_clearance_height": 1, + "cec_standoff": 6, + "cec_height": 0, + "cec_mounting_config": 0, + "cec_heat_transfer": 0, + "cec_mounting_orientation": 0, + "cec_gap_spacing": 0.050000000000000003, + "cec_module_width": 1.046, + "cec_module_length": 1.5589999999999999, + "cec_array_rows": 1, + "cec_array_cols": 10, + "cec_backside_temp": 20, + "cec_transient_thermal_model_unit_mass": 11.091900000000001, + "sixpar_celltech": 0, + "sixpar_vmp": 54.700000000000003, + "sixpar_imp": 5.6699999999999999, + "sixpar_voc": 64.400000000000006, + "sixpar_isc": 6.0499999999999998, + "sixpar_bvoc": -0.175619, + "sixpar_aisc": 0.0037352700000000002, + "sixpar_gpmp": -0.38600000000000001, + "sixpar_nser": 96, + "sixpar_area": 1.631, + "sixpar_tnoct": 46, + "sixpar_standoff": 6, + "sixpar_mounting": 0, + "sixpar_is_bifacial": 0, + "sixpar_bifacial_transmission_factor": 0.012999999999999999, + "sixpar_bifaciality": 0.69999999999999996, + "sixpar_bifacial_ground_clearance_height": 1, + "sixpar_transient_thermal_model_unit_mass": 11.091900000000001, + "snl_module_structure": 0, + "snl_a": -3.6200000000000001, + "snl_b": -0.074999999999999997, + "snl_dtc": 3, + "snl_ref_a": -3.6200000000000001, + "snl_ref_b": -0.074999999999999997, + "snl_ref_dT": 3, + "snl_fd": 1, + "snl_a0": 0.9597, + "snl_a1": 0.032169999999999997, + "snl_a2": -0.0036600000000000001, + "snl_a3": 6.0000000000000002e-05, + "snl_a4": 5.4e-06, + "snl_aimp": -0.00038000000000000002, + "snl_aisc": 0.00059000000000000003, + "snl_area": 1.631, + "snl_b0": 1, + "snl_b1": -0.0024380000000000001, + "snl_b2": 0.00031, + "snl_b3": -1.2459999999999999e-05, + "snl_b4": 2.11e-07, + "snl_b5": -1.3600000000000001e-09, + "snl_bvmpo": -0.186, + "snl_bvoco": -0.17699999999999999, + "snl_c0": 1.0089999999999999, + "snl_c1": -0.0089999999999999993, + "snl_c2": 0.38019999999999998, + "snl_c3": -3.7160000000000002, + "snl_c4": 0.98799999999999999, + "snl_c5": 0.012, + "snl_c6": 1.093, + "snl_c7": -0.092999999999999999, + "snl_impo": 5.5800000000000001, + "snl_isco": 5.96, + "snl_ixo": 5.9000000000000004, + "snl_ixxo": 4.0999999999999996, + "snl_mbvmp": 0, + "snl_mbvoc": 0, + "snl_n": 1.131, + "snl_series_cells": 96, + "snl_vmpo": 54.700000000000003, + "snl_voco": 64.200000000000003, + "snl_transient_thermal_model_unit_mass": 11.091900000000001, + "sd11par_nser": 96, + "sd11par_area": 1.6799999999999999, + "sd11par_AMa0": 0.94169999999999998, + "sd11par_AMa1": 0.065159999999999996, + "sd11par_AMa2": -0.020219999999999998, + "sd11par_AMa3": 0.0021900000000000001, + "sd11par_AMa4": -9.1000000000000003e-05, + "sd11par_glass": 0, + "sd11par_tnoct": 44.619999999999997, + "sd11par_standoff": 6, + "sd11par_mounting": 0, + "sd11par_Vmp0": 58.536999999999999, + "sd11par_Imp0": 5.5060000000000002, + "sd11par_Voc0": 70.214399999999998, + "sd11par_Isc0": 5.9028499999999999, + "sd11par_alphaIsc": 0.00144911, + "sd11par_n": 1.0127299999999999, + "sd11par_Il": 5.9090499999999997, + "sd11par_Io": 3.6386500000000001e-12, + "sd11par_Egref": 1.0858300000000001, + "sd11par_d1": 0.80539099999999997, + "sd11par_d2": 0, + "sd11par_d3": 0.029139499999999999, + "sd11par_c1": 386.02999999999997, + "sd11par_c2": 451.44200000000001, + "sd11par_c3": 0.64406799999999997, + "inverter_model": 0, + "mppt_low_inverter": 800, + "mppt_hi_inverter": 1500, + "inv_num_mppt": 1, + "inv_snl_c0": -7.0562699999999997e-09, + "inv_snl_c1": 5.5650400000000003e-06, + "inv_snl_c2": 0.000106673, + "inv_snl_c3": -0.000143943, + "inv_snl_paco": 2507194, + "inv_snl_pdco": 2579160, + "inv_snl_pnt": 62.799999999999997, + "inv_snl_pso": 8485.6299999999992, + "inv_snl_vdco": 975, + "inv_snl_vdcmax": 1500, + "inv_cec_cg_c0": -3.1752000000000001e-06, + "inv_cec_cg_c1": -5.1231399999999999e-05, + "inv_cec_cg_c2": 0.00098359599999999999, + "inv_cec_cg_c3": -0.0015077999999999999, + "inv_cec_cg_paco": 3800, + "inv_cec_cg_pdco": 3928.1100000000001, + "inv_cec_cg_pnt": 0.98999999999999999, + "inv_cec_cg_psco": 19.448399999999999, + "inv_cec_cg_vdco": 398.49700000000001, + "inv_cec_cg_vdcmax": 600, + "inv_ds_paco": 4000, + "inv_ds_eff": 96, + "inv_ds_pnt": 1, + "inv_ds_pso": 0, + "inv_ds_vdco": 310, + "inv_ds_vdcmax": 600, + "inv_pd_paco": 4000, + "inv_pd_pdco": 4210.5299999999997, + "inv_pd_partload": [ + 0, + 0.40400000000000003, + 0.80800000000000005, + 1.212, + 1.6160000000000001, + 2.02, + 2.4239999999999999, + 2.8279999999999998, + 3.2320000000000002, + 3.6360000000000001, + 4.04, + 4.444, + 4.8479999999999999, + 5.2519999999999998, + 5.6559999999999997, + 6.0599999999999996, + 6.4640000000000004, + 6.8680000000000003, + 7.2720000000000002, + 7.6760000000000002, + 8.0800000000000001, + 8.484, + 8.8879999999999999, + 9.2919999999999998, + 9.6959999999999997, + 10.1, + 10.504, + 10.907999999999999, + 11.311999999999999, + 11.715999999999999, + 12.119999999999999, + 12.523999999999999, + 12.928000000000001, + 13.332000000000001, + 13.736000000000001, + 14.140000000000001, + 14.544, + 14.948, + 15.352, + 15.756, + 16.16, + 16.564, + 16.968, + 17.372, + 17.776, + 18.18, + 18.584, + 18.988, + 19.391999999999999, + 19.795999999999999, + 20.199999999999999, + 20.603999999999999, + 21.007999999999999, + 21.411999999999999, + 21.815999999999999, + 22.219999999999999, + 22.623999999999999, + 23.027999999999999, + 23.431999999999999, + 23.835999999999999, + 24.239999999999998, + 24.643999999999998, + 25.047999999999998, + 25.452000000000002, + 25.856000000000002, + 26.260000000000002, + 26.664000000000001, + 27.068000000000001, + 27.472000000000001, + 27.876000000000001, + 28.280000000000001, + 28.684000000000001, + 29.088000000000001, + 29.492000000000001, + 29.896000000000001, + 30.300000000000001, + 30.704000000000001, + 31.108000000000001, + 31.512, + 31.916, + 32.32, + 32.723999999999997, + 33.128, + 33.531999999999996, + 33.936, + 34.340000000000003, + 34.744, + 35.148000000000003, + 35.552, + 35.956000000000003, + 36.359999999999999, + 36.764000000000003, + 37.167999999999999, + 37.572000000000003, + 37.975999999999999, + 38.380000000000003, + 38.783999999999999, + 39.188000000000002, + 39.591999999999999, + 39.996000000000002, + 40.399999999999999, + 40.804000000000002, + 41.207999999999998, + 41.612000000000002, + 42.015999999999998, + 42.420000000000002, + 42.823999999999998, + 43.228000000000002, + 43.631999999999998, + 44.036000000000001, + 44.439999999999998, + 44.844000000000001, + 45.247999999999998, + 45.652000000000001, + 46.055999999999997, + 46.460000000000001, + 46.863999999999997, + 47.268000000000001, + 47.671999999999997, + 48.076000000000001, + 48.479999999999997, + 48.884, + 49.287999999999997, + 49.692, + 50.095999999999997, + 50.5, + 50.904000000000003, + 51.308, + 51.712000000000003, + 52.116, + 52.520000000000003, + 52.923999999999999, + 53.328000000000003, + 53.731999999999999, + 54.136000000000003, + 54.539999999999999, + 54.944000000000003, + 55.347999999999999, + 55.752000000000002, + 56.155999999999999, + 56.560000000000002, + 56.963999999999999, + 57.368000000000002, + 57.771999999999998, + 58.176000000000002, + 58.579999999999998, + 58.984000000000002, + 59.387999999999998, + 59.792000000000002, + 60.195999999999998, + 60.600000000000001, + 61.003999999999998, + 61.408000000000001, + 61.811999999999998, + 62.216000000000001, + 62.619999999999997, + 63.024000000000001, + 63.427999999999997, + 63.832000000000001, + 64.236000000000004, + 64.640000000000001, + 65.043999999999997, + 65.447999999999993, + 65.852000000000004, + 66.256, + 66.659999999999997, + 67.063999999999993, + 67.468000000000004, + 67.872, + 68.275999999999996, + 68.680000000000007, + 69.084000000000003, + 69.488, + 69.891999999999996, + 70.296000000000006, + 70.700000000000003, + 71.103999999999999, + 71.507999999999996, + 71.912000000000006, + 72.316000000000003, + 72.719999999999999, + 73.123999999999995, + 73.528000000000006, + 73.932000000000002, + 74.335999999999999, + 74.739999999999995, + 75.144000000000005, + 75.548000000000002, + 75.951999999999998, + 76.355999999999995, + 76.760000000000005, + 77.164000000000001, + 77.567999999999998, + 77.971999999999994, + 78.376000000000005, + 78.780000000000001, + 79.183999999999997, + 79.587999999999994, + 79.992000000000004, + 80.396000000000001, + 80.799999999999997, + 81.203999999999994, + 81.608000000000004, + 82.012, + 82.415999999999997, + 82.819999999999993, + 83.224000000000004, + 83.628, + 84.031999999999996, + 84.436000000000007, + 84.840000000000003, + 85.244, + 85.647999999999996, + 86.052000000000007, + 86.456000000000003, + 86.859999999999999, + 87.263999999999996, + 87.668000000000006, + 88.072000000000003, + 88.475999999999999, + 88.879999999999995, + 89.284000000000006, + 89.688000000000002, + 90.091999999999999, + 90.495999999999995, + 90.900000000000006, + 91.304000000000002, + 91.707999999999998, + 92.111999999999995, + 92.516000000000005, + 92.920000000000002, + 93.323999999999998, + 93.727999999999994, + 94.132000000000005, + 94.536000000000001, + 94.939999999999998, + 95.343999999999994, + 95.748000000000005, + 96.152000000000001, + 96.555999999999997, + 96.959999999999994, + 97.364000000000004, + 97.768000000000001, + 98.171999999999997, + 98.575999999999993, + 98.980000000000004, + 99.384, + 99.787999999999997, + 100.19199999999999, + 100.596, + 101 + ], + "inv_pd_efficiency": [ + 0, + 0, + 34.420000000000002, + 55.200000000000003, + 65.590000000000003, + 71.819999999999993, + 75.969999999999999, + 78.939999999999998, + 81.170000000000002, + 82.900000000000006, + 84.280000000000001, + 85.420000000000002, + 86.359999999999999, + 87.159999999999997, + 87.840000000000003, + 88.439999999999998, + 88.950000000000003, + 89.409999999999997, + 89.819999999999993, + 90.180000000000007, + 90.510000000000005, + 90.810000000000002, + 91.079999999999998, + 91.319999999999993, + 91.549999999999997, + 91.75, + 91.950000000000003, + 92.120000000000005, + 92.290000000000006, + 92.439999999999998, + 92.579999999999998, + 92.719999999999999, + 92.840000000000003, + 92.959999999999994, + 93.069999999999993, + 93.170000000000002, + 93.269999999999996, + 93.370000000000005, + 93.450000000000003, + 93.540000000000006, + 93.620000000000005, + 93.689999999999998, + 93.760000000000005, + 93.829999999999998, + 93.900000000000006, + 93.959999999999994, + 94.019999999999996, + 94.079999999999998, + 94.129999999999995, + 94.180000000000007, + 94.230000000000004, + 94.280000000000001, + 94.329999999999998, + 94.370000000000005, + 94.420000000000002, + 94.459999999999994, + 94.5, + 94.540000000000006, + 94.569999999999993, + 94.609999999999999, + 94.640000000000001, + 94.680000000000007, + 94.709999999999994, + 94.739999999999995, + 94.769999999999996, + 94.799999999999997, + 94.829999999999998, + 94.859999999999999, + 94.890000000000001, + 94.909999999999997, + 94.939999999999998, + 94.959999999999994, + 94.980000000000004, + 95.010000000000005, + 95.030000000000001, + 95.049999999999997, + 95.069999999999993, + 95.090000000000003, + 95.109999999999999, + 95.129999999999995, + 95.150000000000006, + 95.170000000000002, + 95.189999999999998, + 95.209999999999994, + 95.230000000000004, + 95.239999999999995, + 95.260000000000005, + 95.280000000000001, + 95.290000000000006, + 95.310000000000002, + 95.319999999999993, + 95.340000000000003, + 95.349999999999994, + 95.359999999999999, + 95.379999999999995, + 95.390000000000001, + 95.400000000000006, + 95.420000000000002, + 95.430000000000007, + 95.439999999999998, + 95.450000000000003, + 95.469999999999999, + 95.480000000000004, + 95.489999999999995, + 95.5, + 95.510000000000005, + 95.519999999999996, + 95.530000000000001, + 95.540000000000006, + 95.549999999999997, + 95.560000000000002, + 95.569999999999993, + 95.579999999999998, + 95.590000000000003, + 95.599999999999994, + 95.609999999999999, + 95.620000000000005, + 95.629999999999995, + 95.640000000000001, + 95.640000000000001, + 95.650000000000006, + 95.659999999999997, + 95.670000000000002, + 95.680000000000007, + 95.680000000000007, + 95.689999999999998, + 95.700000000000003, + 95.709999999999994, + 95.709999999999994, + 95.719999999999999, + 95.730000000000004, + 95.730000000000004, + 95.739999999999995, + 95.75, + 95.75, + 95.760000000000005, + 95.769999999999996, + 95.769999999999996, + 95.780000000000001, + 95.780000000000001, + 95.790000000000006, + 95.799999999999997, + 95.799999999999997, + 95.810000000000002, + 95.810000000000002, + 95.819999999999993, + 95.819999999999993, + 95.829999999999998, + 95.829999999999998, + 95.840000000000003, + 95.840000000000003, + 95.849999999999994, + 95.849999999999994, + 95.859999999999999, + 95.859999999999999, + 95.870000000000005, + 95.870000000000005, + 95.879999999999995, + 95.879999999999995, + 95.890000000000001, + 95.890000000000001, + 95.890000000000001, + 95.900000000000006, + 95.900000000000006, + 95.909999999999997, + 95.909999999999997, + 95.909999999999997, + 95.920000000000002, + 95.920000000000002, + 95.930000000000007, + 95.930000000000007, + 95.930000000000007, + 95.939999999999998, + 95.939999999999998, + 95.939999999999998, + 95.950000000000003, + 95.950000000000003, + 95.959999999999994, + 95.959999999999994, + 95.959999999999994, + 95.969999999999999, + 95.969999999999999, + 95.969999999999999, + 95.980000000000004, + 95.980000000000004, + 95.980000000000004, + 95.980000000000004, + 95.989999999999995, + 95.989999999999995, + 95.989999999999995, + 96, + 96, + 96, + 96.010000000000005, + 96.010000000000005, + 96.010000000000005, + 96.010000000000005, + 96.019999999999996, + 96.019999999999996, + 96.019999999999996, + 96.019999999999996, + 96.030000000000001, + 96.030000000000001, + 96.030000000000001, + 96.030000000000001, + 96.040000000000006, + 96.040000000000006, + 96.040000000000006, + 96.040000000000006, + 96.049999999999997, + 96.049999999999997, + 96.049999999999997, + 96.049999999999997, + 96.060000000000002, + 96.060000000000002, + 96.060000000000002, + 96.060000000000002, + 96.060000000000002, + 96.069999999999993, + 96.069999999999993, + 96.069999999999993, + 96.069999999999993, + 96.069999999999993, + 96.079999999999998, + 96.079999999999998, + 96.079999999999998, + 96.079999999999998, + 96.079999999999998, + 96.090000000000003, + 96.090000000000003, + 96.090000000000003, + 96.090000000000003, + 96.090000000000003, + 96.090000000000003, + 96.099999999999994, + 96.099999999999994, + 96.099999999999994, + 96.099999999999994, + 96.099999999999994, + 96.099999999999994, + 96.109999999999999, + 96.109999999999999, + 96.109999999999999, + 96.109999999999999, + 96.109999999999999, + 96.109999999999999, + 96.120000000000005, + 96.120000000000005, + 96.120000000000005, + 96.120000000000005, + 96.120000000000005 + ], + "inv_pd_pnt": 0, + "inv_pd_vdco": 310, + "inv_pd_vdcmax": 600, + "inv_tdc_cec_db": [ + [ + 1500, + 50, + -0.02, + 53, + -0.46999999999999997 + ] + ], + "inv_tdc_cec_cg": [ + [ + 1500, + 50, + -0.02, + 53, + -0.46999999999999997 + ] + ], + "inv_tdc_ds": [ + [ + 1500, + 50, + -0.02, + 53, + -0.46999999999999997 + ] + ], + "inv_tdc_plc": [ + [ + 1500, + 50, + -0.02, + 53, + -0.46999999999999997 + ] + ], + "en_batt": 0, + "enable_subhourly_clipping": 0, + "inv_snl_eff_cec": 97.532170498488981, + "inv_pd_eff": 95, + "inv_cec_cg_eff_cec": 96.636399999999995, + "enable_interconnection_limit": 0, + "grid_interconnection_limit_kwac": 100000 +} \ No newline at end of file diff --git a/examples/simple_hybrid_plant/amr_input.inp b/examples/simple_hybrid_plant/amr_input.inp new file mode 100644 index 00000000..8ef0cd1a --- /dev/null +++ b/examples/simple_hybrid_plant/amr_input.inp @@ -0,0 +1,163 @@ +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# SIMULATION STOP # +#.......................................# +time.stop_time = 100.0 # Max (simulated) time to evolve +time.max_step = -1 # Max number of time steps + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# TIME STEP COMPUTATION # +#.......................................# +time.fixed_dt = 0.5 # Use this constant dt if > 0 +time.cfl = 0.95 # CFL factor + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# INPUT AND OUTPUT # +#.......................................# +time.plot_interval = 3600 # Steps between plot files +time.checkpoint_interval = 3600 # Steps between checkpoint files +io.restart_file = "/projects/ssc/amr_precursors/b_abl_neutral_lowTI_redo/chk14400" + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# PHYSICS # +#.......................................# +incflo.gravity = 0. 0. -9.81 # Gravitational force (3D) +incflo.density = 1.0 # Reference density + +incflo.use_godunov = 1 +incflo.godunov_type = weno_z +incflo.diffusion_type = 1 +transport.viscosity = 1.0e-5 +transport.laminar_prandtl = 0.7 +transport.turbulent_prandtl = 0.3333 +turbulence.model = OneEqKsgsM84 + +incflo.physics = ABL Actuator +ICNS.source_terms = BoussinesqBuoyancy CoriolisForcing ABLMeanBoussinesq ActuatorForcing +TKE.source_terms = KsgsM84Src +BoussinesqBuoyancy.reference_temperature = 300.0 +CoriolisForcing.latitude = 41.3 +ABLForcing.abl_forcing_height = 90 +incflo.velocity = 6.928203230275509 4.0 0.0 + + +# Atmospheric boundary layer +ABL.temperature_heights = 0.0 700.0 800.0 1280.0 +ABL.temperature_values = 300.0 300.0 308.0 309.44 +ABL.reference_temperature = 300.0 +ABL.kappa = .40 +ABL.surface_roughness_z0 = 1.0E-4 +ABL.Uperiods = 25.0 +ABL.Vperiods = 25.0 +ABL.cutoff_height = 50.0 +ABL.deltaU = 1.0 +ABL.deltaV = 1.0 +ABL.normal_direction = 2 +ABL.perturb_ref_height = 50.0 +ABL.perturb_temperature = false +ABL.perturb_velocity = true +ABL.stats_output_format = netcdf +ABL.stats_output_frequency = 1 +ABL.surface_temp_flux = 0.00 +ABL.wall_shear_stress_type = "Moeng" + +ABL.bndry_file = "/projects/ssc/amr_precursors/b_abl_neutral_lowTI_redo/bndry_files" +ABL.bndry_io_mode = 1 +ABL.bndry_planes = ylo xlo # I'm (Paul) adding this but not sure if I have to +ABL.bndry_var_names = velocity temperature tke + + +# Output boundary files +ABL.bndry_planes = ylo xlo +ABL.bndry_output_start_time = 7200.0 +ABL.bndry_var_names = velocity temperature tke +ABL.bndry_output_format = native +ABL.stats_output_frequency = 1 +ABL.stats_output_format = netcdf + +# Whether to use helics +helics.activated = true +helics.broker_port = 32000 + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# ADAPTIVE MESH REFINEMENT # +#.......................................# +amr.n_cell = 512 512 128 # Grid cells at coarsest AMRlevel +amr.max_level = 0 # Max AMR level in hierarchy + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# GEOMETRY # +#.......................................# +geometry.prob_lo = 0. 0. 0. # Lo corner coordinates +geometry.prob_hi = 5120. 5120. 1280. # Hi corner coordinates +geometry.is_periodic = 0 0 0 +xlo.type = "mass_inflow" +xlo.density = 1.0 +xlo.temperature = 0.0 # value required but ignored +xlo.tke = 0.0 +xhi.type = "pressure_outflow" + +ylo.type = "mass_inflow" +ylo.density = 1.0 +ylo.temperature = 0.0 +ylo.tke = 0.0 +yhi.type = "pressure_outflow" + +# Boundary conditions +zlo.type = "wall_model" +zlo.tke_type = "zero_gradient" + +zhi.type = "slip_wall" +zhi.temperature_type = "fixed_gradient" +zhi.temperature = 0.003 # tracer is used to specify potential temperature gradient + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# VERBOSITY # +#.......................................# +incflo.verbose = 0 # incflo_level + + + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# SAMPLING # +#.......................................# +incflo.post_processing = samplingPlane samplingLine + +samplingPlane.output_frequency = 600 +samplingPlane.labels = z_plane +samplingPlane.fields = velocity temperature +samplingPlane.z_plane.type = PlaneSampler +samplingPlane.z_plane.axis1 = 5110 0.0 0.0 +samplingPlane.z_plane.axis2 = 0.0 5110 0.0 +samplingPlane.z_plane.origin = 5.0 5.0 0.0 +samplingPlane.z_plane.num_points = 512 512 +samplingPlane.z_plane.normal = 0.0 0.0 1.0 +samplingPlane.z_plane.offsets = 5.0 85.0 155.0 255.0 + + +samplingLine.output_frequency = 1 +samplingLine.labels = z_line +samplingLine.fields = velocity temperature +samplingLine.z_line.type = LineSampler +samplingLine.z_line.num_points = 128 +samplingLine.z_line.start = 5.0 5.0 5.0 +samplingLine.z_line.end = 5.0 5.0 1275.0 + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# TURBINES # +#.......................................# + +Actuator.type = UniformCtDisk +Actuator.UniformCtDisk.rotor_diameter = 126.0 +Actuator.UniformCtDisk.hub_height = 90.0 +Actuator.UniformCtDisk.thrust_coeff = 0.0 0.0 1.132034888 0.999470963 0.917697381 0.860849503 0.815371198 0.811614904 0.807939328 0.80443352 0.800993851 0.79768116 0.794529244 0.791495834 0.788560434 0.787217182 0.787127977 0.785839257 0.783812219 0.783568108 0.783328285 0.781194418 0.777292539 0.773464375 0.769690236 0.766001924 0.762348072 0.758760824 0.755242872 0.751792927 0.748434131 0.745113997 0.717806682 0.672204789 0.63831272 0.610176496 0.585456847 0.563222111 0.542912273 0.399312061 0.310517829 0.248633226 0.203543725 0.169616419 0.143478955 0.122938861 0.106515296 0.093026095 0.081648606 0.072197368 0.064388275 0.057782745 0.0 0.0 +Actuator.UniformCtDisk.wind_speed = 0.0 2.9 3.0 4.0 5.0 6.0 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9 8.0 9.0 10.0 10.1 10.2 10.3 10.4 10.5 10.6 10.7 10.8 10.9 11.0 11.1 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0 21.0 22.0 23.0 24.0 25.0 25.1 50.0 +Actuator.UniformCtDisk.epsilon = 10.0 +Actuator.UniformCtDisk.density = 1.225 +Actuator.UniformCtDisk.diameters_to_sample = 1.0 +Actuator.UniformCtDisk.num_points_r = 20 +Actuator.UniformCtDisk.num_points_t = 5 + + +Actuator.labels = T00 T01 +Actuator.T00.base_position = 0.0 0.0 0.0 +Actuator.T01.base_position = 1000.0 0.0 0.0 diff --git a/examples/simple_hybrid_plant/bash_script.sh b/examples/simple_hybrid_plant/bash_script.sh new file mode 100755 index 00000000..063a7b2c --- /dev/null +++ b/examples/simple_hybrid_plant/bash_script.sh @@ -0,0 +1,18 @@ +# Example bash for running things locally +# I just run these one at a t time + +# A lot of modules and conda stuff +conda activate hercules + +# Set the helics port to use: +export HELICS_PORT=32000 + +#make sure you use the same port number in the amr_input.inp and hercules_input_000.yaml files. + +# Clear old log files for clarity +rm loghercules logfloris + +# Set up the helics broker and run the open-loop control simulation +helics_broker -t zmq -f 2 --loglevel="debug" --local_port=$HELICS_PORT & +python3 hercules_runscript_windsolarstorage.py hercules_input_000.yaml >> loghercules 2>&1 & +python3 floris_runscript.py amr_input.inp >> logfloris 2>&1 \ No newline at end of file diff --git a/examples/simple_hybrid_plant/floris_runscript.py b/examples/simple_hybrid_plant/floris_runscript.py new file mode 100644 index 00000000..81d96a02 --- /dev/null +++ b/examples/simple_hybrid_plant/floris_runscript.py @@ -0,0 +1,14 @@ +import sys + +from hercules.floris_standin import launch_floris + +# Check that one command line argument was given +if len(sys.argv) < 2: + raise Exception("Usage: python floris_runscript.py ") + +# # Get the first command line argument +# This is the name of the file to read +amr_input_file = sys.argv[1] +print(f"Running FLORIS standin with input file: {amr_input_file}") + +launch_floris(amr_input_file) diff --git a/examples/simple_hybrid_plant/hercules_input_000.yaml b/examples/simple_hybrid_plant/hercules_input_000.yaml new file mode 100644 index 00000000..08b0cf3c --- /dev/null +++ b/examples/simple_hybrid_plant/hercules_input_000.yaml @@ -0,0 +1,71 @@ +# Input YAML for emy_python + +# Name +name: example_000 + +### +# Describe this emulator setup +description: Hybrid wind, solar, and battery plant + +dt: 0.5 + +hercules_comms: + + amr_wind: + + wind_farm_0: + type: amr_wind_local #options are amr_wind or amr_wind_local + amr_wind_input_file: amr_input.inp + + helics: + + config: + name: hercules # What is the purpose of this name + use_dash_frontend: False + KAFKA: False + KAFKA_topics: EMUV1py + helics: + # deltat: 1 # This will be assigned in software + subscription_topics: [status] + publication_topics: [control] + endpoints: [] + helicsport : 32000 + publication_interval: 1 + endpoint_interval: 1 + starttime: 0 + stoptime: 100 + Agent: ControlCenter + +py_sims: + + solar_farm_0: # The name of py_sim object 1 + + py_sim_type: SolarPySAM + weather_file_name: NonAnnualSimulation-sample_data-interpolated-daytime.csv + system_info_file_name: 100MW_1axis_pvsamv1.json + lat: 39.7442 + lon: -105.1778 + elev: 1829 + + # capacity: 100 # MW + + initial_conditions: + + power: 25 # MW + dni: 1000 + + battery_0: # The name of py_sim object 1 + + py_sim_type: LIB + size: 10 # MW size of the battery + energy_capacity: 40 # total capacity of the battery in MWh (4-hour 20 MW battery) + charge_rate: 20 # charge rate of the battery in MW + discharge_rate: 20 # discharge rate of the battery in MW + max_SOC: 0.9 # upper boundary on battery SOC + min_SOC: 0.1 # lower boundary on battery SOC + + initial_conditions: + SOC: 0.5 # initial state of charge of the battery as fraction of total size + +controller: + num_turbines: 2 \ No newline at end of file diff --git a/examples/simple_hybrid_plant/hercules_runscript_windsolarstorage.py b/examples/simple_hybrid_plant/hercules_runscript_windsolarstorage.py new file mode 100644 index 00000000..24d978c4 --- /dev/null +++ b/examples/simple_hybrid_plant/hercules_runscript_windsolarstorage.py @@ -0,0 +1,52 @@ +# Copyright 2021 NREL + +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + +# See https://nrel.github.io/wind-hybrid-open-controller for documentation + +import sys + +from hercules.emulator import Emulator +from hercules.py_sims import PySims +from hercules.utilities import load_yaml +from whoc.controllers import ( + HybridSupervisoryControllerSkeleton, + WindFarmPowerTrackingController, + BatteryPassthroughController, + SolarPassthroughController +) +from whoc.interfaces.hercules_hybrid_actuator_disk_interface import HerculesHybridADInterface + +input_dict = load_yaml(sys.argv[1]) +input_dict["output_file"] = "hercules_output_hybrid.csv" + +interface = HerculesHybridADInterface(input_dict) + +print("Setting up controller.") +wind_controller = WindFarmPowerTrackingController(interface, input_dict) +solar_controller = SolarPassthroughController(interface, input_dict) +battery_controller = BatteryPassthroughController(interface, input_dict) +controller = HybridSupervisoryControllerSkeleton( + interface, + input_dict, + wind_controller=wind_controller, + solar_controller=solar_controller, + battery_controller=battery_controller +) + +print("Establishing simulators.") +py_sims = PySims(input_dict) + +emulator = Emulator(controller, py_sims, input_dict) +emulator.run_helics_setup() +emulator.enter_execution(function_targets=[], function_arguments=[[]]) + +print("Finished running open-loop controller.")