Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #301 - Add CoilCoolingDXVariableSpeed to hvac_library and MainRightColumnController #455

Merged
merged 2 commits into from
Oct 29, 2021

Conversation

jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Oct 29, 2021

image

The code I used to add it to the hvac_library:

model = osload('hvac_library.osm')

cooling_coil = OpenStudio::Model::CoilCoolingDXVariableSpeed.new(model)
cooling_coil_speed_1 = OpenStudio::Model::CoilCoolingDXVariableSpeedSpeedData.new(model)
cooling_coil.addSpeed(cooling_coil_speed_1)
cooling_coil_speed_2 = OpenStudio::Model::CoilCoolingDXVariableSpeedSpeedData.new(model)
cooling_coil.addSpeed(cooling_coil_speed_2)
puts cooling_coil.setName("Coil Cooling DX Variable Speed - Two Speeds")
puts cooling_coil.energyPartLoadFractionCurve
cooling_coil.energyPartLoadFractionCurve.setName("#{cooling_coil.nameString} EIRfPLR")

cooling_coil.setNominalSpeedLevel(2)

cooling_coil_speed_1.setName("#{cooling_coil.nameString} Half Speed")
cooling_coil_speed_1.setReferenceUnitGrossRatedTotalCoolingCapacity(8914.185229)
cooling_coil_speed_1.setReferenceUnitGrossRatedSensibleHeatRatio(0.79)
cooling_coil_speed_1.setReferenceUnitGrossRatedCoolingCOP(3.980488789)
cooling_coil_speed_1.setReferenceUnitRatedAirFlowRate(0.944)

cooling_coil_speed_2.setName("#{cooling_coil.nameString} Full Speed")
cooling_coil_speed_2.setReferenceUnitGrossRatedTotalCoolingCapacity(16456.94607)
cooling_coil_speed_2.setReferenceUnitGrossRatedSensibleHeatRatio(0.73)
cooling_coil_speed_2.setReferenceUnitGrossRatedCoolingCOP(4.08)
cooling_coil_speed_2.setReferenceUnitRatedAirFlowRate(1.888)

[cooling_coil_speed_1, cooling_coil_speed_2].each do |speed|

  speed.totalCoolingCapacityFunctionofTemperatureCurve.setName("#{speed.nameString} capFT")
  speed.totalCoolingCapacityFunctionofAirFlowFractionCurve.setName("#{speed.nameString} capFlow")
  speed.energyInputRatioFunctionofTemperatureCurve.setName("#{speed.nameString} EIRFT")
  speed.energyInputRatioFunctionofAirFlowFractionCurve.setName("#{speed.nameString} EIRFlow")

end

cooling_coil.getTarget(21).get.setName("#{cooling_coil.nameString} Speed Data List")

model.save('hvac_library.osm', true)

…e below)

Add a Coil:Cooling:DX:VariableSpeed to the hvac_library (see ruby code below)

```ruby
model = osload('hvac_library.osm')

cooling_coil = OpenStudio::Model::CoilCoolingDXVariableSpeed.new(model)
cooling_coil_speed_1 = OpenStudio::Model::CoilCoolingDXVariableSpeedSpeedData.new(model)
cooling_coil.addSpeed(cooling_coil_speed_1)
cooling_coil_speed_2 = OpenStudio::Model::CoilCoolingDXVariableSpeedSpeedData.new(model)
cooling_coil.addSpeed(cooling_coil_speed_2)
puts cooling_coil.setName("Coil Cooling DX Variable Speed - Two Speeds")
puts cooling_coil.energyPartLoadFractionCurve
cooling_coil.energyPartLoadFractionCurve.setName("#{cooling_coil.nameString} EIRfPLR")

cooling_coil.setNominalSpeedLevel(2)

cooling_coil_speed_1.setName("#{cooling_coil.nameString} Half Speed")
cooling_coil_speed_1.setReferenceUnitGrossRatedTotalCoolingCapacity(8914.185229)
cooling_coil_speed_1.setReferenceUnitGrossRatedSensibleHeatRatio(0.79)
cooling_coil_speed_1.setReferenceUnitGrossRatedCoolingCOP(3.980488789)
cooling_coil_speed_1.setReferenceUnitRatedAirFlowRate(0.944)

cooling_coil_speed_2.setName("#{cooling_coil.nameString} Full Speed")
cooling_coil_speed_2.setReferenceUnitGrossRatedTotalCoolingCapacity(16456.94607)
cooling_coil_speed_2.setReferenceUnitGrossRatedSensibleHeatRatio(0.73)
cooling_coil_speed_2.setReferenceUnitGrossRatedCoolingCOP(4.08)
cooling_coil_speed_2.setReferenceUnitRatedAirFlowRate(1.888)

[cooling_coil_speed_1, cooling_coil_speed_2].each do |speed|

  speed.totalCoolingCapacityFunctionofTemperatureCurve.setName("#{speed.nameString} capFT")
  speed.totalCoolingCapacityFunctionofAirFlowFractionCurve.setName("#{speed.nameString} capFlow")
  speed.energyInputRatioFunctionofTemperatureCurve.setName("#{speed.nameString} EIRFT")
  speed.energyInputRatioFunctionofAirFlowFractionCurve.setName("#{speed.nameString} EIRFlow")

end

cooling_coil.getTarget(21).get.setName("#{cooling_coil.nameString} Speed Data List")

model.save('hvac_library.osm', true)
```
75b819
@jmarrec jmarrec force-pushed the 301_CoilCoolngDXVariableSpeed branch from e3df525 to ee2afef Compare October 29, 2021 12:56
@jmarrec jmarrec merged commit b010da5 into develop Oct 29, 2021
@jmarrec jmarrec deleted the 301_CoilCoolngDXVariableSpeed branch October 29, 2021 12:56
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HVAC library doesn't seem to have CoilCoolingDXVariableSpeed
1 participant