Views
No views yet
English Summary A physics-informed neural network (PINN) surrogate model that predicts indoor airflow fields (velocity, pressure, temperature, CO2) given spatial coordinates and room conditions. Trained on 54 CFD cases generated with OpenFOAM buoyantSimpleFoam, incorporating Navier-Stokes residuals as a physics loss term. The model replaces costly CFD simulations with millisecond-scale ONNX inference for real-time workspace environment control on DGX Spark.
L = L_data + 0.1 × L_physicsbuoyantSimpleFoam による定常CFD解析| 指標 | 説明 |
|---|---|
| RMSE | 二乗平均平方根誤差(MinMax正規化空間 [0,1] 上) |
| Relative L2 | CFD真値に対する相対 L2 誤差 |
| MAE | 平均絶対誤差 |
注: 具体的な数値はバリデーション実行環境に依存します。validate_model.pyで再現可能です。
| 名前 | 形状 | 型 | 説明 |
|---|---|---|---|
input | (batch, 8) | float32 | MinMax正規化済みの空間座標 + 環境パラメータ |
| Index | パラメータ | 値域 | 正規化方法 |
|---|---|---|---|
| 0 | x(空間座標) | 0.0 〜 6.0 m | MinMax |
| 1 | y(空間座標) | 0.0 〜 5.0 m | MinMax |
| 2 | z(空間座標) | 0.0 〜 2.7 m | MinMax |
| 3 | ac_speed(AC風速) | 1.0 〜 5.0 m/s | MinMax |
| 4 | ac_temp(AC温度) | 20.0 〜 28.0 °C | MinMax |
| 5 | window_open(窓開閉) | 0 or 1 | そのまま |
| 6 | layout_id(レイアウト) | 0 〜 2 | / 2.0 |
| 7 | vent_rate(換気量) | 0.0 〜 0.1 m³/s | MinMax |
| 名前 | 形状 | 型 | 説明 |
|---|---|---|---|
u | (batch, 6) | float32 | MinMax正規化 [0,1] された流体場の予測値 |
| Index | フィールド | 説明 |
|---|---|---|
| 0 | u | x方向速度成分 |
| 1 | v | y方向速度成分 |
| 2 | w | z方向速度成分 |
| 3 | p | 圧力 |
| 4 | T | 温度 |
| 5 | CO2 | CO2濃度 |
1import numpy as np
2import onnxruntime as ort
3
4# モデルのロード
5session = ort.InferenceSession("airflow_surrogate.onnx")
6
7FIELD_NAMES = ["u", "v", "w", "p", "T", "CO2"]
8
9# 正規化パラメータ
10NORM = {
11 "coords_min": [0.0, 0.0, 0.0],
12 "coords_max": [6.0, 5.0, 2.7],
13 "ac_speed_min": 1.0, "ac_speed_max": 5.0,
14 "ac_temp_min": 20.0, "ac_temp_max": 28.0,
15 "vent_rate_min": 0.0, "vent_rate_max": 0.1,
16}
17
18def minmax(val, vmin, vmax):
19 return (val - vmin) / (vmax - vmin) if vmax != vmin else 0.0
20
21# 入力: デスク位置 (1.5, 0.9, 1.2), AC風速3m/s, AC温度24°C, 窓閉, レイアウト0, 換気0.05
22input_array = np.array([[
23 minmax(1.5, 0.0, 6.0), # x
24 minmax(0.9, 0.0, 5.0), # y
25 minmax(1.2, 0.0, 2.7), # z
26 minmax(3.0, 1.0, 5.0), # ac_speed
27 minmax(24.0, 20.0, 28.0), # ac_temp
28 0.0, # window_open (閉)
29 0.0, # layout_id / 2.0
30 minmax(0.05, 0.0, 0.1), # vent_rate
31]], dtype=np.float32)
32
33# 推論
34result = session.run(["u"], {"input": input_array})[0]
35
36# 結果表示 (MinMax正規化 [0,1] 空間)
37for name, val in zip(FIELD_NAMES, result[0]):
38 print(f"{name}: {val:.4f}")1@misc{kanden_airflow_model_2025,
2 title = {Airflow Surrogate: Physics-Informed Neural Network for Indoor CFD Prediction},
3 author = {Team NANIWA-Factory},
4 year = {2025},
5 url = {https://huggingface.co/SeiyaCM/KandenAiHackathonAirflowModel},
6 note = {Kanden AI Hackathon — Space AI Brain Project}
7}