-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
290 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "spawn.hpp" | ||
#include "util/conversion.hpp" | ||
#include <string_view> | ||
|
||
namespace spawn { | ||
|
||
int ZoneNum(Spawn &spawn, std::string_view zone_name) | ||
{ | ||
auto upper_zone_name = zone_name; | ||
std::transform(zone_name.begin(), zone_name.end(), upper_zone_name.begin(), ::toupper); | ||
|
||
for (int i = 0; i < spawn.EnergyPlusData().dataGlobal->NumOfZones; ++i) { | ||
if (spawn.EnergyPlusData().dataHeatBal->Zone[as_size_t(i)].Name == upper_zone_name) { | ||
return i + 1; | ||
} | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
} // namespace spawn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include <EnergyPlusData.hh> | ||
#include <ZoneTempPredictorCorrector.hh> | ||
|
||
namespace spawn { | ||
|
||
class ZoneSums | ||
{ | ||
public: | ||
ZoneSums(EnergyPlus::EnergyPlusData &sim_state_, int zone_num) | ||
{ | ||
auto &zone_heat_balance = sim_state_.dataZoneTempPredictorCorrector->zoneHeatBalance(zone_num); | ||
zone_heat_balance.calcZoneOrSpaceSums(sim_state_, true, zone_num); | ||
|
||
temp_dep_coef_ = zone_heat_balance.SumHA + zone_heat_balance.SumMCp; | ||
temp_ind_coef_ = zone_heat_balance.SumIntGain + zone_heat_balance.SumHATsurf + zone_heat_balance.SumMCpT; | ||
|
||
// Refer to | ||
// https://bigladdersoftware.com/epx/docs/8-8/engineering-reference/basis-for-the-zone-and-air-system-integration.html#basis-for-the-zone-and-air-system-integration | ||
q_con_sen_flow_ = temp_ind_coef_ - (temp_dep_coef_ * zone_heat_balance.MAT); | ||
} | ||
|
||
[[nodiscard]] double TempDepCoef() const; | ||
[[nodiscard]] double TempIndCoef() const; | ||
[[nodiscard]] double QConSenFlow() const; | ||
|
||
private: | ||
double temp_dep_coef_; | ||
double temp_ind_coef_; | ||
double q_con_sen_flow_; | ||
}; | ||
|
||
[[nodiscard]] int ZoneNum(std::string_view zone_name); | ||
|
||
} // namespace spawn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.