Module: OpenstudioStandards::Daylighting

Defined in:
lib/openstudio-standards/daylighting/space.rb

Overview

The Daylighting module provides methods to add daylighting to a Space

Space collapse

Class Method Details

.space_add_daylight_sensor(space, name: nil, position: nil, phi_rotation_around_z_axis: 0.0, illuminance_setpoint: 430.0, lighting_control_type: 'Continuous', minimum_input_power_fraction_continuous: 0.3, minimum_light_output_fraction_continuous: 0.2, number_of_stepped_control_steps: 1) ⇒ OpenStudio::Model::DaylightingControl

add a daylight sensor to a space

Parameters:

  • space (OpenStudio::Model::Space)

    OpenStudio Space object

  • name (String) (defaults to: nil)

    name of sensor, if nil, will use “<space name> daylight sensor”

  • position (OpenStudio::Point3d) (defaults to: nil)

    point to place daylight sensor, defaults to 1 meter above the center of the space

  • phi_rotation_around_z_axis (Double) (defaults to: 0.0)

    Rotation around z-axis

  • illuminance_setpoint (Double) (defaults to: 430.0)

    illuminance setpoint in lux, default 430 lux is roughly 40 foot-candles

  • lighting_control_type (String) (defaults to: 'Continuous')

    Options are ‘None’, ‘Continuous’, Stepped’, ‘Continuous/Off’

  • minimum_input_power_fraction_continuous (Double) (defaults to: 0.3)

    minimum input power fraction for continuous dimming control

  • minimum_light_output_fraction_continuous (Double) (defaults to: 0.2)

    minimum light output fraction for continuous dimming control

  • number_of_stepped_control_steps (Integer) (defaults to: 1)

    number of steps if stepped control

Returns:

  • (OpenStudio::Model::DaylightingControl)

    daylight sensor



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/openstudio-standards/daylighting/space.rb', line 18

def self.space_add_daylight_sensor(space,
                                   name: nil,
                                   position: nil,
                                   phi_rotation_around_z_axis: 0.0,
                                   illuminance_setpoint: 430.0,
                                   lighting_control_type: 'Continuous',
                                   minimum_input_power_fraction_continuous: 0.3,
                                   minimum_light_output_fraction_continuous: 0.2,
                                   number_of_stepped_control_steps: 1)

  daylight_sensor = OpenStudio::Model::DaylightingControl.new(space.model)
  daylight_sensor.setSpace(space)
  sensor_name = name.nil? ? "#{space.name} Daylight Sensor" : name
  daylight_sensor.setName(sensor_name)
  if position.nil?
    position = OpenstudioStandards::Geometry.space_create_point_at_center_of_floor(space, 1.0)
  end
  daylight_sensor.setPosition(position)
  daylight_sensor.setPhiRotationAroundZAxis(phi_rotation_around_z_axis) unless phi_rotation_around_z_axis.nil?
  daylight_sensor.setIlluminanceSetpoint(illuminance_setpoint)
  daylight_sensor.setLightingControlType(lighting_control_type)
  daylight_sensor.setMinimumInputPowerFractionforContinuousDimmingControl(minimum_input_power_fraction_continuous)
  daylight_sensor.setMinimumLightOutputFractionforContinuousDimmingControl(minimum_light_output_fraction_continuous)
  daylight_sensor.setNumberofSteppedControlSteps(number_of_stepped_control_steps)

  return daylight_sensor
end