Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into shading-flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Myoldmopar committed Feb 6, 2021
2 parents 0107de2 + e1fb1e6 commit e652b59
Show file tree
Hide file tree
Showing 22 changed files with 500 additions and 1,940 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mac_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: |
set -x
echo "Using brew to install mactex and adding it to PATH"
brew cask install mactex
brew install --cask mactex
echo "/Library/TeX/texbin" >> $GITHUB_PATH
- name: Install IFW
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/windows_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ jobs:
run: |
set -x
echo "Downloading MiKTeX CLI installer"
# We download from a specific miror already
curl -L -O https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-4.0-x64.zip
unzip miktexsetup-4.0-x64.zip
# We download from a specific miror already # TODO: Should store this setup package somewhere ourselves
curl -L -O https://ctan.math.illinois.edu/systems/win32/miktex/setup/windows-x64/miktexsetup-4.1-x64.zip
unzip miktexsetup-4.1-x64.zip
echo "Setting up the local package directory via download"
./miktexsetup --verbose \
./miktexsetup_standalone --verbose \
--local-package-repository=C:/ProgramData/MiKTeX-Repo \
--remote-package-repository="https://ctan.math.illinois.edu/systems/win32/miktex/tm/packages/" \
--package-set=basic \
download
echo "Installing from the local package directory previously set up"
./miktexsetup --verbose \
./miktexsetup_standalone --verbose \
--local-package-repository=C:/ProgramData/MiKTeX-Repo \
--package-set=basic \
--shared \
Expand Down
1 change: 0 additions & 1 deletion src/EnergyPlus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,6 @@ SET( SRC
TARCOGDeflection.hh
TARCOGGasses90.cc
TARCOGGasses90.hh
TARCOGGassesParams.cc
TARCOGGassesParams.hh
TARCOGMain.cc
TARCOGMain.hh
Expand Down
95 changes: 8 additions & 87 deletions src/EnergyPlus/TARCOGArgs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,9 @@
#include <EnergyPlus/TARCOGArgs.hh>
#include <EnergyPlus/TARCOGCommon.hh>
#include <EnergyPlus/TARCOGGassesParams.hh>
#include <EnergyPlus/TARCOGOutput.hh>
#include <EnergyPlus/TARCOGParams.hh>

namespace EnergyPlus {

namespace TARCOGArgs {
namespace EnergyPlus::TARCOGArgs {

// MODULE INFORMATION:
// AUTHOR Simon Vidanovic
Expand All @@ -71,26 +68,13 @@ namespace TARCOGArgs {
// A module which contains common functions for error checking and
// preparation of arguments and intermediate variables

// METHODOLOGY EMPLOYED:
// <description>

// REFERENCES:
// na

// OTHER NOTES:
// na

// USE STATEMENTS:

// Using/Aliasing
using namespace TARCOGCommon;
using namespace TARCOGGassesParams;
using namespace TARCOGOutput;
using namespace TARCOGParams;

// Functions

int ArgCheck(Files &files,
int ArgCheck(EnergyPlusData &state, Files &files,
int const nlayer,
int const iwd,
Real64 const tout,
Expand Down Expand Up @@ -163,10 +147,6 @@ namespace TARCOGArgs {
std::string &ErrorMessage)
{

/// INPUTS:

/// General:

// Return value
int ArgCheck;

Expand Down Expand Up @@ -212,30 +192,11 @@ namespace TARCOGArgs {
EP_SIZE_CHECK(LaminateB, maxlay);
EP_SIZE_CHECK(sumsol, maxlay);

// Locals
/// Environment related:

/// Layers:
/// Venetians:

/// Laminates:

/// Gaps:

// Deflection

// Support Pillars
// 0 - does not have support pillar
// 1 - have support pillar

//// INPUTS/OUTPUTS:


// bi...Write debug output files - if debug flag = 1:

if (files.WriteDebugOutput) {

WriteInputArguments(files.DebugOutputFile,
WriteInputArguments(state, files.DebugOutputFile,
files.DBGD,
tout,
tind,
Expand Down Expand Up @@ -296,7 +257,8 @@ namespace TARCOGArgs {
xgcp,
xwght);

WriteTARCOGInputFile(files,
std::string const VersionNumber(" 7.0.15.00 ");
WriteTARCOGInputFile(state, files,
VersionNumber,
tout,
tind,
Expand Down Expand Up @@ -383,6 +345,8 @@ namespace TARCOGArgs {
return ArgCheck;
}

int constexpr MinThermalMode(0);
int constexpr MaxThermalMode(2);
if ((ThermalMod < MinThermalMode) || (ThermalMod > MaxThermalMode)) {
ArgCheck = 29;
ErrorMessage = "Invalid code for thermal mode.";
Expand Down Expand Up @@ -529,15 +493,6 @@ namespace TARCOGArgs {
}
}

// bi...Debug output:
// open(unit=18, file='iprop.dbg', status='unknown', position='APPEND',
// 2 form='formatted', iostat=nperr)
// write(18,5555) 'Iprop1:', iprop(1, 1), iprop(1, 2), iprop (1, 3)
// write(18,5555) 'Iprop2:', iprop(2, 1), iprop(2, 2), iprop (2, 3)
// write(18,5555) 'Iprop3:', iprop(3, 1), iprop(3, 2), iprop (3, 3)
// 5555 format(A, I3, I3, I3)
// close(18)

return ArgCheck;
}

Expand Down Expand Up @@ -613,17 +568,6 @@ namespace TARCOGArgs {
EP_SIZE_CHECK(rir, maxlay2);
EP_SIZE_CHECK(vfreevent, maxlay1);

// Locals
/// Environment related:

/// Layers:

/// Venetians:

//// INPUTS/OUTPUTS:

/// OUTPUTS:

int k1;
Real64 tiltr;
Real64 Rsky;
Expand All @@ -632,8 +576,6 @@ namespace TARCOGArgs {
Real64 e0;
std::string a;

//! Initialize variables:

//! Scalars:
ShadeEmisRatioOut = 1.0;
ShadeEmisRatioIn = 1.0;
Expand Down Expand Up @@ -725,15 +667,6 @@ namespace TARCOGArgs {

ebsky = Gout;

// Ebsky=sigma*Tout**4.0d0
// As of 6/1/01 The expression for Ebsky is different in the current ISO 15099
// (Ebsky=sigma*Tout**4) because equations 32 and 33 specify Tout and Tind as reference
// outdoor and indoor temperatures, but I think that they should be Tne and Tni
// (environmental temps). Therefore, Ebsky becomes the same as Gout.
// Inside (room) radiation
// Ebroom = sigma*tind**4.0d0
// See comment above about Ebsky

if (ibc(2) == 1) { // inside BC - fixed combined film coef.
trmin = tind;
}
Expand Down Expand Up @@ -766,19 +699,7 @@ namespace TARCOGArgs {

bool GoAhead(int const nperr)
{

// Return value
bool GoAhead;

if (((nperr > 0) && (nperr < 1000)) || ((nperr > 2000) && (nperr < 3000))) {
GoAhead = false; // error
} else {
GoAhead = true; // all OK, or a warning
}

return GoAhead;
return !(((nperr > 0) && (nperr < 1000)) || ((nperr > 2000) && (nperr < 3000)));
}

} // namespace TARCOGArgs

} // namespace EnergyPlus
96 changes: 45 additions & 51 deletions src/EnergyPlus/TARCOGArgs.hh
Original file line number Diff line number Diff line change
Expand Up @@ -55,32 +55,28 @@
#include <EnergyPlus/EnergyPlus.hh>
#include <EnergyPlus/TARCOGOutput.hh>

namespace EnergyPlus {
namespace EnergyPlus::TARCOGArgs {

namespace TARCOGArgs {

// Functions

int ArgCheck(EnergyPlus::TARCOGOutput::Files &files,
int const nlayer,
int const iwd,
Real64 const tout,
Real64 const tind,
Real64 const trmin,
Real64 const wso,
Real64 const wsi,
Real64 const dir,
Real64 const outir,
int const isky,
Real64 const tsky,
Real64 const esky,
Real64 const fclr,
Real64 const VacuumPressure,
Real64 const VacuumMaxGapThickness,
int const CalcDeflection,
Real64 const Pa,
Real64 const Pini,
Real64 const Tini,
int ArgCheck(EnergyPlusData &state, EnergyPlus::TARCOGOutput::Files &files,
int nlayer,
int iwd,
Real64 tout,
Real64 tind,
Real64 trmin,
Real64 wso,
Real64 wsi,
Real64 dir,
Real64 outir,
int isky,
Real64 tsky,
Real64 esky,
Real64 fclr,
Real64 VacuumPressure,
Real64 VacuumMaxGapThickness,
int CalcDeflection,
Real64 Pa,
Real64 Pini,
Real64 Tini,
const Array1D<Real64> &gap,
const Array1D<Real64> &GapDef,
const Array1D<Real64> &thick,
Expand All @@ -89,18 +85,18 @@ namespace TARCOGArgs {
const Array1D<Real64> &PoissonsRat,
const Array1D<Real64> &tir,
const Array1D<Real64> &emis,
Real64 const totsol,
Real64 const tilt,
Real64 totsol,
Real64 tilt,
const Array1D<Real64> &asol,
Real64 const height,
Real64 const heightt,
Real64 const width,
Real64 height,
Real64 heightt,
Real64 width,
const Array1D<Real64> &presure,
Array2A_int const iprop,
Array2A<Real64> const frct,
Array2A<Real64> const xgcon,
Array2A<Real64> const xgvis,
Array2A<Real64> const xgcp,
Array2A_int iprop,
Array2A<Real64> frct,
Array2A<Real64> xgcon,
Array2A<Real64> xgvis,
Array2A<Real64> xgcp,
const Array1D<Real64> &xwght,
const Array1D<Real64> &gama,
const Array1D_int &nmix,
Expand Down Expand Up @@ -128,27 +124,27 @@ namespace TARCOGArgs {
const Array1D<Real64> &LaminateA,
const Array1D<Real64> &LaminateB,
const Array1D<Real64> &sumsol,
int const standard,
int const ThermalMod,
Real64 const SDScalar,
int standard,
int ThermalMod,
Real64 SDScalar,
std::string &ErrorMessage);

void PrepVariablesISO15099(int const nlayer,
Real64 const tout,
Real64 const tind,
void PrepVariablesISO15099(int nlayer,
Real64 tout,
Real64 tind,
Real64 &trmin,
int const isky,
Real64 const outir,
int isky,
Real64 outir,
// IR radiance of window's exterior/interior surround (W/m2)
Real64 const tsky,
Real64 tsky,
Real64 &esky,
Real64 const fclr,
Real64 fclr,
Array1D<Real64> &gap,
Array1D<Real64> &thick,
Array1D<Real64> &scon,
const Array1D<Real64> &tir,
const Array1D<Real64> &emis,
Real64 const tilt,
Real64 tilt,
Real64 &hin,
Real64 &hout,
const Array1D_int &ibc,
Expand All @@ -157,8 +153,8 @@ namespace TARCOGArgs {
const Array1D<Real64> &SlatAngle,
const Array1D<Real64> &SlatCond,
const Array1D_int &LayerType,
int const ThermalMod,
Real64 const SDScalar,
int ThermalMod,
Real64 SDScalar,
Real64 &ShadeEmisRatioOut,
Real64 &ShadeEmisRatioIn,
Real64 &ShadeHcRatioOut,
Expand All @@ -184,9 +180,7 @@ namespace TARCOGArgs {
int &nperr,
std::string &ErrorMessage);

bool GoAhead(int const nperr);

} // namespace TARCOGArgs
bool GoAhead(int nperr);

} // namespace EnergyPlus

Expand Down
Loading

0 comments on commit e652b59

Please sign in to comment.