For generation of forcing function for steam hammer there is nice approach given in EC goodling paper. The forces can be plotted against time very easily
The paper was published in asme PVP also I really don't remember the year
hope this helps
If you are looking for the static equivalent method for seismic analysis then ASCE 7 gives some guidelines for calculating "g" for piping systems which can be imparted on the piping system as a uniform horizontal acceleration. and yes it depend on the height of the structure.
cheers
ashu