2025 / UC Berkeley (ME249)
Custom Loss + PINN Heat Transfer
Physics-inspired training for PV and heat diffusion

Overview
Two-part study: custom loss functions for solar PV performance modeling and a physics-informed neural network for 2D heat transfer.
Problem
Model PV output under varying conditions and solve 2D heat diffusion with limited boundary measurements.
Role
Course project (ME249)
Timeline
Nov 2025
Tools
Python / TensorFlow / NumPy
Tags
PINN / Scientific ML / Heat Transfer / Regression
Data
- - Solar PV performance dataset (flux up to 1300 W/m²)
- - Boundary temperature samples + interior residual constraints
Approach
- - Implemented custom loss (MSE vs 4th-power error) for PV models
- - Built PINN with Laplacian residual + boundary penalties
- - Tested kappa and architecture variants for stability
Evaluation
- - Train/validation split with log-log prediction plots
- - PINN loss targets defined (<0.005) with surface/heatmap checks
Results
- - Generated heatmap/surface comparisons for baseline vs tuned models
- - Documented loss behavior under custom objective functions
Deployment & Monitoring
- - Notebook-based workflow with reproducible plots
Limitations
- - Physics constraints tuned manually per scenario
- - Evaluation emphasized qualitative surface agreement
Gallery

PV training loss curve

PINN baseline heatmap

PINN baseline surface
Repro Steps
- - Use CodeP3.* notebooks in 249 projects folder
- - Figures in 249 projects/figures and figures_part2
Next Steps
- - Automate hyperparameter sweeps for kappa and architecture
- - Compare PINN surfaces to finite-difference baselines