@@ -364,6 +364,7 @@ void GetSysInput(EnergyPlusData &state)
364364 airTerm.SysName = Alphas (1 );
365365 airTerm.sysType = CurrentModuleObject;
366366 airTerm.SysType_Num = SysType::SingleDuctVAVReheat;
367+
367368 airTerm.ReheatComp = Alphas (7 );
368369 if (Util::SameString (airTerm.ReheatComp , " Coil:Heating:Fuel" )) {
369370 airTerm.ReheatComp_Num = HeatingCoilType::Gas;
@@ -380,12 +381,28 @@ void GetSysInput(EnergyPlusData &state)
380381 ShowContinueError (state, format (" Occurs in {} = {}" , airTerm.sysType , airTerm.SysName ));
381382 ErrorsFound = true ;
382383 }
384+
383385 airTerm.ReheatName = Alphas (8 );
384- ValidateComponent (state, airTerm.ReheatComp , airTerm.ReheatName , IsNotOK, airTerm.sysType );
385- if (IsNotOK) {
386- ShowContinueError (state, format (" In {} = {}" , airTerm.sysType , airTerm.SysName ));
387- ErrorsFound = true ;
386+ if (airTerm.ReheatComp_Num == HeatingCoilType::Gas || airTerm.ReheatComp_Num == HeatingCoilType::Electric) {
387+ HeatingCoils::GetCoilIndex (state, airTerm.ReheatName , airTerm.ReheatComp_Index , ErrorsFound);
388+ if (airTerm.ReheatComp_Index == 0 ) {
389+ ShowSevereItemNotFound (state, eoh, cAlphaFields (8 ), Alphas (8 ));
390+ ErrorsFound = true ;
391+ }
392+ } else if (airTerm.ReheatComp_Num == HeatingCoilType::SimpleHeating) {
393+ airTerm.ReheatComp_Index = WaterCoils::GetWaterCoilIndex (state, airTerm.ReheatComp , airTerm.ReheatName , ErrorsFound);
394+ if (airTerm.ReheatComp_Index == 0 ) {
395+ ShowSevereItemNotFound (state, eoh, cAlphaFields (8 ), Alphas (8 ));
396+ ErrorsFound = true ;
397+ }
398+ } else if (airTerm.ReheatComp_Num == HeatingCoilType::SteamAirHeating) {
399+ airTerm.ReheatComp_Index = SteamCoils::GetSteamCoilIndex (state, airTerm.ReheatComp , airTerm.ReheatName , ErrorsFound);
400+ if (airTerm.ReheatComp_Index == 0 ) {
401+ ShowSevereItemNotFound (state, eoh, cAlphaFields (8 ), Alphas (8 ));
402+ ErrorsFound = true ;
403+ }
388404 }
405+
389406 if (lAlphaBlanks (2 )) {
390407 airTerm.availSched = Sched::GetScheduleAlwaysOn (state);
391408 } else if ((airTerm.availSched = Sched::GetSchedule (state, Alphas (2 ))) == nullptr ) {
@@ -692,10 +709,24 @@ void GetSysInput(EnergyPlusData &state)
692709 ErrorsFound = true ;
693710 }
694711 airTerm.ReheatName = Alphas (6 );
695- ValidateComponent (state, airTerm.ReheatComp , airTerm.ReheatName , IsNotOK, airTerm.sysType );
696- if (IsNotOK) {
697- ShowContinueError (state, format (" In {} = {}" , airTerm.sysType , airTerm.SysName ));
698- ErrorsFound = true ;
712+ if (airTerm.ReheatComp_Num == HeatingCoilType::Gas || airTerm.ReheatComp_Num == HeatingCoilType::Electric) {
713+ HeatingCoils::GetCoilIndex (state, airTerm.ReheatName , airTerm.ReheatComp_Index , ErrorsFound);
714+ if (airTerm.ReheatComp_Index == 0 ) {
715+ ShowSevereItemNotFound (state, eoh, cAlphaFields (6 ), Alphas (6 ));
716+ ErrorsFound = true ;
717+ }
718+ } else if (airTerm.ReheatComp_Num == HeatingCoilType::SimpleHeating) {
719+ airTerm.ReheatComp_Index = WaterCoils::GetWaterCoilIndex (state, airTerm.ReheatComp , airTerm.ReheatName , ErrorsFound);
720+ if (airTerm.ReheatComp_Index == 0 ) {
721+ ShowSevereItemNotFound (state, eoh, cAlphaFields (6 ), Alphas (6 ));
722+ ErrorsFound = true ;
723+ }
724+ } else if (airTerm.ReheatComp_Num == HeatingCoilType::SteamAirHeating) {
725+ airTerm.ReheatComp_Index = SteamCoils::GetSteamCoilIndex (state, airTerm.ReheatComp , airTerm.ReheatName , ErrorsFound);
726+ if (airTerm.ReheatComp_Index == 0 ) {
727+ ShowSevereItemNotFound (state, eoh, cAlphaFields (6 ), Alphas (6 ));
728+ ErrorsFound = true ;
729+ }
699730 }
700731
701732 if (lAlphaBlanks (2 )) {
@@ -919,10 +950,24 @@ void GetSysInput(EnergyPlusData &state)
919950 ErrorsFound = true ;
920951 }
921952 airTerm.ReheatName = Alphas (6 );
922- ValidateComponent (state, airTerm.ReheatComp , airTerm.ReheatName , IsNotOK, airTerm.sysType );
923- if (IsNotOK) {
924- ShowContinueError (state, format (" In {} = {}" , airTerm.sysType , airTerm.SysName ));
925- ErrorsFound = true ;
953+ if (airTerm.ReheatComp_Num == HeatingCoilType::Gas || airTerm.ReheatComp_Num == HeatingCoilType::Electric) {
954+ HeatingCoils::GetCoilIndex (state, airTerm.ReheatName , airTerm.ReheatComp_Index , ErrorsFound);
955+ if (airTerm.ReheatComp_Index == 0 ) {
956+ ShowSevereItemNotFound (state, eoh, cAlphaFields (6 ), Alphas (6 ));
957+ ErrorsFound = true ;
958+ }
959+ } else if (airTerm.ReheatComp_Num == HeatingCoilType::SimpleHeating) {
960+ airTerm.ReheatComp_Index = WaterCoils::GetWaterCoilIndex (state, airTerm.ReheatComp , airTerm.ReheatName , ErrorsFound);
961+ if (airTerm.ReheatComp_Index == 0 ) {
962+ ShowSevereItemNotFound (state, eoh, cAlphaFields (6 ), Alphas (6 ));
963+ ErrorsFound = true ;
964+ }
965+ } else if (airTerm.ReheatComp_Num == HeatingCoilType::SteamAirHeating) {
966+ airTerm.ReheatComp_Index = SteamCoils::GetSteamCoilIndex (state, airTerm.ReheatComp , airTerm.ReheatName , ErrorsFound);
967+ if (airTerm.ReheatComp_Index == 0 ) {
968+ ShowSevereItemNotFound (state, eoh, cAlphaFields (6 ), Alphas (6 ));
969+ ErrorsFound = true ;
970+ }
926971 }
927972
928973 if (lAlphaBlanks (2 )) {
@@ -1654,10 +1699,25 @@ void GetSysInput(EnergyPlusData &state)
16541699 ShowContinueError (state, format (" Occurs in {} = {}" , airTerm.sysType , airTerm.SysName ));
16551700 ErrorsFound = true ;
16561701 }
1657- ValidateComponent (state, airTerm.ReheatComp , airTerm.ReheatName , IsNotOK, airTerm.sysType );
1658- if (IsNotOK) {
1659- ShowContinueError (state, format (" In {} = {}" , airTerm.sysType , airTerm.SysName ));
1660- ErrorsFound = true ;
1702+
1703+ if (airTerm.ReheatComp_Num == HeatingCoilType::Gas || airTerm.ReheatComp_Num == HeatingCoilType::Electric) {
1704+ HeatingCoils::GetCoilIndex (state, airTerm.ReheatName , airTerm.ReheatComp_Index , ErrorsFound);
1705+ if (airTerm.ReheatComp_Index == 0 ) {
1706+ ShowSevereItemNotFound (state, eoh, cAlphaFields (8 ), Alphas (8 ));
1707+ ErrorsFound = true ;
1708+ }
1709+ } else if (airTerm.ReheatComp_Num == HeatingCoilType::SimpleHeating) {
1710+ airTerm.ReheatComp_Index = WaterCoils::GetWaterCoilIndex (state, airTerm.ReheatComp , airTerm.ReheatName , ErrorsFound);
1711+ if (airTerm.ReheatComp_Index == 0 ) {
1712+ ShowSevereItemNotFound (state, eoh, cAlphaFields (8 ), Alphas (8 ));
1713+ ErrorsFound = true ;
1714+ }
1715+ } else if (airTerm.ReheatComp_Num == HeatingCoilType::SteamAirHeating) {
1716+ airTerm.ReheatComp_Index = SteamCoils::GetSteamCoilIndex (state, airTerm.ReheatComp , airTerm.ReheatName , ErrorsFound);
1717+ if (airTerm.ReheatComp_Index == 0 ) {
1718+ ShowSevereItemNotFound (state, eoh, cAlphaFields (8 ), Alphas (8 ));
1719+ ErrorsFound = true ;
1720+ }
16611721 }
16621722
16631723 airTerm.fanType = static_cast <HVAC::FanType>(getEnumValue (HVAC::fanTypeNamesUC, Alphas (5 )));
0 commit comments