Class: BTAP::Structure
- Inherits:
-
Object
- Object
- BTAP::Structure
- Extended by:
- StructureData
- Defined in:
- lib/openstudio-standards/btap/structure.rb
Instance Attribute Summary collapse
-
#category ⇒ String
readonly
Default building type CATEGORY (e.g. "public").
-
#cladding ⇒ Symbol
readonly
Default building cladding (e.g. :medium).
-
#co2 ⇒ Hash
readonly
Default building STRUCTURE embodied carbon (CO2-e kg).
-
#deadload ⇒ Float
readonly
Default building dead load, in floor kg/m2.
-
#feedback ⇒ Hash
readonly
Logged messages.
-
#finish ⇒ Symbol
readonly
Default building finish (e.g. :light).
-
#framing ⇒ Symbol
readonly
Default building framing (e.g. :steel).
-
#liveload ⇒ Float
readonly
Default building non-occupant live load, in floor kg/m2.
-
#spaces ⇒ Hash
readonly
Customized STRUCTURE, FRAMING, CLADDING & FINISH per space.
-
#structure ⇒ Symbol
readonly
Default building STRUCTURE selection (e.g. :steel).
Instance Method Summary collapse
-
#initialize(model = nil, activity = nil, massive = true) ⇒ Structure
constructor
Initialize BTAP STRUCTURE parameters.
-
#property(space = nil, tag = "") ⇒ Symbol
Returns an (inherited) AdditionalProperty, applicable to a given space.
Methods included from StructureData
Constructor Details
#initialize(model = nil, activity = nil, massive = true) ⇒ Structure
Initialize BTAP STRUCTURE parameters.
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 |
# File 'lib/openstudio-standards/btap/structure.rb', line 296 def initialize(model = nil, activity = nil, massive = true) mth = "BTAP::Structure::#{__callee__}" @feedback = {logs: []} lgs = @feedback[:logs] massive = false unless [true, false].include?(massive) unless model.is_a?(OpenStudio::Model::Model) lgs << "Invalid or empty OpenStudio model (#{mth})" return end unless activity.is_a?(BTAP::Activity) lgs << "Invalid or empty BTAP::Activity instance (#{mth})" return end cat = activity.category lload = activity.liveload if cat.respond_to?(:to_sym) cat = cat.to_s.downcase if cat.empty? lgs << "Empty building category (#{mth})" return else unless data[:category].keys.include?(cat) lgs << "Unknown building category: #{cat} (#{mth})" return end end else lgs << "Invalid building category: #{cat.class} (#{mth})" return end if lload.respond_to?(:to_f) lload = lload.to_f else lgs << "Invalid live load (kg/m2): #{lload.class} (#{mth})" return end bldg = model.getBuilding @category = cat @structure = data[:category][cat][:small] @spaces = {} # Switch to :large structure, instead of default :small. if data[:category][cat].key?(:stories) mx = data[:category][cat][:stories] n = bldg.standardsNumberOfAboveGroundStories n = n.empty? ? 1 : n.get @structure = data[:category][cat][:large] if n > mx elsif data[:category][cat].key?(:height) mx = data[:category][cat][:height] n = bldg.standardsNumberOfAboveGroundStories n = n.empty? ? 1 : n.get if n > 1 @structure = data[:category][cat][:large] else h = 0 model.getSpaces.each do |space| h = [mx, BTAP::Geometry::Spaces.space_height(space)].max end @structure = data[:category][cat][:large] if h > mx end end # Reset :clt and :metal structure selections - not yet available. @todo @structure = :steel if @structure == :metal @structure = :concrete if @structure == :clt # Set building framing, e.g. light-gauge :steel. @framing = data[:structure][@structure][:framing] # Set exterior cladding. @cladding = :light @cladding = :medium if @structure == :cmu @cladding = :medium if @category == "public" @cladding = :heavy if @category == "robust" # Set interior finish. @finish = :light @finish = :none if @framing == :cmu @finish = :heavy if @category == "robust" # Validate customization requests - override if user requests are invalid. # Custom cladding and finish options are caught and held in memory, yet # aren't fully supported for all costed constructions - may be ignored. [:structure, :framing, :cladding, :finish].each do |item| tag = "btap_" + item.to_s opt = case item when :framing then @framing when :cladding then @cladding when :finish then @finish else @structure end if bldg.additionalProperties.hasFeature(tag) prp = bldg.additionalProperties.getFeatureAsString(tag) if prp.empty? bldg.additionalProperties.setFeature(tag, opt.to_s) else prp = prp.get.downcase.to_sym case item when :structure if data[:structure].key?(prp) @structure = prp # Reset :clt and :metal structure selections for now - @todo @structure = :steel if @structure == :metal @structure = :concrete if @structure == :clt # Conditionally reset framing, cladding and/or finish. @framing = data[:structure][@structure][:framing] @cladding = :medium if @structure == :cmu @finish = :none if @framing == :cmu else bldg.additionalProperties.setFeature(tag, @structure.to_s) end when :framing if data[:structure][@structure][:frames].include?(prp) @framing = prp # Conditionally reset finish. @finish = :none if @framing == :cmu else bldg.additionalProperties.setFeature(tag, @framing.to_s) end when :cladding if data[:cladding].include?(prp) @cladding = prp else bldg.additionalProperties.setFeature(tag, @cladding.to_s) end when :finish if data[:finish].include?(prp) @finish = prp else bldg.additionalProperties.setFeature(tag, @finish.to_s) end end end else bldg.additionalProperties.setFeature(tag, opt.to_s) end end # Track CONDITIONED spaces, e.g. rooms & plenums - ignore vented attics. cspaces = model.getSpaces.reject { |sp| TBD.unconditioned?(sp) } if cspaces.empty? lgs << "Only UNCONDITIONED spaces (#{mth})" return end # Customized space-specific STRUCTURE attributes, overriding # default/custom building-wide attributes. data[:tags].each do |tag| cspaces.each do |space| id = space.nameString zn = space.thermalZone next if zn.empty? next unless space.floorArea > 0 # Retrieve/validate tagged AdditionalProperty (if assigned to story, # spacetype or space). prp = property(space, tag) next unless prp # Skip if same as building. next if tag == "btap_structure" && prp == @structure next if tag == "btap_framing" && prp == @framing next if tag == "btap_cladding" && prp == @cladding next if tag == "btap_finish" && prp == @finish unless @spaces.key?(id) @spaces[id] = {} @spaces[id][:m2 ] = space.floorArea @spaces[id][:h ] = BTAP::Geometry::Spaces.space_height(space) @spaces[id][:co2] = {columns: 0, partitions: 0} # Initialized with building attributes by default. @spaces[id][:structure] = @structure @spaces[id][:framing ] = @framing @spaces[id][:cladding ] = @cladding @spaces[id][:finish ] = @finish end # Reset if compatible. case tag when "btap_structure" @spaces[id][:structure] = prp # Conditionally reset framing, cladding and/or finish. @spaces[id][:framing ] = data[:structure][prp][:framing] @spaces[id][:cladding] = :medium if @spaces[id][:structure] == :cmu @spaces[id][:finish ] = :none if @spaces[id][:framing ] == :cmu when "btap_framing" @spaces[id][:framing] = prp # Conditionally reset finish. @spaces[id][:finish] = :none if @spaces[id][:framing] == :cmu when "btap_cladding" @spaces[id][:cladding] = prp when "btap_finish" @spaces[id][:finish] = prp else end end end # Prune customized spaces from common collection. @spaces.keys.each { |id| cspaces.delete(model.getSpaceByName(id).get) } # Only customized spaces left? Base building STRUCTURE on most common one. if cspaces.empty? custom = [] id = @spaces.keys.first sp = @spaces.values.first espace = model.getSpaceByName(id).get first = {} first[:spaces ] = [espace] first[:structure] = sp[:structure] first[:framing ] = sp[:framing] first[:cladding ] = sp[:cladding] first[:finish ] = sp[:finish] first[:m2 ] = sp[:m2] * espace.multiplier custom << first @spaces.each do |id, sp| match = false space = model.getSpaceByName(id).get next if space == espace custom.each do |csp| break if match if sp[:structure] == csp[:structure] && sp[:framing ] == sp[:framing ] && sp[:cladding ] == sp[:cladding ] && sp[:finish ] == sp[:finish ] csp[:spaces] << space csp[:m2 ] += sp[:m2] * space.multiplier match = true end end unless match spx = {} spx[:spaces ] = [space] spx[:structure] = sp[:structure] spx[:framing ] = sp[:framing] spx[:cladding ] = sp[:cladding] spx[:finish ] = sp[:finish] spx[:m2 ] = sp[:m2] * space.multiplier custom << spx end end if custom.empty? lgs << "Unknown UNCONDITIONED spaces (#{mth})?" return end csp = custom.sort_by { |sp| sp[:m2] }.reverse.first cspaces = csp[:spaces] @structure = csp[:structure] @framing = csp[:framing] @cladding = csp[:cladding] @finish = csp[:finish] bldg.additionalProperties.setFeature("btap_structure", @structure.to_s) bldg.additionalProperties.setFeature("btap_framing", @framing.to_s) bldg.additionalProperties.setFeature("btap_cladding", @cladding.to_s) bldg.additionalProperties.setFeature("btap_finish", @finish.to_s) cspaces.each { |space| @spaces.delete(space.nameString) } end if cspaces.empty? lgs << "Invalid # CONDITIONED spaces (#{mth})?" return end # Isolate OCCUPIED spaces. ospaces = cspaces.select { |space| space.partofTotalFloorArea } # Scenario A - no space customization, i.e. default BTAP scenario: # - take-off areas below (m2) reflect all CONDITIONED spaces # # Scenario B - one or more spaces are customized, e.g. :framing # - take-off areas below (m2) reflect non-customized spaces only # - look up @spaces to retrieve custom space-specific take-offs. m2 = cspaces.sum(&:floorArea) om2 = ospaces.sum(&:floorArea) # --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- # # 'Dead load' refers to the self-weight of structural elements of a # building, as well as non-structural fixtures that are permanently # attached to the building. They are considered 'dead' as they typically # do not move around during the life of the building. Once a building # is resold, its new owners recover dead load as 'real estate assets'. # Dead load typically falls under design scopes of architects/engineers. # Although there are obvious design constraints to consider (e.g. fire # safety, $), designers do get to make design decisions when it comes to # dead load, e.g.: # - between steel vs concrete post/beam/slab structural options # - between light-gauge steel vs CMU wall construction options # - between foam vs fibrous insulation options # # Most dead load is modelled explicitly in OpenStudio, like envelope and # interzone surfaces. Rough estimates of embodied carbon (in CO2-e kg of # surface m2) can be reasonably associated to selected construction # assemblies, such as the embodied carbon of chosen insulation materials # or framing options. Other dead load, like lighting and HVAC, are not # modelled explicitly. Here, the 'deadload' attribute represents a mass # floor area density estimate (kg/m2) of non-modelled structural and # non-structural items like fixed furniture, columns, beams, shear walls # and bracing, as well as 'partitions'. # # Note that OpenStudio supports an InteriorPartitionSurface class, useful # mainly for daylighting. Although similar, 'partition' (within the scope # of BTAP::Structure) more generally refers to any non-modelled wall, e.g. # those surrounding lobbies, stairwells, WCs and technical rooms, as well # as separations between similar rooms (e.g. multiple, side-by-side # enclosed offices, a row of hotel rooms). Comparing BTAP prototype models # and samples of building plans for similar facilities suggests matching # modelled partition m2 with floor m2 as a suitable basis to estimate the # mass of non-modelled partitions. As this estimate may be more on the # high side for many prototype models, fixed appliances (e.g. fixtures, # counters, doors and windows) are considered included. Adjusting for # larger spaces, based on building category. partition_m2 = case @category when "commerce" then m2 / 2 when "industry" then m2 / 4 when "recreation" then m2 / 3 else m2 end # For wood-framed partitions, representative material mass (per m2): # - 16% wood-framing: 0.0224 m3/m2 x 540 kg/m3 = 12.1 kg/m2 (35.7%) # - 84% insulation : 0.1176 m3/m2 x 19 kg/m3 = 2.2 kg/m2 ( 6.5%) # - drywall (2x) : 0.0250 m3/m2 x 785 kg/m3 = 19.6 kg/m2 (57.8%) # = 33.9 kg/m2 # # For steel-framed partitions, representative material mass (per m2): # - 1% steel-framing: 1.25 x 2.5 x 1.5 kg/m = 4.7 kg/m2 (17.3%) # - 99% insulation : 0.1504 m3/m2 x 19 kg/m3 = 2.9 kg/m2 (10.7%) # - drywall (2x) : 0.0250 m3/m2 x 785 kg/m3 = 19.6 kg/m2 (72.0%) # = 27.2 kg/m2 # # For CMU partitions, representative material mass (per m2): # - 10" medium weight CMU = 250.0 kg/m2 (approx.) partition_rho = case @framing when :cmu then 250.0 when :wood then 33.9 else 27.2 end # Partition kg / floor area. partition_kgm2 = 0 partition_kgm2 = partition_rho * partition_m2 / m2 if m2 > 0 # Repeat for customized spaces. @spaces.each do |id, sp| sp[:partition_m2] = case @category when "commerce" then sp[:m2] / 2 when "industry" then sp[:m2] / 4 when "recreation" then sp[:m2] / 3 else sp[:m2] end if sp.key?(:framing) p_rho = case sp[:framing] when :cmu then 250.0 when :wood then 33.9 else 27.2 end else p_rho = partition_rho end sp[:partition_kgm2] = p_rho * sp[:partition_m2] / sp[:m2] end # Structural dead load - not explicitly modelled - include columns, # bracing, connectors, etc. For BTAP purposes, some basic assumptions are # required: # - 9m x 9m spans # - approx. 15 columns / 1000 m2 of floor area # - approx. 14" x 14" columns (0.126 m2) # - if structure :steel or :metal (W10x49) # - 73 kg/m (x 125% for bracing, etc.) = 91 kg/m # - if structure :concrete # - concrete: 2240 kg/m3 x 0.126 m2 x 97% = 274 kg/m # - rebar: 7850 kg/m3 x 0.126 m2 x 3% = 30 kg/m # = 304 kg/m # - x 125% for shear walls, etc. = 380 kg/m # - if structure :cmu (mix of load bearing walls + smaller pours) # - 1/2 :concrete = 190 kg/m # - if structure :clt # - wood: 540 kg/m3 x 0.126 m2 x 97% = 66 kg/m # - anchors: 7850 kg/m3 x 0.126 m2 x 3% = 30 kg/m # = 96 kg/m # - x 125% for shear walls, etc. = 120 kg/m # - if structure :wood # - 1/2 :clt = 60 kg/m # Fetch approx. total column height (m) and linear density. column_m = 0 column_rho = case @structure when :steel then 91 when :metal then 91 when :cmu then 190 when :wood then 60 when :clt then 120 else 380 end cspaces.each do |space| zn = space.thermalZone next if zn.empty? fm2 = space.floorArea next unless fm2 > 0 column_m += BTAP::Geometry::Spaces.space_height(space) * fm2 * 15 / 1000 end column_kgm2 = 0 column_kgm2 = column_rho * column_m / m2 if m2 > 0 @deadload = partition_kgm2 + column_kgm2 # Repeat for customized spaces. @spaces.values.each do |sp| col_m = sp[:h] * sp[:m2] * 15 / 1000 if sp.key?(:structure) c_rho = case sp[:structure] when :steel then 91 when :metal then 91 when :cmu then 190 when :wood then 60 when :clt then 120 else 380 end else c_rho = column_rho end sp[:column_kgm2] = c_rho * col_m / sp[:m2] sp[:deadload ] = sp[:partition_kgm2] + sp[:column_kgm2] end # The 'liveload' attribute represents the mass area density (kg/m2) of # dynamic, yet uniform floor live load from non-permanent items like # furniture, documents, copiers and computers, i.e. not real estate # assets. Architects and engineers deal with (fixed) live load as design # constraint - not as potential design option. Non-occupant live load is # taken into account when setting internal mass. Yet as a non-real estate # item, live load is not considered when tallying embodied carbon. # # Within BTAP, non-occupant live load estimates are stored in the # "btap_building_types.csv" file, parsed/stored in a BTAP::Activity # instance (1x per building activity). These estimates are initially based # on NBC Part 4 minimum live load requirements (kPa), as well as data from # established structural engineering resources. Minimum live load kPa (or # psf) estimates, corresponding to hundreds of kg/m2 of floor area, are # strictly for structural dimensioning/safety purposes. They are not (or # are very rarely) representative of actual day-to-day loads. Back of the # envelope calculations suggest reducing live load code requirements down # to ~1/12th of their initial values for internal mass purposes. These # code requirements also include occupants, which should be set aside - # by subtracting the total building population mass: # # - NECB building occupant density (occupant/m2) x avg. 80 kg/adult # # This gives for instance a resulting live load estimate of 23 kg/m2 for # housing (low) and a 61 kg/m2 for manufacturing (high). It is obviously # challenging to pin down a single-number estimate for several building # types, including bigbox retail and warehousing. Grain of salt. @liveload = lload # Cap internal mass density to 1000 kg/m3, and thickness to 6". rho = 1000.0 th = 0.150 # Add internal mass objects, 1x instance per CONDITIONED space. cspaces.each do |space| break unless massive id = space.nameString matID = "#{id} : Mass Material" conID = "#{id} : Mass Construction" defID = "#{id} : Mass Definition" mssID = "#{id} : Mass" # Calculate total internal mass (kg), then thickness. if @spaces.key?(id) load_kgm2 = @liveload + @spaces[id][:deadload] else load_kgm2 = @deadload load_kgm2 += @liveload if ospaces.include?(space) end kg = space.floorArea * load_kgm2 im2 = kg / rho / th mat = OpenStudio::Model::StandardOpaqueMaterial.new(model) mat.setName(matID) mat.setRoughness("MediumRough") mat.setThickness(th) mat.setConductivity(1.0) mat.setDensity(rho) mat.setSpecificHeat(1000) mat.setThermalAbsorptance(0.9) mat.setSolarAbsorptance(0.7) mat.setVisibleAbsorptance(0.7) con = OpenStudio::Model::Construction.new(model) con.setName(conID) layers = OpenStudio::Model::MaterialVector.new layers << mat con.setLayers(layers) df = OpenStudio::Model::InternalMassDefinition.new(model) df.setName(defID) df.setConstruction(con) df.setSurfaceArea(space.floorArea) df.setSurfaceArea(im2) mass = OpenStudio::Model::InternalMass.new(df) mass.setName(mssID) mass.setSpace(space) end # Embodied CO2-e kg (A1-A3?) of a model's structure is broken down into: # - non-modelled above grade items COLUMNS # - non-modelled PARTITIONS # # COLUMN and PARTITION CO2-e kg estimates are limited to non-customized # spaces (look for equivalent entries in customized @spaces). Yet # all COLUMN and PARTITION estimates (for both custom and non-custom # spaces) are ultimately tallied in the STRUCTURE CO2-e kg entry. # # Note that below-grade structures (rebar + poured concrete) are ignored, # as there are no alternative BTAP options (e.g. low carbon concrete mix). @co2 = {} # Add columns. column_kgco2kg = case @structure when :steel then 0.854 # 0.854 kgCO2-e/kg when :metal then 0.854 # 0.854 kgCO2-e/kg when :wood then 55.000 / 540.0 # 55.000 kgCO2-e/m3 when :clt then 55.000 / 540.0 # 55.000 kgCO2-e/m3 else 0.268 # 0.268 kgCO2-e/kg end @co2[:columns] = column_kgco2kg * column_m * column_rho # Add interior partitions, based on framing options only. Other partition # components are ignored for now (e.g. drywall, acoustic insulation). partition_kgco2m2 = case @framing when :wood then 55.000 * 12.1 / 540.0 when :cmu then 200.000 * 0.250 else 0.854 * 4.7 end @co2[:partitions] = partition_kgco2m2 * partition_m2 @co2[:structure ] = @co2[:columns] + @co2[:partitions] # Repeat for customized spaces. @spaces.each do |id, sp| if sp.key?(:structure) c_kgco2kg = case sp[:structure] when :steel then 0.854 # 0.854 kgCO2-e/kg when :metal then 0.854 # 0.854 kgCO2-e/kg when :wood then 55.000 / 540.0 # 55.000 kgCO2-e/m3 when :clt then 55.000 / 540.0 # 55.000 kgCO2-e/m3 else 0.268 # 0.268 kgCO2-e/kg end else c_kgco2kg = column_kgco2kg end if sp.key?(:framing) p_kgco2m2 = case sp[:framing] when :wood then 55.000 * 12.1 / 540.0 when :cmu then 200.000 * 0.250 else 0.854 * 4.7 end else p_kgco2m2 = partition_kgco2m2 end sp[:co2][:columns ] = c_kgco2kg * sp[:column_kgm2] * sp[:m2] sp[:co2][:partitions] = p_kgco2m2 * sp[:partition_m2] @co2[:structure] += sp[:co2][:columns] + sp[:co2][:partitions] end # Set an AdditionalProperty for tallied CO2-e [kg] (A1-A3): tag = "co2_structure" bldg.additionalProperties.setFeature(tag, @co2[:structure]) true end |
Instance Attribute Details
#category ⇒ String (readonly)
Returns default building type CATEGORY (e.g. "public").
261 262 263 |
# File 'lib/openstudio-standards/btap/structure.rb', line 261 def category @category end |
#cladding ⇒ Symbol (readonly)
Returns default building cladding (e.g. :medium).
270 271 272 |
# File 'lib/openstudio-standards/btap/structure.rb', line 270 def cladding @cladding end |
#co2 ⇒ Hash (readonly)
Returns default building STRUCTURE embodied carbon (CO2-e kg).
285 286 287 |
# File 'lib/openstudio-standards/btap/structure.rb', line 285 def co2 @co2 end |
#deadload ⇒ Float (readonly)
Returns default building dead load, in floor kg/m2.
279 280 281 |
# File 'lib/openstudio-standards/btap/structure.rb', line 279 def deadload @deadload end |
#feedback ⇒ Hash (readonly)
Returns logged messages.
288 289 290 |
# File 'lib/openstudio-standards/btap/structure.rb', line 288 def feedback @feedback end |
#finish ⇒ Symbol (readonly)
Returns default building finish (e.g. :light).
273 274 275 |
# File 'lib/openstudio-standards/btap/structure.rb', line 273 def finish @finish end |
#framing ⇒ Symbol (readonly)
Returns default building framing (e.g. :steel).
267 268 269 |
# File 'lib/openstudio-standards/btap/structure.rb', line 267 def framing @framing end |
#liveload ⇒ Float (readonly)
Returns default building non-occupant live load, in floor kg/m2.
282 283 284 |
# File 'lib/openstudio-standards/btap/structure.rb', line 282 def liveload @liveload end |
#spaces ⇒ Hash (readonly)
Returns customized STRUCTURE, FRAMING, CLADDING & FINISH per space.
276 277 278 |
# File 'lib/openstudio-standards/btap/structure.rb', line 276 def spaces @spaces end |
#structure ⇒ Symbol (readonly)
Returns default building STRUCTURE selection (e.g. :steel).
264 265 266 |
# File 'lib/openstudio-standards/btap/structure.rb', line 264 def structure @structure end |
Instance Method Details
#property(space = nil, tag = "") ⇒ Symbol
Returns an (inherited) AdditionalProperty, applicable to a given space. Four admissible STRUCTURE AdditionalProperty keys: "btap_structure", "btap_framing", "btap_cladding", "btap_finish". If an AdditionalProperty key is correctly identified yet its value invalid (per BTAP::Structure rules), its value is reset to building defaults.
925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 |
# File 'lib/openstudio-standards/btap/structure.rb', line 925 def property(space = nil, tag = "") mth = "BTAP::Structure::#{__callee__}" lgs = @feedback[:logs] prp = nil unless space.is_a?(OpenStudio::Model::Space) lgs << "Invalid or empty OpenStudio space (#{mth})" return prp end unless tag.respond_to?(:to_sym) lgs << "Invalid STRUCTURE AddtionalProperty tag (#{mth})" return prp end tag = tag.to_s.downcase unless data[:tags].include?(tag) lgs << "Unrecognized STRUCTURE AddtionalProperty '#{tag}' (#{mth})" return prp end # Check if the AdditionalProperty is assigned to the space itself. if space.additionalProperties.hasFeature(tag) prp = space.additionalProperties.getFeatureAsString(tag) if prp.empty? lgs << "Unknown space AddtionalProperty '#{tag}' (#{mth})" prp = nil else prp = prp.get.downcase.to_sym end end # Check if the AdditionalProperty is instead assigned to the spacetype. unless prp type = space.spaceType unless type.empty? type = type.get if type.additionalProperties.hasFeature(tag) prp = type.additionalProperties.getFeatureAsString(tag) if prp.empty? lgs << "Unknown spacetype AddtionalProperty '#{tag}' (#{mth})" prp = nil else prp = prp.get.downcase.to_sym end end end end # Check if the AdditionalProperty is instead assigned to building story. unless prp story = space.buildingStory unless story.empty? story = story.get if story.additionalProperties.hasFeature(tag) prp = story.additionalProperties.getFeatureAsString(tag) if prp.empty? lgs << "Unknown story AddtionalProperty '#{tag}' (#{mth})" prp = nil else prp = prp.get.downcase.to_sym end end end end # Validate, based on STRUCTURE rules - attempt to fix if invalid. if prp case tag when "btap_structure" if data[:structure].key?(prp) prp = :steel if prp == :metal # temporary - @todo prp = :concrete if prp == :clt # temporary - @todo else prp = @structure space.additionalProperties.setFeature(tag, prp.to_s) end when "btap_framing" structure = property(space, "btap_structure") structure = @structure unless structure if data[:structure].key?(structure) unless data[:structure][structure][:frames].include?(prp) prp = data[:structure][structure][:framing] space.additionalProperties.setFeature(tag, prp.to_s) end else prp = data[:structure][@structure][:framing] bldg.additionalProperties.setFeature(tag, prp.to_s) end when "btap_cladding" unless data[:cladding].include?(prp) prp = @cladding space.additionalProperties.setFeature(tag, prp.to_s) end when "btap_finish" unless data[:finish].include?(prp) prp = @finish space.additionalProperties.setFeature(tag, prp.to_s) end else lgs << "Unknown AddtionalProperty '#{tag}' (#{mth})" prp = nil end end prp end |