Efficient tuning of complex accelerator chains requires automated procedures, themselves reliant upon beam physical models. The Isotope Separator and ACcelerator (ISAC) facility at TRIUMF requires frequent changes of beam species (isotope), mass to charge ratio and beam energy tailored to experiment requirements, which demands rapid beam tuning. In addition, emergent effects such as long term changes of energy or energy spread require beam optimization that must be based on a complete model of the accelerator. Using an envelope code to build an end-to-end simulation of the accelerator facility for operational purposes reduces computing times by 3 or 4 orders of magnitude, when compared to particle tracking codes, so that the requisite simulations may be carried out in real time, by polling control system data. Herein described is the second order Hamiltonian for an radio frequency quadrupole (RFQ), presented within the framework of the envelope code TRANSOPTR. To benchmark the TRANSOPTR model, envelope simulations of the TRIUMF-ISAC RFQ have been performed and compared with the multiparticle code PARMTEQ.