Skip to content

Commit

Permalink
Updating name of some deflection results. Updated and added results i…
Browse files Browse the repository at this point in the history
…n deflection.py example
  • Loading branch information
StephenCzarnecki committed Aug 28, 2023
1 parent df7e925 commit 950724c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
36 changes: 20 additions & 16 deletions examples/deflection.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
# example for simplicity.
deflection_results = glazing_system.calc_deflection_properties(pywincalc.TarcogSystemType.SHGC)
print("Initial results")
print("\tdeflection max: {val}".format(val=deflection_results.deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.deflection_mean))
print("\tdeflection max: {val}".format(val=deflection_results.layer_deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.layer_deflection_mean))
print("\tpanes load: {val}".format(val=deflection_results.panes_load))
print("\tU: {val}".format(val=glazing_system.u()))
print("\tSHGC: {val}".format(val=glazing_system.shgc()))
Expand All @@ -57,8 +57,8 @@
glazing_system.set_deflection_properties(temperature_at_construction=290, pressure_at_construction=101450)
print("")
print("Changed initial temperature and pressure")
print("\tdeflection max: {val}".format(val=deflection_results.deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.deflection_mean))
print("\tdeflection max: {val}".format(val=deflection_results.layer_deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.layer_deflection_mean))
print("\tpanes load: {val}".format(val=deflection_results.panes_load))
print("\tU: {val}".format(val=glazing_system.u()))
print("\tSHGC: {val}".format(val=glazing_system.shgc()))
Expand All @@ -73,8 +73,8 @@

print("")
print("Set tilt")
print("\tdeflection max: {val}".format(val=deflection_results.deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.deflection_mean))
print("\tdeflection max: {val}".format(val=deflection_results.layer_deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.layer_deflection_mean))
print("\tpanes load: {val}".format(val=deflection_results.panes_load))
print("\tU: {val}".format(val=glazing_system.u()))
print("\tSHGC: {val}".format(val=glazing_system.shgc()))
Expand All @@ -91,8 +91,8 @@

print("")
print("Set applied loads")
print("\tdeflection max: {val}".format(val=deflection_results.deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.deflection_mean))
print("\tdeflection max: {val}".format(val=deflection_results.layer_deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.layer_deflection_mean))
print("\tpanes load: {val}".format(val=deflection_results.panes_load))
print("\tU: {val}".format(val=glazing_system.u()))
print("\tSHGC: {val}".format(val=glazing_system.shgc()))
Expand Down Expand Up @@ -152,8 +152,8 @@

print("")
print("Set custom environmental conditions 1")
print("\tdeflection max: {val}".format(val=deflection_results.deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.deflection_mean))
print("\tdeflection max: {val}".format(val=deflection_results.layer_deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.layer_deflection_mean))
print("\tpanes load: {val}".format(val=deflection_results.panes_load))
print("\tU: {val}".format(val=glazing_system.u()))
print("\tSHGC: {val}".format(val=glazing_system.shgc()))
Expand All @@ -179,8 +179,8 @@

print("")
print("Set custom environmental conditions 2")
print("\tdeflection max: {val}".format(val=deflection_results.deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.deflection_mean))
print("\tdeflection max: {val}".format(val=deflection_results.layer_deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.layer_deflection_mean))
print("\tpanes load: {val}".format(val=deflection_results.panes_load))
print("\tU: {val}".format(val=glazing_system.u()))
print("\tSHGC: {val}".format(val=glazing_system.shgc()))
Expand Down Expand Up @@ -209,9 +209,11 @@

print("")
print("Set density and Young's modulus")
print("\tdeflection max: {val}".format(val=deflection_results.deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.deflection_mean))
print("\tdeflection max: {val}".format(val=deflection_results.layer_deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.layer_deflection_mean))
print("\tpanes load: {val}".format(val=deflection_results.panes_load))
print("\tgap width max: {val}".format(val=deflection_results.gap_width_max))
print("\tgap width mean: {val}".format(val=deflection_results.gap_width_mean))
print("\tU: {val}".format(val=glazing_system.u()))
print("\tSHGC: {val}".format(val=glazing_system.shgc()))
print("\tLayer temperatures (U): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.U)))
Expand All @@ -228,9 +230,11 @@

print("")
print("Set measured gap widths")
print("\tdeflection max: {val}".format(val=deflection_results.deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.deflection_mean))
print("\tdeflection max: {val}".format(val=deflection_results.layer_deflection_max))
print("\tdeflection mean: {val}".format(val=deflection_results.layer_deflection_mean))
print("\tpanes load: {val}".format(val=deflection_results.panes_load))
print("\tgap width max: {val}".format(val=deflection_results.gap_width_max))
print("\tgap width mean: {val}".format(val=deflection_results.gap_width_mean))
print("\tU: {val}".format(val=glazing_system.u()))
print("\tSHGC: {val}".format(val=glazing_system.shgc()))
print("\tLayer temperatures (U): {val}".format(val=glazing_system.layer_temperatures(pywincalc.TarcogSystemType.U)))
Expand Down
4 changes: 2 additions & 2 deletions src/wincalcbindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -912,9 +912,9 @@ PYBIND11_MODULE(wincalcbindings, m) {
m.def("nfrc_shgc_environments", &wincalc::nfrc_shgc_environments);

py::class_<wincalc::Deflection_Results>(m, "DeflectionResults")
.def_readwrite("deflection_max",
.def_readwrite("layer_deflection_max",
&wincalc::Deflection_Results::layer_deflection_max)
.def_readwrite("deflection_mean",
.def_readwrite("layer_deflection_mean",
&wincalc::Deflection_Results::layer_deflection_mean)
.def_readwrite("panes_load", &wincalc::Deflection_Results::panes_load)
.def_readwrite("gap_width_max",
Expand Down

0 comments on commit 950724c

Please sign in to comment.