Steam locomotives or railcars