Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions doc/src/records/top-members.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ The program simulates 365 days at most. If begDay and endDay are the same, 1 day

**jan1DoW=*choice***

Day of week on which January 1 falls.
Day of week on which January 1 falls. jan1DoW is used in the calculation of the day of the week.

Note that "warm-up" days (see wuDays) occur before the start day specified by begDay. Thus "warm-up" days are often in the prior year. In order to preserve the day-of-week sequence, the effective jan1DoW is shifted back by one day during prior-year warmup.

<%= member_table(
units: "",
Expand All @@ -65,7 +67,7 @@ Number of "warm-up" days used to initialize the simulator. Simulator initializat

<%= member_table(
units: "",
legal_range: "*x* $\\ge$ 0",
legal_range: "0 $\\le$ *x* $\\le$ 365",
default: "7",
required: "No",
variability: "constant") %>
Expand Down
2 changes: 1 addition & 1 deletion src/cncult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2730,7 +2730,7 @@ CULT cnTopCult[] = // Top level table, points to all other tables, used in cal
{
// id cs fn f uc evf ty b dfls p2 ckf
//---------- ----- ----------------- ------- -- ------ ----- ----- ------------------ ---- ----
CULT( "*", STAR, 0, PRFP, 0, 0, 0, 0, v topStarItf,0.f, v topStarPrf, //also called by CLEAR entry below; calls topStarPrf2.
CULT( "*", STAR, 0, PRFP, 0, 0, 0, 0, v topStarItf,0.f, v topStarPrf, //also called by CLEAR entry below; calls topStarPrf2.
topStarPrf2), //main ckf ptr is used for re-entry pre-input fcn.
// TOP overall control
// ?? word to do main simulation??
Expand Down
6 changes: 3 additions & 3 deletions src/cncult2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,9 @@ RC TOPRAT::tp_SetDerived()
if (nDays <= 0) // for eg Dec..Feb run, or Jul 1..Jun 30.
nDays += 365; // fix day count

//run "year"
year = -((jan1DoW + 5) % 7) - 1; /* map jan 1 day of week (1=sun..7=sat, data\dtypes.def DOWCH type) to
generic year starting on that day (-1=mon..-7=sun, lib\tdpak.cpp). */
// run "year"
year = -((jan1DoW + 5) % 7) - 1; // map jan 1 day of week (1=sun..7=sat, dtypes.def DOWCH type) to
// generic year starting on that day (-1=mon..-7=sun, tdpak.cpp).

// default and check daylight time start/end dates
// modified re 2007 law revision, 7-11
Expand Down
24 changes: 18 additions & 6 deletions src/cnguts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,19 @@ RC TOPRAT::tp_MainSimI() // Main hourly simulation inner routine
tp_ClearAuszFlags(); // no autosizing underway

CSE_EF( cgFazInit( false) ); // main Sim or autosize phase initialization. local function below.
// Inits autoSizing and peak-recording stuff in AH's, TU's, etc. 6-95.
// Inits autoSizing and peak-recording stuff in AH's, TU's, etc. 6-95.
CSE_EF( cgRddInit( false) ); // more init (what is repeated for each des day for autoSize). local below.
// CSE_EF: if error, return bad now.
// CSE_EF: if error, return bad now.

CSE_EF( tp_ExshRunInit()); // Penumbra external shading initialization
CSE_EF( tp_ExshRunInit()); // Penumbra external shading initialization

screen( NONL|QUIETIF, " Warmup"); // screen msg on current line (rmkerr.cpp): beg of warmup.
// Continues line started in cse.cpp.
if (wuDays > 365)
{
warn("Warmup period wuDays must be <= 365; input value (%d) changed to 365.", wuDays);
wuDays = 365;
}

tp_ebErrCount = 0; // count of short-interval energy balance errors

Expand Down Expand Up @@ -2818,7 +2823,7 @@ void TOPRAT::tp_DoDateDowStuff() // do date, day of week, and holiday stuff for
{
// get autosizing Julian day, month, mday, wday. Preset by callers: (tp_dsDayI), .tp_dsDay, .auszMon, .jDay, (.xJDay).
tddyi( tp_date, jDay, year); // convert (caller's solar) Julian date to month-day-wday.
tp_date.wday = 3; // change day of week to Wednesday during autosizing.
tp_date.wday = 3; // change day of week to Wednesday during autosizing.

// autosizing beginning of month flag, month and date strings
isBegMonth = isBegRun; // set for first repetition of a design day
Expand Down Expand Up @@ -2851,8 +2856,15 @@ void TOPRAT::tp_DoDateDowStuff() // do date, day of week, and holiday stuff for

// date: get month, mday, wday; convert to string. jDay is primary independent variable, set in tp_MainSimI().

tddyi( tp_date, jDay, year); // convert current simulation julian date to month-day, tdpak.cpp.
// sets tp_date.month (1-12), .mday (1-31), .wday (0=Sun).
// handle warmup starting in prior year
int yearX = year;
if (isWarmup && jDay > tp_begDay) // if in prior year
{ if (++yearX == 0) // move jan1 back a day: -2 (Tues) -> -1 (Mon)
yearX = -7; // handle wrap
}

tddyi( tp_date, jDay, yearX); // convert current simulation julian date to month-day, tdpak.cpp.
// sets tp_date.month (1-12), .mday (1-31), .wday (0=Sun).
dateStr = tddis( tp_date); // convert to string for rpt hdrs. tdpak.cpp.

// main sim beginning of month flag, month string, local end of month date
Expand Down
4 changes: 4 additions & 0 deletions src/tdpak.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ void tddyi( // Convert day of year to integer format date (year/month/mday/wd
idt.month = im-1;
idt.mday = doy - ( tddDoyMonBeg( idt.month) + LEAPDAY(year,idt.month)) + 1;
idt.wday = tddyw( doy, year); // day of week
#if 0
printf("\ntddyi: jDay=%d year=%d dow=%d", doy, year, idt.wday);
#endif

} // tddyi
//=======================================================================
DOY tddiy( // Convert integer date structure to day of year
Expand Down
4 changes: 2 additions & 2 deletions test/ASHP_DFNG.cse
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
nSubSteps = 6
wuDays = 15
awTrigSlr = 0.3
anTolAbs = 0.03
anTolRel = 0.003
anTolAbs = 0.0011 // airnet tolerances slightly tighter than defaults
anTolRel = 0.00009 // to verify input remains functional
auszTol = 0.05
awTrigT = 15
awTrigH = 1
Expand Down
2 changes: 0 additions & 2 deletions test/DHWDU.cse
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,6 @@ ENDDHWDAYUSE
nSubSteps = 6
wuDays = 15
awTrigSlr = 0.3
anTolAbs = 0.03
anTolRel = 0.003
auszTol = 0.05
awTrigT = 15
awTrigH = 1
Expand Down
2 changes: 0 additions & 2 deletions test/DHWLoop32U.cse
Original file line number Diff line number Diff line change
Expand Up @@ -4625,8 +4625,6 @@ ENDDHWDAYUSE
nSubSteps = 20
wuDays = 30
awTrigSlr = 0.1
anTolAbs = 0.005
anTolRel = 0.0005
auszTol = 0.01
awTrigT = 3
awTrigH = 0.3
Expand Down
2 changes: 0 additions & 2 deletions test/DHW_BRWL.cse
Original file line number Diff line number Diff line change
Expand Up @@ -4621,8 +4621,6 @@ ENDDHWDAYUSE
nSubSteps = 6
wuDays = 15
awTrigSlr = 0.3
anTolAbs = 0.03
anTolRel = 0.003
auszTol = 0.05
awTrigT = 15
awTrigH = 1
Expand Down
2 changes: 0 additions & 2 deletions test/DHW_MFSizing.cse
Original file line number Diff line number Diff line change
Expand Up @@ -9312,8 +9312,6 @@ ENDDHWDAYUSE
nSubSteps = 6
wuDays = 15
awTrigSlr = 0.3
anTolAbs = 0.03
anTolRel = 0.003
auszTol = 0.05
awTrigT = 15
awTrigH = 1
Expand Down
2 changes: 0 additions & 2 deletions test/FanCoil.cse
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@
nSubSteps = 6
wuDays = 15
awTrigSlr = 0.3
anTolAbs = 0.03
anTolRel = 0.003
auszTol = 0.05
awTrigT = 15
awTrigH = 1
Expand Down
2 changes: 0 additions & 2 deletions test/MF8X.cse
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@
nSubSteps = 10
wuDays = 30
awTrigSlr = 0.1
anTolAbs = 0.005
anTolRel = 0.0005
auszTol = 0.01
awTrigT = 3
awTrigH = 0.3
Expand Down
2 changes: 0 additions & 2 deletions test/Multifamily-DOAS.cse
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
nSubSteps = 20
wuDays = 30
awTrigSlr = 0.1
anTolAbs = 0.005
anTolRel = 0.0005
auszTol = 0.01
awTrigT = 3
awTrigH = 0.3
Expand Down
2 changes: 0 additions & 2 deletions test/ashpvc2.cse
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@
nSubSteps = 6
wuDays = 15
awTrigSlr = 0.3
anTolAbs = 0.03
anTolRel = 0.003
auszTol = 0.05
awTrigT = 15
awTrigH = 1
Expand Down
2 changes: 0 additions & 2 deletions test/chdhw.cse
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@
nSubSteps = 6
wuDays = 15
awTrigSlr = 0.3
anTolAbs = 0.03
anTolRel = 0.003
auszTol = 0.05
awTrigT = 15
awTrigH = 1
Expand Down
2 changes: 0 additions & 2 deletions test/dhw_aquathermaire.cse
Original file line number Diff line number Diff line change
Expand Up @@ -1135,8 +1135,6 @@ ENDDHWDAYUSE
nSubSteps = 6
wuDays = 15
awTrigSlr = 0.3
anTolAbs = 0.03
anTolRel = 0.003
auszTol = 0.05
awTrigT = 15
awTrigH = 1
Expand Down
2 changes: 0 additions & 2 deletions test/dhw_dr.cse
Original file line number Diff line number Diff line change
Expand Up @@ -4589,8 +4589,6 @@ ENDDHWDAYUSE
nSubSteps = 6
wuDays = 15
awTrigSlr = 0.3
anTolAbs = 0.03
anTolRel = 0.003
auszTol = 0.05
awTrigT = 15
awTrigH = 1
Expand Down
Loading