More calibrations
This commit is contained in:
+23
-18
@@ -377,15 +377,12 @@ export function calcManagedIndoorTempPass(TaArr, globArr, elevArr, buildingType
|
||||
// Panel surface temp - conductive gain into cabin air.
|
||||
//
|
||||
// 2. VERTICAL GLAZING GAIN (sun-angle dependent)
|
||||
// When solar elevation is between ~10- and ~60-, the sun's rays
|
||||
// cut through the side glass and windscreen at an angle that allows
|
||||
// significant transmission into the cabin. This warms the cabin air
|
||||
// but the occupant is modelled as NOT sitting in the beam -
|
||||
// so it adds to ambient cabin temp, not direct radiant load.
|
||||
// Outside that window a diffuse floor still applies: scattered sky
|
||||
// light enters the glass at any sun angle, so the tent function is
|
||||
// clamped rather than switched off (an unclamped tent produced a
|
||||
// discontinuity where a LOWER sun gave MORE glazing gain).
|
||||
// Sun cuts through the side glass and windscreen and warms the cabin
|
||||
// air, but the occupant is modelled as NOT sitting in the beam - so it
|
||||
// adds to ambient cabin temp, not direct radiant load. The beam on
|
||||
// vertical glass goes as cos(elevation) averaged over azimuth, over a
|
||||
// diffuse floor that applies at any sun angle. A parked vehicle is not
|
||||
// aimed at the sun, so only orientFactor of the glazing is catching it.
|
||||
//
|
||||
// 3. HORIZONTAL GLAZING GAIN (rooflights / panoramic roofs)
|
||||
// Rooflights collect most strongly when the sun is high - the exact
|
||||
@@ -442,16 +439,24 @@ export function calcVehicleInteriorTemp(Ta, globalRad, solElev, vehicleType = 'c
|
||||
|
||||
// -- 2. Vertical glazing gain (angle-dependent) --------------------
|
||||
// Glazing transmission for auto glass ~0.70; scaled by vehicle glazing area.
|
||||
// Tent function peaks at 35- elevation, where the sun cuts squarely through
|
||||
// side glass and windscreen, and tapers either side. It is clamped at 0.30
|
||||
// (= the 0.15 diffuse floor once the 0.5 not-in-beam factor is applied) so
|
||||
// scattered sky light always gets in. Without that clamp the gain fell to
|
||||
// zero at 10- and 60- and then jumped back up outside the range.
|
||||
//
|
||||
// The beam landing on VERTICAL glass goes as cos(elevation) once averaged
|
||||
// over azimuth, plus a diffuse floor of scattered sky light that gets in at
|
||||
// any sun angle. orientFactor then accounts for the glazing that is NOT
|
||||
// pointing at the sun - a parked vehicle is not aimed, and a motorhome's
|
||||
// windscreen faces wherever it happened to park.
|
||||
//
|
||||
// This replaced a tent function that peaked at 35- elevation. That shape
|
||||
// assumed the glass was always squarely aimed at the sun, so its factor
|
||||
// nearly TRIPLED between 3pm and 5pm as the sun dropped toward the peak -
|
||||
// sending a ventilated van climbing to +9 over ambient in the late
|
||||
// afternoon when the measured excess stays flat around +5..6. It also had
|
||||
// a discontinuity at its 10-/60- cut-offs where a LOWER sun gave MORE gain.
|
||||
const tau = 0.70 * preset.glazingArea;
|
||||
const tent = (solElev != null && solElev > 0)
|
||||
? Math.max(0, 1 - Math.abs(solElev - 35) / 25)
|
||||
: 0;
|
||||
const glazingGain = tau * globalRad * Math.max(0.30, tent) * 0.5; // occupant not in beam
|
||||
const angleFactor = (solElev != null && solElev > 0)
|
||||
? 0.30 + 0.70 * Math.cos(solElev * Math.PI / 180)
|
||||
: 0.30;
|
||||
const glazingGain = tau * globalRad * angleFactor * (preset.orientFactor ?? 0.65) * 0.5;
|
||||
|
||||
// -- 3. Horizontal glazing gain (rooflights, panoramic roof) -------
|
||||
// Rooflights collect in proportion to sin(elevation), so they peak at midday
|
||||
|
||||
Reference in New Issue
Block a user