Skip to content
New issue

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

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

Already on GitHub? # to your account

Global water use #8166

Merged
merged 8 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/EnergyPlus/Data/EnergyPlusData.hh
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@
#include <EnergyPlus/OutputFiles.hh>
#include <EnergyPlus/Pipes.hh>
#include <EnergyPlus/PlantChillers.hh>
#include <EnergyPlus/WaterUse.hh>
#include <EnergyPlus/WindowAC.hh>
#include <EnergyPlus/WindowComplexManager.hh>
#include <EnergyPlus/WindowEquivalentLayer.hh>
#include <EnergyPlus/WindowManager.hh>
#include <EnergyPlus/WindTurbine.hh>
#include <EnergyPlus/ZoneAirLoopEquipmentManager.hh>
#include <EnergyPlus/ZoneContaminantPredictorCorrector.hh>
#include <EnergyPlus/ZoneDehumidifier.hh>
Expand Down Expand Up @@ -127,10 +129,12 @@ namespace EnergyPlus {
// after we've plumbed enough of the functions to allow
OutputFiles outputFiles;

WaterUseData dataWaterUse;
WindowACData dataWindowAC;
WindowComplexManagerData dataWindowComplexManager;
WindowEquivalentLayerData dataWindowEquivalentLayer;
WindowManagerData dataWindowManager;
WindTurbineData dataWindTurbine;
ZoneAirLoopEquipmentManagerData dataZoneAirLoopEquipmentManager;
ZoneContaminantPredictorCorrectorData dataZoneContaminantPredictorCorrector;
ZoneDehumidifierData dataZoneDehumidifier;
Expand Down Expand Up @@ -172,10 +176,12 @@ namespace EnergyPlus {
//outputReportTabular.clear_state();
pipes.clear_state();
dataPlantChillers.clear_state();
dataWaterUse.clear_state();
dataWindowAC.clear_state();
dataWindowComplexManager.clear_state();
dataWindowEquivalentLayer.clear_state();
dataWindowManager.clear_state();
dataWindTurbine.clear_state();
dataZoneAirLoopEquipmentManager.clear_state();
dataZoneContaminantPredictorCorrector.clear_state();
dataZoneDehumidifier.clear_state();
Expand Down
6 changes: 3 additions & 3 deletions src/EnergyPlus/ElectricPowerServiceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
// EnergyPlus Headers
#include <EnergyPlus/CTElectricGenerator.hh>
#include <EnergyPlus/CurveManager.hh>
#include <EnergyPlus/Data/EnergyPlusData.hh>
#include <EnergyPlus/DataGlobalConstants.hh>
#include <EnergyPlus/DataGlobals.hh>
#include <EnergyPlus/DataHVACGlobals.hh>
Expand All @@ -66,7 +67,6 @@
#include <EnergyPlus/ElectricPowerServiceManager.hh>
#include <EnergyPlus/FuelCellElectricGenerator.hh>
#include <EnergyPlus/General.hh>
#include <EnergyPlus/Data/EnergyPlusData.hh>
#include <EnergyPlus/HeatBalanceInternalHeatGains.hh>
#include <EnergyPlus/ICEngineElectricGenerator.hh>
#include <EnergyPlus/InputProcessing/InputProcessor.hh>
Expand Down Expand Up @@ -2207,8 +2207,8 @@ void GeneratorController::simGeneratorGetPowerOutput(EnergyPlusData &state, bool
break;
}
case GeneratorType::windTurbine: {
WindTurbine::SimWindTurbine(DataGlobalConstants::iGeneratorWindTurbine, name, generatorIndex, runFlag, myElecLoadRequest);
WindTurbine::GetWTGeneratorResults(
WindTurbine::SimWindTurbine(state.dataWindTurbine, DataGlobalConstants::iGeneratorWindTurbine, name, generatorIndex, runFlag, myElecLoadRequest);
WindTurbine::GetWTGeneratorResults(state.dataWindTurbine,
DataGlobalConstants::iGeneratorWindTurbine, generatorIndex, electProdRate, electricityProd, thermProdRate, thermalProd);
electricPowerOutput = electProdRate;
thermalPowerOutput = thermProdRate;
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/InternalHeatGains.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5524,7 +5524,7 @@ namespace InternalHeatGains {

CalcWaterThermalTankZoneGains(state);
PipeHeatTransfer::PipeHTData::CalcZonePipesHeatGain();
CalcWaterUseZoneGains();
CalcWaterUseZoneGains(state.dataWaterUse);
FigureFuelCellZoneGains();
FigureMicroCHPZoneGains();
initializeElectricPowerServiceZoneGains();
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/NonZoneEquipmentManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ namespace NonZoneEquipmentManager {
CountNonZoneEquip = false;
}

SimulateWaterUse(state.dataBranchInputManager, FirstHVACIteration); // simulate non-plant loop water use.
SimulateWaterUse(state.dataBranchInputManager, state.dataWaterUse, FirstHVACIteration); // simulate non-plant loop water use.

if (!ZoneSizingCalc) {
for (WaterHeaterNum = 1; WaterHeaterNum <= NumOfWaterHeater; ++WaterHeaterNum) {
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/Plant/PlantManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ namespace EnergyPlus {
} else if (UtilityRoutines::SameString(this_comp_type, "WaterUse:Connections")) {
this_comp.TypeOf_Num = TypeOf_WaterUseConnection;
this_comp.CurOpSchemeType = DemandOpSchemeType;
this_comp.compPtr = WaterUse::WaterConnectionsType::factory(CompNames(CompNum));
this_comp.compPtr = WaterUse::WaterConnectionsType::factory(state.dataWaterUse, CompNames(CompNum));
} else if (UtilityRoutines::SameString(this_comp_type, "Coil:Cooling:Water")) {
this_comp.TypeOf_Num = TypeOf_CoilWaterCooling;
this_comp.CurOpSchemeType = DemandOpSchemeType;
Expand Down
2 changes: 0 additions & 2 deletions src/EnergyPlus/StateManagement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@
#include <EnergyPlus/WaterManager.hh>
#include <EnergyPlus/WaterThermalTanks.hh>
#include <EnergyPlus/WaterToAirHeatPumpSimple.hh>
#include <EnergyPlus/WaterUse.hh>
#include <EnergyPlus/WeatherManager.hh>

void EnergyPlus::clearThisState(EnergyPlusData &state)
Expand Down Expand Up @@ -392,7 +391,6 @@ void EnergyPlus::clearAllStates(OutputFiles &outputFiles)
WaterThermalTanks::clear_state();
WaterToAirHeatPumpSimple::clear_state();
EIRPlantLoopHeatPumps::EIRPlantLoopHeatPump::clear_state();
WaterUse::clear_state();
WeatherManager::clear_state();
ResultsFramework::clear_state();
}
Loading