The inherent non-linearities in combustion instabilities can be of crucial importance, and we here propose an approach in which the one-dimensional Navier-Stokes and scalar transport equations are solved for geometries of variable cross-section. The focus is on attached flames, and for this purpose a new phenomenological model for the unsteady heat release from a flame front is introduced. In the attached flame method (AFM) the heat release occurs over the full length of the flame. The non-linear code with the use of the AFM approach is validated against results from an experimental study of thermoacoustic instabilities in oxy-fuel flames by Ditaranto and Hals [Combustion and Flame, 146, 493-512 (2006)]. The numerical simulations are in accordance with the experimental measurements and both the frequencies and the amplitudes of the resonant acoustic pressure modes are reproduced with good accuracy.