This paper studies how to maximize the lifetime of ISA100.11a and Wireless highway addressable remote transducer (WiHART) compatible sensor networks for a petroleum refinery scenario. When accounting for the energy consumption of a typical refinery process sensor and the node microprocessor, only a relatively small percentage of battery energy on average is spent on wireless communication. However, this paper will demonstrate that optimizing network operation can still considerably extend network lifetime. The longest lifetimes are achieved using a new network optimization approach that accounts for the frame structure of ISA100.11a/WiHART. Results are generated using a full network protocol stack simulation that incorporates three different network optimization approaches and includes the energy consumption of the wireless transceiver, sensor, and microprocessor.