Views
No views yet
| Output | Description | Units |
|---|---|---|
T_max | Maximum battery surface temperature | °C |
Nu | Nusselt number (heat transfer coefficient) | — |
S_gen | Total entropy generation (normalized) | — |
delta_T | Cell-to-cell temperature difference | °C |
BL_suppression | Boundary layer suppression | % |
k_ratio | Thermal conductivity ratio (k_hnf/k_bf) | — |
| Input | Range | Description |
|---|---|---|
Ha | 0–60 | Hartmann number (magnetic field strength) |
phi | 0.01–0.05 | Nanoparticle volume fraction |
u_in | 0.05–0.30 m/s | Inlet flow velocity |
| Metric | R² Score | MAE | MAPE (%) |
|---|---|---|---|
| T_max | 0.979 | 0.76°C | 1.76 |
| Nu | 0.960 | 0.54 | 2.53 |
| S_gen | 0.991 | 0.012 | 3.27 |
| delta_T | 0.980 | 0.21°C | 1.67 |
| BL_suppression | 0.999 | 0.20% | 6.96 |
| k_ratio | 0.999 | 0.002 | 0.17 |
| Overall | 0.985 | — | — |
| Parameter | PSO Optimal | Paper Reference |
|---|---|---|
| Ha | ~22–32 | 32.4 |
| φ | ~0.04–0.05 | 0.038 |
| u₀ | ~0.19–0.29 m/s | 0.187 m/s |
1import torch
2import numpy as np
3import json
4
5# Load model
6from model import ThermalSurrogateModel, DataNormalizer, get_model_config
7
8config = get_model_config()
9model = ThermalSurrogateModel(
10 input_dim=3, hidden_dims=[64, 128, 128, 64],
11 output_dim=6, dropout=0.0
12)
13model.load_state_dict(torch.load('model.pt', weights_only=True))
14model.eval()
15
16normalizer = DataNormalizer.load('normalizer.json')
17
18# Predict: [Ha=32.4, phi=0.038, u_in=0.187]
19X = np.array([[32.4, 0.038, 0.187]], dtype=np.float32)
20X_norm = normalizer.transform_input(X)
21with torch.no_grad():
22 pred = model(torch.tensor(X_norm)).numpy()
23result = normalizer.inverse_transform_output(pred)
24print(f"T_max: {result[0,0]:.1f}°C, Nu: {result[0,1]:.1f}")| File | Description |
|---|---|
model.pt | Trained PyTorch model weights |
normalizer.json | Input/output normalization parameters |
config.json | Model architecture configuration |
model.py | Model class definition |
data_generator.py | Physics-based synthetic data generator |
pso_optimizer.py | PSO optimization module |
predict.py | High-level prediction interface |
train.py | Training script |
evaluation.json | Evaluation metrics |
pso_results.json | PSO optimization results + Pareto front |