3.2.1.3
Tweaked shade calc Updated About and FAQ sections
This commit is contained in:
+25
-16
@@ -12,7 +12,7 @@
|
||||
// calcIndoorTempPass(TaArr, globArr, elevArr, buildingType) passive indoor temp
|
||||
// calcManagedIndoorTempPass(TaArr, globArr, elevArr, buildingType) managed indoor temp
|
||||
// calcVehicleInteriorTemp(Ta, globalRad, solElev, vehicleType, ventilated, speedMph)
|
||||
// calcShadeAirTemp(Ta, effectiveRad, va, elev, shade) per-env shade air temp
|
||||
// calcShadeAirTemp(TaEnv, effRadEnv, va, elev, shade) per-env shade air temp
|
||||
// vaporPressureHpa(Ta, RH) Magnus formula - hPa
|
||||
// solarElevationDeg(lat, lon, dateUTC) NOAA simplified solar position (-)
|
||||
// calcTmrt(Ta, dirRad, diffRad, globalRad, solElev) Mean radiant temperature
|
||||
@@ -476,21 +476,25 @@ export function calcVehicleInteriorTemp(Ta, globalRad, solElev, vehicleType = 'c
|
||||
// Estimates the AIR temperature you'd actually experience sitting in
|
||||
// the typical shade of the selected Solar Model - NOT the felt temp.
|
||||
//
|
||||
// The official Air column is the standardised open-ground, 2 m,
|
||||
// shaded-screen value for a ~2 km model grid cell. A real sitting
|
||||
// spot is a sheltered sun-trap: surrounding surfaces (walls, sand,
|
||||
// rock) re-radiate heat into the still air pocket, while wind mixing
|
||||
// pulls the pocket back toward the official reading. The kind of
|
||||
// shelter and the heat of the surroundings differ by environment,
|
||||
// which is what the per-env `shade` block captures.
|
||||
// Baseline: this builds on the SAME environment air temp that SunSoak
|
||||
// uses - TaEnv = Ta + env.taOffset - so every Solar Model's air-temp
|
||||
// shift (urban heat island, forest/river evapotranspiration cooling,
|
||||
// desert baking) flows through here automatically and the two columns
|
||||
// can never drift out of sync. On top of that env baseline we add only
|
||||
// the LOCAL sun-trap effects: surrounding surfaces (walls, sand, rock)
|
||||
// re-radiate heat into the still air pocket, while wind mixing pulls
|
||||
// the pocket back toward the ambient reading. Crucially the sun-trap
|
||||
// warming is driven by the environment-REDUCED radiation, so a forest
|
||||
// canopy shades the sun-trap just as it shades the person.
|
||||
//
|
||||
// IMPORTANT: this is an air-temperature nudge, deliberately gentle.
|
||||
// The radiant load of direct sun is already handled by Tmrt/SunSoak,
|
||||
// so we do NOT re-add it here - that would double-count the sun.
|
||||
//
|
||||
// shade.offset - base air-temp delta for this environment's shade (-C).
|
||||
// Warmer for urban/desert (heat island, baking ground),
|
||||
// cooler for river/forest (evaporative, canopy shade).
|
||||
// The environment air-temp shift is NOT re-specified here - it lives in
|
||||
// env.taOffset and reaches us via the TaEnv passed in as `Ta`. The shade
|
||||
// block only carries the two local micro-effects:
|
||||
//
|
||||
// shade.shelter - 0-1 wind shelter. High = enclosed (canyon, canopy),
|
||||
// so wind mixing has little effect. Low = breezy
|
||||
// (open water, single beach umbrella).
|
||||
@@ -500,8 +504,13 @@ export function calcVehicleInteriorTemp(Ta, globalRad, solElev, vehicleType = 'c
|
||||
// still air warms on a sunny hour.
|
||||
//
|
||||
// Behaviour: a calm sunny hour in a sheltered, sun-baked environment
|
||||
// reads a degree or two above official Air; a windy or overcast hour
|
||||
// collapses back toward it.
|
||||
// reads a degree or two above the environment air temp; a windy or
|
||||
// overcast hour collapses back toward it. Cooling models (forest,
|
||||
// river) sit below official Air because their taOffset already has.
|
||||
//
|
||||
// TaEnv - environment air temp (Ta + env.taOffset), the shared
|
||||
// SunSoak baseline. Passed in as the `Ta` argument.
|
||||
// effectiveRad - environment-REDUCED radiation reaching the sun-trap.
|
||||
// -------------------------------------------------------------------
|
||||
export const SHADE_K_SUN = 1.5; // surface-warming strength (per full-sun, fully sun-baked)
|
||||
export const SHADE_K_WIND = 0.15; // wind-mixing strength (per m/s, fully exposed)
|
||||
@@ -512,9 +521,9 @@ export function calcShadeAirTemp(Ta, effectiveRad, va, elev, shade) {
|
||||
const daytime = (elev != null && elev > 0) ? 1 : 0;
|
||||
const sunTerm = SHADE_K_SUN * (shade.sun ?? 0) * rad * daytime;
|
||||
const windTerm = SHADE_K_WIND * (1 - (shade.shelter ?? 0)) * Math.max(0, va || 0);
|
||||
const adj = (shade.offset ?? 0) + sunTerm - windTerm;
|
||||
// Keep the nudge sane - this is air temp, not a felt-temp delta.
|
||||
return Ta + Math.max(-5, Math.min(6, adj));
|
||||
const adj = sunTerm - windTerm;
|
||||
// Local sun-trap nudge only - the env air-temp shift is already in Ta.
|
||||
return Ta + Math.max(-4, Math.min(5, adj));
|
||||
}
|
||||
|
||||
// -- FUTURE FEATURE v2: Pets Profile - Fur Temperature & Heat Stress ----------
|
||||
|
||||
Reference in New Issue
Block a user