The document presents an optimization model for hydrogen networks in petroleum refineries, focusing on minimizing the installation and operational costs associated with hydrogen distribution. The model, currently applied at the YPF Luján de Cuyo refinery in Argentina, incorporates variables such as flow rates, purity, and pressure conditions to determine optimal hydrogen connections and minimize demand. The study emphasizes the importance of hydrogen pinch analysis for effective design and operation of refinery hydrogen management systems.