First time here? Check out the Help page!
1 | initial version |
I totally misread your question; I am leaving my original answer below just because I had fun figuring that specific out.
You are looking for the OpenStudio SDK. Take a look at the documentation for the FanOnOff class. There are different methods (or functions in Python) to get everything about the fan, take a look at the example code below where I print the fan pressureRise
parameter.
from openstudio import model
m = model.Model()
f = model.FanOnOff(m)
pressure_rise_si = f.pressureRise()
print('The fan Pressure Rise in Pa is ' + str(pressure_rise_si))
Output
The fan Pressure Rise in Pa is 300.0
You can get any parameter from a fan using similar methods, take a look at the SDK for the specific documentation.
---- Original answer
Hmm interesting, I would like to ask you back what is the reason why you would do this. The following Python code should do what you are asking if I understand what you want to do.
# Create a fan
from openstudio import model
m = model.Model()
f = model.FanOnOff(m)
# Get the fan iddObject
obj = f.iddObject()
fields = obj.numFields()
for i in range(fields):
print(f.getField(i))
Output:
{0fae4eb3-fe16-4c05-94f7-4ed150857507}
Fan On Off 1
{2f817562-e016-4118-9091-e4f096e2b345}
0.6
300
autosize
0.8
1
{668676fe-a69f-4db3-8e07-9953fa12b2d4}
{eb20ba76-8c87-412f-be6f-8d4b4c8af830}
2 | No.2 Revision |
I totally misread your question; I am leaving my original answer below just because I had fun figuring that specific out.
You are looking for the OpenStudio SDK. Take a look at the documentation for the FanOnOff class. There are different methods (or functions in Python) methods
to get everything about the fan, take a look at the example code below where I print the fan pressureRise
parameter.
from openstudio import model
m = model.Model()
f = model.FanOnOff(m)
pressure_rise_si = f.pressureRise()
print('The fan Pressure Rise in Pa is ' + str(pressure_rise_si))
Output
The fan Pressure Rise in Pa is 300.0
You can get any parameter from a fan using similar methods, take a look at the SDK for the specific documentation.
---- Original answer
Hmm interesting, I would like to ask you back what is the reason why you would do this. The following Python code should do what you are asking if I understand what you want to do.
# Create a fan
from openstudio import model
m = model.Model()
f = model.FanOnOff(m)
# Get the fan iddObject
obj = f.iddObject()
fields = obj.numFields()
for i in range(fields):
print(f.getField(i))
Output:
{0fae4eb3-fe16-4c05-94f7-4ed150857507}
Fan On Off 1
{2f817562-e016-4118-9091-e4f096e2b345}
0.6
300
autosize
0.8
1
{668676fe-a69f-4db3-8e07-9953fa12b2d4}
{eb20ba76-8c87-412f-be6f-8d4b4c8af830}