openstudio-standards 0.8.3 → 0.8.5.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/geometry/ASHRAECollege.osm +30 -30
- data/data/geometry/ASHRAECourthouse.osm +22 -22
- data/data/geometry/ASHRAESmallOfficeDetailed.osm +2 -2
- data/data/geometry/DEER_Asm.osm +1 -1
- data/data/geometry/DEER_ECC.osm +1 -1
- data/data/geometry/DEER_EPr.osm +1 -1
- data/data/geometry/DEER_ERC.osm +1 -1
- data/data/geometry/DEER_ESe.osm +1 -1
- data/data/geometry/DEER_EUn.osm +1 -1
- data/data/geometry/DEER_Hsp.osm +1 -1
- data/data/geometry/DEER_Htl.osm +1 -1
- data/data/geometry/DEER_MBT.osm +1 -1
- data/data/geometry/DEER_MFm.osm +1 -1
- data/data/geometry/DEER_Nrs.osm +1 -1
- data/data/geometry/DEER_OfL.osm +1 -1
- data/data/geometry/DEER_OfS.osm +1 -1
- data/data/geometry/DEER_RFF.osm +1 -1
- data/data/geometry/DEER_RSD.osm +1 -1
- data/data/geometry/DEER_Rt3.osm +1 -1
- data/data/geometry/DEER_RtS.osm +1 -1
- data/data/standards/export_OpenStudio_libraries.rb +2 -3
- data/data/standards/test_performance_expected_dd_results.csv +42 -42
- data/lib/openstudio-standards/btap/NECB_building_types.csv +35 -0
- data/lib/openstudio-standards/btap/NECB_space_types.csv +109 -0
- data/lib/openstudio-standards/btap/activity.rb +480 -0
- data/lib/openstudio-standards/btap/attributes.rb +166 -0
- data/lib/openstudio-standards/btap/bridging.rb +561 -1402
- data/lib/openstudio-standards/btap/btap.rb +4 -2
- data/lib/openstudio-standards/btap/btap_test_helper.rb +86 -0
- data/lib/openstudio-standards/btap/carbon/btap_carbon.rb +177 -0
- data/lib/openstudio-standards/btap/common_paths.rb +81 -0
- data/lib/openstudio-standards/btap/common_resources/ConstructionProperties.csv +52 -0
- data/lib/openstudio-standards/btap/common_resources/Constructions.csv +37 -0
- data/lib/openstudio-standards/btap/common_resources/carbon_frame.csv +35 -0
- data/lib/openstudio-standards/btap/common_resources/carbon_glazing.csv +35 -0
- data/lib/openstudio-standards/btap/common_resources/carbon_opaque.csv +164 -0
- data/lib/openstudio-standards/btap/common_resources/construction_sets.csv +1270 -0
- data/lib/openstudio-standards/btap/common_resources/constructions_glazing.csv +121 -0
- data/lib/openstudio-standards/btap/common_resources/constructions_opaque.csv +2256 -0
- data/lib/openstudio-standards/btap/common_resources/costs.csv +1897 -0
- data/lib/openstudio-standards/btap/common_resources/costs_local_factors.csv +2315 -0
- data/lib/openstudio-standards/btap/common_resources/hvac_vent_ahu.csv +925 -0
- data/lib/openstudio-standards/btap/common_resources/lighting.csv +364 -0
- data/lib/openstudio-standards/btap/common_resources/lighting_sets.csv +2667 -0
- data/lib/openstudio-standards/btap/common_resources/locations.csv +75 -0
- data/lib/openstudio-standards/btap/common_resources/materials_glazing.csv +35 -0
- data/lib/openstudio-standards/btap/common_resources/materials_hvac.csv +1686 -0
- data/lib/openstudio-standards/btap/common_resources/materials_lighting.csv +267 -0
- data/lib/openstudio-standards/btap/common_resources/materials_opaque.csv +164 -0
- data/lib/openstudio-standards/btap/costing/README.md +502 -0
- data/lib/openstudio-standards/btap/costing/btap_costing.rb +469 -0
- data/lib/openstudio-standards/btap/costing/btap_measure_helper.rb +359 -0
- data/lib/openstudio-standards/btap/costing/btap_workflow.rb +117 -0
- data/lib/openstudio-standards/btap/costing/copy_test_results_files_to_expected_results.rb +11 -0
- data/lib/openstudio-standards/btap/costing/cost_building_from_file.rb +136 -0
- data/lib/openstudio-standards/btap/costing/costing_database_wrapper.rb +173 -0
- data/lib/openstudio-standards/btap/costing/daylighting_sensor_control_costing.rb +354 -0
- data/lib/openstudio-standards/btap/costing/dcv_costing.rb +314 -0
- data/lib/openstudio-standards/btap/costing/dummy.epw +8768 -0
- data/lib/openstudio-standards/btap/costing/dummy.osm +5320 -0
- data/lib/openstudio-standards/btap/costing/envelope_costing.rb +215 -0
- data/lib/openstudio-standards/btap/costing/heating_cooling_costing.rb +2584 -0
- data/lib/openstudio-standards/btap/costing/led_lighting_costing.rb +156 -0
- data/lib/openstudio-standards/btap/costing/lighting_costing.rb +209 -0
- data/lib/openstudio-standards/btap/costing/mech_sizing.json +502 -0
- data/lib/openstudio-standards/btap/costing/neb_end_use_prices.csv +42 -0
- data/lib/openstudio-standards/btap/costing/necb_2011_spacetype_info.csv +225 -0
- data/lib/openstudio-standards/btap/costing/necb_reference_runs.csv +28705 -0
- data/lib/openstudio-standards/btap/costing/nv_costing.rb +547 -0
- data/lib/openstudio-standards/btap/costing/parallel_tests.rb +92 -0
- data/lib/openstudio-standards/btap/costing/pv_ground_costing.rb +687 -0
- data/lib/openstudio-standards/btap/costing/shw_costing.rb +705 -0
- data/lib/openstudio-standards/btap/costing/test_list.txt +15 -0
- data/lib/openstudio-standards/btap/costing/test_run_all_test_locally.rb +27 -0
- data/lib/openstudio-standards/btap/costing/test_run_costing_tests.rb +80 -0
- data/lib/openstudio-standards/btap/costing/ventilation_costing.rb +2616 -0
- data/lib/openstudio-standards/btap/geometry.rb +86 -6
- data/lib/openstudio-standards/btap/structure.rb +657 -0
- data/lib/openstudio-standards/constructions/modify.rb +2 -1
- data/lib/openstudio-standards/create_typical/create_typical.rb +17 -33
- data/lib/openstudio-standards/create_typical/space_type_ratios.rb +36 -36
- data/lib/openstudio-standards/equipment/create_transformer.rb +104 -0
- data/lib/openstudio-standards/equipment/create_typical_equipment.rb +117 -0
- data/lib/openstudio-standards/equipment/data/electric_equipment_space_types.json +1514 -0
- data/lib/openstudio-standards/equipment/data/gas_equipment_space_types.json +227 -0
- data/lib/openstudio-standards/exterior_lighting/create.rb +22 -22
- data/lib/openstudio-standards/exterior_lighting/information.rb +3 -2
- data/lib/openstudio-standards/hvac/components/air_conditioner_vrf.rb +482 -0
- data/lib/openstudio-standards/hvac/components/air_terminal.rb +31 -0
- data/lib/openstudio-standards/hvac/components/boiler_hot_water.rb +163 -0
- data/lib/openstudio-standards/hvac/components/central_air_source_heat_pump.rb +220 -0
- data/lib/openstudio-standards/hvac/components/chiller.rb +25 -0
- data/lib/openstudio-standards/hvac/components/coil.rb +276 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_dx_multi_speed.rb +40 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_dx_single_speed.rb +300 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_dx_two_speed.rb +187 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_water.rb +80 -0
- data/lib/openstudio-standards/hvac/components/coil_cooling_water_to_air_heat_pump_equation_fit.rb +182 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_dx_single_speed.rb +220 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_electric.rb +56 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_gas.rb +90 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_gas_multi_stage.rb +33 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_water.rb +98 -0
- data/lib/openstudio-standards/hvac/components/coil_heating_water_to_air_heat_pump_equation_fit.rb +147 -0
- data/lib/openstudio-standards/hvac/components/component.rb +39 -0
- data/lib/openstudio-standards/{standards/ashrae_90_1/data/ashrae_90_1.fans.json → hvac/components/data/fans.json} +6 -6
- data/lib/openstudio-standards/hvac/components/fan.rb +363 -0
- data/lib/openstudio-standards/hvac/components/heat_exchanger_air_to_air.rb +203 -0
- data/lib/openstudio-standards/hvac/components/pump.rb +181 -0
- data/lib/openstudio-standards/hvac/controls/radiant_system_controls.rb +594 -0
- data/lib/openstudio-standards/hvac/conversions.rb +222 -0
- data/lib/openstudio-standards/hvac/curves.rb +192 -0
- data/lib/openstudio-standards/hvac/helpers.rb +357 -0
- data/lib/openstudio-standards/hvac/setpoint_managers/information.rb +4 -4
- data/lib/openstudio-standards/interior_lighting/create_lights.rb +52 -0
- data/lib/openstudio-standards/interior_lighting/create_typical_interior_lighting.rb +254 -0
- data/lib/openstudio-standards/interior_lighting/data/convert_lighting_data.rb +249 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_space_types.csv +96 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_space_types.json +1429 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_technology.csv +46 -0
- data/lib/openstudio-standards/interior_lighting/data/lighting_technology.json +859 -0
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +4 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +4 -4
- data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.HighRiseApartment.rb +6 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Hospital.rb +15 -15
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb +4 -4
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOffice.rb +5 -5
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOffice.rb +6 -6
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Outpatient.rb +7 -7
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.PrimarySchool.rb +4 -4
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SecondarySchool.rb +6 -6
- data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOfficeDetailed.rb +5 -1
- data/lib/openstudio-standards/prototypes/common/data/prototype_space_type_map.json +2594 -0
- data/lib/openstudio-standards/prototypes/common/data/thermostat_schedule_lookup.json +2108 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirTerminalSingleDuctVAVReheat.rb +33 -0
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Fan.rb +0 -140
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanConstantVolume.rb +1 -73
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanOnOff.rb +1 -69
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanVariableVolume.rb +0 -116
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanZoneExhaust.rb +0 -61
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.hvac.rb +2 -2
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +128 -13
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +606 -607
- data/lib/openstudio-standards/prototypes/common/prototype_space_type_map.rb +41 -0
- data/lib/openstudio-standards/prototypes/common/space_type_equipment_map.rb +184 -0
- data/lib/openstudio-standards/prototypes/common/space_type_thermostat_schedule_map.rb +116 -0
- data/lib/openstudio-standards/qaqc/hvac.rb +12 -12
- data/lib/openstudio-standards/refrigeration/create_compressor.rb +2 -5
- data/lib/openstudio-standards/refrigeration/data/refrigeration_compressors.csv +4 -4
- data/lib/openstudio-standards/service_water_heating/create_water_heater.rb +1 -2
- data/lib/openstudio-standards/service_water_heating/create_water_use.rb +5 -5
- data/lib/openstudio-standards/space_type/data/level_1_space_types.json +612 -0
- data/lib/openstudio-standards/space_type/standards_space_type.rb +53 -0
- data/lib/openstudio-standards/standards/Standards.AirConditionerVariableRefrigerantFlow.rb +8 -26
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +13 -13
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +0 -24
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +6 -43
- data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +7 -24
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +19 -44
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +25 -50
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +25 -33
- data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +9 -22
- data/lib/openstudio-standards/standards/Standards.CoilDX.rb +15 -157
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +2 -2
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +18 -105
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGas.rb +3 -23
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +0 -24
- data/lib/openstudio-standards/standards/Standards.CoilHeatingWaterToAirHeatPumpEquationFit.rb +2 -86
- data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +0 -107
- data/lib/openstudio-standards/standards/Standards.Model.rb +45 -20
- data/lib/openstudio-standards/standards/Standards.People.rb +113 -0
- data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +11 -11
- data/lib/openstudio-standards/standards/Standards.Pump.rb +2 -147
- data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +57 -41
- data/lib/openstudio-standards/standards/Standards.SpaceType.rb +30 -153
- data/lib/openstudio-standards/standards/Standards.Ventilation.rb +74 -0
- data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PlantLoop.rb +4 -4
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_pumps_heating.json +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +37 -112
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/data/comstock_ashrae_90_1_2007.spc_typ.json +37 -102
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_pumps_heating.json +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +37 -112
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/data/comstock_ashrae_90_1_2010.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.BoilerHotWater.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/data/comstock_ashrae_90_1_2013.spc_typ.json +37 -102
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.BoilerHotWater.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/data/comstock_ashrae_90_1_2016.spc_typ.json +45 -109
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.BoilerHotWater.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoilHeatingGas.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/data/comstock_ashrae_90_1_2019.spc_typ.json +45 -109
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.heat_pumps_heating.json +6 -6
- data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.curves.json +0 -200
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/data/comstock_doe_ref_1980_2004.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/data/comstock_doe_ref_pre_1980.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.spc_typ.json +37 -37
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.PlantLoop.rb +5 -5
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirTerminalSingleDuctVAVReheat.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.PlantLoop.rb +5 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ChillerElectricEIR.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXSingleSpeed.rb +2 -68
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXTwoSpeed.rb +2 -35
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb +42 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingDXSingleSpeed.rb +5 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingGas.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +2 -2
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlantLoop.rb +3 -3
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.SpaceType.rb +1 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.Model.rb +1 -0
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019_WaterHeaterMixed.rb +2 -4
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.curves.json +0 -200
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.fans.json +5 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/ashrae_90_1_prm.UserData.rb +7 -1
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_enums.rb +0 -1
- data/lib/openstudio-standards/standards/cbes/data/cbes.curves.json +0 -200
- data/lib/openstudio-standards/standards/deer/data/deer.curves.json +0 -200
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +21 -37
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb +12 -11
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +68 -27
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +64 -25
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +9 -14
- data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_systems.rb +4 -4
- data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +1 -1
- data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +115 -112
- data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +637 -249
- data/lib/openstudio-standards/standards/necb/NECB2011/beps_compliance_path.rb +16 -12
- data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +799 -46
- data/lib/openstudio-standards/standards/necb/NECB2011/data/chillers.json +33 -51
- data/lib/openstudio-standards/standards/necb/NECB2011/data/constants.json +75 -7
- data/lib/openstudio-standards/standards/necb/NECB2011/data/fuel_type_sets.json +25 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/HighriseApartmentMult.osm +14272 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/heat_pumps_heating.json +21 -15
- data/lib/openstudio-standards/standards/necb/NECB2011/data/necb_2015_table_c1.json +1 -1
- data/lib/openstudio-standards/standards/necb/NECB2011/data/space_types.json +437 -437
- data/lib/openstudio-standards/standards/necb/NECB2011/data/systems.json +516 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/data/systems_including_sys5.json +588 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_namer.rb +489 -0
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +18 -6
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +48 -5
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +2 -2
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +35 -27
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +34 -23
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +8 -6
- data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +68 -150
- data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +444 -134
- data/lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb +61 -1
- data/lib/openstudio-standards/standards/necb/NECB2015/data/heat_pumps_heating.json +10 -2
- data/lib/openstudio-standards/standards/necb/NECB2015/data/space_types.json +636 -636
- data/lib/openstudio-standards/standards/necb/NECB2015/data/unitary_acs.json +38 -38
- data/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +17 -8
- data/lib/openstudio-standards/standards/necb/NECB2017/data/space_types.json +636 -636
- data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +71 -71
- data/lib/openstudio-standards/standards/necb/NECB2020/data/heat_pumps_heating.json +16 -6
- data/lib/openstudio-standards/standards/necb/NECB2020/data/unitary_acs.json +60 -61
- data/lib/openstudio-standards/standards/necb/NECB2020/service_water_heating.rb +30 -30
- data/lib/openstudio-standards/standards/necb/README.md +343 -0
- data/lib/openstudio-standards/standards/necb/common/btap_analysis.rb +79 -0
- data/lib/openstudio-standards/standards/necb/common/btap_data.rb +206 -32
- data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +75 -43
- data/lib/openstudio-standards/standards/necb/common/eccc_electric_grid_intensity_20250311.csv +14 -0
- data/lib/openstudio-standards/standards/necb/common/nir_gas_grid_intensity_20250311.csv +14 -0
- data/lib/openstudio-standards/standards/necb/common/system_types.yaml +0 -0
- data/lib/openstudio-standards/thermal_zone/{thermal_zone.rb → information.rb} +12 -45
- data/lib/openstudio-standards/thermal_zone/thermostat_schedules.rb +152 -0
- data/lib/openstudio-standards/utilities/logging.rb +18 -14
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/modify.rb +2 -2
- data/lib/openstudio-standards/weather/stat_file.rb +2 -2
- data/lib/openstudio-standards.rb +67 -38
- metadata +141 -50
- data/lib/openstudio-standards/hvac/components/create.rb +0 -169
- data/lib/openstudio-standards/hvac/components/modify.rb +0 -42
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirConditionerVariableRefrigerantFlow.rb +0 -438
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.BoilerHotWater.rb +0 -123
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CentralAirSourceHeatPump.rb +0 -216
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXSingleSpeed.rb +0 -273
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXTwoSpeed.rb +0 -159
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWater.rb +0 -77
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -154
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingDXSingleSpeed.rb +0 -214
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingElectric.rb +0 -53
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingGas.rb +0 -72
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWater.rb +0 -95
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWaterToAirHeatPumpEquationFit.rb +0 -125
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.ControllerWaterCoil.rb +0 -17
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.transformers.rb +0 -90
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.Pump.rb +0 -4
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.PumpVariableSpeed.rb +0 -70
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.radiant_system_controls.rb +0 -590
- data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +0 -901
- data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +0 -5
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +0 -55
- data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanConstantVolume.rb +0 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanOnOff.rb +0 -5
- data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanZoneExhaust.rb +0 -5
- data/lib/openstudio-standards/standards/cbes/data/cbes.fans.json +0 -328
- data/lib/openstudio-standards/standards/deer/data/deer.fans.json +0 -328
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.PumpVariableSpeed.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Pump.rb +0 -0
- /data/lib/openstudio-standards/{prototypes → standards}/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.PumpVariableSpeed.rb +0 -0
|
@@ -0,0 +1,687 @@
|
|
|
1
|
+
class BTAPCosting
|
|
2
|
+
|
|
3
|
+
def cost_audit_pv_ground(model, prototype_creator)
|
|
4
|
+
@costing_report['renewables']['pv'] = []
|
|
5
|
+
a = 0 # This is for reporting purposes.
|
|
6
|
+
pv_ground_total_cost = 0.0
|
|
7
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
8
|
+
# summary of all steps as per Mike Lubun's spec:
|
|
9
|
+
# Step 2: costing of concrete base
|
|
10
|
+
# Step 3: pv modules' racking costing
|
|
11
|
+
# Step 4: pv module costing
|
|
12
|
+
# Step 5: pv wiring costing
|
|
13
|
+
# Step 6: pv inverter costing
|
|
14
|
+
# Step 7: transformer costing
|
|
15
|
+
# Step 8: circuit breakers costing
|
|
16
|
+
# Step 9: circuit breaker fuses costing
|
|
17
|
+
# Step 10: PV fuses costing
|
|
18
|
+
# Step 11: disconnects costing
|
|
19
|
+
# Step 12: total cost (sum of Step 2 to 11)
|
|
20
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
21
|
+
##### Gather PV information from the model
|
|
22
|
+
model.getGeneratorPVWattss.sort.each do |generator_PVWatt|
|
|
23
|
+
|
|
24
|
+
tags = ['renewables','pv']
|
|
25
|
+
|
|
26
|
+
dc_system_capacity_w = generator_PVWatt.dcSystemCapacity()
|
|
27
|
+
module_type = generator_PVWatt.moduleType()
|
|
28
|
+
dc_system_capacity_kw = dc_system_capacity_w/1000
|
|
29
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
30
|
+
##### Step 2: costing of concrete base (#Note: steps' numbers are based on Mike Lubun's spec document)
|
|
31
|
+
### Step 2a: costing of concrete
|
|
32
|
+
### Step 2b: costing of excavation
|
|
33
|
+
### Step 2c: costing of concrete footing
|
|
34
|
+
### Step 2d: costing of backfill
|
|
35
|
+
### Step 2e: costing of compaction
|
|
36
|
+
### Step 2f: costing of underground electrical duct
|
|
37
|
+
### Step 2g: costing of grounding
|
|
38
|
+
### Step 2h: sum of 2a,b,c,d,e,f,g
|
|
39
|
+
### Step 2a: costing of concrete -------------------------------
|
|
40
|
+
quantity_concrete = 0.5 * dc_system_capacity_kw #unit: yd3
|
|
41
|
+
search_concrete_3000psi = {
|
|
42
|
+
row_id_1: 'concrete',
|
|
43
|
+
row_id_2: 3000.0
|
|
44
|
+
}
|
|
45
|
+
sheet_name = 'materials_hvac'
|
|
46
|
+
column_1 = 'Material'
|
|
47
|
+
column_2 = 'Size'
|
|
48
|
+
pv_ground_costing_concrete = assembly_cost(cost_info:search_concrete_3000psi,
|
|
49
|
+
sheet_name:sheet_name,
|
|
50
|
+
column_1:column_1,
|
|
51
|
+
column_2:column_2,
|
|
52
|
+
quantity: quantity_concrete,
|
|
53
|
+
tags: tags)
|
|
54
|
+
# puts "quantity_concrete is #{quantity_concrete}"
|
|
55
|
+
# puts "pv_ground_costing_concrete is #{pv_ground_costing_concrete}"
|
|
56
|
+
|
|
57
|
+
### Step 2b: costing of excavation -------------------------------
|
|
58
|
+
quantity_excavation = 3.0 * dc_system_capacity_kw #unit: yd3
|
|
59
|
+
search_excavation = {
|
|
60
|
+
row_id_1: 'Excavation_trench_4_6',
|
|
61
|
+
row_id_2: 0.75
|
|
62
|
+
}
|
|
63
|
+
sheet_name = 'materials_hvac'
|
|
64
|
+
column_1 = 'Material'
|
|
65
|
+
column_2 = 'Size'
|
|
66
|
+
pv_ground_costing_excavation = assembly_cost(cost_info:search_excavation,
|
|
67
|
+
sheet_name:sheet_name,
|
|
68
|
+
column_1:column_1,
|
|
69
|
+
column_2:column_2,
|
|
70
|
+
quantity: quantity_excavation,
|
|
71
|
+
tags: tags)
|
|
72
|
+
# puts "quantity_excavation is #{quantity_excavation}"
|
|
73
|
+
# puts "pv_ground_costing_excavation is #{pv_ground_costing_excavation}"
|
|
74
|
+
|
|
75
|
+
### Step 2c: costing of concrete footing -------------------------------
|
|
76
|
+
quantity_concrete_form = 1.0 * dc_system_capacity_kw #unit: each
|
|
77
|
+
search_concrete_footing = {
|
|
78
|
+
row_id_1: 'concreteforms',
|
|
79
|
+
row_id_2: nil
|
|
80
|
+
}
|
|
81
|
+
sheet_name = 'materials_hvac'
|
|
82
|
+
column_1 = 'Material'
|
|
83
|
+
column_2 = nil
|
|
84
|
+
pv_ground_concrete_footing = assembly_cost(cost_info:search_concrete_footing,
|
|
85
|
+
sheet_name:sheet_name,
|
|
86
|
+
column_1:column_1,
|
|
87
|
+
column_2:column_2,
|
|
88
|
+
quantity: quantity_concrete_form,
|
|
89
|
+
tags: tags)
|
|
90
|
+
# puts "quantity_concrete_form is #{quantity_concrete_form}"
|
|
91
|
+
# puts "pv_ground_concrete_footing is #{pv_ground_concrete_footing}"
|
|
92
|
+
|
|
93
|
+
### Step 2d: costing of backfill -------------------------------
|
|
94
|
+
quantity_backfill = 3.0 * dc_system_capacity_kw #unit: each
|
|
95
|
+
search_backfill = {
|
|
96
|
+
row_id_1: 'Backfill ',
|
|
97
|
+
row_id_2: nil
|
|
98
|
+
}
|
|
99
|
+
sheet_name = 'materials_hvac'
|
|
100
|
+
column_1 = 'Material'
|
|
101
|
+
column_2 = nil
|
|
102
|
+
pv_ground_backfill = assembly_cost(cost_info:search_backfill,
|
|
103
|
+
sheet_name:sheet_name,
|
|
104
|
+
column_1:column_1,
|
|
105
|
+
column_2:column_2,
|
|
106
|
+
quantity: quantity_backfill,
|
|
107
|
+
tags: tags)
|
|
108
|
+
# puts "quantity_backfill is #{quantity_backfill}"
|
|
109
|
+
# puts "pv_ground_backfill is #{pv_ground_backfill}"
|
|
110
|
+
|
|
111
|
+
### Step 2e: costing of compaction -------------------------------
|
|
112
|
+
quantity_compaction = 3.0 * dc_system_capacity_kw #unit: yd3
|
|
113
|
+
search_compaction = {
|
|
114
|
+
row_id_1: 'Compaction_WalkBehind',
|
|
115
|
+
row_id_2: 4.0
|
|
116
|
+
}
|
|
117
|
+
sheet_name = 'materials_hvac'
|
|
118
|
+
column_1 = 'Material'
|
|
119
|
+
column_2 = 'Size'
|
|
120
|
+
pv_ground_compaction = assembly_cost(cost_info:search_compaction,
|
|
121
|
+
sheet_name:sheet_name,
|
|
122
|
+
column_1:column_1,
|
|
123
|
+
column_2:column_2,
|
|
124
|
+
quantity: quantity_compaction,
|
|
125
|
+
tags: tags)
|
|
126
|
+
# puts "quantity_compaction is #{quantity_compaction}"
|
|
127
|
+
# puts "pv_ground_compaction is #{pv_ground_compaction}"
|
|
128
|
+
|
|
129
|
+
### Step 2f: costing of underground electrical duct -------------------------------
|
|
130
|
+
quantity_underground_electrical_duct = 100.0
|
|
131
|
+
search_underground_electrical_duct = {
|
|
132
|
+
row_id_1: 'groundconduit',
|
|
133
|
+
row_id_2: 1470.0
|
|
134
|
+
}
|
|
135
|
+
sheet_name = 'materials_hvac'
|
|
136
|
+
column_1 = 'Material'
|
|
137
|
+
column_2 = 'material_id'
|
|
138
|
+
pv_ground_underground_electrical_duct = assembly_cost(cost_info:search_underground_electrical_duct,
|
|
139
|
+
sheet_name:sheet_name,
|
|
140
|
+
column_1:column_1,
|
|
141
|
+
column_2:column_2,
|
|
142
|
+
quantity: quantity_underground_electrical_duct,
|
|
143
|
+
tags: tags)
|
|
144
|
+
# puts "quantity_underground_electrical_duct is #{quantity_underground_electrical_duct}"
|
|
145
|
+
# puts "pv_ground_underground_electrical_duct is #{pv_ground_underground_electrical_duct}"
|
|
146
|
+
|
|
147
|
+
### Step 2g: costing of grounding -------------------------------
|
|
148
|
+
# Step 2g-1: costing of ground rod
|
|
149
|
+
quantity_grounding_ground_rod = 1.0
|
|
150
|
+
search_grounding_ground_rod = {
|
|
151
|
+
row_id_1: 'Ground_Rod',
|
|
152
|
+
row_id_2: 1356.0
|
|
153
|
+
}
|
|
154
|
+
sheet_name = 'materials_hvac'
|
|
155
|
+
column_1 = 'Material'
|
|
156
|
+
column_2 = 'material_id'
|
|
157
|
+
pv_ground_grounding_ground_rod = assembly_cost(cost_info:search_grounding_ground_rod,
|
|
158
|
+
sheet_name:sheet_name,
|
|
159
|
+
column_1:column_1,
|
|
160
|
+
column_2:column_2,
|
|
161
|
+
quantity: quantity_grounding_ground_rod,
|
|
162
|
+
tags: tags)
|
|
163
|
+
# puts "quantity_grounding_ground_rod is #{quantity_grounding_ground_rod}"
|
|
164
|
+
# puts "pv_grounding_ground_rod is #{pv_ground_grounding_ground_rod}"
|
|
165
|
+
|
|
166
|
+
# Step 2g-2: costing of exo weld
|
|
167
|
+
quantity_grounding_exo_weld = 2.0
|
|
168
|
+
search_grounding_exo_weld = {
|
|
169
|
+
row_id_1: 'Exo_weld',
|
|
170
|
+
row_id_2: 1373.0
|
|
171
|
+
}
|
|
172
|
+
sheet_name = 'materials_hvac'
|
|
173
|
+
column_1 = 'Material'
|
|
174
|
+
column_2 = 'material_id'
|
|
175
|
+
pv_ground_grounding_exo_weld = assembly_cost(cost_info:search_grounding_exo_weld,
|
|
176
|
+
sheet_name:sheet_name,
|
|
177
|
+
column_1:column_1,
|
|
178
|
+
column_2:column_2,
|
|
179
|
+
quantity: quantity_grounding_exo_weld,
|
|
180
|
+
tags: tags)
|
|
181
|
+
# puts "quantity_grounding_exo_weld is #{quantity_grounding_exo_weld}"
|
|
182
|
+
# puts "pv_grounding_exo_weld is #{pv_ground_grounding_exo_weld}"
|
|
183
|
+
|
|
184
|
+
# Step 2g-3: costing of ground wire #4
|
|
185
|
+
quantity_grounding_ground_wire_4 = 100.0 / 100.0
|
|
186
|
+
search_grounding_ground_wire_4 = {
|
|
187
|
+
row_id_1: 'Wire_copper_stranded',
|
|
188
|
+
row_id_2: 1372.0
|
|
189
|
+
}
|
|
190
|
+
sheet_name = 'materials_hvac'
|
|
191
|
+
column_1 = 'Material'
|
|
192
|
+
column_2 = 'material_id'
|
|
193
|
+
pv_ground_grounding_ground_wire_4 = assembly_cost(cost_info:search_grounding_ground_wire_4,
|
|
194
|
+
sheet_name:sheet_name,
|
|
195
|
+
column_1:column_1,
|
|
196
|
+
column_2:column_2,
|
|
197
|
+
quantity: quantity_grounding_ground_wire_4,
|
|
198
|
+
tags: tags)
|
|
199
|
+
# puts "quantity_grounding_ground_wire_4 is #{quantity_grounding_ground_wire_4}"
|
|
200
|
+
# puts "pv_grounding_ground_wire_4 is #{pv_ground_grounding_ground_wire_4}"
|
|
201
|
+
|
|
202
|
+
# Step 2g-4: costing of ground wire #6
|
|
203
|
+
quantity_grounding_ground_wire_6 = 20.0
|
|
204
|
+
search_grounding_ground_wire_6 = {
|
|
205
|
+
row_id_1: 'Wire_copper_solid',
|
|
206
|
+
row_id_2: 1361.0
|
|
207
|
+
}
|
|
208
|
+
sheet_name = 'materials_hvac'
|
|
209
|
+
column_1 = 'Material'
|
|
210
|
+
column_2 = 'material_id'
|
|
211
|
+
pv_ground_grounding_ground_wire_6 = assembly_cost(cost_info:search_grounding_ground_wire_6,
|
|
212
|
+
sheet_name:sheet_name,
|
|
213
|
+
column_1:column_1,
|
|
214
|
+
column_2:column_2,
|
|
215
|
+
quantity: quantity_grounding_ground_wire_6,
|
|
216
|
+
tags: tags)
|
|
217
|
+
# puts "quantity_grounding_ground_wire_6 is #{quantity_grounding_ground_wire_6}"
|
|
218
|
+
# puts "pv_grounding_ground_wire_6 is #{pv_ground_grounding_ground_wire_6}"
|
|
219
|
+
|
|
220
|
+
# Step 2g-5: costing of wire brazing
|
|
221
|
+
quantity_grounding_wire_brazing = 1.0
|
|
222
|
+
search_grounding_wire_brazing = {
|
|
223
|
+
row_id_1: 'Brazed_connection',
|
|
224
|
+
row_id_2: 1374.0
|
|
225
|
+
}
|
|
226
|
+
sheet_name = 'materials_hvac'
|
|
227
|
+
column_1 = 'Material'
|
|
228
|
+
column_2 = 'material_id'
|
|
229
|
+
pv_ground_grounding_wire_brazing = assembly_cost(cost_info:search_grounding_wire_brazing,
|
|
230
|
+
sheet_name:sheet_name,
|
|
231
|
+
column_1:column_1,
|
|
232
|
+
column_2:column_2,
|
|
233
|
+
quantity: quantity_grounding_wire_brazing,
|
|
234
|
+
tags: tags)
|
|
235
|
+
# puts "quantity_grounding_wire_brazing is #{quantity_grounding_wire_brazing}"
|
|
236
|
+
# puts "pv_grounding_wire_brazing is #{pv_ground_grounding_wire_brazing}"
|
|
237
|
+
|
|
238
|
+
# total cost of grounding
|
|
239
|
+
pv_ground_grounding = pv_ground_grounding_ground_rod +
|
|
240
|
+
pv_ground_grounding_exo_weld +
|
|
241
|
+
pv_ground_grounding_ground_wire_4 +
|
|
242
|
+
pv_ground_grounding_ground_wire_6 +
|
|
243
|
+
pv_ground_grounding_wire_brazing
|
|
244
|
+
# puts "pv_ground_grounding is #{pv_ground_grounding}"
|
|
245
|
+
|
|
246
|
+
### Step 2h: sum of 2a,b,c,d,e,f,g ------------------------------
|
|
247
|
+
# calculate total cost of concrete base (2a + 2b + 2c + 2d + 2e + 2f + 2g)
|
|
248
|
+
costing_of_concrete_base = pv_ground_costing_concrete +
|
|
249
|
+
pv_ground_costing_excavation +
|
|
250
|
+
pv_ground_concrete_footing +
|
|
251
|
+
pv_ground_backfill +
|
|
252
|
+
pv_ground_compaction +
|
|
253
|
+
pv_ground_underground_electrical_duct +
|
|
254
|
+
pv_ground_grounding
|
|
255
|
+
# puts "costing_of_concrete_base is #{costing_of_concrete_base}"
|
|
256
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
257
|
+
##### Step 3: pv modules' racking costing
|
|
258
|
+
quantity_racking = dc_system_capacity_kw * 1.0
|
|
259
|
+
search_pv_racking = {
|
|
260
|
+
row_id_1: 'pvgroundmount',
|
|
261
|
+
row_id_2: 6.0
|
|
262
|
+
}
|
|
263
|
+
sheet_name = 'materials_hvac'
|
|
264
|
+
column_1 = 'Material'
|
|
265
|
+
column_2 = 'Size'
|
|
266
|
+
pv_ground_racking = assembly_cost(cost_info:search_pv_racking,
|
|
267
|
+
sheet_name:sheet_name,
|
|
268
|
+
column_1:column_1,
|
|
269
|
+
column_2:column_2,
|
|
270
|
+
quantity:quantity_racking,
|
|
271
|
+
tags: tags)
|
|
272
|
+
# puts "quantity_racking is #{quantity_racking}"
|
|
273
|
+
# puts "pv_ground_racking is #{pv_ground_racking}"
|
|
274
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
275
|
+
##### Step 4: pv module costing
|
|
276
|
+
# Note: osm file does not show total area of PV panels; instead it shows the total wattage of PV panels.
|
|
277
|
+
# So, for the calculation of number of PV panels, we have assumed that a specific module is being used based on
|
|
278
|
+
# the module type that we can get from the osm file. In this way, we know the wattage of each PV panel;
|
|
279
|
+
# so, we can calculate number of PV panels.
|
|
280
|
+
if module_type == 'Standard' #As per Mike Lubun's comment, we assume using 'HES-160-36PV 26.6 x 58.3 x 1.38' as 'Standard' (i.e. 'poly'/'perc')
|
|
281
|
+
row_id_1 = 'HES-160-36PV 26.6 x 58.3 x 1.38'
|
|
282
|
+
row_id_2 = 160.0 #wattage of each module of 'HES-160-36PV 26.6 x 58.3 x 1.38'
|
|
283
|
+
quantity_number_of_panels = dc_system_capacity_w / row_id_2
|
|
284
|
+
elsif module_type == 'Premium' #As per Mike Lubun's comment, we assume using 'Heliene 36HD 26.6 x 58.6 x 1.6' as 'Premium' (i.e. 'mono')
|
|
285
|
+
row_id_1 = 'Heliene 36HD 26.6 x 58.6 x 1.6'
|
|
286
|
+
row_id_2 = 160.0 #wattage of each module of 'Heliene 36HD 26.6 x 58.6 x 1.6'
|
|
287
|
+
quantity_number_of_panels = dc_system_capacity_w / row_id_2
|
|
288
|
+
elsif module_type == 'ThinFilm' #As per Mike Lubun's comment, we assume using 'Powerfilm, Soltronic Semi-Flex with Sunpower cells, 21 x 44.5 x 0.08' as 'ThinFilm' (i.e. 'thin')
|
|
289
|
+
row_id_1 = 'Powerfilm, Soltronic Semi-Flex with Sunpower cells, 21 x 44.5 x 0.08'
|
|
290
|
+
row_id_2 = 100.0 #wattage of each module of 'Powerfilm, Soltronic Semi-Flex with Sunpower cells, 21 x 44.5 x 0.08'
|
|
291
|
+
quantity_number_of_panels = dc_system_capacity_w / row_id_2
|
|
292
|
+
end
|
|
293
|
+
search_pv_module = {
|
|
294
|
+
row_id_1: row_id_1,
|
|
295
|
+
row_id_2: row_id_2
|
|
296
|
+
}
|
|
297
|
+
sheet_name = 'materials_hvac'
|
|
298
|
+
column_1 = 'description'
|
|
299
|
+
column_2 = 'Size'
|
|
300
|
+
pv_ground_costing_pv_module = assembly_cost(cost_info:search_pv_module,
|
|
301
|
+
sheet_name:sheet_name,
|
|
302
|
+
column_1:column_1,
|
|
303
|
+
column_2:column_2,
|
|
304
|
+
quantity:quantity_number_of_panels,
|
|
305
|
+
tags: tags)
|
|
306
|
+
# puts "quantity_number_of_panels is #{quantity_number_of_panels}"
|
|
307
|
+
# puts "pv_ground_costing_pv_module is #{pv_ground_costing_pv_module}"
|
|
308
|
+
|
|
309
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
310
|
+
##### Step 5: pv wiring costing
|
|
311
|
+
# Step 5-1
|
|
312
|
+
quantity_wiring_wire = dc_system_capacity_kw * 1.0#unit: CLF (Hundred Linear Feet)
|
|
313
|
+
search_pv_wire = {
|
|
314
|
+
row_id_1: 'Wire_copper_stranded',
|
|
315
|
+
row_id_2: 6.0
|
|
316
|
+
}
|
|
317
|
+
sheet_name = 'materials_hvac'
|
|
318
|
+
column_1 = 'Material'
|
|
319
|
+
column_2 = 'Size'
|
|
320
|
+
pv_ground_wiring_wire = assembly_cost(cost_info:search_pv_wire,
|
|
321
|
+
sheet_name:sheet_name,
|
|
322
|
+
column_1:column_1,
|
|
323
|
+
column_2:column_2,
|
|
324
|
+
quantity:quantity_wiring_wire,
|
|
325
|
+
tags: tags)
|
|
326
|
+
# puts "quantity_wiring_wire is #{quantity_wiring_wire}"
|
|
327
|
+
# puts "pv_ground_wiring_wire is #{pv_ground_wiring_wire}"
|
|
328
|
+
|
|
329
|
+
# Step 5-2
|
|
330
|
+
quantity_wiring_conduit = dc_system_capacity_kw * 27.0 #unit: LF
|
|
331
|
+
search_pv_conduit = {
|
|
332
|
+
row_id_1: 'Conduit',
|
|
333
|
+
row_id_2: 851.0
|
|
334
|
+
}
|
|
335
|
+
sheet_name = 'materials_hvac'
|
|
336
|
+
column_1 = 'Material'
|
|
337
|
+
column_2 = 'material_id'
|
|
338
|
+
pv_ground_wiring_conduit = assembly_cost(cost_info:search_pv_conduit,
|
|
339
|
+
sheet_name:sheet_name,
|
|
340
|
+
column_1:column_1,
|
|
341
|
+
column_2:column_2,
|
|
342
|
+
quantity:quantity_wiring_conduit,
|
|
343
|
+
tags: tags)
|
|
344
|
+
# puts "quantity_wiring_conduit is #{quantity_wiring_conduit}"
|
|
345
|
+
# puts "pv_ground_wiring_conduit is #{pv_ground_wiring_conduit}"
|
|
346
|
+
|
|
347
|
+
pv_ground_wiring = pv_ground_wiring_wire + pv_ground_wiring_conduit
|
|
348
|
+
# puts "pv_ground_wiring is #{pv_ground_wiring}"
|
|
349
|
+
|
|
350
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
351
|
+
##### Step 6: pv inverter costing
|
|
352
|
+
# Step 6-1: inverters themselves
|
|
353
|
+
if dc_system_capacity_kw < 4.0
|
|
354
|
+
inverter_size = 3.0
|
|
355
|
+
inverter_multiplier = 1.0
|
|
356
|
+
elsif dc_system_capacity_kw == 4.0
|
|
357
|
+
inverter_size = 4.0
|
|
358
|
+
inverter_multiplier = 1.0
|
|
359
|
+
elsif dc_system_capacity_kw > 4.0
|
|
360
|
+
inverter_size = 4.0
|
|
361
|
+
inverter_multiplier = dc_system_capacity_kw / 4.0
|
|
362
|
+
inverter_multiplier = inverter_multiplier.ceil
|
|
363
|
+
end
|
|
364
|
+
# puts "inverter_multiplier is #{inverter_multiplier}"
|
|
365
|
+
quantity_inverter_itself = inverter_multiplier.to_f
|
|
366
|
+
search_pv_inverter_itself = {
|
|
367
|
+
row_id_1: 'inverter24',
|
|
368
|
+
row_id_2: inverter_size
|
|
369
|
+
}
|
|
370
|
+
sheet_name = 'materials_hvac'
|
|
371
|
+
column_1 = 'Material'
|
|
372
|
+
column_2 = 'Size'
|
|
373
|
+
pv_ground_inverter_itself = assembly_cost(cost_info:search_pv_inverter_itself,
|
|
374
|
+
sheet_name:sheet_name,
|
|
375
|
+
column_1:column_1,
|
|
376
|
+
column_2:column_2,
|
|
377
|
+
quantity:quantity_inverter_itself,
|
|
378
|
+
tags: tags)
|
|
379
|
+
# puts "quantity_inverter_itself is #{quantity_inverter_itself}"
|
|
380
|
+
# puts "pv_ground_inverter_itself is #{pv_ground_inverter_itself}"
|
|
381
|
+
|
|
382
|
+
# Step 6-2: inverters' boxes
|
|
383
|
+
quantity_inverter_box = inverter_multiplier.to_f
|
|
384
|
+
search_pv_inverter_box = {
|
|
385
|
+
row_id_1: 'pvbox',
|
|
386
|
+
row_id_2: 1135.0
|
|
387
|
+
}
|
|
388
|
+
sheet_name = 'materials_hvac'
|
|
389
|
+
column_1 = 'Material'
|
|
390
|
+
column_2 = 'material_id'
|
|
391
|
+
pv_ground_inverter_box = assembly_cost(cost_info:search_pv_inverter_box,
|
|
392
|
+
sheet_name:sheet_name,
|
|
393
|
+
column_1:column_1,
|
|
394
|
+
column_2:column_2,
|
|
395
|
+
quantity:quantity_inverter_box,
|
|
396
|
+
tags: tags)
|
|
397
|
+
# puts "quantity_inverter_box is #{quantity_inverter_box}"
|
|
398
|
+
# puts "pv_ground_inverter_box is #{pv_ground_inverter_box}"
|
|
399
|
+
|
|
400
|
+
pv_ground_inverter = pv_ground_inverter_itself + pv_ground_inverter_box
|
|
401
|
+
# puts "pv_ground_inverter is #{pv_ground_inverter}"
|
|
402
|
+
|
|
403
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
404
|
+
##### Step 7: transformer costing
|
|
405
|
+
transformer_types = [1.0, 2.0, 3.0, 5.0, 7.5, 10.0, 15.0, 25.0, 37.5, 50.0, 75.0, 100.0, 167.0] #based on Mike Lubun's costing spreadsheet
|
|
406
|
+
transformer_closet_to_pv_kw = transformer_types.sort_by { |item| (dc_system_capacity_kw-item).abs }.first(1)
|
|
407
|
+
# puts "transformer_closet_to_pv_kw is #{transformer_closet_to_pv_kw}"
|
|
408
|
+
if dc_system_capacity_kw <= 167.0
|
|
409
|
+
transformer_multiplier = 1.0
|
|
410
|
+
row_id_2 = transformer_closet_to_pv_kw[0]
|
|
411
|
+
else #i.e. dc_system_capacity_kw > 167.0
|
|
412
|
+
transformer_multiplier = dc_system_capacity_kw / 167.0
|
|
413
|
+
transformer_multiplier = transformer_multiplier.ceil
|
|
414
|
+
row_id_2 = 167.0
|
|
415
|
+
end
|
|
416
|
+
# puts "transformer_multiplier is #{transformer_multiplier}"
|
|
417
|
+
quantity_transformer = transformer_multiplier.to_f
|
|
418
|
+
search_transformer = {
|
|
419
|
+
row_id_1: 'Transformer_dry_low_voltage',
|
|
420
|
+
row_id_2: row_id_2
|
|
421
|
+
}
|
|
422
|
+
sheet_name = 'materials_hvac'
|
|
423
|
+
column_1 = 'Material'
|
|
424
|
+
column_2 = 'Size'
|
|
425
|
+
pv_ground_transformer = assembly_cost(cost_info:search_transformer,
|
|
426
|
+
sheet_name:sheet_name,
|
|
427
|
+
column_1:column_1,
|
|
428
|
+
column_2:column_2,
|
|
429
|
+
quantity:quantity_transformer,
|
|
430
|
+
tags: tags)
|
|
431
|
+
# puts "quantity_transformer is #{quantity_transformer}"
|
|
432
|
+
# puts "pv_ground_transformer is #{pv_ground_transformer}"
|
|
433
|
+
|
|
434
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
435
|
+
##### Step 8: circuit breakers costing
|
|
436
|
+
circuit_breaker240_types = [30.0, 60.0, 100.0, 200.0, 400.0, 600.0]
|
|
437
|
+
circuit_breaker_amps = (dc_system_capacity_kw * 1000.0 * 1.5 / 24.0) * 1.25
|
|
438
|
+
# puts "circuit_breaker_amps is #{circuit_breaker_amps}"
|
|
439
|
+
circuit_breaker_closet_to_pv_amps = circuit_breaker240_types.sort_by { |item| (circuit_breaker_amps-item).abs }.first(1)
|
|
440
|
+
# puts "circuit_breaker_closet_to_pv_amps is #{circuit_breaker_closet_to_pv_amps}"
|
|
441
|
+
if circuit_breaker_amps <= 600.0
|
|
442
|
+
circuit_breaker_multiplier = 1.0
|
|
443
|
+
row_id_2 = circuit_breaker_closet_to_pv_amps[0]
|
|
444
|
+
else #i.e. circuit_breaker_amps > 600.0
|
|
445
|
+
circuit_breaker_multiplier = circuit_breaker_amps / 600.0
|
|
446
|
+
circuit_breaker_multiplier = circuit_breaker_multiplier.ceil
|
|
447
|
+
row_id_2 = 600.0
|
|
448
|
+
end
|
|
449
|
+
quantity_circuit_breakers = circuit_breaker_multiplier.to_f
|
|
450
|
+
search_circuit_breakers = {
|
|
451
|
+
row_id_1: 'Circuit_breaker240',
|
|
452
|
+
row_id_2: row_id_2
|
|
453
|
+
}
|
|
454
|
+
sheet_name = 'materials_hvac'
|
|
455
|
+
column_1 = 'Material'
|
|
456
|
+
column_2 = 'Size'
|
|
457
|
+
pv_ground_circuit_breakers = assembly_cost(cost_info:search_circuit_breakers,
|
|
458
|
+
sheet_name:sheet_name,
|
|
459
|
+
column_1:column_1,
|
|
460
|
+
column_2:column_2,
|
|
461
|
+
quantity:quantity_circuit_breakers,
|
|
462
|
+
tags: tags)
|
|
463
|
+
# puts "quantity_circuit_breakers is #{quantity_circuit_breakers}"
|
|
464
|
+
# puts "pv_ground_circuit_breakers is #{pv_ground_circuit_breakers}"
|
|
465
|
+
|
|
466
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
467
|
+
##### Step 9: circuit breaker fuses costing
|
|
468
|
+
circuit_breaker_fuse = circuit_breaker_amps
|
|
469
|
+
circuit_breaker_fuse_250V_timedelay_types = [30.0, 5.0, 60.0, 100.0, 200.0, 400.0, 600.0]
|
|
470
|
+
circuit_breaker_fuse_closet_to_pv_amps = circuit_breaker_fuse_250V_timedelay_types.sort_by { |item| (circuit_breaker_fuse-item).abs }.first(1)
|
|
471
|
+
# puts "circuit_breaker_fuse_closet_to_pv_amps is #{circuit_breaker_fuse_closet_to_pv_amps}"
|
|
472
|
+
if circuit_breaker_fuse <= 600.0
|
|
473
|
+
circuit_breaker_fuse_multiplier = 1.0
|
|
474
|
+
row_id_2 = circuit_breaker_fuse_closet_to_pv_amps[0]
|
|
475
|
+
else #i.e. circuit_breaker_fuse > 600.0
|
|
476
|
+
circuit_breaker_fuse_multiplier = circuit_breaker_fuse / 600.0
|
|
477
|
+
circuit_breaker_fuse_multiplier = circuit_breaker_fuse_multiplier.ceil
|
|
478
|
+
row_id_2 = 600.0
|
|
479
|
+
end
|
|
480
|
+
quantity_circuit_breaker_fuses = circuit_breaker_fuse_multiplier.to_f
|
|
481
|
+
search_circuit_breaker_fuses = {
|
|
482
|
+
row_id_1: 'fuse_250V_timedelay',
|
|
483
|
+
row_id_2: row_id_2
|
|
484
|
+
}
|
|
485
|
+
sheet_name = 'materials_hvac'
|
|
486
|
+
column_1 = 'Material'
|
|
487
|
+
column_2 = 'Size'
|
|
488
|
+
pv_ground_circuit_breaker_fuses = assembly_cost(cost_info:search_circuit_breaker_fuses,
|
|
489
|
+
sheet_name:sheet_name,
|
|
490
|
+
column_1:column_1,
|
|
491
|
+
column_2:column_2,
|
|
492
|
+
quantity:quantity_circuit_breaker_fuses,
|
|
493
|
+
tags: tags)
|
|
494
|
+
# puts "quantity_circuit_breaker_fuses is #{quantity_circuit_breaker_fuses}"
|
|
495
|
+
# puts "pv_ground_circuit_breaker_fuses is #{pv_ground_circuit_breaker_fuses}"
|
|
496
|
+
|
|
497
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
498
|
+
##### Step 10: PV fuses costing
|
|
499
|
+
# Step 10-1: PV fuses
|
|
500
|
+
quantity_pv_fuse_itself = (dc_system_capacity_kw * 1.0).ceil.to_f
|
|
501
|
+
search_pv_fuse = {
|
|
502
|
+
row_id_1: 'fuse_120V',
|
|
503
|
+
row_id_2: 15.0
|
|
504
|
+
}
|
|
505
|
+
sheet_name = 'materials_hvac'
|
|
506
|
+
column_1 = 'Material'
|
|
507
|
+
column_2 = 'Size'
|
|
508
|
+
pv_ground_pv_fuse_itself = assembly_cost(cost_info:search_pv_fuse,
|
|
509
|
+
sheet_name:sheet_name,
|
|
510
|
+
column_1:column_1,
|
|
511
|
+
column_2:column_2,
|
|
512
|
+
quantity:quantity_pv_fuse_itself,
|
|
513
|
+
tags: tags)
|
|
514
|
+
# puts "quantity_pv_fuse_itself is #{quantity_pv_fuse_itself}"
|
|
515
|
+
# puts "pv_ground_pv_fuse_itself is #{pv_ground_pv_fuse_itself}"
|
|
516
|
+
|
|
517
|
+
# Step 10-2: PV combiner box
|
|
518
|
+
quantity_pv_combiner_box = (dc_system_capacity_kw / 10.0).ceil.to_f
|
|
519
|
+
search_pv_combiner_box = {
|
|
520
|
+
row_id_1: 'pvcombinerbox',
|
|
521
|
+
row_id_2: 1125.0
|
|
522
|
+
}
|
|
523
|
+
sheet_name = 'materials_hvac'
|
|
524
|
+
column_1 = 'Material'
|
|
525
|
+
column_2 = 'material_id'
|
|
526
|
+
pv_ground_pv_combiner_box = assembly_cost(cost_info:search_pv_combiner_box,
|
|
527
|
+
sheet_name:sheet_name,
|
|
528
|
+
column_1:column_1,
|
|
529
|
+
column_2:column_2,
|
|
530
|
+
quantity:quantity_pv_combiner_box,
|
|
531
|
+
tags: tags)
|
|
532
|
+
# puts "quantity_pv_combiner_box is #{quantity_pv_combiner_box}"
|
|
533
|
+
# puts "pv_ground_pv_combiner_box is #{pv_ground_pv_combiner_box}"
|
|
534
|
+
|
|
535
|
+
pv_ground_pv_fuses = pv_ground_pv_fuse_itself + pv_ground_pv_combiner_box
|
|
536
|
+
# puts "pv_ground_pv_fuses is #{pv_ground_pv_fuses}"
|
|
537
|
+
|
|
538
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
539
|
+
##### Step 11: disconnects costing
|
|
540
|
+
quantity_disconnect_before_inverter = 1.0
|
|
541
|
+
search_disconnect_before_inverter = {
|
|
542
|
+
row_id_1: 'Circuit_breaker240',
|
|
543
|
+
row_id_2: 1403.0
|
|
544
|
+
}
|
|
545
|
+
sheet_name = 'materials_hvac'
|
|
546
|
+
column_1 = 'Material'
|
|
547
|
+
column_2 = 'material_id'
|
|
548
|
+
pv_ground_disconnect_before_inverter = assembly_cost(cost_info:search_disconnect_before_inverter,
|
|
549
|
+
sheet_name:sheet_name,
|
|
550
|
+
column_1:column_1,
|
|
551
|
+
column_2:column_2,
|
|
552
|
+
quantity:quantity_disconnect_before_inverter,
|
|
553
|
+
tags: tags)
|
|
554
|
+
# puts "quantity_disconnect_before_inverter is #{quantity_disconnect_before_inverter}"
|
|
555
|
+
# puts "pv_ground_disconnect_before_inverter is #{pv_ground_disconnect_before_inverter}"
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
quantity_disconnect_after_transformer = 1.0
|
|
559
|
+
search_disconnect_after_transformer = {
|
|
560
|
+
row_id_1: 'Circuit_breaker240',
|
|
561
|
+
row_id_2: 1407.0
|
|
562
|
+
}
|
|
563
|
+
sheet_name = 'materials_hvac'
|
|
564
|
+
column_1 = 'Material'
|
|
565
|
+
column_2 = 'material_id'
|
|
566
|
+
pv_ground_disconnect_after_transformer = assembly_cost(cost_info:search_disconnect_after_transformer,
|
|
567
|
+
sheet_name:sheet_name,
|
|
568
|
+
column_1:column_1,
|
|
569
|
+
column_2:column_2,
|
|
570
|
+
quantity:quantity_disconnect_after_transformer,
|
|
571
|
+
tags: tags)
|
|
572
|
+
# puts "quantity_disconnect_after_transformer is #{quantity_disconnect_after_transformer}"
|
|
573
|
+
# puts "pv_ground_disconnect_after_transformer is #{pv_ground_disconnect_after_transformer}"
|
|
574
|
+
|
|
575
|
+
pv_ground_disconnects = pv_ground_disconnect_before_inverter + pv_ground_disconnect_after_transformer
|
|
576
|
+
# puts "pv_ground_disconnects is #{pv_ground_disconnects}"
|
|
577
|
+
|
|
578
|
+
#-----------------------------------------------------------------------------------------------------------------
|
|
579
|
+
##### Step 12: calculate total cost of the ground mount PV system (sum of steps 2 to 11)
|
|
580
|
+
pv_ground_total_cost_handle = costing_of_concrete_base +
|
|
581
|
+
pv_ground_racking +
|
|
582
|
+
pv_ground_costing_pv_module +
|
|
583
|
+
pv_ground_wiring +
|
|
584
|
+
pv_ground_inverter +
|
|
585
|
+
pv_ground_transformer +
|
|
586
|
+
pv_ground_circuit_breakers +
|
|
587
|
+
pv_ground_circuit_breaker_fuses +
|
|
588
|
+
pv_ground_pv_fuses +
|
|
589
|
+
pv_ground_disconnects
|
|
590
|
+
|
|
591
|
+
pv_ground_total_cost += pv_ground_total_cost_handle
|
|
592
|
+
|
|
593
|
+
# puts "pv_ground_total_cost_handle is #{pv_ground_total_cost_handle}"
|
|
594
|
+
|
|
595
|
+
##### Gather information for reporting
|
|
596
|
+
@costing_report['renewables']['pv'] << {
|
|
597
|
+
'generator_PVWatt_name' => generator_PVWatt.name.to_s,
|
|
598
|
+
'costing_of_concrete_base' => costing_of_concrete_base,
|
|
599
|
+
'pv_ground_racking' => pv_ground_racking,
|
|
600
|
+
'pv_ground_costing_pv_module' => pv_ground_costing_pv_module,
|
|
601
|
+
'pv_ground_wiring' => pv_ground_wiring,
|
|
602
|
+
'pv_ground_inverter' => pv_ground_inverter,
|
|
603
|
+
'pv_ground_transformer' => pv_ground_transformer,
|
|
604
|
+
'pv_ground_circuit_breakers' => pv_ground_circuit_breakers,
|
|
605
|
+
'pv_ground_circuit_breaker_fuses' => pv_ground_circuit_breaker_fuses,
|
|
606
|
+
'pv_ground_pv_fuses' => pv_ground_pv_fuses,
|
|
607
|
+
'pv_ground_disconnects' => pv_ground_disconnects,
|
|
608
|
+
'the_generator_PVWatt_total_cost' => pv_ground_total_cost_handle
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
a += 1
|
|
612
|
+
|
|
613
|
+
end
|
|
614
|
+
if a > 0
|
|
615
|
+
@costing_report['renewables']['pv'] << {
|
|
616
|
+
'pv_ground_total_cost' => pv_ground_total_cost
|
|
617
|
+
}
|
|
618
|
+
end
|
|
619
|
+
|
|
620
|
+
puts "\nGround-mounted PV costing data successfully generated. Total PV costs: $#{pv_ground_total_cost.round(2)}"
|
|
621
|
+
|
|
622
|
+
return pv_ground_total_cost
|
|
623
|
+
end #cost_audit_pv_ground(model, prototype_creator)
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
def assembly_cost(cost_info:, sheet_name:, column_1:, column_2:, quantity:, tags:)
|
|
627
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
628
|
+
### Step I: find mat_id
|
|
629
|
+
mat_data = nil
|
|
630
|
+
mat_data = @costing_database['raw'][sheet_name].select { |data|
|
|
631
|
+
data[column_1].to_s.upcase == cost_info[:row_id_1].to_s.upcase and
|
|
632
|
+
data[column_2].to_f.round(1) == cost_info[:row_id_2].to_f.round(1)
|
|
633
|
+
}.first
|
|
634
|
+
mat_id = mat_data['id']
|
|
635
|
+
material_adjust = mat_data['material_mult']
|
|
636
|
+
labour_adjust = mat_data['labour_mult']
|
|
637
|
+
material_adjust = 1.0 if material_adjust.nil?
|
|
638
|
+
labour_adjust = 1.0 if labour_adjust.nil?
|
|
639
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
640
|
+
### Step II: calculate unit cost
|
|
641
|
+
mat_cost_info = @costing_database['costs'].select { |data| data['id'] == mat_id.to_s.upcase }.first
|
|
642
|
+
regional_material, regional_installation, regional_equipment = get_regional_cost_factors(@costing_report["province_state"], @costing_report["city"], mat_cost_info)
|
|
643
|
+
# puts "regional_material, regional_installation, regional_equipment #{regional_material}, #{regional_installation}, #{regional_equipment}"
|
|
644
|
+
|
|
645
|
+
if mat_cost_info['baseCosts']['materialOpCost'].nil?
|
|
646
|
+
cost_material = 0.0
|
|
647
|
+
else
|
|
648
|
+
cost_material = mat_cost_info['baseCosts']['materialOpCost'] * (regional_material / 100.0) * material_adjust.to_f
|
|
649
|
+
end
|
|
650
|
+
if mat_cost_info['baseCosts']['laborOpCost'].nil?
|
|
651
|
+
cost_labour = 0.0
|
|
652
|
+
else
|
|
653
|
+
cost_labour = mat_cost_info['baseCosts']['laborOpCost'] * (regional_installation / 100.0) * labour_adjust.to_f
|
|
654
|
+
end
|
|
655
|
+
if mat_cost_info['baseCosts']['equipmentOpCost'].nil?
|
|
656
|
+
cost_equipment = 0.0
|
|
657
|
+
else
|
|
658
|
+
cost_equipment = mat_cost_info['baseCosts']['equipmentOpCost'] * (regional_equipment / 100.0)
|
|
659
|
+
end
|
|
660
|
+
|
|
661
|
+
cost_unit = cost_material + cost_labour + cost_equipment
|
|
662
|
+
# puts "cost_unit is #{cost_unit}"
|
|
663
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
664
|
+
### Step III: calculate total cost
|
|
665
|
+
cost_total = cost_unit * quantity
|
|
666
|
+
# puts "cost_total is #{cost_total}"
|
|
667
|
+
#-------------------------------------------------------------------------------------------------------------------
|
|
668
|
+
# Gather info for costed items output file
|
|
669
|
+
unless mat_data['Material'].nil?
|
|
670
|
+
tags << mat_data['Material']
|
|
671
|
+
end
|
|
672
|
+
unless mat_data['description'].nil?
|
|
673
|
+
tags << mat_data['description']
|
|
674
|
+
end
|
|
675
|
+
if not tags.empty?
|
|
676
|
+
add_costed_item(material_id: mat_id.to_s,
|
|
677
|
+
quantity: quantity,
|
|
678
|
+
material_mult: material_adjust.to_f,
|
|
679
|
+
labour_mult: labour_adjust.to_f,
|
|
680
|
+
equip_mult: 1.0,
|
|
681
|
+
tags: tags)
|
|
682
|
+
end
|
|
683
|
+
|
|
684
|
+
return cost_total
|
|
685
|
+
end
|
|
686
|
+
|
|
687
|
+
end
|