An historical example of use of simile and metaphor in science:
"To date we have declared the nature & powers of the loadstone, & also the properties & essence of iron; it now remains to show their mutual affinities, & kinship, so to speak, & how very closely conjoined these substances are. At the highest part of the terrestrial globe, or at its perishable surface & rind, as it were, these two bodies usually originate & are produced in one and the same matrix, as twins in one mine."
William Gilbert
Gilbert, W. (1600). On the Magnet, Magnetic Bodies, and the Great Magnet of the Earth. A new science, with many both arguments and experiment proofs. (V. Wilmont, Trans.). Lulu.com.
(I am considering 'rind, as it were' as simile and 'as twins in one mine' as metaphor.)
Read about examples of science similes