A physics-calibrated neural network surrogate model for predicting thermal performance of MHD hybrid nanofluid cooling systems in electric vehicle battery thermal management, coupled with Particle Swarm Optimization (PSO) for intelligent parameter optimization.
This model replaces expensive CFD simulations with a fast neural network surrogate that predicts:
| 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) | — |
From 3 input parameters:
| 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 | — | — |
The PSO optimizer finds optimal cooling parameters:
| 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 |
Key Results:
import torch
import numpy as np
import json
# Load model
from model import ThermalSurrogateModel, DataNormalizer, get_model_config
config = get_model_config()
model = ThermalSurrogateModel(
input_dim=3, hidden_dims=[64, 128, 128, 64],
output_dim=6, dropout=0.0
)
model.load_state_dict(torch.load('model.pt', weights_only=True))
model.eval()
normalizer = DataNormalizer.load('normalizer.json')
# Predict: [Ha=32.4, phi=0.038, u_in=0.187]
X = np.array([[32.4, 0.038, 0.187]], dtype=np.float32)
X_norm = normalizer.transform_input(X)
with torch.no_grad():
pred = model(torch.tensor(X_norm)).numpy()
result = normalizer.inverse_transform_output(pred)
print(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 |
Paper: "AI-Assisted Thermodynamic Optimization of MHD Hybrid Nanofluid Flow for Electric Vehicle Battery Thermal Management Using Particle Swarm Optimization"
Continuity: ∂u/∂x + ∂v/∂y = 0
Momentum (NS + MHD): ρ_hnf(u·∂u/∂x + v·∂u/∂y) = -∂p/∂x + μ_hnf·∇²u - σ_hnf·B₀²·u
Energy: (ρCₚ)_hnf(u·∂T/∂x + v·∂T/∂y) = k_hnf·∇²T + μ_hnf·Φ + σ_hnf·B₀²·u²
Entropy: S_gen = k_hnf/T₀²·|∇T|² + μ_hnf/T₀·Φ + σ_hnf·B₀²·u²/T₀
Apache 2.0