Open mjwitte opened 1 month ago
@rraustad @EnergyArchmage This condition occurs when the chiller has a load, but the chiller shuts down here due to zero condenser water flow and leaves calculate
with
https://github.com/NREL/EnergyPlus/blob/ec7398adcfbd2ba6bc71e72b57e3febb6cd99708/src/EnergyPlus/ChillerElectricEIR.cc#L1957-L1972
This has been set before this exit: https://github.com/NREL/EnergyPlus/blob/ec7398adcfbd2ba6bc71e72b57e3febb6cd99708/src/EnergyPlus/ChillerElectricEIR.cc#L1939 (which seems wrong, wouldn't you want to intialize outlet=inlet before that actual calcs happen?)
After this, update
thinks the chiller is on, because there is a load and the evap mass flow rate is >0 so it skips the chiller of block:
https://github.com/NREL/EnergyPlus/blob/ec7398adcfbd2ba6bc71e72b57e3febb6cd99708/src/EnergyPlus/ChillerElectricEIR.cc#L2585-L2594
~And those line setting condense mass flow rates to zero seem wrong, because the chiller could have flow forced through the condenser even when it's off.~ this is ok, it's for aircooled condenser.
Oh, never mind the condenser flow rate comment, those lines are for aircooled condenser.
Line 1939 does seem wrong as something to do before a potential return at line 1970. Also, as an observation, if the return at 1970 happens I would think the calc routine would want to inform other later functions that the chiller RunFlag = false,
Line 1939 does seem wrong as something to do before a potential return at line 1970. Also, as an observation, if the return at 1970 happens I would think the calc routine would want to inform other later functions that the chiller RunFlag = false,
Given the arguments here
void ElectricEIRChillerSpecs::simulate(
EnergyPlusData &state, const PlantLocation &calledFromLocation, bool FirstHVACIteration, Real64 &CurLoad, bool RunFlag)
ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, bool const RunFlag)
Perhaps MyLoad
should be set to zero before return
ing?
Perhaps MyLoad should be set to zero before returning?
Probably, because that return value for &CurLoad will be used by the calling routine (I think) to update the remaining load.
If the calling routine does use &CurLoad then I would think that MyLoad should represent exactly what load the chiller met. I don't think I have ever considered that before.
Yes, that is the idea. So it can update remaining load for dispatch to other machines if any.
With the same fix applied to all chiller types, annual regression results:
"diffs": {
"big_math": [ 37 files ]
"5ZoneCoolBeam", eso
"5ZoneDetailedIceStorageSimpleCtrl", eso and mtr
"5ZoneDetailedIceStorage", eso and mtr
"5ZoneDetailedIceStorage2", eso and mtr
"5ZoneDetailedIceStorageCubicLinear", eso and mtr
"5ZoneIceStorage", eso and mtr
"ASHRAE901_OfficeLarge_STD2019_Denver_Chiller205", eso
"ASHRAE901_OfficeLarge_STD2019_Denver_Chiller205_Detailed", eso
"ASHRAE901_OfficeLarge_STD2019_Denver_ChillerEIR", eso
"CompSetPtControl", eso and mtr
"FourPipeBeamLargeOffice", eso
"FreeCoolingChiller_wWaterSideEconomizer", eso
"IceStorage-Series-ChillerUpstream", eso
"IceStorage-Series-ChillerDownstream", eso
"RadLoTempHydrCtrlOpt", eso
"RadLoTempHydrHeatCool", eso and mtr
"RadLoTempHydrCtrlOpt2", eso
"RadLoTempHydrHeatCoolDry", eso and mtr
"RadLoTempHydrISOPipeHT", eso
"SeriesActiveBranch", eso and mtr
"RadLoTempHydrHeatCoolDryCondFD", eso
"RadLoTempCFloHeatCoolCondFD", eso
"TermReheatPri-SecLoop", eso
"WaterSideEconomizer_NonIntegrated", eso and mtr
"WaterCooledChillerWithVSCondenserControl", eso
"RadLoTempHydrCtrlOpt3" eso and mtr
],
"small_math": [ 61 files ]
"big_table": [ 18 files ]
"5ZoneDetailedIceStorageSimpleCtrl", 0.8% cooling electricity
"5ZoneDetailedIceStorage", 0.8% cooling electricity
"5ZoneDetailedIceStorage2", 0.8% cooling electricity
"5ZoneDetailedIceStorageCubicLinear", 0.8% cooling electricity
"5ZoneIceStorage", 0.8% cooling electricity, 1% pumps
"ASHRAE901_OfficeLarge_STD2019_Denver", no big diffs in ABUPS, some <1% diffs in resilience and OA limits
"ASHRAE901_OfficeLarge_STD2019_Denver_Chiller205", 1% heat rejection water
"ASHRAE901_OfficeLarge_STD2019_Denver_Chiller205_Detailed", 1.1% heat rejection elec, 0.6% heat rejection water
"ASHRAE901_OfficeLarge_STD2019_Denver_ChillerEIR", no big diffs in ABUPS, some 1-2% diffs in resilience and OA limits
"CompSetPtControl", 2% cooling electricity, pumps, and heat rejection
"ASHRAE901_Hospital_STD2019_Denver", no big diffs in ABUPS, some 1-2% diffs in resilience and OA limits
"EMSPlantLoopOverrideControl", no big diffs in ABUPS, some 1-2% diffs in resilience and OA limits
"FourPipeBeamLargeOffice", no big diffs in ABUPS, <1% diff in cooling electricity at peak demand
"PythonPluginPlantLoopOverrideControl", no big diffs in ABUPS, some <1% diffs in Monthly Roof Irrigation(?)
"RadLoTempHydrHeatCool", 3% district cooling, 0.1% cooling electricity
"RadLoTempHydrHeatCoolDry", 3% district cooling, 0.1% cooling electricity
"SeriesActiveBranch", no big diffs in ABUPS, some big diffs in peak electricity time bins
"WaterSideEconomizer_NonIntegrated", 3% natural gas, 6% fans, 10% pumps,
7% Setpoint Not Met During Occupied Cooling (increase from 144 to 512, hmmmmmm)
],
"small_table": [ 16 files ]
"textual": [ 30 files, some eio, some err, some both ]
"5ZoneCoolBeam",
"5ZoneDetailedIceStorageSimpleCtrl",
"5ZoneDetailedIceStorage",
"5ZoneDetailedIceStorage2",
"5ZoneDetailedIceStorageCubicLinear",
"5ZoneIceStorage",
"ASHRAE901_OfficeLarge_STD2019_Denver",
"ASHRAE901_OfficeLarge_STD2019_Denver_Chiller205",
"ASHRAE901_OfficeLarge_STD2019_Denver_Chiller205_Detailed",
"ASHRAE901_OfficeLarge_STD2019_Denver_ChillerEIR",
"CompSetPtControl",
"ASHRAE901_Hospital_STD2019_Denver",
"FourPipeBeamLargeOffice",
"IceStorage-Series-ChillerDownstream",
"HospitalLowEnergy",
"PlantApplicationsGuide_Example1",
"RadLoTempHydrHeatCool",
"RadLoTempHydrHeatCoolDry",
"SeriesActiveBranch",
"RadLoTempHydrHeatCoolDryCondFD",
"WaterSideEconomizer_NonIntegrated",
"WaterCooledChillerWithVSCondenserControl",
"RadLoTempHydrCtrlOpt3"
]
@rraustad I'm doubting this approach now due to these results:
"WaterSideEconomizer_NonIntegrated", 3% natural gas, 6% fans, 10% pumps, 7% Setpoint Not Met During Occupied Cooling (increase from 144 to 512, hmmmmmm)
Maybe this needs to check for (gasp) flowlock
before setting MyLoad=0.0
? Or skip that on FirstHVACIteration
?
Well, it looked good when I reviewed this. MyLoad is disconnected from water flow rate so, for now, I think no need to look at flowlock and this is just a way to tell the plant that this component did not meet a load or what was actually met (and probably should not exceed original MyLoad?). Since this does look like the correct approach I think verifying a components operation in 1 of these files. Was this component meeting a load that it shouldn't have, or is now passing that load to another component, or is off now and the plant load increases on the next iteration? Too hard to think this through without some hard data.
For WaterSideEconomizer_NonIntegrated-Chiller, here are some hours where the chiller is showing evap outlet temp < evap inlet temp when the chiller is off. Develop is on the left, this branch on the right.
This file has 652 hours like that with develop, zero hours with this branch, so maybe this is fixing a real problem. WaterSideEconomizer_NonIntegrated-Develop.zip WaterSideEconomizer_NonIntegrated.zip
I do think this is fixing something. Note the integrated economizer inlet now tracks the correct water temp. Why this temp changed from 10 C to 16 C is a bit of a mystery but without that free cooling the plant temps have risen. What are the plant outlet node temps wrt set point? maybe a plant outlet temp vs plant mass flow rate plot. And if the plant return water temp is > 12 C, why isn't the chiller on? is there a bypass pipe that has flow? There was no mass flow rate at the chiller before so it seems it should be off, but why? Availability Manager?
So, the waterside economizer HX hardly ever runs, and I haven't figured out why the chiller is off when there's a high loop demand. There's no plant availability manager, and a simple plant operating scheme with the chiller always available. There is flow through the HX on the chilled water side, but no flow on the other side of the HX. Not sure why the HX has flow if it's not contributing.
Hmmm, this is a water cooled Chiller:EngineDriven. Looking at 02/23 10:00-15:00, in both branches, the CENTRAL CHILLER:Chiller Evaporator Mass Flow Rate kg/s is zero, but there is flow on the Central Chiller Inlet/Outlet Nodes(!). The chiller is LeavingSetpointModulated, maybe that's not working right?
@EnergyArchmage has found a few places in code where the WWHX is not passing information correctly (i.e., SafeCopyPlantNode is needed in a few places). I can't recall exactly what the details are so maybe he could comment on what you are seeing.
@rraustad Oh, silly me. This is why the chiller is not operating:
Pump:VariableSpeed,
Cond Circ Pump, !- Name
INTERMITTENT, !- Pump Control Type
CoolingPumpAvailSched; !- Pump Flow Rate Schedule Name
Schedule:Compact,
CoolingPumpAvailSched, !- Name
Fraction, !- Schedule Type Limits Name
Through: 3/31, !- Field 1
For: AllDays, !- Field 2
Until: 24:00,0.0, !- Field 3
Through: 9/30, !- Field 5
For: AllDays, !- Field 6
Until: 24:00,1.0, !- Field 7
Through: 12/31, !- Field 9
For: AllDays, !- Field 10
Until: 24:00,0.0; !- Field 11
The condenser pump is scheduled off, but everything else is always available. So the chiller tries to run, but then when it sees zero condenser flow it's "off" (but not really) - exactly the case that this is fixing.
Changing the file so that the condenser pump is always available eliminates the diffs between develop and this branch and eliminates the unmet hours. So, this file needs some review, because the HX is only running for 8 hrs of the year in Chicago. But that can be a separate issue.
Some unit tests would be nice here.
This just makes me wonder why a pump would ever be schedule off.
Pull request overview
MyLoad
to zero if lack of condenser water flow causes the chiller to be off. No more of the above warnings are produced (with a full annual regression).MyLoad = 0.0
this->EvapMassFlowRate = 0.0
SetComponentFlowRate
for evaporator flow rate.Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.