earthquake energy formula