Beta 7
New columns and title popups Click scroll
This commit is contained in:
@@ -165,6 +165,73 @@ export function calcIndoorTempPass(TaArr, globArr, elevArr) {
|
||||
return result;
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// UK HOUSE INDOOR TEMPERATURE — MANAGED (curtains closed, windows open)
|
||||
// ───────────────────────────────────────────────────────────────────
|
||||
// Models the same UK brick house as calcIndoorTempPass but with two
|
||||
// behavioural interventions that reflect standard heatwave advice:
|
||||
//
|
||||
// 1. CURTAINS CLOSED
|
||||
// Thick curtains block ~80% of window solar gain before it enters
|
||||
// the room. The small remaining fraction is diffuse light through
|
||||
// the curtain fabric. Wall conduction is unchanged.
|
||||
//
|
||||
// 2. WINDOWS OPEN (smart ventilation)
|
||||
// When outdoor air is cooler than the indoor air, windows are open
|
||||
// and a ventilation heat exchange pulls the indoor temp toward
|
||||
// outdoor. When outdoor is hotter than indoor, windows are kept
|
||||
// shut — so this strategy never makes things worse, only better.
|
||||
// Ventilation rate ~2 air changes/hour for a well-opened house.
|
||||
//
|
||||
// Same thermal lag model as calcIndoorTempPass (4 h brick time constant).
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
export function calcManagedIndoorTempPass(TaArr, globArr, elevArr) {
|
||||
const n = TaArr.length;
|
||||
const result = new Array(n);
|
||||
|
||||
const uWall = 0.35;
|
||||
const lagHours = 4;
|
||||
const alpha = 1 - Math.exp(-1 / lagHours);
|
||||
|
||||
// Curtain factor: blocks 80% of solar gain
|
||||
const curtainBlock = 0.80;
|
||||
|
||||
// Ventilation blending weight per hour when windows are open
|
||||
// ~2 ACH for a well-ventilated house → meaningful but not instant pull
|
||||
const ventAlpha = 0.25;
|
||||
|
||||
let Ti = TaArr[0] ?? 15;
|
||||
|
||||
for (let i = 0; i < n; i++) {
|
||||
const Ta = TaArr[i] ?? Ti;
|
||||
const glob = globArr[i] ?? 0;
|
||||
|
||||
// Solar gain — curtains block 80%
|
||||
const glazingRatio = 0.16;
|
||||
const gValue = 0.63;
|
||||
const orientFactor = 0.50;
|
||||
const solarGain = glob * glazingRatio * gValue * orientFactor * (1 - curtainBlock);
|
||||
|
||||
// Wall conduction (unchanged)
|
||||
const conductionGain = uWall * (Ta - Ti);
|
||||
|
||||
const heatCapProxy = 0.15;
|
||||
const Ti_instant = Ti + (conductionGain + solarGain) * heatCapProxy;
|
||||
|
||||
// Apply thermal lag
|
||||
Ti = Ti + alpha * (Ti_instant - Ti);
|
||||
|
||||
// Smart ventilation: only open windows when outside is cooler
|
||||
if (Ta < Ti) {
|
||||
Ti = Ti + ventAlpha * (Ta - Ti);
|
||||
}
|
||||
|
||||
result[i] = Math.max(Math.min(Ti, 55), Math.min(Ta, Ti));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// VEHICLE INTERIOR CABIN TEMPERATURE (seated occupant, not in sunbeam)
|
||||
// ───────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user