diff --git a/docs/calculation_differences.md b/docs/calculation_differences.md index db199e1..df9b52c 100644 --- a/docs/calculation_differences.md +++ b/docs/calculation_differences.md @@ -33,6 +33,7 @@ Nextの製品版は[`jjjexperiment/release.py`](../packages/pyhees-jjj/src/jjjex | BRI-01 | 冷房時の居室・非居室間の間仕切熱移動の符号 | `+Q_trs` | `+Q_trs` | 既定OFFは`+Q_trs`、①をONにすると全経路で`-Q_trs` | | BRI-02 | 全般換気なし時も区画別全般換気量を給気下限に使用 | 使用する | 使用する。最低風量直接入力時は過大値が拡大 | 既定OFFは建研式、②をONにすると換気下限と設備最低風量を分離 | | VP-01 | RAC活用型の冷房SHFに用いる負荷 | 該当モデルなし(ダクト式は負荷バランス後) | 負荷バランス前のRAC負荷 | 負荷バランス後の全館空調負荷 | +| VP-02 | RAC活用型暖房のデフロスト補正の責務 | 該当モデルなし | ダクト式とRACの係数が重複 | RACの$C_{af}$と$C_{df}$だけをRAC消費電力モデルで適用 | BRI-01とBRI-02の既定値はOFFである。建研本家との比較照合ではOFF、物理的に正しいと 判断した方法を使う計算ではONにする。①と②は独立して選択できる。 @@ -234,6 +235,7 @@ Nextでは、次の二つを別の物理量として扱う。 | VAVあり・全般換気なし | サーモOFF・小負荷時の設備下限が不明確 | ②ONでは暖冷房期に設備最低風量を明示的に保証 | | 全般換気なしの中間期 | 給気またはファン電力が残る経路がある | 給気・ファン電力とも0 | | RAC活用型の冷房SHF | 負荷バランス前の`L_CS`、`L_CL`から算定 | 負荷バランス後の`L_star_CS`、`L_star_CL`から算定 | +| RAC活用型暖房のデフロスト | ダクト式$C_{df}$で補正済みの能力へRAC式$C_{df}$を重ねて適用 | ダクト式補正をRAC入力境界で戻し、RAC式$C_{af}$・$C_{df}$のみ適用 | ### 6.1 VP-01:RAC活用型の冷房SHF @@ -273,6 +275,105 @@ $Q_{\max,CS}$と$Q_{\max,CL}$だけに上記SHFと補正潜熱負荷を使う。 この差は冷房の顕潜熱配分だけに生じる。暖房にはSHFによる顕熱・潜熱分割がなく、 RACの最大暖房能力をそのまま熱源上限へ使うため、同種の問題はない。 +### 6.2 VP-02:RAC活用型暖房のデフロスト補正 + +RAC活用型は、空気側の負荷・風量・温度をダクト式の計算で求め、 +消費電力だけをRACモデルで評価する。ダクト式の平均暖房能力計算は、 +空気側で実際に搬送された熱量$q_{air}$をダクト式のデフロスト係数で除している。 + +```math +q_{hs,duct}=\frac{q_{air}}{C_{df,duct}} +``` + +修正前は、この$q_{hs,duct}$をRACの暖房負荷として渡した後、RACモデル内で +RAC専用の風量補正$C_{af,rac}$とデフロスト補正$C_{df,rac}$を適用していた。 +そのため、両方が0.77となる時刻では、機器種別の異なる補正が同じRAC評価へ重なっていた。 + +修正後はRAC消費電力の入力境界で次のようにダクト式補正を戻す。 + +```math +L_{H,rac}=q_{hs,duct}C_{df,duct}=q_{air} +``` + +その後、RACモデルが$C_{af,rac}$と$C_{df,rac}$を1回だけ適用する。 +これにより、RAC活用型の暖房消費電力はダクト式の以下の3入力から独立する。 + +- `C_df_H_d_t_defrost_ductcentral` +- `defrost_temp_ductcentral` +- `defrost_humid_ductcentral` + +一方、RAC側の同等の3入力は引き続きRAC活用型の暖房消費電力に影響する。 +RAC活用型の空気搬送計算で使う`Q_hs_max_H_d_t`は、RACの最大能力式で +$C_{af,rac}$と$C_{df,rac}$を適用した上限である。今回修正するのは、その上限内で +実際に空気が搬送した熱量をRAC消費電力モデルへ渡す境界であり、上限式自体は変更しない。 + +検証者から受領した地域2・等級5・RAC活用型条件の年間値は次のとおりである。 + +| 状態 | 暖房一次エネルギー [MJ/年] | 冷房一次エネルギー [MJ/年] | +| --- | ---: | ---: | +| ver.1.3.0修正前 | 84,222.243989 | 2,010.059118 | +| VP-02修正後 | 70,154.484309 | 2,010.059118 | +| 受領Excelのキャッシュ値 | 74,958.287610 | 2,010.059118と報告 | + +VP-02修正により14,067.759679 MJ/年(約16.7%)低下する。ただし、Excel報告値とは +4,803.803301 MJ/年の残差がある。このため、本修正は「デフロスト補正の責務重複を解消」 +するものであり、現状Excelのキャッシュ値への一致を意味しない。 + +#### 6.2.1 受領Excelの追跡結果 + +比較対象は次のファイルである。 + +- ファイル名:`第4章第2節ダクト式全館空調_VAV確認済_260816_RAC冷暖房統合.xlsm` +- SHA-256:`0769AF8132D3463A70C3A2B3724183326EA328EE03C4AD4F7B2AFF4D2C65C565` +- 受領日:2026-08-20 + +受領Excelの年間暖房値74,958.287610 MJ/年は、次の内訳から再現できる。 + +| 項目 | Excelセル・範囲 | 値 | +| --- | --- | ---: | +| RAC圧縮機電力量 | `インプット!S19 = SUM(計算過程_HT!F8:F8767)` | 6,808.075834 kWh/年 | +| 送風機電力量 | `インプット!S20 = SUM(計算過程_HT!AF8:AF8767)` | 303.312287 kWh/年 | +| 電力の一次エネルギー | `インプット!S22 = (S19+S20)×9.76` | 69,407.148055 MJ/年 | +| 未処理暖房負荷 | `インプット!U19 = 負荷計算!GX1` | 3,802.150380 MJ/年 | +| 未処理負荷の一次エネルギー | `インプット!U22 = U19×1.46` | 5,551.139555 MJ/年 | +| 合計 | `インプット!V22 = S22+U22` | 74,958.287610 MJ/年 | + +8760時間系列を照合すると、外気温、ダクト側$C_{df}$、全般換気量および送風機電力は +Nextと一致した。送風機電力量303.312286815 kWh/年は全時刻で一致している。 +一方、受領Excelには次の二つの内部不整合がある。 + +1. **RACシートだけ別の相対湿度系列を使用している。** + `計算過程_HT!Y8:Y8767`は`AL8:AL8767`を参照するが、`AL`列は値貼付けで数式がない。 + これに対し、空気搬送計算は`負荷計算!AZ5:AZ8764`で同じ外気データから相対湿度を + 計算している。両列は8760時間すべて異なり、最初の時刻は72.521355%と90.375285%である。 + 外気温は両経路とも-6.9℃で一致するため、この差でRACデフロスト判定が変わる。 +2. **RAC消費電力へダクト式補正後の能力を渡している。** + `計算過程_HT!AM8:AM8767`は`付録A!E5:E8764×3.6/1000`である。 + `付録A!E`は空気搬送熱量を`負荷計算!DQ`(ダクト式$C_{df}$)で除した + $q_{hs,duct}$であり、さらに`計算過程_HT!S`で$C_{af,rac}C_{df,rac}$により除される。 + したがって、機器種別の異なる補正がRAC消費電力評価へ重なる。 + +なお、`負荷計算!HC`の「最大暖房出力にデフロストをもう一度乗じた係数」は +`HC1 = SUM(HC5:HC8764)`以外から参照されない検算列であり、年間値74,958.287610 MJ/年の +直接の計算経路には入っていない。 + +Excelの式を、Excel側の負荷・相対湿度系列を使ってPythonで再構成したところ、 +`計算過程_HT!F8:F8767`の全8760値と浮動小数点精度で一致した。従って残差は +RAC式の実装差ではなく、Excelが使う入力系列と補正境界の差で説明できる。 + +ExcelをVP-02と同じ責務へ直す場合は、少なくとも次を同時に行って再計算する必要がある。 + +1. RAC側相対湿度を`負荷計算!AZ`と同じ気象データ・式から求める。 +2. RAC消費電力へ渡す負荷を$q_{hs,duct}$ではなく、 + $q_{air}=q_{hs,duct}C_{df,duct}$とする。 +3. RAC最大能力と空気搬送計算も、同じ外気温・相対湿度系列から求める。 + +この3点を別々に変更すると、能力上限、処理負荷、未処理負荷の責務が再びずれるため、 +Excel側も一括して再計算・照合する。 + +Phase 5のRAC代表ケースでは、年間暖房値と、デフロスト影響時刻224時間の +`E_H_d_t`・`E_E_H_d_t`だけが変化した。ダクト式代表ケース、冷房系列、入力条件は不変である。 + 床下計算全体に関する旧版・Excel床下13・Excel床下14との差は、 [`underfloor_ac_seven_changes.md`](underfloor_ac_seven_changes.md)および [`underfloor_ac_excel_alignment.md`](underfloor_ac_excel_alignment.md)に記録している。 @@ -287,6 +388,8 @@ RACの最大暖房能力をそのまま熱源上限へ使うため、同種の | 全般換気なし・最低風量160/420 m3/h | [`test_section4_2_preparation.py`](../tests/test_section4_2_preparation.py#L923-L1001) | | VAVあり・全般換気なし | [`test_section4_2_preparation.py`](../tests/test_section4_2_preparation.py#L1004-L1031) | | RAC活用型冷房の負荷バランス後SHF | [`test_section4_2_preparation.py`](../tests/test_section4_2_preparation.py) | +| RAC活用型とダクト式デフロスト係数の分離 | [`test_not_broken_type2.py`](../packages/pyhees-jjj/src/tests/test_not_broken_type2.py) | +| 地域2・等級5・RAC活用型の年間回帰 | [`test_type2_defrost_responsibility.py`](../packages/pyhees-jjj/src/tests/test_type2_defrost_responsibility.py) | ver.1.0.2リリース時には、全体pytest、Phase 5、Excel床下14 Golden、 計算エンジン内部試験、RuffおよびGitHub Actionsの成功を確認している。 diff --git "a/packages/pyhees-jjj/docs/\350\250\210\347\256\227\343\203\225\343\203\255\343\203\274_\343\202\277\343\202\244\343\203\2271\343\203\2732.md" "b/packages/pyhees-jjj/docs/\350\250\210\347\256\227\343\203\225\343\203\255\343\203\274_\343\202\277\343\202\244\343\203\2271\343\203\2732.md" index 1f3e86d..ee4bef6 100644 --- "a/packages/pyhees-jjj/docs/\350\250\210\347\256\227\343\203\225\343\203\255\343\203\274_\343\202\277\343\202\244\343\203\2271\343\203\2732.md" +++ "b/packages/pyhees-jjj/docs/\350\250\210\347\256\227\343\203\225\343\203\255\343\203\274_\343\202\277\343\202\244\343\203\2271\343\203\2732.md" @@ -493,7 +493,7 @@ style Add fill:#e1ffe1 | **送風機電力計算** | **風量比例(換気補正あり)、P_fan_rtd = カタログ値** | **同左、ただし P_fan_rtd = V_hs_dsgn × f_SFP で算出** | | **圧縮機電力計算** | **理論効率 × 効率比** | **基準入出力関数(表ベース)** | | 容量制御 | 定格・中間・最小の3点 | 連続可変(dualcompressor時) | -| デフロスト補正 | 条件時のみ適用(外気温 < 5℃ かつ 相対湿度 > 80%)、デフォルト値 0.77(変更可) | 同左 | +| デフロスト補正 | ダクトセントラル専用の$C_{df,duct}$を適用 | RAC専用の$C_{df,rac}$を適用。ダクト式係数はRAC消費電力に重ねない | | 風量補正 | C_af (専用室・風向固定) | C_af (専用室・風向固定) | | 特性曲線 | ヒートポンプサイクル理論 | JIS試験データベース | @@ -504,3 +504,4 @@ style Add fill:#e1ffe1 - 2026-01-30: 初版作成(暖房・冷房統合版) - 2026-02-07: Type 2 (ルームエアコン) の処理フローを追加 - 2026-03-02: ドキュメントの説明文を修正 +- 2026-08-19: タイプ2のRAC暖房にダクト式デフロスト補正を重ねない責務境界を追記 diff --git a/packages/pyhees-jjj/src/jjjexperiment/main.py b/packages/pyhees-jjj/src/jjjexperiment/main.py index db144d3..b8e4f92 100644 --- a/packages/pyhees-jjj/src/jjjexperiment/main.py +++ b/packages/pyhees-jjj/src/jjjexperiment/main.py @@ -577,14 +577,36 @@ def _get_heating_electricity_type1_and_type3(heat_ac_setting, E_E_fan_H_d_t, q_h ) ) -def _get_heating_electricity_type2(heat_ac_setting, house, climateFile, E_E_fan_H_d_t, q_hs_H_d_t, heat_CRAC, cool_CRAC): +def _get_type2_rac_heating_load(q_hs_H_d_t, climate): + """Return delivered heat before the duct-central defrost correction. + + ``dc_a.get_q_hs_H_d_t`` returns the heat-source average capacity after + dividing the air-side heat by the duct-central defrost coefficient. The + type-2 RAC model accepts an uncorrected heating load and applies its own + RAC-specific ``C_af`` and ``C_df``. Undo the duct-central correction at + this boundary so the two equipment-specific coefficients do not overlap. + """ + return q_hs_H_d_t * climate.get_C_df_H_d_t() + + +def _get_heating_electricity_type2( + heat_ac_setting, + house, + climateFile, + climate, + E_E_fan_H_d_t, + q_hs_H_d_t, + heat_CRAC, + cool_CRAC, +): + rac_heating_load_d_t = _get_type2_rac_heating_load(q_hs_H_d_t, climate) return jjj_dc_a.calc_E_E_H_d_t_type2( *_HeatingType2ElectricityInputs( heat_ac_setting.type, house.region, climateFile, E_E_fan_H_d_t, - q_hs_H_d_t, + rac_heating_load_d_t, heat_CRAC.e_rtd, heat_CRAC.q_rtd, cool_CRAC.q_rtd, @@ -650,6 +672,7 @@ def _select_heating_electricity( heat_ac_setting, house, climateFile, + climate, E_E_fan_H_d_t, q_hs_H_d_t, heat_CRAC, diff --git a/packages/pyhees-jjj/src/test_utils/input_region2_grade5_type2.json b/packages/pyhees-jjj/src/test_utils/input_region2_grade5_type2.json new file mode 100644 index 0000000..4a4cbf8 --- /dev/null +++ b/packages/pyhees-jjj/src/test_utils/input_region2_grade5_type2.json @@ -0,0 +1,119 @@ +{ + "case_name": "region2_grade5_type2_regression", + "climateFile": "-", + "loadFile": "-", + "Theta_hs_out_max_H_d_t_limit": 45, + "Theta_hs_out_min_C_d_t_limit": 15, + "C_df_H_d_t_defrost_ductcentral": 0.77, + "defrost_temp_ductcentral": 5, + "defrost_humid_ductcentral": 80, + "phi_i": 0.49, + "C_V_fan_dsgn_H": 0.79, + "C_V_fan_dsgn_C": 0.79, + "C_df_H_d_t_defrost_rac": 0.77, + "defrost_temp_rac": 5, + "defrost_humid_rac": 80, + "C_hm_C": 1.15, + "q_rtd_C_limit": 5600, + "change_supply_volume_before_vav_adjust": "1", + "change_heat_source_outlet_required_temperature": "1", + "change_V_supply_d_t_i_max": 1, + "A_A": 120.08, + "A_MR": 29.81, + "A_OR": 51.34, + "region": 2, + "A_env": 307.51, + "U_A": 0.4, + "eta_A_C": 1.9, + "eta_A_H": 2.3, + "underfloor_ventilation": "1", + "r_A_ufvnt": 100, + "underfloor_insulation": "1", + "hs_CAV": "1", + "underfloor_air_conditioning_air_supply": "1", + "change_underfloor_temperature": "1", + "R_g": 0.15, + "input_ufac_consts": 1, + "Theta_g_avg": 15.7, + "U_s_vert": 2.223, + "phi": 0.846, + "carry_over_heat": 1, + "C1_BR_R_i": [893676, 500835, 400667, 325488, 325598], + "C1_NR_R": 1195534, + "H_A": { + "type": 2, + "duct_insulation": 1, + "VAV": 1, + "general_ventilation": 1, + "input_V_hs_dsgn": 1, + "V_hs_dsgn": 1500, + "subtract_ventilation_power": 1, + "input_V_hs_min": 1, + "V_hs_min": 1200, + "input_E_E_fan_min": 1, + "E_E_fan_logic": 1, + "E_E_fan_min": 100, + "input": 1, + "input_f_SFP": 1, + "input_C_af_H2": 1, + "dedicated_chamber2": 1, + "fixed_fin_direction2": 1, + "input_C_af_H3": 1, + "dedicated_chamber3": 1, + "fixed_fin_direction3": 1, + "input_C_af_H4": 1, + "dedicated_chamber4": 1, + "fixed_fin_direction4": 1, + "C_af_H2": 0, + "input_rac_performance": 1, + "q_rac_rtd_H": 2.2, + "q_rac_max_H": 3.3, + "e_rac_rtd_H": 0, + "dualcompressor": 1, + "f_SFP": 0.144, + "input_mode": 1, + "mode": 3, + "correct_cooling_partition_heat_transfer": 1, + "correct_no_general_ventilation_airflow": 1 + }, + "C_A": { + "type": 2, + "duct_insulation": 1, + "VAV": 1, + "general_ventilation": 1, + "input_V_hs_dsgn": 1, + "V_hs_dsgn": 1500, + "subtract_ventilation_power": 1, + "input_V_hs_min": 1, + "V_hs_min": 1200, + "input_E_E_fan_min": 1, + "E_E_fan_logic": 1, + "E_E_fan_min": 100, + "input": 1, + "input_mode": 1, + "input_f_SFP": 1, + "input_C_af_C2": 1, + "dedicated_chamber2": 1, + "fixed_fin_direction2": 1, + "input_C_af_C3": 1, + "dedicated_chamber3": 1, + "fixed_fin_direction3": 1, + "input_C_af_C4": 1, + "dedicated_chamber4": 1, + "fixed_fin_direction4": 1, + "C_af_C2": 0, + "mode": 3, + "input_rac_performance": 1, + "q_rac_rtd_C": 0, + "q_rac_max_C": 0, + "e_rac_rtd_C": 0, + "dualcompressor": 1, + "f_SFP": 0.144, + "correct_cooling_partition_heat_transfer": 1, + "correct_no_general_ventilation_airflow": 1 + }, + "HEX": { + "install": 1, + "etr_t": 0.4 + } +} diff --git a/packages/pyhees-jjj/src/test_utils/utils.py b/packages/pyhees-jjj/src/test_utils/utils.py index 98bbff0..6a42c53 100644 --- a/packages/pyhees-jjj/src/test_utils/utils.py +++ b/packages/pyhees-jjj/src/test_utils/utils.py @@ -39,7 +39,7 @@ def expected_result_type1(): @pytest.fixture def expected_result_type2(): """ 負荷バランス後の冷房負荷でSHFを算定した場合の期待結果 """ - return ResultSummary(E_C=13857.745579445591, E_H=40692.8527046848) + return ResultSummary(E_C=13857.745579445591, E_H=39433.352028185276) def deep_update(d, u): for k, v in u.items(): diff --git a/packages/pyhees-jjj/src/tests/test_main_refactoring_boundaries.py b/packages/pyhees-jjj/src/tests/test_main_refactoring_boundaries.py index 91bcbd1..c239ee8 100644 --- a/packages/pyhees-jjj/src/tests/test_main_refactoring_boundaries.py +++ b/packages/pyhees-jjj/src/tests/test_main_refactoring_boundaries.py @@ -391,6 +391,10 @@ def test_get_heating_electricity_type2_preserves_argument_order(monkeypatch): ) setting = SimpleNamespace(type='type') house = SimpleNamespace(region=6) + climate = SimpleNamespace( + get_C_df_H_d_t=lambda: np.array([1.0, 0.77]), + ) + q_hs = np.array([1000.0, 2000.0]) heat = SimpleNamespace( e_rtd='e-rtd-h', q_rtd='q-rtd-h', q_max='q-max-h', input_C_af='c-af-h', dualcompressor='dual-h', @@ -398,14 +402,18 @@ def test_get_heating_electricity_type2_preserves_argument_order(monkeypatch): cool = SimpleNamespace(q_rtd='q-rtd-c', q_max='q-max-c') result = experiment_main._get_heating_electricity_type2( - setting, house, 'climate.csv', 'fan', 'q-h', heat, cool + setting, house, 'climate.csv', climate, 'fan', q_hs, heat, cool ) assert result == 'electricity' - assert calls == [( - 'type', 6, 'climate.csv', 'fan', 'q-h', 'e-rtd-h', 'q-rtd-h', - 'q-rtd-c', 'q-max-h', 'q-max-c', 'c-af-h', 'dual-h', - )] + assert len(calls) == 1 + args = calls[0] + assert args[:4] == ('type', 6, 'climate.csv', 'fan') + np.testing.assert_array_equal(args[4], np.array([1000.0, 1540.0])) + assert args[5:] == ( + 'e-rtd-h', 'q-rtd-h', 'q-rtd-c', 'q-max-h', 'q-max-c', 'c-af-h', + 'dual-h', + ) def test_get_heating_electricity_type4_preserves_argument_order(monkeypatch): calls = [] monkeypatch.setattr( diff --git a/packages/pyhees-jjj/src/tests/test_not_broken_type2.py b/packages/pyhees-jjj/src/tests/test_not_broken_type2.py index cb93e55..2db20a4 100644 --- a/packages/pyhees-jjj/src/tests/test_not_broken_type2.py +++ b/packages/pyhees-jjj/src/tests/test_not_broken_type2.py @@ -49,7 +49,7 @@ def test_入力値入替_01(self, expected_result_type2): assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(40703.110799509814) + assert result['TValue'].E_H == pytest.approx(39441.84221310339) def test_入力値入替_02(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -66,7 +66,7 @@ def test_入力値入替_02(self, expected_result_type2): assert result['TValue'].E_C == pytest.approx(13297.408128678953) def test_入力値入替_03(self, expected_result_type2): - """ 以前のプログラムと同じ計算結果になる + """ RAC活用型にダクト式のデフロスト係数を重ねない デフロストに関する暖房出力補正係数(ダクトセントラル空調機) C_df_H_d_t_defrost_ductcentral """ @@ -76,11 +76,10 @@ def test_入力値入替_03(self, expected_result_type2): result = calc(inputs, test_mode=True) assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) - assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(40259.614225256155) + assert result['TValue'].E_H == pytest.approx(expected_result_type2.E_H) def test_入力値入替_04(self, expected_result_type2): - """ 以前のプログラムと同じ計算結果になる + """ RAC活用型にダクト式のデフロスト温度条件を重ねない デフロスト発生外気温度(ダクトセントラル空調機) defrost_temp_ductcentral """ @@ -90,11 +89,10 @@ def test_入力値入替_04(self, expected_result_type2): result = calc(inputs, test_mode=True) assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) - assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(41211.39467707037) + assert result['TValue'].E_H == pytest.approx(expected_result_type2.E_H) def test_入力値入替_05(self, expected_result_type2): - """ 以前のプログラムと同じ計算結果になる + """ RAC活用型にダクト式のデフロスト湿度条件を重ねない デフロスト発生外気相対湿度(ダクトセントラル空調機) defrost_humid_ductcentral """ @@ -104,8 +102,7 @@ def test_入力値入替_05(self, expected_result_type2): result = calc(inputs, test_mode=True) assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) - assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(41446.61835562958) + assert result['TValue'].E_H == pytest.approx(expected_result_type2.E_H) def test_入力値入替_06(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -120,7 +117,7 @@ def test_入力値入替_06(self, expected_result_type2): assert result['TValue'].E_C != expected_result_type2.E_C assert result['TValue'].E_C == pytest.approx(13978.101338792161) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(41116.4326458173) + assert result['TValue'].E_H == pytest.approx(39899.415470236745) def test_入力値入替_07(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -134,7 +131,7 @@ def test_入力値入替_07(self, expected_result_type2): assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(40651.396812654966) + assert result['TValue'].E_H == pytest.approx(39375.502975572876) def test_入力値入替_08(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -162,7 +159,7 @@ def test_入力値入替_09(self, expected_result_type2): assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(40108.03642034368) + assert result['TValue'].E_H == pytest.approx(38231.03647029923) def test_入力値入替_10(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -176,7 +173,7 @@ def test_入力値入替_10(self, expected_result_type2): assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(40806.580581208946) + assert result['TValue'].E_H == pytest.approx(39547.07990470942) def test_入力値入替_11(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -190,7 +187,7 @@ def test_入力値入替_11(self, expected_result_type2): assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(40362.181064378994) + assert result['TValue'].E_H == pytest.approx(38832.776006294924) def test_入力値入替_12(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -219,7 +216,7 @@ def test_入力値入替_13(self, expected_result_type2): result = calc(inputs, test_mode=True) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(38861.62504332851) + assert result['TValue'].E_H == pytest.approx(38795.35976591757) assert result['TValue'].E_C != expected_result_type2.E_C assert result['TValue'].E_C == pytest.approx(15563.079021522884) @@ -234,7 +231,7 @@ def test_入力値入替_14(self, expected_result_type2): result = calc(inputs, test_mode=True) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(40487.48035409603) + assert result['TValue'].E_H == pytest.approx(39098.426203275085) assert result['TValue'].E_C != expected_result_type2.E_C assert result['TValue'].E_C == pytest.approx(13305.987836187865) @@ -249,7 +246,7 @@ def test_入力値入替_15(self, expected_result_type2): result = calc(inputs, test_mode=True) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(47568.49376799733) + assert result['TValue'].E_H == pytest.approx(46955.11952738601) assert result['TValue'].E_C != expected_result_type2.E_C assert result['TValue'].E_C == pytest.approx(21944.37878738222) @@ -264,7 +261,7 @@ def test_入力値入替_16(self, expected_result_type2): result = calc(inputs, test_mode=True) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(58421.88338474051) + assert result['TValue'].E_H == pytest.approx(58271.95941940279) assert result['TValue'].E_C != expected_result_type2.E_C assert result['TValue'].E_C == pytest.approx(24288.367155641543) @@ -279,7 +276,7 @@ def test_入力値入替_17(self, expected_result_type2): result = calc(inputs, test_mode=True) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(174261.67585289382) + assert result['TValue'].E_H == pytest.approx(165908.65711298122) assert result['TValue'].E_C != expected_result_type2.E_C assert result['TValue'].E_C == pytest.approx(2802.5193170301254) @@ -294,7 +291,7 @@ def test_入力値入替_18(self, expected_result_type2): result = calc(inputs, test_mode=True) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(45431.40860402107) + assert result['TValue'].E_H == pytest.approx(44513.01518125113) assert result['TValue'].E_C != expected_result_type2.E_C assert result['TValue'].E_C == pytest.approx(14370.582844217894) @@ -309,7 +306,7 @@ def test_入力値入替_19(self, expected_result_type2): result = calc(inputs, test_mode=True) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(50840.21334169296) + assert result['TValue'].E_H == pytest.approx(50212.65609353035) assert result['TValue'].E_C != expected_result_type2.E_C assert result['TValue'].E_C == pytest.approx(13299.403436916855) @@ -339,7 +336,7 @@ def test_入力値入替_21(self, expected_result_type2): assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(42822.54947702187) + assert result['TValue'].E_H == pytest.approx(41536.48189211298) def test_入力値入替_22(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -352,7 +349,7 @@ def test_入力値入替_22(self, expected_result_type2): result = calc(inputs, test_mode=True) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(38220.231632402436) + assert result['TValue'].E_H == pytest.approx(36623.44261215648) assert result['TValue'].E_C != expected_result_type2.E_C assert result['TValue'].E_C == pytest.approx(11921.975635902661) @@ -419,7 +416,7 @@ def test_入力値入替_27(self, expected_result_type2): assert result['TValue'].E_C != expected_result_type2.E_C assert result['TValue'].E_C == pytest.approx(15139.137857477981) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(41489.49730383161) + assert result['TValue'].E_H == pytest.approx(40148.95202360735) def test_入力値入替_H1(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -433,7 +430,7 @@ def test_入力値入替_H1(self, expected_result_type2): assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(38426.4135686332) + assert result['TValue'].E_H == pytest.approx(36903.80868890366) def test_入力値入替_H2(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -447,7 +444,7 @@ def test_入力値入替_H2(self, expected_result_type2): assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(39667.322879561434) + assert result['TValue'].E_H == pytest.approx(38367.82936826073) def test_入力値入替_H3(self, expected_result_type2): """ 補正ONかつ全般換気なしでは熱源機の換気下限を給気風量に含めない @@ -461,7 +458,7 @@ def test_入力値入替_H3(self, expected_result_type2): assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(41355.78022134368) + assert result['TValue'].E_H == pytest.approx(40096.27954484415) def test_入力値入替_H4(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -476,7 +473,7 @@ def test_入力値入替_H4(self, expected_result_type2): assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(40703.594298106414) + assert result['TValue'].E_H == pytest.approx(39307.07965540052) def test_入力値入替_H5_方式2(self, expected_inputs, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -520,7 +517,7 @@ def test_入力値入替_H5_方式2(self, expected_inputs, expected_result_type2 assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(31465.044727934437) + assert result['TValue'].E_H == pytest.approx(29504.65246370503) def test_入力値入替_H6_方式2(self, expected_inputs, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -569,7 +566,7 @@ def test_入力値入替_H6_方式2(self, expected_inputs, expected_result_type2 assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(40211.253920843934) + assert result['TValue'].E_H == pytest.approx(40187.590301873955) def test_入力値入替_R1(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -714,7 +711,7 @@ def test_入力値入替_R6_方式2(self): assert result['TInput'].e_rtd_H == pytest.approx(3.6543) assert result['TValue'].E_C == pytest.approx(20475.8370428381) - assert result['TValue'].E_H == pytest.approx(46788.506664833956) + assert result['TValue'].E_H == pytest.approx(46758.401828572394) def test_入力値入替_HEX1(self, expected_result_type2): """ 以前のプログラムと同じ計算結果になる @@ -729,4 +726,4 @@ def test_入力値入替_HEX1(self, expected_result_type2): assert result['TValue'].E_C == pytest.approx(expected_result_type2.E_C) assert result['TValue'].E_H != expected_result_type2.E_H - assert result['TValue'].E_H == pytest.approx(37895.580913287784) + assert result['TValue'].E_H == pytest.approx(36421.2477000799) diff --git a/packages/pyhees-jjj/src/tests/test_type2_defrost_responsibility.py b/packages/pyhees-jjj/src/tests/test_type2_defrost_responsibility.py new file mode 100644 index 0000000..127f228 --- /dev/null +++ b/packages/pyhees-jjj/src/tests/test_type2_defrost_responsibility.py @@ -0,0 +1,23 @@ +import json +from pathlib import Path + +import pytest + +from jjjexperiment.main import calc + + +REGRESSION_INPUT_PATH = ( + Path(__file__).parents[1] + / "test_utils" + / "input_region2_grade5_type2.json" +) + + +def test_region2_grade5_type2_applies_only_rac_defrost_correction(): + """Freeze the verifier-reported region-2 case after separating C_df roles.""" + inputs = json.loads(REGRESSION_INPUT_PATH.read_text(encoding="utf-8")) + + result = calc(inputs, test_mode=True) + + assert result["TValue"].E_H == pytest.approx(70154.48430913354) + assert result["TValue"].E_C == pytest.approx(2010.0591180227493) diff --git a/regression/phase5/baselines/rac-whole-house.output1.csv.gz b/regression/phase5/baselines/rac-whole-house.output1.csv.gz index 639feb4..0fcc712 100644 Binary files a/regression/phase5/baselines/rac-whole-house.output1.csv.gz and b/regression/phase5/baselines/rac-whole-house.output1.csv.gz differ diff --git a/regression/phase5/baselines/rac-whole-house.output2.csv.gz b/regression/phase5/baselines/rac-whole-house.output2.csv.gz index b8f9d4a..eb40a0d 100644 Binary files a/regression/phase5/baselines/rac-whole-house.output2.csv.gz and b/regression/phase5/baselines/rac-whole-house.output2.csv.gz differ