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

ventilation.setOutdoorAirFlowperPerson() accepts bad value in API #1312

Closed
DavidGoldwasser opened this issue Dec 18, 2014 · 1 comment
Closed

Comments

@DavidGoldwasser
Copy link
Collaborator

I had a measure where I had a formula to set the setOutdoorAirFlowperPerson. The formula had a divided by 0. The measure appeared to run without issue. But the simulation failed. In the GUI I see "-nan" instead of the double. It was a mistake in my code and I fixed it, but I would assume this would either fail in the measure or leave the value untouched. Seems odd to produce a non-double for the value.

Here is the object in the model

OS:DesignSpecification:OutdoorAir,
  {4d0a6dba-6738-4665-9e31-12723669e0ec}, !- Handle
  Office|Elec/MechRoom|DOE Ref 1980-2004|ASHRAE 169-2006-5A|OutdoorAir, !- Name
  Sum,                                    !- Outdoor Air Method
  -nan,                                   !- Outdoor Air Flow per Person {m3/s-person}
  0,                                      !- Outdoor Air Flow per Floor Area {m3/s-m2}
  ,                                       !- Outdoor Air Flow Rate {m3/s}
  0,                                      !- Outdoor Air Flow Air Changes per Hour {1/hr}
  ;                                       !- Outdoor Air Flow Rate Fraction Schedule Name
@asparke2
Copy link
Member

@DavidGoldwasser Closing because I could not reproduce this with Ruby 2.0.0:

require 'openstudio'
model = OpenStudio::Model::Model.new
oa_spec = OpenStudio::Model::DesignSpecificationOutdoorAir.new(model)
# Tried 3 different ways
# val = Float::NAN
# val = 0.0/0.0
# val = 1/0
oa_spec.setOutdoorAirFlowperPerson(val)
puts oa_spec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants