MCPcopy Create free account
hub / github.com/NatLabRockies/EnergyPlus / getDXCoilSystemData

Method getDXCoilSystemData

src/EnergyPlus/UnitarySystem.cc:7314–7424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7312 }
7313
7314 void UnitarySys::getDXCoilSystemData(
7315 EnergyPlusData &state, std::string_view objectName, bool const ZoneEquipment, int const ZoneOAUnitNum, bool &errorsFound)
7316 {
7317 std::string const cCurrentModuleObject = "CoilSystem:Cooling:DX";
7318 auto const instances = state.dataInputProcessing->inputProcessor->epJSON.find(cCurrentModuleObject);
7319 if (instances != state.dataInputProcessing->inputProcessor->epJSON.end()) {
7320 auto &instancesValue = instances.value();
7321 int numCoilSystemDX = 0;
7322 for (auto instance = instancesValue.begin(); instance != instancesValue.end(); ++instance) {
7323
7324 std::string const &thisObjectName = Util::makeUPPER(instance.key());
7325 // only get the current data once all data has been read in and vector unitarySys has been initialized
7326 // when UnitarySystems::getInputOnceFlag is true read all unitary systems, otherwise read just the current object
7327 if (!Util::SameString(objectName, thisObjectName) && !state.dataUnitarySystems->getInputOnceFlag) {
7328 continue;
7329 }
7330
7331 int sysNum = getUnitarySystemIndex(state, thisObjectName);
7332 UnitarySys thisSys;
7333 if (sysNum == -1) {
7334 ++state.dataUnitarySystems->numUnitarySystems;
7335 auto const &thisObjName = instance.key();
7336 state.dataInputProcessing->inputProcessor->markObjectAsUsed(cCurrentModuleObject, thisObjName);
7337 } else {
7338 thisSys = state.dataUnitarySystems->unitarySys[sysNum];
7339 }
7340
7341 // get CoilSystem:Cooling:DX object inputs
7342 auto const &fields = instance.value();
7343 thisSys.input_specs.name = thisObjectName;
7344 thisSys.input_specs.system_type = cCurrentModuleObject;
7345 if (auto it = fields.find("availability_schedule_name"); it != fields.end()) { // not required field
7346 thisSys.input_specs.availability_schedule_name = Util::makeUPPER(it.value().get<std::string>());
7347 }
7348 thisSys.input_specs.air_inlet_node_name =
7349 Util::makeUPPER(fields.at("dx_cooling_coil_system_inlet_node_name").get<std::string>()); // required field
7350 thisSys.input_specs.air_outlet_node_name =
7351 Util::makeUPPER(fields.at("dx_cooling_coil_system_outlet_node_name").get<std::string>()); // required field
7352
7353 thisSys.input_specs.dx_cooling_coil_system_sensor_node_name =
7354 Util::makeUPPER(fields.at("dx_cooling_coil_system_sensor_node_name").get<std::string>()); // required field
7355
7356 thisSys.input_specs.cooling_coil_object_type =
7357 Util::makeUPPER(fields.at("cooling_coil_object_type").get<std::string>()); // required field
7358 thisSys.input_specs.cooling_coil_name = Util::makeUPPER(fields.at("cooling_coil_name").get<std::string>()); // required field
7359 // min-fields = 7, begin optional inputs
7360 if (auto it = fields.find("dehumidification_control_type"); it != fields.end()) { // not required field
7361 thisSys.input_specs.dehumidification_control_type =
7362 it.value().get<std::string>(); // Don't capitalize this one, since it's an enum
7363 } else {
7364 // find default value
7365 thisSys.input_specs.dehumidification_control_type = "None";
7366 }
7367 std::string loc_RunOnSensLoad;
7368 if (auto it = fields.find("run_on_sensible_load"); it != fields.end()) { // not required field
7369 loc_RunOnSensLoad = Util::makeUPPER(it.value().get<std::string>());
7370 } else {
7371 // find default value

Callers

nothing calls this directly

Calls 6

makeUPPERFunction · 0.85
SameStringFunction · 0.85
getUnitarySystemIndexFunction · 0.85
markObjectAsUsedMethod · 0.80
processInputSpecMethod · 0.80
valueMethod · 0.45

Tested by

no test coverage detected