Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

## 主な機能

- 222項目の正規入力スキーマと方式別の表示・検証条件
- 223項目の正規入力スキーマと方式別の表示・検証条件
- JSON入力とGradio Web UI
- ダクト式セントラル空調、ルームエアコン、床下空調などの計算
- 暖冷房結果、8760時間系列、グラフ、計算ログの出力
Expand Down
2 changes: 1 addition & 1 deletion apps/gradio/src/verification_app/form_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def visibility(self, values: Mapping[str, Any]) -> dict[str, bool]:


def load_form_model(
version: str = "260809",
version: str = "260812",
values: Mapping[str, Any] | None = None,
) -> FormModel:
schema = load_input_schema(version)
Expand Down
8 changes: 4 additions & 4 deletions docs/calculation_differences.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Verification Platform Nextは、建築研究所等の技術的協力のもと公
| --- | --- |
| 建研本家 | `BRI-EES-House/pyhees` Ver.3.10、commit `d5224c4a01def00a8421bcd2fcc0d4b4a5b88644` |
| 旧Verification Platform | Next移行時の基準commit `0f91ba8381df1b4960557b92b39339385cc9009f` |
| Verification Platform Next | ver.1.1.1、入力仕様 `260809` |
| Verification Platform Next | ver.1.1.1、入力仕様 `260812` |

建研本家の版は[`packages/pyhees-jjj/UPSTREAM.md`](../packages/pyhees-jjj/UPSTREAM.md)、
Nextの製品版は[`jjjexperiment/release.py`](../packages/pyhees-jjj/src/jjjexperiment/release.py)
でも固定している。

## 3. 結論一覧

| ID | 不具合候補・変更点 | 建研本家 | 旧Verification Platform | Next(入力仕様260809) |
| ID | 不具合候補・変更点 | 建研本家 | 旧Verification Platform | Next(入力仕様260812) |
| --- | --- | --- | --- | --- |
| BRI-01 | 冷房時の居室・非居室間の間仕切熱移動の符号 | `+Q_trs` | `+Q_trs` | 既定OFFは`+Q_trs`、①をONにすると全経路で`-Q_trs` |
| BRI-02 | 全般換気なし時も区画別全般換気量を給気下限に使用 | 使用する | 使用する。最低風量直接入力時は過大値が拡大 | 既定OFFは建研式、②をONにすると換気下限と設備最低風量を分離 |
Expand Down Expand Up @@ -95,7 +95,7 @@ L_{CS,i}+Q^{*}_{\mathrm{trs,prt},i},

### 4.3 Nextの補正モード

新床下空調では、元の住宅負荷に含まれる断熱床経路を取り除くため、
床下空調では、元の住宅負荷に含まれる断熱床経路を取り除くため、
床を通る符号付き熱流$\Delta L_{\mathrm{floor},i}$も同時に扱う。

```math
Expand Down Expand Up @@ -226,7 +226,7 @@ Nextでは、次の二つを別の物理量として扱う。

旧版との差は次のとおりである。

| 項目 | 旧Verification Platform | Verification Platform Next(入力仕様260809) |
| 項目 | 旧Verification Platform | Verification Platform Next(入力仕様260812) |
| --- | --- | --- |
| 冷房時の間仕切熱移動 | 建研式の`+Q_trs` | ①OFFは同じ。ONは非床下・繰越・新床下すべて`-Q_trs` |
| 全般換気なしの式(43)/(44)下限 | 区画別全般換気量を使用 | ②OFFは同じ。ONは区画別下限を0へ切替 |
Expand Down
291 changes: 124 additions & 167 deletions docs/underfloor_ac_input_guide.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/pyhees-jjj/docs/風量設定_VAV_計算ルート.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## 1. この文書の目的

ダクト式セントラル空調の風量計算では、住宅の全般換気量、熱源機の設備最低風量、
設計風量、VAV、風量上限、新床下空調が同じ計算系列へ入る。名称が似ていても
設計風量、VAV、風量上限、床下空調が同じ計算系列へ入る。名称が似ていても
意味は異なるため、本書では「どの設定が、どの計算ルートと出力に影響するか」を
表とフローで示す。

Expand Down Expand Up @@ -173,9 +173,9 @@ $$
入力が正しければ、設備最低風量と設計風量の両方を満たす。最低風量が設計風量を
超える矛盾した入力は、上限を破って計算を続けず入力エラーとする。

## 9. 新床下空調との関係
## 9. 床下空調との関係

新床下空調の逐次計算では、Excel床下14との数値契約に従い、区画別のVAV前配分を
床下空調の逐次計算では、Excel床下14との数値契約に従い、区画別のVAV前配分を
固定面積比で求める。通常経路の負荷依存配分
`change_supply_volume_before_vav_adjust` をそのまま渡すと、床下14 Goldenの年間値が
大きく変わることを確認している。
Expand All @@ -195,7 +195,7 @@ $$
| 全般換気なし・②ON・暖冷房期 | 合計風量が設備最低風量以上 |
| 全般換気なし・②ON・中間期 | 合計風量・ファン電力とも0 |
| 全般換気あり・中間期 | 熱源機が換気量を搬送 |
| 新床下空調 | Excel床下14に合わせ、固定面積比の配分を使用 |
| 床下空調 | Excel床下14に合わせ、固定面積比の配分を使用 |

関連資料は [最低風量・最低電力 直接入力](最低風量_最低電力_直接入力.md) と
[風量設定・VAVの不具合修正メモ](風量設定_VAV_不具合修正メモ.md) を参照する。
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ def get_Theta_ex_d_t(self) -> Array8760:
return Theta_ex_d_t

def get_Theta_g_avg(self) -> float:
if (ufac := self._new_ufac) and ufac.explicit_constants:
return self._new_ufac.Theta_g_avg
else:
return algo.get_Theta_g_avg(self.get_Theta_ex_d_t())
return algo.get_Theta_g_avg(self.get_Theta_ex_d_t())

def get_HCM_d_t(self) -> Array8760:
H, C, M = dc.get_season_array_d_t(self.region)
Expand Down
4 changes: 2 additions & 2 deletions packages/pyhees-jjj/src/jjjexperiment/inputs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class OuterSkin:
# ▼ 床下空調利用時
r_A_ufac: Optional[float] = None
"""当該住戸において、床下空間全体の面積に対する 空調を供給する床下空間の面積の比 [-]"""
# NOTE: 新床下空調インプットによって決まる
# NOTE: 床下空調インプットによって決まる

underfloor_insulation: bool = False
"""床下空間の断熱"""
Expand Down Expand Up @@ -120,7 +120,7 @@ def from_dict(cls, data: dict) -> 'OuterSkin':
if 'underfloor_insulation' in data:
kwargs['underfloor_insulation'] = int(data['underfloor_insulation']) == 2

# 新床下空調がオンの場合は、床下換気なし・床下断熱状態となります
# 床下空調がオンの場合は、床下換気なし・床下断熱状態となります
if (
'change_underfloor_temperature' in data
and int(data['change_underfloor_temperature']) == 2
Expand Down
12 changes: 6 additions & 6 deletions packages/pyhees-jjj/src/jjjexperiment/inputs/di_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from jjjexperiment.v_supply_cap.inputs.v_supply_cap_dto import VSupplyCapDto
# F24-04 過剰熱量繰越
from jjjexperiment.carryover_heat.inputs.carryover_heat_dto import CarryoverHeatDto
# F24-05 新床下空調
# F24-05 床下空調
import jjjexperiment.underfloor_ac.inputs.common as ufac_input
# F25-01 最小風量・最低電力 直接入力
import jjjexperiment.v_min_input.inputs.heating as v_min_heating_input
Expand Down Expand Up @@ -102,7 +102,7 @@ def _validate_feature_inputs(self) -> tuple[bool, bool]:
if removed_ufac_flg is not None and int(removed_ufac_flg) == 2:
raise ValueError(
'underfloor_air_conditioning_air_supply=2 の旧床下空調計算は'
'削除されました。新床下空調を使用する場合は '
'削除されました。床下空調を使用する場合は '
'change_underfloor_temperature=2 を指定してください。'
)

Expand All @@ -117,7 +117,7 @@ def _validate_feature_inputs(self) -> tuple[bool, bool]:
)
if new_ufac_enabled and carry_over_enabled:
raise ValueError(
'新床下空調と過剰熱量繰越計算は同時に使用できません。'
'床下空調と過剰熱量繰越計算は同時に使用できません。'
'どちらか一方を無効にしてください。'
)

Expand All @@ -126,8 +126,8 @@ def _validate_feature_inputs(self) -> tuple[bool, bool]:
def _update_underfloor_input(self, new_ufac_enabled: bool) -> None:
"""床下利用状態を入力辞書へ反映し、従来のログを出力する。"""
if new_ufac_enabled:
print("新・床下空調ロジックを使用")
# 新床下空調
print("床下空調ロジックを使用")
# 床下空調
self._input['r_A_ufac'] = 100.0 # [%] WG資料より
print("r_A_ufac = 100.0 [%]")
print("空調空気を床下を通して給気する")
Expand Down Expand Up @@ -259,7 +259,7 @@ def provide_v_supply_cap_dto(self) -> VSupplyCapDto:
def provide_carryover_heat_dto(self) -> CarryoverHeatDto:
return CarryoverHeatDto.from_dict(self._get_root_input())

# F24-05 新・床下空調
# F24-05 床下空調
@singleton
@provider
def provide_underfloor_ac_input(self) -> ufac_input.UnderfloorAc:
Expand Down
6 changes: 3 additions & 3 deletions packages/pyhees-jjj/src/jjjexperiment/section4_2_jjj.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
# F24-4 過剰熱量繰越
from jjjexperiment.carryover_heat.inputs.carryover_heat_dto import CarryoverHeatDto
import jjjexperiment.carryover_heat as jjj_carryover_heat
# F24-5 新床下空調
# F24-5 床下空調
import jjjexperiment.underfloor_ac.section4_2_jjj as jjj_ufac_dc
from jjjexperiment.underfloor_ac.section3_1_e_jjj import calc_Theta_uf_d_t_2023

Expand Down Expand Up @@ -2503,7 +2503,7 @@ def _get_new_underfloor_requested_temperatures(inputs: _NewUnderfloorRequestedTe
Theta_uf_d_t_2023 = calc_Theta_uf_d_t_2023(*_ExpectedUnderfloorTemperatureInputs(
L_star_H_d_t_i, L_star_CS_d_t_i, house.A_A, house.A_MR,
house.A_OR, skin.r_A_ufac, V_dash_supply_d_t_i, Theta_ex_d_t, house.region))
# 新床下空調-1st: θuf_supply を逆算(二分探索)
# 床下空調-1st: θuf_supply を逆算(二分探索)
_, _, Theta_uf_supply_d_t = algo.calc_Theta(
region=house.region,
A_A=house.A_A,
Expand Down Expand Up @@ -2569,7 +2569,7 @@ def _get_new_underfloor_supply_temperatures(inputs: _NewUnderfloorSupplyTemperat
Theta_underfloor_supply_override_d_t = (
inputs.Theta_underfloor_supply_override_d_t
)
# 新床下空調-2nd: θuf の本計算
# 床下空調-2nd: θuf の本計算
Theta_uf_d_t, Theta_g_surf_d_t, *others = algo.calc_Theta(
region=house.region,
A_A=house.A_A,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class UnderfloorAc:

new_ufac_flg: 床下空調ロジック = 床下空調ロジック.変更しない

# NOTE: 従来 pyhees では上書き対象でない定数たち
# NOTE: Theta_g_avg と U_s_vert は旧入力JSONとの互換保持用。
# 現行計算ではそれぞれ気象系列からの自動算定値と用途別U値を使用する。
"""床下空調ロジック"""
Theta_g_avg: float = 15.7
"""地盤内の不易層の温度 [℃]"""
Expand All @@ -38,8 +39,6 @@ def from_dict(cls, data: dict) -> 'UnderfloorAc':
# 実行条件: 明示的な上書き宣言が必要
if 'input_ufac_consts' in data and int(data['input_ufac_consts']) == 2:
kwargs['explicit_constants'] = True
kwargs['Theta_g_avg'] = float(data['Theta_g_avg'])
kwargs['U_s_vert'] = float(data['U_s_vert'])
kwargs['phi'] = float(data['phi'])
return cls(**kwargs)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def calc_sum_Theta_dash_g_surf_A_m_runup(
state.commit(Theta_uf_const, response)
return float(np.sum(response))

#260112 IGUCHI 新床下空調用固定値
#260112 IGUCHI 床下空調用固定値
@jjj_cloning
def get_Theta_uf_d_t_runup(
underfloor_insulation: bool,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def get_Theta_HBR_i(
) -> Array5x1:
"""単時点版 (46-1)(46-2)(46-3) の床下空調 補正
"""
# TODO: 事前条件: 新床下空調ロジック 有効時のみ
# TODO: 事前条件: 床下空調ロジック 有効時のみ

assert V_supply_i.shape == (5, 1), '想定外の行列数'
assert Theta_supply_i.shape == (5, 1), '想定外の行列数'
Expand Down Expand Up @@ -84,7 +84,7 @@ def get_Theta_NR(
) -> float:
"""単時点版 (48a)(48b) 床下空調 補正アリ
"""
# TODO: 事前条件: 新床下空調ロジック 有効時のみ
# TODO: 事前条件: 床下空調ロジック 有効時のみ

assert Theta_HBR_i.shape == (5, 1), '想定外の行列数'
assert V_dash_supply_i.shape == (5, 1), '想定外の行列数'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def get_Theta_star_NR(
Returns:
Theta_star_NR: 単時点版 負荷バランス時の非居室の室温 [℃]
"""
# NOTE: 新床下空調ロジックのみで使用可能
# NOTE: 床下空調ロジックのみで使用可能

# vectorize可能
c_p_air, rho_air, U_s = _get_formula_52_properties()
Expand Down
2 changes: 1 addition & 1 deletion packages/pyhees-jjj/src/pyhees/section3_1_e.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ def calc_Theta(region, A_A, A_MR, A_OR, Q, r_A_ufvnt, underfloor_insulation, The

Theta_in_H = 20
Theta_in_C = 27
# NOTE: 既存コードにあったものを、新床下空調時 目標 Theta_uf の実行可否の閾値に再利用しています
# NOTE: 既存コードにあったものを、床下空調時 目標 Theta_uf の実行可否の閾値に再利用しています

# 指数項mにおける吸熱応答係数
phi_1_A_m = np.array([get_phi_1_A_m(m) for m in range(1, M + 1)])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_new_underfloor_updates_ratio_and_preserves_log_order(capsys):

assert module._input["r_A_ufac"] == 100.0
assert capsys.readouterr().out == (
"新・床下空調ロジックを使用\n"
"床下空調ロジックを使用\n"
"r_A_ufac = 100.0 [%]\n"
"空調空気を床下を通して給気する\n"
)
Expand Down Expand Up @@ -93,7 +93,7 @@ def test_feature_conflict_error_precedes_logs_and_mutation(capsys):
before = deepcopy(data)

with pytest.raises(
ValueError, match="新床下空調と過剰熱量繰越計算は同時に使用できません"
ValueError, match="床下空調と過剰熱量繰越計算は同時に使用できません"
):
JJJExperimentModule(data)

Expand Down
2 changes: 1 addition & 1 deletion packages/pyhees-jjj/src/tests/inputs/test_input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ eta_A_H: 4.3
TS: False
r_A_ufvnt: null # [%]
hs_CAV: False
change_underfloor_temperature: 1 # 新床下空調なし
change_underfloor_temperature: 1 # 床下空調なし
R_g: 0.15
H_A:
type: 1
Expand Down
22 changes: 20 additions & 2 deletions packages/pyhees-jjj/src/tests/inputs/test_input_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_underfloor_constants_are_derived_when_not_explicit():
)


def test_explicit_underfloor_constants_do_not_override_load_floor_u_value():
def test_explicit_underfloor_constants_only_override_foundation_phi():
q = 2.647962191872085
climate = ClimateService(
6,
Expand All @@ -92,9 +92,27 @@ def test_explicit_underfloor_constants_do_not_override_load_floor_u_value():
),
)

assert climate.get_Theta_g_avg() == 14.1
assert climate.get_Theta_g_avg() == pytest.approx(
15.686130136986295,
abs=1e-12,
)
assert climate.get_U_s_vert(q) == pytest.approx(
0.5422264459110593,
abs=1e-12,
)
assert climate.get_phi(2.6) == 0.91


def test_underfloor_input_only_accepts_editable_ground_constants():
underfloor = UnderfloorAc.from_dict({
"change_underfloor_temperature": 2,
"input_ufac_consts": 2,
"Theta_g_avg": 14.1,
"U_s_vert": 9.9,
"phi": 0.91,
})

assert underfloor.explicit_constants
assert underfloor.Theta_g_avg == 15.7
assert underfloor.U_s_vert == 2.223
assert underfloor.phi == 0.91
2 changes: 1 addition & 1 deletion packages/pyhees-jjj/src/tests/test_dicontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_new_underfloor_input_sets_only_new_underfloor_state():


def test_new_underfloor_and_carryover_fail_instead_of_falling_back():
with pytest.raises(ValueError, match="新床下空調と過剰熱量繰越計算は同時に使用できません"):
with pytest.raises(ValueError, match="床下空調と過剰熱量繰越計算は同時に使用できません"):
JJJExperimentModule(_underfloor_inputs(
change_underfloor_temperature=床下空調ロジック.変更する.value,
carry_over_heat=過剰熱量繰越計算.行う.value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _binding_from_dict(item: Mapping[str, Any]) -> InputBinding:
)


def load_input_bindings(version: str = "260809") -> InputBindingCatalog:
def load_input_bindings(version: str = "260812") -> InputBindingCatalog:
file_name = f"input_bindings_{version}.json"
data_file = resources.files("verification_core.data").joinpath(file_name)
with data_file.open(encoding="utf-8") as stream:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "260812",
"base_version": "260809",
"binding_count": 270,
"binding_overrides": [
{
"line": 138,
"target_path": ["Theta_g_avg"],
"expression": "15.7",
"source_ids": []
},
{
"line": 141,
"target_path": ["U_s_vert"],
"expression": "2.223",
"source_ids": []
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": "260812",
"base_version": "260809",
"field_count": 223,
"remove_field_ids": [
"Theta_g_avg__0",
"U_s_vert__0"
],
"field_overrides": {
"underfloor_ventilation__0": {
"description": "建研付録D系の床下換気による負荷補正です。床下空調とは別の計算です。"
},
"r_A_ufvnt__0": {
"description": "床下換気を評価する場合だけ使用します。床下空調の床下利用面積ではありません。"
},
"underfloor_insulation__0": {
"description": "床下換気の負荷計算に使用します。床下空調では断熱区画内に固定されます。"
},
"change_underfloor_temperature__0": {
"group": "床下空調(Verification Platform)",
"label": "床下空調を使用する",
"description": "Excel床下14に合わせたPass 1・Pass 2・地盤逐時計算を使用します。床下利用面積は100%、床下断熱は断熱区画内に固定されます。"
},
"input_ufac_consts__0": {
"group": "床下空調(Verification Platform)",
"label": "床下空調の補助定数を手動設定する",
"description": "OFFではR_gに既定値0.15を使い、基礎側面の線熱貫流率φを地域区分とQ値から算定します。ONでは表示されるR_gとφを使用します。不易層温度は外気温8760時間値の年間平均から自動算定します。床板熱貫流率は、元負荷控除用を地域区分とQ値から算定し、床下から室への熱移動用を2.223 W/(m²・K)に固定します。"
},
"R_g__0": {
"group": "手動設定する補助定数",
"description": "地盤応答と床下から地盤への熱移動に使用します。手動設定しない場合は既定値0.15 (m²・K)/Wを使用します。"
},
"phi__0": {
"group": "手動設定する補助定数",
"description": "床下から外気への基礎側面熱損失に使用します。手動設定しない場合は地域区分とQ値から自動算定します。"
},
"carry_over_heat__0": {
"description": "床下空調とは同時に使用できません。両方を有効にすると計算開始時にエラーになります。"
}
}
}
Loading