Modeling, Optimization, Thermal Management, and Monitoring of Fuel Cells, Electrolyzers, and Batteries