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

Global SimAirServingZones #8437

Merged
merged 20 commits into from
Jan 5, 2021
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
17 changes: 7 additions & 10 deletions src/EnergyPlus/CostEstimateManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ namespace CostEstimateManager {
using DataPhotovoltaics::iSimplePVModel;
using DataPhotovoltaics::PVarray;
using DataSurfaces::Surface;
using DXCoils::DXCoil;
using HeatingCoils::HeatingCoil;

// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
Expand Down Expand Up @@ -309,7 +308,7 @@ namespace CostEstimateManager {
ErrorsFound = true;

} else { // assume name is probably useful
thisCoil = UtilityRoutines::FindItem(state.dataCostEstimateManager->CostLineItem(Item).ParentObjName, DXCoil);
thisCoil = UtilityRoutines::FindItem(state.dataCostEstimateManager->CostLineItem(Item).ParentObjName, state.dataDXCoils->DXCoil);
if (thisCoil == 0) {
ShowWarningError(state, "ComponentCost:LineItem: \"" + state.dataCostEstimateManager->CostLineItem(Item).LineName + "\", Coil:DX, invalid coil specified");
ShowContinueError(state, "Coil Specified=\"" + state.dataCostEstimateManager->CostLineItem(Item).ParentObjName +
Expand Down Expand Up @@ -497,8 +496,6 @@ namespace CostEstimateManager {
using DataPhotovoltaics::PVarray;
using DataSurfaces::Surface;
using DataSurfaces::TotSurfaces;
using DXCoils::DXCoil;
using DXCoils::NumDXCoils;
using HeatingCoils::HeatingCoil;
using HeatingCoils::NumHeatingCoils;

Expand Down Expand Up @@ -574,29 +571,29 @@ namespace CostEstimateManager {
if (state.dataCostEstimateManager->CostLineItem(Item).ParentObjName == "*") { // wildcard, apply to all such components
WildcardObjNames = true;
} else if (!state.dataCostEstimateManager->CostLineItem(Item).ParentObjName.empty()) {
thisCoil = UtilityRoutines::FindItem(state.dataCostEstimateManager->CostLineItem(Item).ParentObjName, DXCoil);
thisCoil = UtilityRoutines::FindItem(state.dataCostEstimateManager->CostLineItem(Item).ParentObjName, state.dataDXCoils->DXCoil);
}

if (state.dataCostEstimateManager->CostLineItem(Item).PerKiloWattCap > 0.0) {
if (WildcardObjNames) {
Real64 Qty(0.0);
for (auto const &e : DXCoil)
for (auto const &e : state.dataDXCoils->DXCoil)
Qty += e.RatedTotCap(1);
state.dataCostEstimateManager->CostLineItem(Item).Qty = Qty / 1000.0;
state.dataCostEstimateManager->CostLineItem(Item).Units = "kW (tot cool cap.)";
state.dataCostEstimateManager->CostLineItem(Item).ValuePer = state.dataCostEstimateManager->CostLineItem(Item).PerKiloWattCap;
state.dataCostEstimateManager->CostLineItem(Item).LineSubTotal = state.dataCostEstimateManager->CostLineItem(Item).Qty * state.dataCostEstimateManager->CostLineItem(Item).ValuePer;
}
if (thisCoil > 0) {
state.dataCostEstimateManager->CostLineItem(Item).Qty = DXCoil(thisCoil).RatedTotCap(1) / 1000.0;
state.dataCostEstimateManager->CostLineItem(Item).Qty = state.dataDXCoils->DXCoil(thisCoil).RatedTotCap(1) / 1000.0;
state.dataCostEstimateManager->CostLineItem(Item).Units = "kW (tot cool cap.)";
state.dataCostEstimateManager->CostLineItem(Item).ValuePer = state.dataCostEstimateManager->CostLineItem(Item).PerKiloWattCap;
state.dataCostEstimateManager->CostLineItem(Item).LineSubTotal = state.dataCostEstimateManager->CostLineItem(Item).Qty * state.dataCostEstimateManager->CostLineItem(Item).ValuePer;
}
}

if (state.dataCostEstimateManager->CostLineItem(Item).PerEach > 0.0) {
if (WildcardObjNames) state.dataCostEstimateManager->CostLineItem(Item).Qty = double(NumDXCoils);
if (WildcardObjNames) state.dataCostEstimateManager->CostLineItem(Item).Qty = double(state.dataDXCoils->NumDXCoils);
if (thisCoil > 0) state.dataCostEstimateManager->CostLineItem(Item).Qty = 1.0;
state.dataCostEstimateManager->CostLineItem(Item).ValuePer = state.dataCostEstimateManager->CostLineItem(Item).PerEach;
state.dataCostEstimateManager->CostLineItem(Item).LineSubTotal = state.dataCostEstimateManager->CostLineItem(Item).Qty * state.dataCostEstimateManager->CostLineItem(Item).ValuePer;
Expand All @@ -606,15 +603,15 @@ namespace CostEstimateManager {
if (state.dataCostEstimateManager->CostLineItem(Item).PerKWCapPerCOP > 0.0) {
if (WildcardObjNames) {
Real64 Qty(0.0);
for (auto const &e : DXCoil)
for (auto const &e : state.dataDXCoils->DXCoil)
Qty += e.RatedCOP(1) * e.RatedTotCap(1);
state.dataCostEstimateManager->CostLineItem(Item).Qty = Qty / 1000.0;
state.dataCostEstimateManager->CostLineItem(Item).Units = "kW*COP (total, rated) ";
state.dataCostEstimateManager->CostLineItem(Item).ValuePer = state.dataCostEstimateManager->CostLineItem(Item).PerKWCapPerCOP;
state.dataCostEstimateManager->CostLineItem(Item).LineSubTotal = state.dataCostEstimateManager->CostLineItem(Item).Qty * state.dataCostEstimateManager->CostLineItem(Item).ValuePer;
}
if (thisCoil > 0) {
state.dataCostEstimateManager->CostLineItem(Item).Qty = DXCoil(thisCoil).RatedCOP(1) * DXCoil(thisCoil).RatedTotCap(1) / 1000.0;
state.dataCostEstimateManager->CostLineItem(Item).Qty = state.dataDXCoils->DXCoil(thisCoil).RatedCOP(1) * state.dataDXCoils->DXCoil(thisCoil).RatedTotCap(1) / 1000.0;
state.dataCostEstimateManager->CostLineItem(Item).Units = "kW*COP (total, rated) ";
state.dataCostEstimateManager->CostLineItem(Item).ValuePer = state.dataCostEstimateManager->CostLineItem(Item).PerKWCapPerCOP;
state.dataCostEstimateManager->CostLineItem(Item).LineSubTotal = state.dataCostEstimateManager->CostLineItem(Item).Qty * state.dataCostEstimateManager->CostLineItem(Item).ValuePer;
Expand Down
Loading