I have tackled this by an EnergyPlusMeasure, to
- Insert a
Water:Use:Storage
- Insert a
Water:Use:GroundwaterWell
- Insert the name of the water tank into the Cooling Tower object using the approach in this answer
The heart of the code in the measure is copied below. However, it has not been succesfull.
There seems to be an issue with the EnergyPlus calculations, my reasoning is;
The Well Requested Volume Flow Rate
is enough to refill the Tank in one timestep. - However, the
!- Pump Rated Flow Rate {m3/s}
is limited (by me) to 3 l/s - The actual pump flow rate (which is equal to
Tank Inlet Volume Flow Rate
) is as per user entry - The tank only gets 10 minutes * 3 Litres/second = 1.8 m3
- The tank requested 10 minutes * 0.0044 Litres/second = 2.8 m3 (which would fill it up)
- After one Timestep the pump stops refilling the tank - but it is well short of the tank's 3 m3 capacity.
This looks like a bug in EnergyPlus - the Water:Use:Storage is assumed to refill at the requested rate, even when the user has tried to limit this rate.
# add a new WaterUse:Storage object to the model
new_water_storage_string = "
WaterUse:Storage,
Cooling Tower Water Storage Tank, !- Name
Mains, !- Water Quality Subcategory
#{tankVolume.to_s}, !- Maximum Capacity {m3}
#{tankVolume.to_s}, !- Initial Volume {m3}
#{pumpFlowRate.to_s}, !- Design In Flow Rate {m3}
, !- Design Out Flow Rate {m3}
, !- Overflow Destination
GroundwaterWell, !- Type of Supply Controlled by Float Valve
0.20, !- Float Valve On Capacity {m3}
#{tankVolume.to_s}, !- Float Valve Off Capacity {m3}
0.10, !- Backup Mains Capacity {m3}
, !- Other Tank Name
ScheduledTemperature, !- Water Thermal Mode
Thermostat Always 18, !- Water Temperature Schedule Name
, !- Ambient Temperature Indicator
, !- Ambient Temperature Schedule Name
, !- Zone Name
, !- Tank Surface Area {m2}
, !- Tank U Value {W/m2-K}
; !- Tank Outside Surface Material Name
"
idfObject = OpenStudio::IdfObject::load(new_water_storage_string)
object = idfObject.get
wsObject = workspace.addObject(object)
# add a mains staging tank WaterUse:Storage object to the model
well_string = "
WaterUse:Well,
Cooling Tower Transfer Pumps, !- Name
Cooling Tower Water Storage Tank, !- Storage Tank Name
, !- Pump Depth {m}
#{pumpFlowRate.to_s}, !- Pump Rated Flow Rate {m3/s}
, !- Pump Rated Head {Pa}
#{pumpPower.to_s}, !- Pump Rated Power Consumption {W}
, !- Pump Efficiency
, !- Well Recovery Rate {m3/s}
, !- Nominal Well Storage Volume {m3}
, !- Water Table Depth Mode
, !- Water Table Depth {m}
; !- Water Table Depth Schedule Name
"
# Load it up
idfObject = OpenStudio::IdfObject::load(well_string)
object = idfObject.get
wellObject = workspace.addObject(object)
# Clobber the Cooling Tower IDF Object - insert Tank Name
water_connections_objs = workspace.getObjectsByType("CoolingTower:VariableSpeed".to_IddObjectType)
sel_water_connection = water_connections_objs[0]
water_connections_objs.each do |water_connections_obj|
water_connections_obj.setString(23,"Cooling Tower Water Storage Tank")
# magic number hardcoded to suit object/e+version. tch tch.
runner.registerInfo(water_connections_obj.getString(23).to_s)
end
Isn't the question you linked to enough? It looks kinda like a duplicate, unless you think there's a possibility for some other answer on this specific case (doubt it)
i am not having much joy using the approach you suggested in the other question.i may have found a method using a Water:Use:Well object. i'll edit the question again once i have it figured it out.