The numerical solution of one-dimensional thermally expandable flows