diff --git a/energyplus_coroutine/energyplus_helpers.cpp b/energyplus_coroutine/energyplus_helpers.cpp index 89417e498..e36b37679 100644 --- a/energyplus_coroutine/energyplus_helpers.cpp +++ b/energyplus_coroutine/energyplus_helpers.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -84,6 +85,28 @@ int ZoneNum(const EnergyPlus::EnergyPlusData &energyplus_data, const std::string return energyplus_data.dataZoneTempPredictorCorrector->zoneHeatBalance(zone_num).MRT; } +[[nodiscard]] double ZoneDesignCoolingLoad(const EnergyPlus::EnergyPlusData &energyplus_data, int zone_num) +{ + return energyplus_data.dataSize->FinalZoneSizing[zone_num].DesCoolLoad; +} + +[[nodiscard]] double ZoneDesignCoolingLatentLoad(const EnergyPlus::EnergyPlusData &energyplus_data, int zone_num) +{ + return energyplus_data.dataSize->FinalZoneSizing[zone_num].DesLatentCoolLoad; +} + +[[nodiscard]] double ZoneOutdoorTempAtPeakCool(const EnergyPlus::EnergyPlusData &energyplus_data, int zone_num) +{ + return energyplus_data.dataSize->FinalZoneSizing[zone_num].OutTempAtCoolPeak; +} + +[[nodiscard]] double ZoneOutdoorHumidityRatioAtPeakCool(const EnergyPlus::EnergyPlusData &energyplus_data, int zone_num) +{ + return energyplus_data.dataSize->FinalZoneSizing[zone_num].OutHumRatAtCoolPeak; +} + +// const auto value = sim_state.dataSize->FinalZoneSizing[zone_num].OutHumRatAtLatentCoolPeak; + void SetZoneTemperature(EnergyPlus::EnergyPlusData &energyplus_data, const int zone_num, const double &temp) { auto &zone_heat_balance = energyplus_data.dataZoneTempPredictorCorrector->zoneHeatBalance(zone_num); @@ -142,6 +165,11 @@ int ActuatorHandle(EnergyPlus::EnergyPlusData &energyplus_data, return h; } +void SetActuatorValue(EnergyPlus::EnergyPlusData &energyplus_data, int handle, const double &value) +{ + ::setActuatorValue(static_cast(&energyplus_data), handle, value); +} + [[nodiscard]] int SurfaceNum(EnergyPlus::EnergyPlusData &energyplus_data, std::string_view surface_name) { std::string upper_name(surface_name); diff --git a/energyplus_coroutine/energyplus_helpers.hpp b/energyplus_coroutine/energyplus_helpers.hpp index 1115ed2a9..04d337dda 100644 --- a/energyplus_coroutine/energyplus_helpers.hpp +++ b/energyplus_coroutine/energyplus_helpers.hpp @@ -32,6 +32,15 @@ class ZoneSums [[nodiscard]] double ZoneMeanRadiantTemp(const EnergyPlus::EnergyPlusData &energyplus_data, int zone_num); +[[nodiscard]] double ZoneDesignCoolingLoad(const EnergyPlus::EnergyPlusData &energyplus_data, int zone_num); + +[[nodiscard]] double ZoneDesignCoolingLatentLoad(const EnergyPlus::EnergyPlusData &energyplus_data, int zone_num); + +[[nodiscard]] double ZoneOutdoorTempAtPeakCool(const EnergyPlus::EnergyPlusData &energyplus_data, int zone_num); + +[[nodiscard]] double ZoneOutdoorHumidityRatioAtPeakCool(const EnergyPlus::EnergyPlusData &energyplus_data, + int zone_num); + void SetZoneTemperature(EnergyPlus::EnergyPlusData &energyplus_data, const int zone_num, const double &temp); void SetZoneHumidityRatio(EnergyPlus::EnergyPlusData &energyplus_data, const int zone_num, const double &ratio); @@ -46,6 +55,8 @@ VariableHandle(EnergyPlus::EnergyPlusData &energyplus_data, const std::string_vi const std::string &control_type, const std::string &component_name); +void SetActuatorValue(EnergyPlus::EnergyPlusData &energyplus_data, int handle, const double &value); + [[nodiscard]] int SurfaceNum(EnergyPlus::EnergyPlusData &energyplus_data, std::string_view surface_name); [[nodiscard]] double SurfaceArea(EnergyPlus::EnergyPlusData &energyplus_data, int surface_num); diff --git a/energyplus_coroutine/variables.cpp b/energyplus_coroutine/variables.cpp index 67fc46729..5d4569583 100644 --- a/energyplus_coroutine/variables.cpp +++ b/energyplus_coroutine/variables.cpp @@ -1187,6 +1187,157 @@ namespace zone { SetValue(energyplus::ZoneMeanRadiantTemp(energyplus_data, zone_num_), units::UnitSystem::EP); } + void QCooSenFlow::create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables) + { + int value_reference = variables.size(); // NOLINT + const auto zones = input.spawnjson.value("model", json::object()).value("zones", std::vector(0)); + + for (const auto &zone : zones) { + std::string zone_name = zone.value("name", ""); + int zone_num = energyplus::ZoneNum(energyplus_data, zone_name); + + variables.push_back(std::unique_ptr(new QCooSenFlow(zone_name, zone_num, value_reference))); + value_reference++; + } + } + + QCooSenFlow::QCooSenFlow(std::string_view zone_name, int zone_num, int value_reference) // NOLINT + : OutputVariable( + std::string(zone_name) + "_QCooSen_flow", value_reference, units::UnitType::W, units::UnitType::W), + zone_num_(zone_num) + { + metadata_.set_name("ScalarVariable"); + metadata_.append_attribute("name") = name_.c_str(); + metadata_.append_attribute("valueReference") = std::to_string(value_reference_).c_str(); + metadata_.append_attribute("description") = "Design sensible cooling load"; + metadata_.append_attribute("causality") = "calculatedParameter"; + metadata_.append_attribute("variability") = "fixed"; + metadata_.append_attribute("initial") = "calculated"; + + auto real = metadata_.append_child("Real"); + real.append_attribute("quantity") = "Power"; + real.append_attribute("relativeQuantity") = "false"; + real.append_attribute("unit") = units::toString(mo_unit_).c_str(); + } + + void QCooSenFlow::Update(EnergyPlus::EnergyPlusData &energyplus_data) + { + SetValue(energyplus::ZoneDesignCoolingLoad(energyplus_data, zone_num_), units::UnitSystem::EP); + } + + void QCooLatFlow::create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables) + { + int value_reference = variables.size(); // NOLINT + const auto zones = input.spawnjson.value("model", json::object()).value("zones", std::vector(0)); + + for (const auto &zone : zones) { + std::string zone_name = zone.value("name", ""); + int zone_num = energyplus::ZoneNum(energyplus_data, zone_name); + + variables.push_back(std::unique_ptr(new QCooLatFlow(zone_name, zone_num, value_reference))); + value_reference++; + } + } + + QCooLatFlow::QCooLatFlow(std::string_view zone_name, int zone_num, int value_reference) // NOLINT + : OutputVariable( + std::string(zone_name) + "_QCooLat_flow", value_reference, units::UnitType::W, units::UnitType::W), + zone_num_(zone_num) + { + metadata_.set_name("ScalarVariable"); + metadata_.append_attribute("name") = name_.c_str(); + metadata_.append_attribute("valueReference") = std::to_string(value_reference_).c_str(); + metadata_.append_attribute("description") = "Design latent cooling load"; + metadata_.append_attribute("causality") = "calculatedParameter"; + metadata_.append_attribute("variability") = "fixed"; + metadata_.append_attribute("initial") = "calculated"; + + auto real = metadata_.append_child("Real"); + real.append_attribute("quantity") = "Power"; + real.append_attribute("relativeQuantity") = "false"; + real.append_attribute("unit") = units::toString(mo_unit_).c_str(); + } + + void QCooLatFlow::Update(EnergyPlus::EnergyPlusData &energyplus_data) + { + SetValue(energyplus::ZoneDesignCoolingLatentLoad(energyplus_data, zone_num_), units::UnitSystem::EP); + } + + void TOutCoo::create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables) + { + int value_reference = variables.size(); // NOLINT + const auto zones = input.spawnjson.value("model", json::object()).value("zones", std::vector(0)); + + for (const auto &zone : zones) { + std::string zone_name = zone.value("name", ""); + int zone_num = energyplus::ZoneNum(energyplus_data, zone_name); + + variables.push_back(std::unique_ptr(new TOutCoo(zone_name, zone_num, value_reference))); + value_reference++; + } + } + + TOutCoo::TOutCoo(std::string_view zone_name, int zone_num, int value_reference) // NOLINT + : OutputVariable(std::string(zone_name) + "_TOutCoo", value_reference, units::UnitType::C, units::UnitType::K), + zone_num_(zone_num) + { + metadata_.set_name("ScalarVariable"); + metadata_.append_attribute("name") = name_.c_str(); + metadata_.append_attribute("valueReference") = std::to_string(value_reference_).c_str(); + metadata_.append_attribute("description") = "Outdoor drybulb temperature at the cooling design load"; + metadata_.append_attribute("causality") = "calculatedParameter"; + metadata_.append_attribute("variability") = "fixed"; + metadata_.append_attribute("initial") = "calculated"; + + auto real = metadata_.append_child("Real"); + real.append_attribute("quantity") = "ThermodynamicTemperature"; + real.append_attribute("relativeQuantity") = "false"; + real.append_attribute("unit") = units::toString(mo_unit_).c_str(); + } + + void TOutCoo::Update(EnergyPlus::EnergyPlusData &energyplus_data) + { + SetValue(energyplus::ZoneOutdoorTempAtPeakCool(energyplus_data, zone_num_), units::UnitSystem::EP); + } + + void XOutCoo::create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables) + { + int value_reference = variables.size(); // NOLINT + const auto zones = input.spawnjson.value("model", json::object()).value("zones", std::vector(0)); + + for (const auto &zone : zones) { + std::string zone_name = zone.value("name", ""); + int zone_num = energyplus::ZoneNum(energyplus_data, zone_name); + + variables.push_back(std::unique_ptr(new XOutCoo(zone_name, zone_num, value_reference))); + value_reference++; + } + } + + XOutCoo::XOutCoo(std::string_view zone_name, int zone_num, int value_reference) // NOLINT + : OutputVariable( + std::string(zone_name) + "_XOutCoo", value_reference, units::UnitType::one, units::UnitType::one), + zone_num_(zone_num) + { + metadata_.set_name("ScalarVariable"); + metadata_.append_attribute("name") = name_.c_str(); + metadata_.append_attribute("valueReference") = std::to_string(value_reference_).c_str(); + metadata_.append_attribute("description") = + "Outdoor humidity ratio at the cooling design load per total air mass of the zone"; + metadata_.append_attribute("causality") = "calculatedParameter"; + metadata_.append_attribute("variability") = "fixed"; + metadata_.append_attribute("initial") = "calculated"; + + auto real = metadata_.append_child("Real"); + real.append_attribute("relativeQuantity") = "false"; + real.append_attribute("unit") = units::toString(mo_unit_).c_str(); + } + + void XOutCoo::Update(EnergyPlus::EnergyPlusData &energyplus_data) + { + SetValue(energyplus::ZoneOutdoorHumidityRatioAtPeakCool(energyplus_data, zone_num_), units::UnitSystem::EP); + } + void MInletsFlow::create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables) { int value_reference = variables.size(); // NOLINT @@ -1337,12 +1488,57 @@ namespace zone { real.append_attribute("unit") = units::toString(mo_unit_).c_str(); } - void X::Update([[maybe_unused]] EnergyPlus::EnergyPlusData &energyplus_data) + void X::Update(EnergyPlus::EnergyPlusData &energyplus_data) { if (value_) { energyplus::SetZoneHumidityRatio(energyplus_data, zone_num_, *value_); } } + + void QGaiRadFlow::create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables) + { + int value_reference = variables.size(); // NOLINT + const auto zones = input.spawnjson.value("model", json::object()).value("zones", std::vector(0)); + + const std::string actuator_type("OtherEquipment"); + const std::string actuator_controltype("Power Level"); + + for (const auto &zone : zones) { + std::string zone_name = zone.value("name", ""); + const std::string actuator_name(fmt::format("Spawn-Zone-{}-RadiantGains", zone_name)); + + const auto handle = + energyplus::ActuatorHandle(energyplus_data, actuator_type, actuator_controltype, actuator_name); + variables.push_back(std::unique_ptr(new QGaiRadFlow(zone_name, handle, value_reference))); + + value_reference++; + } + } + + QGaiRadFlow::QGaiRadFlow(std::string_view zone_name, int handle, int value_reference) // NOLINT + : InputVariable( + std::string(zone_name) + "_QGaiRad_flow", value_reference, units::UnitType::W, units::UnitType::W), + handle_(handle) + { + metadata_.set_name("ScalarVariable"); + metadata_.append_attribute("name") = name_.c_str(); + metadata_.append_attribute("valueReference") = std::to_string(value_reference_).c_str(); + metadata_.append_attribute("description") = "Radiative sensible heat gain added to the zone"; + metadata_.append_attribute("causality") = "input"; + metadata_.append_attribute("variability") = "continuous"; + + auto real = metadata_.append_child("Real"); + real.append_attribute("quantity") = "Power"; + real.append_attribute("relativeQuantity") = "false"; + real.append_attribute("unit") = units::toString(mo_unit_).c_str(); + } + + void QGaiRadFlow::Update([[maybe_unused]] EnergyPlus::EnergyPlusData &energyplus_data) + { + if (value_) { + energyplus::SetActuatorValue(energyplus_data, handle_, *value_); + } + } } // namespace zone namespace other { @@ -1419,10 +1615,66 @@ namespace other { real.append_attribute("unit") = units::toString(mo_unit_).c_str(); } - void Actuator::Update([[maybe_unused]] EnergyPlus::EnergyPlusData &energyplus_data) + void Actuator::Update(EnergyPlus::EnergyPlusData &energyplus_data) + { + if (value_) { + energyplus::SetActuatorValue(energyplus_data, actuator_handle_, *value_); + } + } + + void Schedule::create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables) + { + const auto schedules = input.spawnjson.value("model", json::object()).value("schedules", std::vector(0)); + int value_reference = variables.size(); // NOLINT + + // Schedules values are set using the EnergyPlus actuator + // + // Since actuators require an EnergyPlus object type and name, + // the first step is to build a map of schedules names and types. + std::map schedule_type_map; + + for (const auto &type : supportedScheduleTypes) { + if (input.jsonidf.contains(type)) { + for (const auto &schedule : input.jsonidf[type].items()) { + schedule_type_map[schedule.key()] = type; + } + } + } + + // Use the type map to find the schedule type, + // then find the actuator handle, + // and finally create a new Schedule variable. + for (const auto &schedule : schedules) { + const auto idf_name = schedule.value("name", ""); + const auto name = schedule.value("fmiName", ""); + + const auto type = schedule_type_map.find(idf_name); + if (type != std::end(schedule_type_map)) { + const auto handle = energyplus::ActuatorHandle(energyplus_data, type->second, "Schedule Value", idf_name); + variables.push_back(std::unique_ptr(new Schedule(name, handle, value_reference))); + value_reference++; + } + } + } + + Schedule::Schedule(std::string_view name, int handle, int value_reference) // NOLINT + : InputVariable(name, value_reference, units::UnitType::one, units::UnitType::one), handle_(handle) + { + metadata_.set_name("ScalarVariable"); + metadata_.append_attribute("name") = name_.c_str(); + metadata_.append_attribute("valueReference") = std::to_string(value_reference_).c_str(); + metadata_.append_attribute("description") = "Schedule"; + metadata_.append_attribute("causality") = "input"; + metadata_.append_attribute("variability") = "continuous"; + + auto real = metadata_.append_child("Real"); + real.append_attribute("unit") = units::toString(mo_unit_).c_str(); + } + + void Schedule::Update(EnergyPlus::EnergyPlusData &energyplus_data) { if (value_) { - // energyplus::SetActuatorValue(energyplus_data, actuator_handle_, *value_); + energyplus::SetActuatorValue(energyplus_data, handle_, *value_); } } @@ -1505,6 +1757,49 @@ namespace surface { { SetValue(energyplus::SurfaceInsideHeatFlow(energyplus_data, surface_num_), spawn::units::UnitSystem::EP); } + + void T::create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables) + { + const auto surfaces = input.spawnjson.value("model", json::object()).value("zoneSurfaces", std::vector(0)); + int value_reference = variables.size(); // NOLINT + + const std::string actuator_type("Surface"); + const std::string actuator_controltype("Surface Inside Temperature"); + + for (const auto &surface : surfaces) { + const auto surface_name = surface.value("name", ""); + + const auto handle = + energyplus::ActuatorHandle(energyplus_data, actuator_type, actuator_controltype, surface_name); + + variables.push_back(std::unique_ptr(new T(surface_name, handle, value_reference))); + value_reference++; + } + } + + T::T(std::string_view surface_name, int actuator_handle, int value_reference) // NOLINT + : InputVariable(std::string(surface_name) + "_T", value_reference, units::UnitType::C, units::UnitType::K), + surface_name_(surface_name), actuator_handle_(actuator_handle) + { + metadata_.set_name("ScalarVariable"); + metadata_.append_attribute("name") = name_.c_str(); + metadata_.append_attribute("valueReference") = std::to_string(value_reference_).c_str(); + metadata_.append_attribute("description") = "Temperature of the surface."; + metadata_.append_attribute("causality") = "input"; + metadata_.append_attribute("variability") = "continuous"; + + auto real = metadata_.append_child("Real"); + real.append_attribute("quantity") = "ThermodynamicTemperature"; + real.append_attribute("relativeQuantity") = "false"; + real.append_attribute("unit") = units::toString(mo_unit_).c_str(); + } + + void T::Update(EnergyPlus::EnergyPlusData &energyplus_data) + { + if (value_) { + energyplus::SetActuatorValue(energyplus_data, actuator_handle_, *value_); + } + } } // namespace surface namespace construction { @@ -1628,6 +1923,92 @@ namespace construction { { SetValue(energyplus::SurfaceOutsideHeatFlow(energyplus_data, surface_num_), spawn::units::UnitSystem::EP); } + + void TFront::create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables) + { + const auto surfaces = input.spawnjson.value("model", json::object()).value("zoneSurfaces", std::vector(0)); + int value_reference = variables.size(); // NOLINT + + const std::string actuator_type("Surface"); + const std::string actuator_controltype("Surface Inside Temperature"); + + for (const auto &surface : surfaces) { + const auto surface_name = surface.value("name", ""); + + const auto handle = + energyplus::ActuatorHandle(energyplus_data, actuator_type, actuator_controltype, surface_name); + + variables.push_back(std::unique_ptr(new TFront(surface_name, handle, value_reference))); + value_reference++; + } + } + + TFront::TFront(std::string_view surface_name, int actuator_handle, int value_reference) // NOLINT + : InputVariable(std::string(surface_name) + "_TFront", value_reference, units::UnitType::C, units::UnitType::K), + surface_name_(surface_name), actuator_handle_(actuator_handle) + { + metadata_.set_name("ScalarVariable"); + metadata_.append_attribute("name") = name_.c_str(); + metadata_.append_attribute("valueReference") = std::to_string(value_reference_).c_str(); + metadata_.append_attribute("description") = "Temperature of the front-facing surface."; + metadata_.append_attribute("causality") = "input"; + metadata_.append_attribute("variability") = "continuous"; + + auto real = metadata_.append_child("Real"); + real.append_attribute("quantity") = "ThermodynamicTemperature"; + real.append_attribute("relativeQuantity") = "false"; + real.append_attribute("unit") = units::toString(mo_unit_).c_str(); + } + + void TFront::Update(EnergyPlus::EnergyPlusData &energyplus_data) + { + if (value_) { + energyplus::SetActuatorValue(energyplus_data, actuator_handle_, *value_); + } + } + + void TBack::create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables) + { + const auto surfaces = input.spawnjson.value("model", json::object()).value("zoneSurfaces", std::vector(0)); + int value_reference = variables.size(); // NOLINT + + const std::string actuator_type("Surface"); + const std::string actuator_controltype("Surface Outside Temperature"); + + for (const auto &surface : surfaces) { + const auto surface_name = surface.value("name", ""); + + const auto handle = + energyplus::ActuatorHandle(energyplus_data, actuator_type, actuator_controltype, surface_name); + + variables.push_back(std::unique_ptr(new TBack(surface_name, handle, value_reference))); + value_reference++; + } + } + + TBack::TBack(std::string_view surface_name, int actuator_handle, int value_reference) // NOLINT + : InputVariable(std::string(surface_name) + "_TBack", value_reference, units::UnitType::C, units::UnitType::K), + surface_name_(surface_name), actuator_handle_(actuator_handle) + { + metadata_.set_name("ScalarVariable"); + metadata_.append_attribute("name") = name_.c_str(); + metadata_.append_attribute("valueReference") = std::to_string(value_reference_).c_str(); + metadata_.append_attribute("description") = "Temperature of the back-facing surface."; + metadata_.append_attribute("causality") = "input"; + metadata_.append_attribute("variability") = "continuous"; + + auto real = metadata_.append_child("Real"); + real.append_attribute("quantity") = "ThermodynamicTemperature"; + real.append_attribute("relativeQuantity") = "false"; + real.append_attribute("unit") = units::toString(mo_unit_).c_str(); + } + + void TBack::Update(EnergyPlus::EnergyPlusData &energyplus_data) + { + if (value_) { + energyplus::SetActuatorValue(energyplus_data, actuator_handle_, *value_); + } + } } // namespace construction void CreateVariables(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables) @@ -1639,17 +2020,28 @@ void CreateVariables(const Input &input, EnergyPlus::EnergyPlusData &energyplus_ zone::QLatFlow::create(input, energyplus_data, variables); zone::QPeoFlow::create(input, energyplus_data, variables); zone::TRad::create(input, energyplus_data, variables); + + zone::QCooSenFlow::create(input, energyplus_data, variables); + zone::QCooLatFlow::create(input, energyplus_data, variables); + zone::TOutCoo::create(input, energyplus_data, variables); + zone::XOutCoo::create(input, energyplus_data, variables); + zone::MInletsFlow::create(input, energyplus_data, variables); zone::TAveInlet::create(input, energyplus_data, variables); zone::T::create(input, energyplus_data, variables); zone::X::create(input, energyplus_data, variables); + zone::QGaiRadFlow::create(input, energyplus_data, variables); other::Sensor::create(input, energyplus_data, variables); other::Actuator::create(input, energyplus_data, variables); + other::Schedule::create(input, energyplus_data, variables); surface::A::create(input, energyplus_data, variables); surface::QFlow::create(input, energyplus_data, variables); + surface::T::create(input, energyplus_data, variables); construction::A::create(input, energyplus_data, variables); construction::QFrontFlow::create(input, energyplus_data, variables); construction::QBackFlow::create(input, energyplus_data, variables); + construction::TFront::create(input, energyplus_data, variables); + construction::TBack::create(input, energyplus_data, variables); } } // namespace spawn::variable diff --git a/energyplus_coroutine/variables.hpp b/energyplus_coroutine/variables.hpp index ca934ff50..1a0364e1f 100644 --- a/energyplus_coroutine/variables.hpp +++ b/energyplus_coroutine/variables.hpp @@ -229,6 +229,50 @@ namespace zone { int zone_num_; }; + class QCooSenFlow : public OutputVariable + { + public: + static void create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables); + void Update(EnergyPlus::EnergyPlusData &energyplus_data) final; + + private: + explicit QCooSenFlow(std::string_view zone_name, int zone_num, int value_reference); + int zone_num_; + }; + + class QCooLatFlow : public OutputVariable + { + public: + static void create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables); + void Update(EnergyPlus::EnergyPlusData &energyplus_data) final; + + private: + explicit QCooLatFlow(std::string_view zone_name, int zone_num, int value_reference); + int zone_num_; + }; + + class TOutCoo : public OutputVariable + { + public: + static void create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables); + void Update(EnergyPlus::EnergyPlusData &energyplus_data) final; + + private: + explicit TOutCoo(std::string_view zone_name, int zone_num, int value_reference); + int zone_num_; + }; + + class XOutCoo : public OutputVariable + { + public: + static void create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables); + void Update(EnergyPlus::EnergyPlusData &energyplus_data) final; + + private: + explicit XOutCoo(std::string_view zone_name, int zone_num, int value_reference); + int zone_num_; + }; + class MInletsFlow : public InputVariable { public: @@ -272,6 +316,18 @@ namespace zone { explicit X(std::string_view zone_name, int zone_num, int value_reference); int zone_num_; }; + + class QGaiRadFlow : public InputVariable + { + public: + static void create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables); + void Update(EnergyPlus::EnergyPlusData &energyplus_data) final; + + private: + explicit QGaiRadFlow(std::string_view zone_name, int handle, int value_reference); + + int handle_; + }; } // namespace zone namespace other { @@ -298,6 +354,18 @@ namespace other { int actuator_handle_; }; + + class Schedule : public InputVariable + { + public: + static void create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables); + void Update(EnergyPlus::EnergyPlusData &energyplus_data) final; + + private: + explicit Schedule(std::string_view name, int handle, int value_reference); + + int handle_; + }; } // namespace other namespace surface { @@ -326,6 +394,19 @@ namespace surface { std::string surface_name_; int surface_num_; }; + + class T : public InputVariable + { + public: + static void create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables); + void Update(EnergyPlus::EnergyPlusData &energyplus_data) final; + + private: + explicit T(std::string_view surface_name, int handle, int value_reference); + + std::string surface_name_; + int actuator_handle_; + }; } // namespace surface namespace construction { @@ -367,6 +448,32 @@ namespace construction { std::string surface_name_; int surface_num_; }; + + class TFront : public InputVariable + { + public: + static void create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables); + void Update(EnergyPlus::EnergyPlusData &energyplus_data) final; + + private: + explicit TFront(std::string_view surface_name, int handle, int value_reference); + + std::string surface_name_; + int actuator_handle_; + }; + + class TBack : public InputVariable + { + public: + static void create(const Input &input, EnergyPlus::EnergyPlusData &energyplus_data, Variables &variables); + void Update(EnergyPlus::EnergyPlusData &energyplus_data) final; + + private: + explicit TBack(std::string_view surface_name, int handle, int value_reference); + + std::string surface_name_; + int actuator_handle_; + }; } // namespace construction } // namespace spawn::variable @@ -389,16 +496,16 @@ namespace construction { //// Input VariableType::T: //// Input VariableType::X: //// Input VariableType::EMS_ACTUATOR: -// Input VariableType::SCHEDULE: -// Input VariableType::QGAIRAD_FLOW: -// Input VariableType::TSURF_FRONT: -// Input VariableType::TSURF: -// Input VariableType::TSURF_BACK: +//// Input VariableType::SCHEDULE: +//// Input VariableType::QGAIRAD_FLOW: +//// Input VariableType::TSURF_FRONT: +//// Input VariableType::TSURF: +//// Input VariableType::TSURF_BACK: // // // Sizing related parameters -// QCOOSEN_FLOW, -// QCOOLAT_FLOW, -// TOUTCOO, +//// QCOOSEN_FLOW, +//// QCOOLAT_FLOW, +//// TOUTCOO, // XOUTCOO, // TCOO, // QHEA_FLOW,