Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add convergence check for co2 and contaminant #10500

Merged
merged 12 commits into from
May 29, 2024
26 changes: 18 additions & 8 deletions src/EnergyPlus/DataConvergParams.hh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ namespace DataConvergParams {
constexpr Real64 HVACTemperatureSlopeToler(0.001); // Slope tolerance for Temperature, Deg C/iteration
constexpr Real64 HVACTemperatureOscillationToler(0.000001); // tolerance for detecting duplicate temps in stack
constexpr Real64 HVACEnergyToler(10.0); // Tolerance for Energy comparisons (in Watts W)
constexpr Real64 HVACCO2Toler(0.1); // Tolerance for CO2 comparisons (in ppm)
constexpr Real64 HVACGenContamToler(0.1); // Tolerance for generic contaminant comparisons (in ppm)
// to be consistent, should be 20.d0 (BG Aug 2012)

constexpr Real64 HVACCpApprox(1004.844); // Air Cp (20C,0.0Kg/Kg) Only for energy Tolerance Calculation
Expand Down Expand Up @@ -137,14 +139,22 @@ namespace DataConvergParams {
std::array<Real64, ConvergLogStackDepth> HVACTempSupplyDeck2ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<bool, 3> HVACEnergyNotConverged = {false}; // Flag to show energy convergence or failure
std::array<Real64, ConvergLogStackDepth> HVACEnergyDemandToSupplyTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACEnergySupplyDeck1ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACEnergySupplyDeck2ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACEnthalpyDemandToSupplyTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACEnthalpySupplyDeck1ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACEnthalpySupplyDeck2ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACPressureDemandToSupplyTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACPressureSupplyDeck1ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACPressueSupplyDeck2ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACEnergySupplyDeck1ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACEnergySupplyDeck2ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACEnthalpyDemandToSupplyTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACEnthalpySupplyDeck1ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACEnthalpySupplyDeck2ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACPressureDemandToSupplyTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACPressureSupplyDeck1ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACPressueSupplyDeck2ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<bool, 3> HVACCO2NotConverged = {false}; // Flag to show mass flow convergence
std::array<Real64, ConvergLogStackDepth> HVACCO2DemandToSupplyTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACCO2SupplyDeck1ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACCO2SupplyDeck2ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<bool, 3> HVACGenContamNotConverged = {false}; // Flag to show mass flow convergence
std::array<Real64, ConvergLogStackDepth> HVACGenContamDemandToSupplyTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACGenContamSupplyDeck1ToDemandTolValue = {0.0}; // Queue of convergence "results"
std::array<Real64, ConvergLogStackDepth> HVACGenContamSupplyDeck2ToDemandTolValue = {0.0}; // Queue of convergence "results"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add more variables for CO2 and contaminant convergence check

};

struct PlantIterationConvergenceStruct
Expand Down
Loading
Loading