An example of simile used in popular science writing:
"The metallic substances differ from all other materials by the fact that the outer shells of their atoms are bound rather loosely, and often let one of their electrons go free. Thus the interior of a metal is filled up with a large number of unattached electrons that travel aimlessly around like a crowd of displaced persons. When a metal wire is subjected to electric force applied on its its opposite ends, these free electrons rush in the direction of the force, thus forming what we call an electric current."
George Gamow (1961) One, Two, Three…Infinity. Facts and speculations of science, Revised Edition, Dover Publications, Inc., New York.
Read about examples of science similes
The reference to outer shells being bound 'loosely' could be seen as a metaphor (and the shells are themselves abstractions). To say that electrons 'rush' or 'travel aimlessly' is to anthropomorphise. (The electrons do not have 'aims' for their motion, so it is 'aimless', but to describe it this way makes an implicit contrast with purposeful motion – as perhaps when they rush to form a current?)
Read examples of anthropomorphism in science