Skip to content
15 changes: 9 additions & 6 deletions src/EnergyPlus/AirflowNetwork/src/Properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

// C++ Headers
#include <format>

// Local Headers
#include "AirflowNetwork/Properties.hpp"

Expand Down Expand Up @@ -96,9 +99,9 @@ namespace AirflowNetwork {
}
ShowRecurringWarningErrorAtEnd(
m_state,
EnergyPlus::format("Air temperature below lower limit of -20C for conductivity calculation. Air temperature of {:.1R} "
"used for conductivity calculation.",
LowerLimit),
std::format("Air temperature below lower limit of -20C for conductivity calculation. Air temperature of {:.1f} "
"used for conductivity calculation.",
LowerLimit),
lowerLimitErrIdx);
T = LowerLimit;
} else if (T > UpperLimit) {
Expand All @@ -107,9 +110,9 @@ namespace AirflowNetwork {
}
ShowRecurringWarningErrorAtEnd(
m_state,
EnergyPlus::format("Air temperature above upper limit of 70C for conductivity calculation. Air temperature of {:.1R} "
"used for conductivity calculation.",
UpperLimit),
std::format("Air temperature above upper limit of 70C for conductivity calculation. Air temperature of {:.1f} "
"used for conductivity calculation.",
UpperLimit),
upperLimitErrIdx);
T = UpperLimit;
}
Expand Down
7 changes: 5 additions & 2 deletions src/EnergyPlus/GroundHeatExchangers/Properties.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

// C++ Headers
#include <format>

// EnergyPlus Headers
#include <EnergyPlus/Data/EnergyPlusData.hh>
#include <EnergyPlus/GroundHeatExchangers/Properties.hh>
Expand All @@ -59,7 +62,7 @@ GLHEVertProps::GLHEVertProps(EnergyPlusData &state, std::string const &objName,
// Check for duplicates
for (const auto &existingObj : state.dataGroundHeatExchanger->vertPropsVector) {
if (objName == existingObj->name) {
ShowFatalError(state, EnergyPlus::format("Invalid input for {} object: Duplicate name found: {}", moduleName, existingObj->name));
ShowFatalError(state, std::format("Invalid input for {} object: Duplicate name found: {}", moduleName, existingObj->name));
}
}

Expand Down Expand Up @@ -98,7 +101,7 @@ std::shared_ptr<GLHEVertProps> GLHEVertProps::GetVertProps(EnergyPlusData &state
if (thisObj != state.dataGroundHeatExchanger->vertPropsVector.end()) {
return *thisObj;
}
ShowSevereError(state, EnergyPlus::format("Object=GroundHeatExchanger:Vertical:Properties, Name={} - not found.", objectName));
ShowSevereError(state, std::format("Object=GroundHeatExchanger:Vertical:Properties, Name={} - not found.", objectName));
ShowFatalError(state, "Preceding errors cause program termination");
}

Expand Down
14 changes: 8 additions & 6 deletions src/EnergyPlus/GroundHeatExchangers/ResponseFactors.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

// C++ Headers
#include <format>

// EnergyPlus Headers
#include <EnergyPlus/Data/EnergyPlusData.hh>
#include <EnergyPlus/DataEnvironment.hh>
Expand All @@ -61,7 +64,7 @@ GLHEResponseFactors::GLHEResponseFactors(EnergyPlusData &state, std::string cons
// Check for duplicates
for (auto &existingObj : state.dataGroundHeatExchanger->vertPropsVector) {
if (objName == existingObj->name) {
ShowFatalError(state, EnergyPlus::format("Invalid input for {} object: Duplicate name found: {}", moduleName, existingObj->name));
ShowFatalError(state, std::format("Invalid input for {} object: Duplicate name found: {}", moduleName, existingObj->name));
}
}

Expand Down Expand Up @@ -90,7 +93,7 @@ std::shared_ptr<GLHEResponseFactors> GetResponseFactor(EnergyPlusData &state, st
if (thisObj != state.dataGroundHeatExchanger->responseFactorsVector.end()) {
return *thisObj;
}
ShowSevereError(state, EnergyPlus::format("Object=GroundHeatExchanger:ResponseFactors, Name={} - not found.", objectName));
ShowSevereError(state, std::format("Object=GroundHeatExchanger:ResponseFactors, Name={} - not found.", objectName));
ShowFatalError(state, "Preceding errors cause program termination");
}

Expand All @@ -110,7 +113,7 @@ std::shared_ptr<GLHEResponseFactors> BuildAndGetResponseFactorObjectFromArray(En
for (int yBH = 1; yBH <= arrayObjectPtr->numBHinYDirection; ++yBH) {
bhCounter += 1;
std::shared_ptr<GLHEVertSingle> thisBH(new GLHEVertSingle);
thisBH->name = EnergyPlus::format("{} BH {} loc: ({}, {})", thisRF->name, bhCounter, xLoc, yLoc);
thisBH->name = std::format("{} BH {} loc: ({}, {})", thisRF->name, bhCounter, xLoc, yLoc);
thisBH->props = GLHEVertProps::GetVertProps(state, arrayObjectPtr->props->name);
thisBH->xLoc = xLoc;
thisBH->yLoc = yLoc;
Expand All @@ -132,13 +135,12 @@ BuildAndGetResponseFactorsObjectFromSingleBHs(const EnergyPlusData &state, std::
{
// Make new response factor object and store it for later use
std::shared_ptr<GLHEResponseFactors> thisRF(new GLHEResponseFactors);
thisRF->name =
EnergyPlus::format("Response Factor Object Auto Generated No: {}", state.dataGroundHeatExchanger->numAutoGeneratedResponseFactors + 1);
thisRF->name = std::format("Response Factor Object Auto Generated No: {}", state.dataGroundHeatExchanger->numAutoGeneratedResponseFactors + 1);

// Make new props object which has the mean values of the other props objects referenced by the individual BH objects
std::shared_ptr<GLHEVertProps> thisProps(new GLHEVertProps);
thisProps->name =
EnergyPlus::format("Response Factor Auto Generated Mean Props No: {}", state.dataGroundHeatExchanger->numAutoGeneratedResponseFactors + 1);
std::format("Response Factor Auto Generated Mean Props No: {}", state.dataGroundHeatExchanger->numAutoGeneratedResponseFactors + 1);
for (auto &thisBH : singleBHsForRFVect) {
thisProps->bhDiameter += thisBH->props->bhDiameter;
thisProps->bhLength += thisBH->props->bhLength;
Expand Down
8 changes: 4 additions & 4 deletions src/EnergyPlus/GroundHeatExchangers/Slinky.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ GLHESlinky::GLHESlinky(EnergyPlusData &state, std::string const &objName, nlohma
if (this->trenchDepth - this->coilDiameter < 0.0) {
// Error: part of the coil is above ground
ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid value in field.", this->moduleName, this->name));
ShowContinueError(state, EnergyPlus::format("...{}=[{:.3R}].", "Trench Depth", this->trenchDepth));
ShowContinueError(state, EnergyPlus::format("...{}=[{:.3R}].", "Coil Depth", this->coilDepth));
ShowContinueError(state, EnergyPlus::format("...{}=[{:.3G}].", "Trench Depth", this->trenchDepth));
ShowContinueError(state, EnergyPlus::format("...{}=[{:.3G}].", "Coil Depth", this->coilDepth));
ShowContinueError(state, "...Part of coil will be above ground.");
errorsFound = true;

Expand All @@ -174,8 +174,8 @@ GLHESlinky::GLHESlinky(EnergyPlusData &state, std::string const &objName, nlohma

if (this->pipe.thickness >= this->pipe.outDia / 2.0) {
ShowSevereError(state, EnergyPlus::format("{}=\"{}\", invalid value in field.", this->moduleName, this->name));
ShowContinueError(state, EnergyPlus::format("...{}=[{:.3R}].", "Pipe Thickness", this->pipe.thickness));
ShowContinueError(state, EnergyPlus::format("...{}=[{:.3R}].", "Pipe Outer Diameter", this->pipe.outDia));
ShowContinueError(state, EnergyPlus::format("...{}=[{:.3G}].", "Pipe Thickness", this->pipe.thickness));
ShowContinueError(state, EnergyPlus::format("...{}=[{:.3G}].", "Pipe Outer Diameter", this->pipe.outDia));
ShowContinueError(state, "...Radius will be <=0.");
errorsFound = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

// C++ Headers
#include <array>
#include <format>

// EnergyPlus Headers
#include <EnergyPlus/Data/EnergyPlusData.hh>
Expand Down Expand Up @@ -88,8 +89,7 @@ namespace GroundTemp {
auto *inputProcessor = state.dataInputProcessing->inputProcessor.get();
auto const modelInstances = inputProcessor->epJSON.find(currentModuleObject);
if (modelInstances == inputProcessor->epJSON.end()) {
ShowFatalError(state,
EnergyPlus::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType]));
ShowFatalError(state, std::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType]));
}
auto const &modelSchemaProps = inputProcessor->getObjectSchemaProps(state, currentModuleObject);

Expand Down Expand Up @@ -176,8 +176,7 @@ namespace GroundTemp {
return thisModel;
}

ShowFatalError(state,
EnergyPlus::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType]));
ShowFatalError(state, std::format("{}--Errors getting input for ground temperature model", GroundTemp::modelTypeNames[(int)modelType]));
return nullptr;
}

Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/HeatBalanceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3029,7 +3029,7 @@ namespace HeatBalanceManager {
print(state.files.eio, Format_732);
state.dataHeatBalMgr->FirstWarmupWrite = false;
}
constexpr const char *Format_731{" Warmup Convergence Information - Detailed, {},{},{},{:.10R},{:.10R}\n"};
constexpr const char *Format_731{" Warmup Convergence Information - Detailed, {},{},{},{:.10G},{:.10G}\n"};
print(state.files.eio,
Format_731,
state.dataHeatBal->Zone(ZoneNum).Name,
Expand Down Expand Up @@ -3277,7 +3277,7 @@ namespace HeatBalanceManager {
StdDevZoneLoad = std::sqrt(sum(state.dataHeatBalMgr->LoadZoneRptStdDev({1, state.dataHeatBalMgr->CountWarmupDayPoints})) /
double(state.dataHeatBalMgr->CountWarmupDayPoints));

constexpr const char *Format_731(" Warmup Convergence Information,{},{},{:.10R},{:.10R},{},{},{:.10R},{:.10R},{},{}\n");
constexpr const char *Format_731(" Warmup Convergence Information,{},{},{:.10G},{:.10G},{},{},{:.10G},{:.10G},{},{}\n");
print(state.files.eio,
Format_731,
state.dataHeatBal->Zone(ZoneNum).Name,
Expand Down
Loading
Loading