Skip to content

Commit 6afd67e

Browse files
Merge pull request #42 from LBNL-ETA/develop
Develop
2 parents c675f05 + 1f67caa commit 6afd67e

File tree

8 files changed

+195
-83
lines changed

8 files changed

+195
-83
lines changed

CMakeLists-WinCalc.txt.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ include(ExternalProject)
44

55
ExternalProject_Add(wincalc
66
GIT_REPOSITORY https://github.com/LBNL-ETA/WinCalc.git
7-
GIT_TAG "v2.3.0"
7+
GIT_TAG "v2.4.0"
88

99
UPDATE_COMMAND ""
1010
PATCH_COMMAND ""

examples/deflection.py

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
glazing_system.enable_deflection(True)
3737

3838
# Set initial temperature and pressure. Values just chosen for example purposes
39-
glazing_system.set_deflection_properties(temperature_initial=273, pressure_initial=101320)
39+
glazing_system.set_deflection_properties(temperature_at_construction=273, pressure_at_construction=101320)
4040

4141
# Density can be calculated using either U or SHGC TARCOG system types. Just using SHGC for this
4242
# example for simplicity.
@@ -54,7 +54,7 @@
5454
print("\tVT: {val}".format(val=visible_results.system_results.front.transmittance.direct_hemispherical))
5555

5656
# Change initial temperature and pressure. Values just chosen for example purposes
57-
glazing_system.set_deflection_properties(temperature_initial=290, pressure_initial=101450)
57+
glazing_system.set_deflection_properties(temperature_at_construction=290, pressure_at_construction=101450)
5858
print("")
5959
print("Changed initial temperature and pressure")
6060
print("\tdeflection max: {val}".format(val=deflection_results.deflection_max))
@@ -174,7 +174,7 @@
174174

175175
glazing_system.environments(custom_env_2)
176176

177-
glazing_system.set_deflection_properties(temperature_initial=273, pressure_initial=101320)
177+
glazing_system.set_deflection_properties(temperature_at_construction=273, pressure_at_construction=101320)
178178
deflection_results = glazing_system.calc_deflection_properties(pywincalc.TarcogSystemType.SHGC)
179179

180180
print("")
@@ -204,7 +204,7 @@
204204
height_meters=height, tilt_degrees=tilt, environment=custom_env_2)
205205

206206
glazing_system.enable_deflection(True)
207-
glazing_system.set_deflection_properties(temperature_initial=273, pressure_initial=101320)
207+
glazing_system.set_deflection_properties(temperature_at_construction=273, pressure_at_construction=101320)
208208
deflection_results = glazing_system.calc_deflection_properties(pywincalc.TarcogSystemType.SHGC)
209209

210210
print("")
@@ -219,3 +219,22 @@
219219
"\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC)))
220220
visible_results = glazing_system.optical_method_results("PHOTOPIC")
221221
print("\tVT: {val}".format(val=visible_results.system_results.front.transmittance.direct_hemispherical))
222+
223+
224+
# If the deflection of the solid layers has been measured it can be used instead of temperature and pressure
225+
# to calculate other properties
226+
glazing_system.set_deflection_properties(measured_deflected_gaps=[.01, .015])
227+
deflection_results = glazing_system.calc_deflection_properties(pywincalc.TarcogSystemType.SHGC)
228+
229+
print("")
230+
print("Set measured gap widths")
231+
print("\tdeflection max: {val}".format(val=deflection_results.deflection_max))
232+
print("\tdeflection mean: {val}".format(val=deflection_results.deflection_mean))
233+
print("\tpanes load: {val}".format(val=deflection_results.panes_load))
234+
print("\tU: {val}".format(val=glazing_system.u()))
235+
print("\tSHGC: {val}".format(val=glazing_system.shgc()))
236+
print("\tLayer temperatures (U): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.U)))
237+
print(
238+
"\tLayer temperatures (SHGC): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.SHGC)))
239+
visible_results = glazing_system.optical_method_results("PHOTOPIC")
240+
print("\tVT: {val}".format(val=visible_results.system_results.front.transmittance.direct_hemispherical))

examples/gaps_and_gases.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,16 @@
7373
# Add circular pillars to the gap
7474
gap_6 = pywincalc.Layers.add_circular_pillar(gap_6, conductivity=999, spacing=0.03, radius=0.0002)
7575

76-
gaps = [gap_1, gap_2, gap_3, gap_4, gap_5, gap_6]
76+
# Gaps can now have forced ventilation. To create one first create a regular gap and then convert
77+
# to a forced ventilated gap. The gap that will be converted can be any of the above.
78+
gap_7 = pywincalc.Layers.gap(thickness=.0127) # .0127 is gap thickness in meters
79+
gap_7 = pywincalc.forced_ventilation_gap(gap=gap_7, forced_ventilation_air_speed=0.3, forced_ventilation_air_temperature=295)
80+
81+
gaps = [gap_1, gap_2, gap_3, gap_4, gap_5, gap_6, gap_7]
7782

7883
clear_3_path = "products/CLEAR_3.DAT"
7984
clear_3 = pywincalc.parse_optics_file(clear_3_path)
80-
solid_layers = [clear_3] * 7
85+
solid_layers = [clear_3] * 8
8186

8287
# Create a glazing system. This only shows an example of getting one result from a glazing system
8388
# created using default environmental conditions.
@@ -87,4 +92,4 @@
8792
# For more on environmental conditions see environmental_conditions_user_defined.py
8893
glazing_system = pywincalc.GlazingSystem(solid_layers=solid_layers, gap_layers=gaps)
8994
u_value = glazing_system.u()
90-
print("U-value for six-layer system of various gases: {v}".format(v=u_value))
95+
print("U-value for seven-layer system of various gases: {v}".format(v=u_value))

pywincalc/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
OpticalResultLayer, OpticalResultSide, OpticalResultSideColor, OpticalResultSide_Layer, OpticalResultTransmission, \
3838
OpticalResultTransmissionColor, OpticalResults, OpticalResultsColor, OpticalStandard, OpticalStandardMethod, \
3939
PVPowerProperty, PVWavelengthData, ParsedPerforatedGeometry, ParsedVenetianGeometry, ParsedWovenGeometry, \
40-
PerforatedGeometry, PredefinedGasConverter, PredefinedGasType, ProductComposistionData, ProductData, \
40+
PerforatedGeometry, PredefinedGasType, ProductComposistionData, ProductData, \
4141
ProductDataOptical, ProductDataOpticalAndThermal, ProductDataOpticalDualBand, \
4242
ProductDataOpticalDualBandBSDF, ProductDataOpticalDualBandHemispheric, ProductDataOpticalNBand, \
4343
ProductDataOpticalPerforatedScreen, ProductDataOpticalVenetian, ProductDataOpticalWithMaterial, \
@@ -51,7 +51,9 @@
5151
create_best_worst_u_factor_option, create_gas, create_perforated_screen, create_venetian_blind, create_woven_shade, \
5252
get_cma_window_double_vision_horizontal, get_cma_window_double_vision_vertical, get_cma_window_single_vision, \
5353
get_spacer_keff, nfrc_shgc_environments, nfrc_u_environments, parse_bsdf_xml_file, parse_bsdf_xml_string, \
54-
parse_json, parse_json_file, parse_optics_file, parse_thmx_file, parse_thmx_string
54+
parse_json, parse_json_file, parse_optics_file, parse_thmx_file, parse_thmx_string, IGUVentilatedGapLayer, \
55+
forced_ventilation_gap
56+
5557

5658

5759
@deprecation.deprecated(deprecated_in="3.0.0", removed_in="4.0.0",

0 commit comments

Comments
 (0)