Skip to content

fix: [Phase B.2] Fix thermal mass time constant calculation (#665)#676

Merged
anchapin merged 2 commits into
mainfrom
fix/issue-665-thermal-mass-time-constant
May 6, 2026
Merged

fix: [Phase B.2] Fix thermal mass time constant calculation (#665)#676
anchapin merged 2 commits into
mainfrom
fix/issue-665-thermal-mass-time-constant

Conversation

@anchapin
Copy link
Copy Markdown
Owner

@anchapin anchapin commented May 6, 2026

Fixes #665

Summary

Disabled the empirically-derived 6R2C correction factors (5.2 for time constant, 1.74 for cooling sensitivity) that were papering over calculation errors in the thermal mass time constant formula.

Changes

  • Set time_constant_sensitivity_correction_6r2c = 1.0 (disabled empirical correction)
  • Set cooling_sensitivity_correction_6r2c = 1.0 (disabled empirical correction)
  • Added new test file: tests/thermal_mass_time_constant_validation.rs

Technical Background

The thermal time constant is calculated as: τ = Cm / (h_tr_ms + h_tr_em)

  • Cm = thermal capacitance (from ISO 13790 effective capacitance per area)
  • h_tr_ms = conductance from thermal mass to interior surface
  • h_tr_em = conductance from exterior to thermal mass

ISO 13790 specifies:

  • Heavy mass: τ ≈ 26+ hours
  • Low mass: τ ≈ 4-8 hours

The 5.2 and 1.74 correction factors were empirically derived calibration constants, not physics-based. Per issue #665, these were papering over errors in the h_tr_ms calculation.

Test Results

All 4 new tests pass:

  • test_6r2c_correction_factors_disabled: PASS
  • test_high_mass_time_constant: PASS (τ = 26.3 hours)
  • test_low_mass_time_constant: PASS (τ = 4.2 hours)
  • test_time_constant_reasonable_for_mass_class: PASS

All 2399 library tests pass.

- Disabled empirically-derived 6R2C correction factors (5.2, 1.74)
- These factors were papering over calculation errors in h_tr_ms
- Now using physics-based values directly

Issue #665
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @anchapin, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@anchapin anchapin merged commit 265da65 into main May 6, 2026
34 checks passed
@anchapin anchapin deleted the fix/issue-665-thermal-mass-time-constant branch May 6, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Phase B.2] Fix thermal mass time constant calculation

2 participants