Module: BTAP::Resources::HVAC::HVACTemplates::NECB2011

Defined in:
lib/openstudio-standards/btap/hvac.rb

Class Method Summary collapse

Class Method Details

.add_sys1_unitary_ac_baseboard_heating(model, zones, boiler_fueltype, mau, mau_heating_coil_type, baseboard_type) ⇒ Object



2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
# File 'lib/openstudio-standards/btap/hvac.rb', line 2337

def self.add_sys1_unitary_ac_baseboard_heating(model,zones, boiler_fueltype, mau ,mau_heating_coil_type,baseboard_type)

  # System Type 1: PTAC with no heating (unitary AC) 

  # Zone baseboards, electric or hot water depending on argument baseboard_type

  # baseboard_type choices are "Hot Water" or "Electric" 

  # PSZ to represent make-up air unit (if present)

  # This measure creates:

  # a PTAC  unit for each zone in the building; DX cooling coil

  # and heating coil that is always off

  # Baseboards ("Hot Water or "Electric") in zones connected to hot water loop

  # MAU is present if argument mau == true, not present if argument mau == false

  # MAU is PSZ; DX cooling 

  # MAU heating coil: hot water coil or electric, depending on argument mau_heating_coil_type

  # mau_heating_coil_type choices are "Hot Water", "Electric"

  # boiler_fueltype choices match OS choices for Boiler component fuel type, i.e.

  # "NaturalGas","Electricity","PropaneGas","FuelOil#1","FuelOil#2","Coal","Diesel","Gasoline","OtherFuel1"

  
  # Some system parameters are set after system is set up; by applying method 'applyHVACEfficiencyStandard'



  always_on = model.alwaysOnDiscreteSchedule
  
  # define always off schedule for ptac heating coil

  always_off = BTAP::Resources::Schedules::StandardSchedules::ON_OFF::always_off(model)

  # Create a hot water loop; MAU hydronic heating coil and hot water baseboards will be

  # connected to this loop (if MAU and its heating coil is hydronic or if baseboard type is hydronic)


  if ( (mau == true and mau_heating_coil_type == "Hot Water") or baseboard_type == "Hot Water" ) then

    hw_loop = OpenStudio::Model::PlantLoop.new(model)
    BTAP::Resources::HVAC::HVACTemplates::NECB2011::setup_hw_loop_with_components(model,hw_loop,boiler_fueltype, always_on)

  end  #of if statement

  
  #Create MAU 

  # TO DO: MAU sizing, characteristics (fan operation schedules, temperature setpoints, outdoor air, etc)

 
  if ( mau == true) then
    
    mau_air_loop = OpenStudio::Model::AirLoopHVAC.new(model)


    mau_air_loop.setName("Make-up air unit")

    # When an air_loop is constructed, its constructor creates a sizing:system object

    # the default sizing:system constructor makes a system:sizing object

    # appropriate for a multizone VAV system

    # this systems is a constant volume system with no VAV terminals,

    # and therfore needs different default settings

    air_loop_sizing = mau_air_loop.sizingSystem # TODO units

    air_loop_sizing.setTypeofLoadtoSizeOn("Sensible")
    air_loop_sizing.autosizeDesignOutdoorAirFlowRate
    air_loop_sizing.setMinimumSystemAirFlowRatio(1.0)
    air_loop_sizing.setPreheatDesignTemperature(7.0)
    air_loop_sizing.setPreheatDesignHumidityRatio(0.008)
    air_loop_sizing.setPrecoolDesignTemperature(12.8)
    air_loop_sizing.setPrecoolDesignHumidityRatio(0.008)
    air_loop_sizing.setCentralCoolingDesignSupplyAirTemperature(12.8)
    air_loop_sizing.setCentralHeatingDesignSupplyAirTemperature(40.0)
    air_loop_sizing.setSizingOption("NonCoincident")
    air_loop_sizing.setAllOutdoorAirinCooling(false)
    air_loop_sizing.setAllOutdoorAirinHeating(false)
    air_loop_sizing.setCentralCoolingDesignSupplyAirHumidityRatio(0.0085)
    air_loop_sizing.setCentralHeatingDesignSupplyAirHumidityRatio(0.0080)
    air_loop_sizing.setCoolingDesignAirFlowMethod("DesignDay")
    air_loop_sizing.setCoolingDesignAirFlowRate(0.0)
    air_loop_sizing.setHeatingDesignAirFlowMethod("DesignDay")
    air_loop_sizing.setHeatingDesignAirFlowRate(0.0)
    air_loop_sizing.setSystemOutdoorAirMethod("ZoneSum")

    mau_fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)
                  

    if ( mau_heating_coil_type == "Electric") then           # electric coil

      mau_htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model,always_on)
    end

    if ( mau_heating_coil_type == "Hot Water") then
      mau_htg_coil = OpenStudio::Model::CoilHeatingWater.new(model, always_on)
      hw_loop.addDemandBranchForComponent(mau_htg_coil)
    end


    # Set up DX coil with default curves (set to NECB);


    mau_clg_coil = BTAP::Resources::HVAC::Plant::add_onespeed_DX_coil(model,always_on)

    #oa_controller 

    oa_controller = OpenStudio::Model::ControllerOutdoorAir.new(model)
    #oa_controller.setEconomizerControlType("DifferentialEnthalpy")



    #oa_system 

    oa_system = OpenStudio::Model::AirLoopHVACOutdoorAirSystem.new(model, oa_controller)

    # Add the components to the air loop

    # in order from closest to zone to furthest from zone

    supply_inlet_node = mau_air_loop.supplyInletNode
    mau_fan.addToNode(supply_inlet_node)
    mau_htg_coil.addToNode(supply_inlet_node)
    mau_clg_coil.addToNode(supply_inlet_node)
    oa_system.addToNode(supply_inlet_node)

    # Add a setpoint manager single zone reheat to control the

    # supply air temperature 

    setpoint_mgr_single_zone_reheat = OpenStudio::Model::SetpointManagerSingleZoneReheat.new(model)
    setpoint_mgr_single_zone_reheat.setMinimumSupplyAirTemperature(13.0)
    setpoint_mgr_single_zone_reheat.addToNode(mau_air_loop.supplyOutletNode)
    
    # TO DO: Which zone is the control zone? 

    #setpoint_mgr_single_zone_reheat.setControlZone(zone)             


   
  end # Create MAU

  

  # Create a PTAC for each zone:

  # PTAC DX Cooling with electric heating coil; electric heating coil is always off 

  
  
  # TO DO: need to apply this system to space types:

  #(1) data processing area: control room, data centre

  # when cooling capacity <= 20kW and

  #(2) residential/accommodation: murb, hotel/motel guest room

  # when building/space heated only (this as per NECB; apply to

  # all for initial work? CAN-QUEST limitation)


  #TO DO: PTAC characteristics: sizing, fan schedules, temperature setpoints, interaction with MAU

  
  
  zones.each do |zone|
  
    # Set up PTAC heating coil; apply always off schedule            

 
    # htg_coil_elec = OpenStudio::Model::CoilHeatingElectric.new(model,always_on)

    htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model,always_off)
  
    
    
    # Set up PTAC DX coil with NECB performance curve characteristics;

    clg_coil = BTAP::Resources::HVAC::Plant::add_onespeed_DX_coil(model,always_on)
    
    
    # Set up PTAC constant volume supply fan

    fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)         
    fan.setPressureRise(640)
              
    

    ptac = OpenStudio::Model::ZoneHVACPackagedTerminalAirConditioner.new(model,
      always_on,
      fan,
      htg_coil,
      clg_coil)
    ptac.setName("#{zone.name} PTAC")
    ptac.addToThermalZone(zone)
    
    # add zone baseboards

    if ( baseboard_type == "Electric") then

      #  zone_elec_baseboard = OpenStudio::Model::ZoneHVACBaseboardConvectiveElectric.new(model)

      zone_elec_baseboard = BTAP::Resources::HVAC::Plant::add_elec_baseboard(model)
      zone_elec_baseboard.addToThermalZone(zone)

    end

    if ( baseboard_type == "Hot Water") then
      baseboard_coil = BTAP::Resources::HVAC::Plant::add_hw_baseboard_coil(model)
      #Connect baseboard coil to hot water loop

      hw_loop.addDemandBranchForComponent(baseboard_coil)


      zone_baseboard = BTAP::Resources::HVAC::ZoneEquipment::add_zone_baseboard_convective_water(model, always_on, baseboard_coil)
      #add zone_baseboard to zone

      zone_baseboard.addToThermalZone(zone)
      
    end
    
    
    #  # Create a diffuser and attach the zone/diffuser pair to the MAU air loop, if applicable

    if (mau == true) then

      diffuser = OpenStudio::Model::AirTerminalSingleDuctUncontrolled.new(model, always_on)
      mau_air_loop.addBranchForZone(zone,diffuser.to_StraightComponent)
       
    end #components for MAU

                
  end # of zone loop

  

  return true
  
end

.add_sys2_FPFC_sys5_TPFC(model, zones, boiler_fueltype, chiller_type, fan_coil_type, mua_cooling_type) ⇒ Object

sys1_unitary_ac_baseboard_heating



2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
# File 'lib/openstudio-standards/btap/hvac.rb', line 2532

def self.add_sys2_FPFC_sys5_TPFC( model,zones, boiler_fueltype,chiller_type,fan_coil_type,mua_cooling_type )

  # System Type 2: FPFC or System 5: TPFC

  # This measure creates:

  # -a four pipe or a two pipe fan coil unit for each zone in the building;

  # -a make up air-unit to provide ventilation to each zone;

  # -a heating loop, cooling loop and condenser loop to serve four pipe fan coil units

  # Arguments:

  #   boiler_fueltype: "NaturalGas","Electricity","PropaneGas","FuelOil#1","FuelOil#2","Coal","Diesel","Gasoline","OtherFuel1"

  #   chiller_type: "Scroll";"Centrifugal";"Rotary Screw";"Reciprocating"

  #   mua_cooling_type: make-up air unit cooling type "DX";"Hydronic"

  #   fan_coil_type options are "TPFC" or "FPFC"


  # TODO: Add arguments as needed when the sizing routine is finalized. For example we will need to know the 

  # required size of the boilers to decide on how many units are needed based on NECB rules.


  always_on = model.alwaysOnDiscreteSchedule

  # schedule for two-pipe fan coil operation


  twenty_four_hrs = OpenStudio::Time.new(0,24,0,0)
  
  # Heating coil availability schedule for tpfc

  tpfc_htg_availability_sch = OpenStudio::Model::ScheduleRuleset.new(model)
  tpfc_htg_availability_sch.setName("tpfc_htg_availability")
  # Cooling coil availability schedule for tpfc

  tpfc_clg_availability_sch = OpenStudio::Model::ScheduleRuleset.new(model)
  tpfc_clg_availability_sch.setName("tpfc_clg_availability")
  istart_month = [1,7,11]
  istart_day = [1,1,1]
  iend_month = [6,10,12]
  iend_day = [30,31,31]
  sch_htg_value = [1,0,1]
  sch_clg_value = [0,1,0]
  for i in 0..2 
    tpfc_htg_availability_sch_rule = OpenStudio::Model::ScheduleRule.new(tpfc_htg_availability_sch)
    tpfc_htg_availability_sch_rule.setName("tpfc_htg_availability_sch_rule")
    tpfc_htg_availability_sch_rule.setStartDate(model.getYearDescription.makeDate(istart_month[i],istart_day[i]))
    tpfc_htg_availability_sch_rule.setEndDate(model.getYearDescription.makeDate(iend_month[i],iend_day[i]))
    tpfc_htg_availability_sch_rule.setApplySunday(true)
    tpfc_htg_availability_sch_rule.setApplyMonday(true)
    tpfc_htg_availability_sch_rule.setApplyTuesday(true)
    tpfc_htg_availability_sch_rule.setApplyWednesday(true)
    tpfc_htg_availability_sch_rule.setApplyThursday(true)
    tpfc_htg_availability_sch_rule.setApplyFriday(true)
    tpfc_htg_availability_sch_rule.setApplySaturday(true)           
    day_schedule = tpfc_htg_availability_sch_rule.daySchedule
    day_schedule.setName("tpfc_htg_availability_sch_rule_day")
    day_schedule.addValue(twenty_four_hrs,sch_htg_value[i])
    
    tpfc_clg_availability_sch_rule = OpenStudio::Model::ScheduleRule.new(tpfc_clg_availability_sch)
    tpfc_clg_availability_sch_rule.setName("tpfc_clg_availability_sch_rule")
    tpfc_clg_availability_sch_rule.setStartDate(model.getYearDescription.makeDate(istart_month[i],istart_day[i]))
    tpfc_clg_availability_sch_rule.setEndDate(model.getYearDescription.makeDate(iend_month[i],iend_day[i]))
    tpfc_clg_availability_sch_rule.setApplySunday(true)
    tpfc_clg_availability_sch_rule.setApplyMonday(true)
    tpfc_clg_availability_sch_rule.setApplyTuesday(true)
    tpfc_clg_availability_sch_rule.setApplyWednesday(true)
    tpfc_clg_availability_sch_rule.setApplyThursday(true)
    tpfc_clg_availability_sch_rule.setApplyFriday(true)
    tpfc_clg_availability_sch_rule.setApplySaturday(true)           
    day_schedule = tpfc_clg_availability_sch_rule.daySchedule
    day_schedule.setName("tpfc_clg_availability_sch_rule_day")
    day_schedule.addValue(twenty_four_hrs,sch_clg_value[i])

  end

  # Create a hot water loop


  hw_loop = OpenStudio::Model::PlantLoop.new(model)
  BTAP::Resources::HVAC::HVACTemplates::NECB2011::setup_hw_loop_with_components(model,hw_loop,boiler_fueltype,tpfc_htg_availability_sch)

  # Create a chilled water loop


  chw_loop = OpenStudio::Model::PlantLoop.new(model)
  chiller = BTAP::Resources::HVAC::HVACTemplates::NECB2011::setup_chw_loop_with_components(model,chw_loop,chiller_type)

  # Create a condenser Loop


  cw_loop = OpenStudio::Model::PlantLoop.new(model)
  ctower = BTAP::Resources::HVAC::HVACTemplates::NECB2011::setup_cw_loop_with_components(model,cw_loop,chiller)

  # Set up make-up air unit for ventilation

  # TO DO: Need to investigate characteristics of make-up air unit for NECB reference

  # and define them here


  air_loop = OpenStudio::Model::AirLoopHVAC.new(model)

  air_loop.setName("Make-up air unit")

  # When an air_loop is contructed, its constructor creates a sizing:system object

  # the default sizing:system constructor makes a system:sizing object

  # appropriate for a multizone VAV system

  # this systems is a constant volume system with no VAV terminals,

  # and therfore needs different default settings

  air_loop_sizing = air_loop.sizingSystem # TODO units

  air_loop_sizing.setTypeofLoadtoSizeOn("Sensible")
  air_loop_sizing.autosizeDesignOutdoorAirFlowRate
  air_loop_sizing.setMinimumSystemAirFlowRatio(1.0)
  air_loop_sizing.setPreheatDesignTemperature(7.0)
  air_loop_sizing.setPreheatDesignHumidityRatio(0.008)
  air_loop_sizing.setPrecoolDesignTemperature(12.8)
  air_loop_sizing.setPrecoolDesignHumidityRatio(0.008)
  air_loop_sizing.setCentralCoolingDesignSupplyAirTemperature(13.0)
  air_loop_sizing.setCentralHeatingDesignSupplyAirTemperature(12.8)
  air_loop_sizing.setSizingOption("NonCoincident")
  air_loop_sizing.setAllOutdoorAirinCooling(false)
  air_loop_sizing.setAllOutdoorAirinHeating(false)
  air_loop_sizing.setCentralCoolingDesignSupplyAirHumidityRatio(0.008)
  air_loop_sizing.setCentralHeatingDesignSupplyAirHumidityRatio(0.008)
  air_loop_sizing.setCoolingDesignAirFlowMethod("DesignDay")
  air_loop_sizing.setCoolingDesignAirFlowRate(0.0)
  air_loop_sizing.setHeatingDesignAirFlowMethod("DesignDay")
  air_loop_sizing.setHeatingDesignAirFlowRate(0.0)
  air_loop_sizing.setSystemOutdoorAirMethod("ZoneSum")

  fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)

  # Assume direct-fired gas heating coil for now; need to add logic

  # to set up hydronic or electric coil depending on proposed?


  htg_coil = OpenStudio::Model::CoilHeatingGas.new(model, always_on)

  # Add DX or hydronic cooling coil

  # TODO: set proper cooling DX COP when sizing data is available

  if(mua_cooling_type == "DX")
    clg_coil = BTAP::Resources::HVAC::Plant::add_onespeed_DX_coil(model,tpfc_clg_availability_sch)
  elsif(mua_cooling_type == "Hydronic")
    clg_coil = OpenStudio::Model::CoilCoolingWater.new(model, tpfc_clg_availability_sch)
    chw_loop.addDemandBranchForComponent(clg_coil)
  end

  # does MAU have an economizer?

  oa_controller = OpenStudio::Model::ControllerOutdoorAir.new(model)

  #oa_system = OpenStudio::Model::AirLoopHVACOutdoorAirSystem.new(model,oa_controller)

  oa_system = OpenStudio::Model::AirLoopHVACOutdoorAirSystem.new(model, oa_controller)

  # Add the components to the air loop 

  # in order from closest to zone to furthest from zone

  supply_inlet_node = air_loop.supplyInletNode
  fan.addToNode(supply_inlet_node)
  htg_coil.addToNode(supply_inlet_node)
  clg_coil.addToNode(supply_inlet_node)
  oa_system.addToNode(supply_inlet_node)

  # Add a setpoint manager single zone reheat to control the

  # supply air temperature based on the needs of default zone (OpenStudio picks one)

  # TO DO: need to have method to pick appropriate control zone?


  setpoint_mgr_single_zone_reheat = OpenStudio::Model::SetpointManagerSingleZoneReheat.new(model)
  setpoint_mgr_single_zone_reheat.setMinimumSupplyAirTemperature(12.8)
  setpoint_mgr_single_zone_reheat.setMaximumSupplyAirTemperature(13.0)
  setpoint_mgr_single_zone_reheat.addToNode(air_loop.supplyOutletNode)
 
  # Set up FC (ZoneHVAC,cooling coil, heating coil, fan) in each zone


  zones.each do |zone| 

    # fc supply fan

    fc_fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)

    if(fan_coil_type == "FPFC")
      # heating coil

      fc_htg_coil = OpenStudio::Model::CoilHeatingWater.new(model, always_on)

      # cooling coil

      fc_clg_coil = OpenStudio::Model::CoilCoolingWater.new(model, always_on)
    elsif(fan_coil_type == "TPFC")
      # heating coil

      fc_htg_coil = OpenStudio::Model::CoilHeatingWater.new(model, tpfc_htg_availability_sch)

      # cooling coil

      fc_clg_coil = OpenStudio::Model::CoilCoolingWater.new(model, tpfc_clg_availability_sch)
    end

    # connect heating coil to hot water loop

    hw_loop.addDemandBranchForComponent(fc_htg_coil)
    # connect cooling coil to chilled water loop

    chw_loop.addDemandBranchForComponent(fc_clg_coil)

    zone_fc = OpenStudio::Model::ZoneHVACFourPipeFanCoil.new(model, always_on, fc_fan, fc_clg_coil, fc_htg_coil)
    zone_fc.addToThermalZone(zone)

    # Create a diffuser and attach the zone/diffuser pair to the air loop (make-up air unit)

    diffuser = OpenStudio::Model::AirTerminalSingleDuctUncontrolled.new(model, always_on)
    air_loop.addBranchForZone(zone,diffuser.to_StraightComponent)

  end #zone loop


end

.add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating(model, zones, boiler_fueltype, heating_coil_type, baseboard_type) ⇒ Object

add_sys2_FPFC_sys5_TPFC



2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
# File 'lib/openstudio-standards/btap/hvac.rb', line 2724

def self.add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating( model, zones, boiler_fueltype,  heating_coil_type, baseboard_type)
  # System Type 3: PSZ-AC

  # This measure creates:

  # -a constant volume packaged single-zone A/C unit

  # for each zone in the building; DX cooling with

  # heating coil: fuel-fired or electric, depending on argument heating_coil_type

  # heating_coil_type choices are "Electric", "Gas", "DX"

  # zone baseboards: hot water or electric, depending on argument baseboard_type

  # baseboard_type choices are "Hot Water" or "Electric"

  # boiler_fueltype choices match OS choices for Boiler component fuel type, i.e.

  # "NaturalGas","Electricity","PropaneGas","FuelOil#1","FuelOil#2","Coal","Diesel","Gasoline","OtherFuel1"


  always_on = model.alwaysOnDiscreteSchedule

  # Create a hot water loop (if baseboard type is hydronic); hot water baseboards will be connected to this loop


  if ( baseboard_type == "Hot Water" ) then

    hw_loop = OpenStudio::Model::PlantLoop.new(model)
    BTAP::Resources::HVAC::HVACTemplates::NECB2011::setup_hw_loop_with_components(model,hw_loop,boiler_fueltype, always_on)

  end  #of if statement


  zones.each do |zone|

    air_loop = OpenStudio::Model::AirLoopHVAC.new(model)

    air_loop.setName("#{zone.name} NECB System 3 PSZ")

    # When an air_loop is constructed, its constructor creates a sizing:system object

    # the default sizing:system constructor makes a system:sizing object

    # appropriate for a multizone VAV system

    # this systems is a constant volume system with no VAV terminals,

    # and therfore needs different default settings

    air_loop_sizing = air_loop.sizingSystem # TODO units

    air_loop_sizing.setTypeofLoadtoSizeOn("Sensible")
    air_loop_sizing.autosizeDesignOutdoorAirFlowRate
    air_loop_sizing.setMinimumSystemAirFlowRatio(1.0)
    air_loop_sizing.setPreheatDesignTemperature(7.0)
    air_loop_sizing.setPreheatDesignHumidityRatio(0.008)
    air_loop_sizing.setPrecoolDesignTemperature(12.8)
    air_loop_sizing.setPrecoolDesignHumidityRatio(0.008)
    air_loop_sizing.setCentralCoolingDesignSupplyAirTemperature(12.8)
    air_loop_sizing.setCentralHeatingDesignSupplyAirTemperature(40.0)
    air_loop_sizing.setSizingOption("NonCoincident")
    air_loop_sizing.setAllOutdoorAirinCooling(false)
    air_loop_sizing.setAllOutdoorAirinHeating(false)
    air_loop_sizing.setCentralCoolingDesignSupplyAirHumidityRatio(0.0085)
    air_loop_sizing.setCentralHeatingDesignSupplyAirHumidityRatio(0.0080)
    air_loop_sizing.setCoolingDesignAirFlowMethod("DesignDay")
    air_loop_sizing.setCoolingDesignAirFlowRate(0.0)
    air_loop_sizing.setHeatingDesignAirFlowMethod("DesignDay")
    air_loop_sizing.setHeatingDesignAirFlowRate(0.0)
    air_loop_sizing.setSystemOutdoorAirMethod("ZoneSum")

    fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)
                 
    case heating_coil_type
    when "Electric"           # electric coil

      htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model,always_on)

    when "Gas"
      htg_coil = OpenStudio::Model::CoilHeatingGas.new(model, always_on)

    when "DX"
      htg_coil = OpenStudio::Model::CoilHeatingDXSingleSpeed.new(model)  
      supplemental_htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model,always_on)
    else
      raise("#{heating_coil_type} is not a valid heating coil type.)")
    end

    #TO DO: other fuel-fired heating coil types? (not available in OpenStudio/E+ - may need to play with efficiency to mimic other fuel types)


    # Set up DX coil with NECB performance curve characteristics;

    clg_coil = OpenStudio::Model::CoilCoolingDXSingleSpeed.new(model)

    #oa_controller 

    oa_controller = OpenStudio::Model::ControllerOutdoorAir.new(model)

    #oa_system 

    oa_system = OpenStudio::Model::AirLoopHVACOutdoorAirSystem.new(model, oa_controller)

    # Add the components to the air loop

    # in order from closest to zone to furthest from zone

    supply_inlet_node = air_loop.supplyInletNode
    #              fan.addToNode(supply_inlet_node)

    #              supplemental_htg_coil.addToNode(supply_inlet_node) if heating_coil_type == "DX" 

    #              htg_coil.addToNode(supply_inlet_node)

    #              clg_coil.addToNode(supply_inlet_node)

    #              oa_system.addToNode(supply_inlet_node)

    if(heating_coil_type == 'DX')
      air_to_air_heatpump = OpenStudio::Model::AirLoopHVACUnitaryHeatPumpAirToAir.new(model,always_on,fan,htg_coil,clg_coil,supplemental_htg_coil)
      air_to_air_heatpump.setName("#{zone.name} ASHP")
      air_to_air_heatpump.setControllingZone(zone)
      air_to_air_heatpump.setSupplyAirFanOperatingModeSchedule(always_on)
      air_to_air_heatpump.addToNode(supply_inlet_node)
    else
      fan.addToNode(supply_inlet_node)
      supplemental_htg_coil.addToNode(supply_inlet_node) if heating_coil_type == "DX" 
      htg_coil.addToNode(supply_inlet_node)
      clg_coil.addToNode(supply_inlet_node)
    end
    oa_system.addToNode(supply_inlet_node)

    # Add a setpoint manager single zone reheat to control the

    # supply air temperature based on the needs of this zone

    setpoint_mgr_single_zone_reheat = OpenStudio::Model::SetpointManagerSingleZoneReheat.new(model)
    setpoint_mgr_single_zone_reheat.setControlZone(zone)
    setpoint_mgr_single_zone_reheat.setMinimumSupplyAirTemperature(13.0)
    setpoint_mgr_single_zone_reheat.addToNode(air_loop.supplyOutletNode)

    # Create a diffuser and attach the zone/diffuser pair to the air loop

    #diffuser = OpenStudio::Model::AirTerminalSingleDuctUncontrolled.new(model,always_on)

    diffuser = OpenStudio::Model::AirTerminalSingleDuctUncontrolled.new(model, always_on)
    air_loop.addBranchForZone(zone,diffuser.to_StraightComponent)

    if ( baseboard_type == "Electric") then

      #  zone_elec_baseboard = OpenStudio::Model::ZoneHVACBaseboardConvectiveElectric.new(model)

      zone_elec_baseboard = BTAP::Resources::HVAC::Plant::add_elec_baseboard(model)
      zone_elec_baseboard.addToThermalZone(zone)

    end

    if ( baseboard_type == "Hot Water") then
      baseboard_coil = BTAP::Resources::HVAC::Plant::add_hw_baseboard_coil(model)
      #Connect baseboard coil to hot water loop

      hw_loop.addDemandBranchForComponent(baseboard_coil)

      zone_baseboard = BTAP::Resources::HVAC::ZoneEquipment::add_zone_baseboard_convective_water(model, always_on, baseboard_coil)
      #add zone_baseboard to zone

      zone_baseboard.addToThermalZone(zone)
    end
  
  end  #zone loop


  return true
end

.add_sys4_single_zone_make_up_air_unit_with_baseboard_heating(model, zones, boiler_fueltype, heating_coil_type, baseboard_type) ⇒ Object

end add_sys3_single_zone_packaged_rooftop_unit_with_baseboard_heating



2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
# File 'lib/openstudio-standards/btap/hvac.rb', line 2863

def self.add_sys4_single_zone_make_up_air_unit_with_baseboard_heating( model, zones, boiler_fueltype, heating_coil_type, baseboard_type)
  # System Type 4: PSZ-AC

  # This measure creates:

  # -a constant volume packaged single-zone A/C unit

  # for each zone in the building; DX cooling with

  # heating coil: fuel-fired or electric, depending on argument heating_coil_type

  # heating_coil_type choices are "Electric", "Gas"

  # zone baseboards: hot water or electric, depending on argument baseboard_type

  # baseboard_type choices are "Hot Water" or "Electric"

  # boiler_fueltype choices match OS choices for Boiler component fuel type, i.e.

  # "NaturalGas","Electricity","PropaneGas","FuelOil#1","FuelOil#2","Coal","Diesel","Gasoline","OtherFuel1"

  # NOTE: This is the same as system type 3 (single zone make-up air unit and single zone rooftop unit are both PSZ systems)

  # SHOULD WE COMBINE sys3 and sys4 into one script?



  always_on = model.alwaysOnDiscreteSchedule

  # Create a hot water loop; hot water baseboards will be connected to this loop


  #TO DO: Include logic to determine whether baseboards should be hydronic or electric


  #Create hot water loop if baseboard type is hydronic


  if ( baseboard_type == "Hot Water" ) then

    hw_loop = OpenStudio::Model::PlantLoop.new(model)
    BTAP::Resources::HVAC::HVACTemplates::NECB2011::setup_hw_loop_with_components(model,hw_loop,boiler_fueltype, always_on)

  end  #of if statement


  # Create a PSZ for each zone

  # TO DO: need to apply this system to space types:

  #(1) automotive area: repair/parking garage, fire engine room, indoor truck bay

  #(2) supermarket/food service: food preparation with kitchen hood/vented appliance

  #(3) warehouse area (non-refrigerated spaces)



  zones.each do |zone|

    air_loop = OpenStudio::Model::AirLoopHVAC.new(model)


    air_loop.setName("#{zone.name} NECB System 4 PSZ")

    # When an air_loop is constructed, its constructor creates a sizing:system object

    # the default sizing:system constructor makes a system:sizing object

    # appropriate for a multizone VAV system

    # this systems is a constant volume system with no VAV terminals,

    # and therfore needs different default settings

    air_loop_sizing = air_loop.sizingSystem # TODO units

    air_loop_sizing.setTypeofLoadtoSizeOn("Sensible")
    air_loop_sizing.autosizeDesignOutdoorAirFlowRate
    air_loop_sizing.setMinimumSystemAirFlowRatio(1.0)
    air_loop_sizing.setPreheatDesignTemperature(7.0)
    air_loop_sizing.setPreheatDesignHumidityRatio(0.008)
    air_loop_sizing.setPrecoolDesignTemperature(12.8)
    air_loop_sizing.setPrecoolDesignHumidityRatio(0.008)
    air_loop_sizing.setCentralCoolingDesignSupplyAirTemperature(12.8)
    air_loop_sizing.setCentralHeatingDesignSupplyAirTemperature(40.0)
    air_loop_sizing.setSizingOption("NonCoincident")
    air_loop_sizing.setAllOutdoorAirinCooling(false)
    air_loop_sizing.setAllOutdoorAirinHeating(false)
    air_loop_sizing.setCentralCoolingDesignSupplyAirHumidityRatio(0.0085)
    air_loop_sizing.setCentralHeatingDesignSupplyAirHumidityRatio(0.0080)
    air_loop_sizing.setCoolingDesignAirFlowMethod("DesignDay")
    air_loop_sizing.setCoolingDesignAirFlowRate(0.0)
    air_loop_sizing.setHeatingDesignAirFlowMethod("DesignDay")
    air_loop_sizing.setHeatingDesignAirFlowRate(0.0)
    air_loop_sizing.setSystemOutdoorAirMethod("ZoneSum")

    fan = OpenStudio::Model::FanConstantVolume.new(model, always_on)
                  

    if ( heating_coil_type == "Electric") then           # electric coil

      htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model,always_on)
    end

    if ( heating_coil_type == "Gas") then
      htg_coil = OpenStudio::Model::CoilHeatingGas.new(model, always_on)
    end

    #TO DO: other fuel-fired heating coil types? (not available in OpenStudio/E+ - may need to play with efficiency to mimic other fuel types)



    # Set up DX coil with NECB performance curve characteristics;


    clg_coil = BTAP::Resources::HVAC::Plant::add_onespeed_DX_coil(model,always_on)

    #oa_controller 

    oa_controller = OpenStudio::Model::ControllerOutdoorAir.new(model)
    


    #oa_system 

    oa_system = OpenStudio::Model::AirLoopHVACOutdoorAirSystem.new(model, oa_controller)

    # Add the components to the air loop

    # in order from closest to zone to furthest from zone

    supply_inlet_node = air_loop.supplyInletNode
    fan.addToNode(supply_inlet_node)
    htg_coil.addToNode(supply_inlet_node)
    clg_coil.addToNode(supply_inlet_node)
    oa_system.addToNode(supply_inlet_node)

    # Add a setpoint manager single zone reheat to control the

    # supply air temperature based on the needs of this zone

    setpoint_mgr_single_zone_reheat = OpenStudio::Model::SetpointManagerSingleZoneReheat.new(model)
    setpoint_mgr_single_zone_reheat.setControlZone(zone)
    setpoint_mgr_single_zone_reheat.setMinimumSupplyAirTemperature(13.0)
    setpoint_mgr_single_zone_reheat.addToNode(air_loop.supplyOutletNode)


    #Create sensible heat exchanger

    #              heat_exchanger = BTAP::Resources::HVAC::Plant::add_hrv(model)

    #              heat_exchanger.setSensibleEffectivenessat100HeatingAirFlow(0.5)

    #              heat_exchanger.setSensibleEffectivenessat75HeatingAirFlow(0.5)

    #              heat_exchanger.setSensibleEffectivenessat100CoolingAirFlow(0.5)

    #              heat_exchanger.setSensibleEffectivenessat75CoolingAirFlow(0.5)

    #              heat_exchanger.setLatentEffectivenessat100HeatingAirFlow(0.0)

    #              heat_exchanger.setLatentEffectivenessat75HeatingAirFlow(0.0)

    #              heat_exchanger.setLatentEffectivenessat100CoolingAirFlow(0.0)

    #              heat_exchanger.setLatentEffectivenessat75CoolingAirFlow(0.0)

    #              heat_exchanger.setSupplyAirOutletTemperatureControl(false)

    #

    #              Connect heat exchanger

    #              oa_node = oa_system.outboardOANode

    #              heat_exchanger.addToNode(oa_node.get)



    # Create a diffuser and attach the zone/diffuser pair to the air loop

    #diffuser = OpenStudio::Model::AirTerminalSingleDuctUncontrolled.new(model,always_on)

    diffuser = OpenStudio::Model::AirTerminalSingleDuctUncontrolled.new(model, always_on)
    air_loop.addBranchForZone(zone,diffuser.to_StraightComponent)

    if ( baseboard_type == "Electric") then

      #  zone_elec_baseboard = OpenStudio::Model::ZoneHVACBaseboardConvectiveElectric.new(model)

      zone_elec_baseboard = BTAP::Resources::HVAC::Plant::add_elec_baseboard(model)
      zone_elec_baseboard.addToThermalZone(zone)

    end

    if ( baseboard_type == "Hot Water") then
      baseboard_coil = BTAP::Resources::HVAC::Plant::add_hw_baseboard_coil(model)
      #Connect baseboard coil to hot water loop

      hw_loop.addDemandBranchForComponent(baseboard_coil)


      zone_baseboard = BTAP::Resources::HVAC::ZoneEquipment::add_zone_baseboard_convective_water(model, always_on, baseboard_coil)
      #add zone_baseboard to zone

      zone_baseboard.addToThermalZone(zone)
    end

  end  #zone loop



  return true
end

.add_sys6_multi_zone_built_up_system_with_baseboard_heating(model, zones, boiler_fueltype, heating_coil_type, baseboard_type, chiller_type, fan_type) ⇒ Object

end add_sys4_single_zone_make_up_air_unit_with_baseboard_heating



3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
# File 'lib/openstudio-standards/btap/hvac.rb', line 3022

def self.add_sys6_multi_zone_built_up_system_with_baseboard_heating( model ,zones,  boiler_fueltype, heating_coil_type, baseboard_type, chiller_type, fan_type )

  # System Type 6: VAV w/ Reheat

  # This measure creates:

  # a single hot water loop with a natural gas or electric boiler or for the building

  # a single chilled water loop with water cooled chiller for the building

  # a single condenser water loop for heat rejection from the chiller

  # a VAV system w/ hot water or electric heating, chilled water cooling, and

  # hot water or electric reheat for each story of the building

  # Arguments:

  # "boiler_fueltype" choices match OS choices for boiler fuel type: 

  # "NaturalGas","Electricity","PropaneGas","FuelOil#1","FuelOil#2","Coal","Diesel","Gasoline","OtherFuel1"

  # "heating_coil_type": "Electric" or "Hot Water"

  # "baseboard_type": "Electric" and "Hot Water"

  # "chiller_type": "Scroll";"Centrifugal";""Screw";"Reciprocating"

  # "fan_type": "AF_or_BI_rdg_fancurve";"AF_or_BI_inletvanes";"fc_inletvanes";"var_speed_drive"  


  always_on = model.alwaysOnDiscreteSchedule

  #Create hot water loop if baseboard or heating coil type is hydronic


  if ( baseboard_type == "Hot Water" ) || ( heating_coil_type == "Hot Water") then

    hw_loop =  OpenStudio::Model::PlantLoop.new(model)
    BTAP::Resources::HVAC::HVACTemplates::NECB2011::setup_hw_loop_with_components(model,hw_loop,boiler_fueltype, always_on)

  end  #of if statement


  # Chilled Water Plant


  chw_loop = OpenStudio::Model::PlantLoop.new(model)
  chiller = BTAP::Resources::HVAC::HVACTemplates::NECB2011::setup_chw_loop_with_components(model,chw_loop,chiller_type)

  # Condenser System


  cw_loop = OpenStudio::Model::PlantLoop.new(model)
  ctower = BTAP::Resources::HVAC::HVACTemplates::NECB2011::setup_cw_loop_with_components(model,cw_loop,chiller)
  
  # Make a Packaged VAV w/ PFP Boxes for each story of the building

  model.getBuildingStorys.sort.each do |story|
    if not ( BTAP::Geometry::BuildingStoreys::get_zones_from_storey(story) & zones).empty?

      air_loop = OpenStudio::Model::AirLoopHVAC.new(model)
      air_loop.setName("VAV with Reheat")
      sizingSystem = air_loop.sizingSystem
      sizingSystem.setCentralCoolingDesignSupplyAirTemperature(13.0)
      sizingSystem.setCentralHeatingDesignSupplyAirTemperature(13.0)

      fan = OpenStudio::Model::FanVariableVolume.new(model,always_on)
      fan.setFanPowerMinimumFlowRateInputMethod("Fraction")
      fan.setFanPowerCoefficient4(0.0)
      fan.setFanPowerCoefficient5(0.0)
      if(fan_type == "AF_or_BI_rdg_fancurve")
        fan.setFanPowerMinimumFlowFraction(0.47)
        fan.setFanPowerCoefficient1(0.227143)
        fan.setFanPowerCoefficient2(1.178929)
        fan.setFanPowerCoefficient3(-0.41071)
      elsif(fan_type == "AF_or_BI_inletvanes")
        fan.setFanPowerMinimumFlowFraction(0.35)
        fan.setFanPowerCoefficient1(0.584345)
        fan.setFanPowerCoefficient2(-0.57917)
        fan.setFanPowerCoefficient3(0.970238)
      elsif(fan_type == "fc_inletvanes")
        fan.setFanPowerMinimumFlowFraction(0.25)
        fan.setFanPowerCoefficient1(0.339619)
        fan.setFanPowerCoefficient2(-0.84814)
        fan.setFanPowerCoefficient3(1.495671)
      elsif(fan_type == "var_speed_drive")
        fan.setFanPowerMinimumFlowFraction(0.20)
        fan.setFanPowerCoefficient1(0.00153028)
        fan.setFanPowerCoefficient2(0.00520806)
        fan.setFanPowerCoefficient3(1.0086242)
      end

      if(heating_coil_type == "Hot Water")
        htg_coil = OpenStudio::Model::CoilHeatingWater.new(model,always_on)
        hw_loop.addDemandBranchForComponent(htg_coil)
      end
      if(heating_coil_type == "Electric")
        htg_coil = OpenStudio::Model::CoilHeatingElectric.new(model,always_on)
      end

      clg_coil = OpenStudio::Model::CoilCoolingWater.new(model,always_on)
      chw_loop.addDemandBranchForComponent(clg_coil)

      oa_controller = OpenStudio::Model::ControllerOutdoorAir.new(model)
    
      oa_system = OpenStudio::Model::AirLoopHVACOutdoorAirSystem.new(model,oa_controller)
    
      # Add the components to the air loop

      # in order from closest to zone to furthest from zone

      # TODO: still need to define the return fan (tried to access the air loop "returnAirNode" without success)

      # TODO: The OS sdk indicates that this keyword should be active but I get a "Not implemented" error when I

      # TODO: try to access it through "air_loop.returnAirNode"

      supply_inlet_node = air_loop.supplyInletNode
      supply_outlet_node = air_loop.supplyOutletNode
      fan.addToNode(supply_inlet_node)
      htg_coil.addToNode(supply_inlet_node)
      clg_coil.addToNode(supply_inlet_node)
      oa_system.addToNode(supply_inlet_node)
    
      #              return_inlet_node = air_loop.returnAirNode


      # Add a setpoint manager to control the

      # supply air to a constant temperature

      sat_c = 13.0
      sat_sch = OpenStudio::Model::ScheduleRuleset.new(model)
      sat_sch.setName("Supply Air Temp")
      sat_sch.defaultDaySchedule().setName("Supply Air Temp Default")
      sat_sch.defaultDaySchedule().addValue(OpenStudio::Time.new(0,24,0,0),sat_c)
      sat_stpt_manager = OpenStudio::Model::SetpointManagerScheduled.new(model,sat_sch)
      sat_stpt_manager.addToNode(supply_outlet_node)

      # TO-do ask Kamel about zonal assignments per storey. 


      # Make a VAV terminal with HW reheat for each zone on this story that is in intersection with the zones array. 

      # and hook the reheat coil to the HW loop

      ( BTAP::Geometry::BuildingStoreys::get_zones_from_storey(story) & zones).each do |zone|
        if(heating_coil_type == "Hot Water")
          reheat_coil = OpenStudio::Model::CoilHeatingWater.new(model,always_on)
          hw_loop.addDemandBranchForComponent(reheat_coil)
        elsif(heating_coil_type == "Electric")
          reheat_coil = OpenStudio::Model::CoilHeatingElectric.new(model,always_on)
        end
        
        vav_terminal = OpenStudio::Model::AirTerminalSingleDuctVAVReheat.new(model,always_on,reheat_coil)
        air_loop.addBranchForZone(zone,vav_terminal.to_StraightComponent)
        vav_terminal.setZoneMinimumAirFlowMethod("FixedFlowRate")
        #TODO: currently the minimum flow rate is set to 2 L/s-m2. In fact we need to create a minimum flow rate

        #TODO: schedule based on whether the zone is occupied or not as stipulated in 8.4.4.22 of NECB2011

        min_flow_rate = 0.002*zone.floorArea
        vav_terminal.setFixedMinimumAirFlowRate(min_flow_rate) 

        #Set zone baseboards

        if ( baseboard_type == "Electric") then
          zone_elec_baseboard = BTAP::Resources::HVAC::Plant::add_elec_baseboard(model)
          zone_elec_baseboard.addToThermalZone(zone)
        end
        if ( baseboard_type == "Hot Water") then
          baseboard_coil = BTAP::Resources::HVAC::Plant::add_hw_baseboard_coil(model)
          #Connect baseboard coil to hot water loop

          hw_loop.addDemandBranchForComponent(baseboard_coil)
          zone_baseboard = BTAP::Resources::HVAC::ZoneEquipment::add_zone_baseboard_convective_water(model, always_on, baseboard_coil)
          #add zone_baseboard to zone

          zone_baseboard.addToThermalZone(zone)
        end
        
      end
    end
  end # next story


  return true

end

.assign_zones_sys1(model, zones, boiler_fueltype, mau, mau_heating_coil_type, baseboard_type) ⇒ Object

wrapper methods for the auto_zoner



2304
2305
2306
# File 'lib/openstudio-standards/btap/hvac.rb', line 2304

def self.assign_zones_sys1( model, zones, boiler_fueltype, mau, mau_heating_coil_type, baseboard_type )
  return self.add_sys1_unitary_ac_baseboard_heating( model,zones,boiler_fueltype,mau,mau_heating_coil_type,baseboard_type)
end

.assign_zones_sys2(model, zones, boiler_fueltype, chiller_type, mua_cooling_type) ⇒ Object



2308
2309
2310
# File 'lib/openstudio-standards/btap/hvac.rb', line 2308

def self.assign_zones_sys2(model, zones, boiler_fueltype,chiller_type,mua_cooling_type)
  self.add_sys2_FPFC_sys5_TPFC(model, zones, boiler_fueltype,chiller_type,"FPFC",mua_cooling_type)
end

.assign_zones_sys3(model, zones, boiler_fueltype, heating_coil_type, baseboard_type) ⇒ Object



2312
2313
2314
# File 'lib/openstudio-standards/btap/hvac.rb', line 2312

def self.assign_zones_sys3(model, zones, boiler_fueltype,  heating_coil_type, baseboard_type)
  self.add_sys3and8_single_zone_packaged_rooftop_unit_with_baseboard_heating( model, zones, boiler_fueltype,  heating_coil_type, baseboard_type)
end

.assign_zones_sys4(model, zones, boiler_fueltype, heating_coil_type, baseboard_type) ⇒ Object



2316
2317
2318
2319
# File 'lib/openstudio-standards/btap/hvac.rb', line 2316

def self.assign_zones_sys4( model, zones, boiler_fueltype, heating_coil_type, baseboard_type)
  self.add_sys4_single_zone_make_up_air_unit_with_baseboard_heating( model, zones, boiler_fueltype, heating_coil_type, baseboard_type)
  return model
end

.assign_zones_sys5(model, zones, boiler_fueltype, chiller_type, mua_cooling_type) ⇒ Object



2321
2322
2323
# File 'lib/openstudio-standards/btap/hvac.rb', line 2321

def self.assign_zones_sys5(model, zones, boiler_fueltype,chiller_type,mua_cooling_type)
  self.add_sys2_FPFC_sys5_TPFC(model, zones, boiler_fueltype,chiller_type,"TPFC",mua_cooling_type)
end

.assign_zones_sys6(model, zones, boiler_fueltype, heating_coil_type, baseboard_type, chiller_type, fan_type) ⇒ Object

To do: must unravel story vav assignment.



2326
2327
2328
# File 'lib/openstudio-standards/btap/hvac.rb', line 2326

def self.assign_zones_sys6( model ,zones,  boiler_fueltype, heating_coil_type, baseboard_type, chiller_type, fan_type )
  self.add_sys6_multi_zone_built_up_system_with_baseboard_heating( model ,zones,  boiler_fueltype, heating_coil_type, baseboard_type, chiller_type, fan_type )
end

.assign_zones_sys7(model, zones, boiler_fueltype, chiller_type, mua_cooling_type) ⇒ Object



2330
2331
2332
2333
# File 'lib/openstudio-standards/btap/hvac.rb', line 2330

def self.assign_zones_sys7(model, zones, boiler_fueltype,chiller_type,mua_cooling_type)
  #System 7 

  self.add_sys2_FPFC_sys5_TPFC(model, zones, boiler_fueltype,chiller_type,"FPFC",mua_cooling_type)
end

.setup_chw_loop_with_components(model, chw_loop, chiller_type) ⇒ Object

of setup_hw_loop_with_components



3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
# File 'lib/openstudio-standards/btap/hvac.rb', line 3225

def self.setup_chw_loop_with_components(model,chw_loop,chiller_type)

  chw_loop.setName("Chilled Water Loop")
  sizing_plant = chw_loop.sizingPlant
  sizing_plant.setLoopType("Cooling")
  sizing_plant.setDesignLoopExitTemperature(7.0)
  sizing_plant.setLoopDesignTemperatureDifference(6.0)       

  #pump = OpenStudio::Model::PumpConstantSpeed.new(model)

  chw_pump = OpenStudio::Model::PumpConstantSpeed.new(model)

  chiller = OpenStudio::Model::ChillerElectricEIR.new(model)
  chiller.setCondenserType("WaterCooled")
  # update name so it's in agreement with method used in Standards file

  chiller_name = chiller.name.to_s + " WaterCooled #{chiller_type}"
  chiller.setName(chiller_name)
  
  chiller_bypass_pipe = OpenStudio::Model::PipeAdiabatic.new(model)
  
  chw_supply_outlet_pipe = OpenStudio::Model::PipeAdiabatic.new(model)

  # Add the components to the chilled water loop

  chw_supply_inlet_node = chw_loop.supplyInletNode
  chw_supply_outlet_node = chw_loop.supplyOutletNode
  chw_pump.addToNode(chw_supply_inlet_node)
  chw_loop.addSupplyBranchForComponent(chiller)
  chw_loop.addSupplyBranchForComponent(chiller_bypass_pipe)
  chw_supply_outlet_pipe.addToNode(chw_supply_outlet_node)

  # Add a setpoint manager to control the

  # chilled water to a constant temperature

  chw_t_c = 7.0
  chw_t_sch = BTAP::Resources::Schedules::create_annual_constant_ruleset_schedule(model, "CHW Temp", "Temperature", chw_t_c)
  chw_t_stpt_manager = OpenStudio::Model::SetpointManagerScheduled.new(model,chw_t_sch)
  chw_t_stpt_manager.addToNode(chw_supply_outlet_node)

  return chiller

end

.setup_cw_loop_with_components(model, cw_loop, chiller) ⇒ Object

of setup_chw_loop_with_components



3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
# File 'lib/openstudio-standards/btap/hvac.rb', line 3265

def self.setup_cw_loop_with_components(model,cw_loop,chiller)

  cw_loop.setName("Condenser Water Loop")
  cw_sizing_plant = cw_loop.sizingPlant
  cw_sizing_plant.setLoopType("Condenser")
  cw_sizing_plant.setDesignLoopExitTemperature(29.0)
  cw_sizing_plant.setLoopDesignTemperatureDifference(6.0)

  cw_pump = OpenStudio::Model::PumpConstantSpeed.new(model)

  clg_tower = OpenStudio::Model::CoolingTowerSingleSpeed.new(model)

  # TO DO: Need to define and set cooling tower curves


  clg_tower_bypass_pipe = OpenStudio::Model::PipeAdiabatic.new(model)

  cw_supply_outlet_pipe = OpenStudio::Model::PipeAdiabatic.new(model)

  # Add the components to the condenser water loop

  cw_supply_inlet_node = cw_loop.supplyInletNode
  cw_supply_outlet_node = cw_loop.supplyOutletNode
  cw_pump.addToNode(cw_supply_inlet_node)
  cw_loop.addSupplyBranchForComponent(clg_tower)
  cw_loop.addSupplyBranchForComponent(clg_tower_bypass_pipe)
  cw_supply_outlet_pipe.addToNode(cw_supply_outlet_node)
  cw_loop.addDemandBranchForComponent(chiller)

  # Add a setpoint manager to control the

  # condenser water to constant temperature

  cw_t_c = 29.0
  cw_t_sch = BTAP::Resources::Schedules::create_annual_constant_ruleset_schedule(model, "CW Temp", "Temperature", cw_t_c)
  cw_t_stpt_manager = OpenStudio::Model::SetpointManagerScheduled.new(model, cw_t_sch)
  cw_t_stpt_manager.addToNode(cw_supply_outlet_node)

  return clg_tower

end

.setup_hw_loop_with_components(model, hw_loop, boiler_fueltype, pump_flow_sch) ⇒ Object



3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
# File 'lib/openstudio-standards/btap/hvac.rb', line 3177

def self.setup_hw_loop_with_components(model,hw_loop,boiler_fueltype,pump_flow_sch)

  hw_loop.setName("Hot Water Loop")
  sizing_plant = hw_loop.sizingPlant
  sizing_plant.setLoopType("Heating")
  sizing_plant.setDesignLoopExitTemperature(82.0) #TODO units

  sizing_plant.setLoopDesignTemperatureDifference(16.0)

  #pump 

  pump = OpenStudio::Model::PumpConstantSpeed.new(model)
  #TODO: the keyword "setPumpFlowRateSchedule" does not seem to work. A message

  #was sent to NREL to let them know about this. Once there is a fix for this,

  #use the proper pump schedule depending on whether we have two-pipe or four-pipe

  #fan coils.

  #            pump.resetPumpFlowRateSchedule()

  #            pump.setPumpFlowRateSchedule(pump_flow_sch)


  #boiler 

  boiler = OpenStudio::Model::BoilerHotWater.new(model)                   
  boiler.setFuelType(boiler_fueltype)

  #boiler_bypass_pipe 

  boiler_bypass_pipe = OpenStudio::Model::PipeAdiabatic.new(model)
    
  #supply_outlet_pipe 

  supply_outlet_pipe = OpenStudio::Model::PipeAdiabatic.new(model)

  # Add the components to the hot water loop

  hw_supply_inlet_node = hw_loop.supplyInletNode
  hw_supply_outlet_node = hw_loop.supplyOutletNode
  pump.addToNode(hw_supply_inlet_node)

  hw_loop.addSupplyBranchForComponent(boiler)
  hw_loop.addSupplyBranchForComponent(boiler_bypass_pipe)
  supply_outlet_pipe.addToNode(hw_supply_outlet_node)

  # Add a setpoint manager to control the

  # hot water based on outdoor temperature

  hw_oareset_stpt_manager = OpenStudio::Model::SetpointManagerOutdoorAirReset.new(model)
  hw_oareset_stpt_manager.setControlVariable("Temperature")
  hw_oareset_stpt_manager.setSetpointatOutdoorLowTemperature(82.0)
  hw_oareset_stpt_manager.setOutdoorLowTemperature(-16.0)
  hw_oareset_stpt_manager.setSetpointatOutdoorHighTemperature(60.0)
  hw_oareset_stpt_manager.setOutdoorHighTemperature(0.0)
  hw_oareset_stpt_manager.addToNode(hw_supply_outlet_node)

end