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

User Defined Plant Component Refactor #7649

Merged
merged 16 commits into from
Dec 19, 2019
2 changes: 1 addition & 1 deletion src/EnergyPlus/HeatBalanceSurfaceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ namespace HeatBalanceSurfaceManager {

using HeatBalanceAirManager::ManageAirHeatBalance;
using HeatBalFiniteDiffManager::SurfaceFD;
using OutputReportTabular::GatherComponentLoadsSurface; // for writing tabular compoonent loads output reports
using OutputReportTabular::GatherComponentLoadsSurface; // for writing tabular component loads output reports
using ThermalComfort::ManageThermalComfort;

int SurfNum;
Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/Plant/PlantManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
#include <EnergyPlus/SurfaceGroundHeatExchanger.hh>
#include <EnergyPlus/SwimmingPool.hh>
#include <EnergyPlus/SystemAvailabilityManager.hh>
#include <EnergyPlus/UserDefinedComponents.hh>
#include <EnergyPlus/UtilityRoutines.hh>
#include <EnergyPlus/WaterToWaterHeatPumpEIR.hh>
#include <EnergyPlus/WaterUse.hh>
Expand Down Expand Up @@ -1440,6 +1441,7 @@ namespace EnergyPlus {
this_comp.TypeOf_Num = TypeOf_PlantComponentUserDefined;
this_comp.GeneralEquipType = GenEquipTypes_PlantComponent;
this_comp.CurOpSchemeType = UnknownStatusOpSchemeType;
this_comp.compPtr = UserDefinedComponents::UserPlantComponentStruct::factory(CompNames(CompNum));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple enough.

} else if (UtilityRoutines::SameString(this_comp_type, "Coil:UserDefined")) {
this_comp.TypeOf_Num = TypeOf_CoilUserDefined;
this_comp.GeneralEquipType = GenEquipTypes_PlantComponent;
Expand Down
11 changes: 1 addition & 10 deletions src/EnergyPlus/PlantLoopEquip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ namespace PlantLoopEquip {
using HWBaseboardRadiator::UpdateHWBaseboardPlantConnection;
using RefrigeratedCase::SimRefrigCondenser;
using SteamBaseboardRadiator::UpdateSteamBaseboardPlantConnection;
using UserDefinedComponents::SimUserDefinedPlantComponent;
using WaterCoils::UpdateWaterToAirCoilPlantConnection;

// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
Expand Down Expand Up @@ -934,15 +933,7 @@ namespace PlantLoopEquip {
} else if (GeneralEquipType == GenEquipTypes_PlantComponent) {

if (EquipTypeNum == TypeOf_PlantComponentUserDefined) {

SimUserDefinedPlantComponent(
LoopNum, LoopSideNum, sim_component.TypeOf, sim_component.Name, EquipNum, InitLoopEquip, CurLoad, MaxLoad, MinLoad, OptLoad);
if (InitLoopEquip) {
sim_component.MaxLoad = MaxLoad;
sim_component.MinLoad = MinLoad;
sim_component.OptLoad = OptLoad;
sim_component.CompNum = EquipNum;
}
sim_component.compPtr->simulate(sim_component_location, FirstHVACIteration, CurLoad, RunFlag);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good here.


} else if (EquipTypeNum == TypeOf_WaterSource) {
sim_component.compPtr->simulate(sim_component_location, FirstHVACIteration, CurLoad, RunFlag);
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/RuntimeLanguageProcessor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ namespace RuntimeLanguageProcessor {
WriteTrace(StackNum, InstructionNum, ReturnValue, seriousErrorFound);

} else if (SELECT_CASE_var == KeywordWhile) {
// evaluate expresssion at while, skip to past endwhile if not true
// evaluate expression at while, skip to past endwhile if not true
ExpressionNum = ErlStack(StackNum).Instruction(InstructionNum).Argument1;
InstructionNum2 = ErlStack(StackNum).Instruction(InstructionNum).Argument2;
ReturnValue = EvaluateExpression(ExpressionNum, seriousErrorFound);
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/SingleDuct.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5452,7 +5452,7 @@ namespace SingleDuct {
NumATMixers = inputProcessor->getNumObjectsFound(cCurrentModuleObject);
SysATMixer.allocate(NumATMixers);

// Need air disribution units first
// Need air distribution units first
ZoneAirLoopEquipmentManager::GetZoneAirLoopEquipment();

for (ATMixerNum = 1; ATMixerNum <= NumATMixers; ++ATMixerNum) {
Expand Down
Loading