Core physics and HVAC formulas used in the ThermoNeural application.
This skill contains the authoritative formulas used in the application. Refer to this when implementing new calculators or verifying existing logic.
Used for charging fixed orifice systems (pistons/capillary tubes).
Formula:
Target SH = ((3 * IndoorWB) - 80 - OutdoorDB) / 2
Constraints:
Source: standard industry formula (Emerson/Copeland approved method).
Calculates the density of air at altitude to determine system capacity loss (derating).
Key Constants:
Steps:
Pressure at Altitude (Barometric Formula): $$ P = P_0 \cdot (1 - \frac{L \cdot h}{T_0}) ^ \frac{g \cdot M}{R \cdot L} $$
Saturation Vapor Pressure ($E_s$) (Magnus Formula): $$ E_s = 6.112 \cdot e^{\frac{17.67 \cdot T_c}{T_c + 243.5}} \text{ (hPa)} $$
Density ($\rho$): Derived effectively using Partial Pressure of Dry Air ($P_d$) and Vapor ($P_v$).
Derating Impact: $$ \text{Impact %} = (1 - \frac{\rho_{actual}}{1.225}) \cdot 100 $$ (Where 1.225 kg/m³ is standard sea-level density).
Dew Point ($T_{dp}$): Calculated using the Magnus formula inversion involving Natural Log of Vapor Pressure.
Wet Bulb ($T_{wb}$): Uses the "Stull" formula (arctangent approximation) as it is computationally efficient for code:
Tw = T * atan(0.151977 * sqrt(RH + 8.313659)) + ...
For calculating max charge of mildly flammable refrigerants (e.g., R32, R454B).
Primary Variables:
Logic: Max charge ($m_{max}$) is derived based on checking if the charge concentration would exceed safety factors of the LFL if leaked into the room volume.
Refer to lib/calculators/a2l.ts for the full specific implementation of the chart lookup/formula.