An example of simile in popular science writing:
"Is it possible to generate energy from hydrogen in a peaceful, controlled way here on the Earth? … The favoured possibility is a reaction involving deuterium alone. …
A very high temperature is necessary to make the reaction 'go'. Extremely hot deuterium gas [sic] must be held imprisoned in space in such a way that it never touches the walls of the containing vessel, otherwise heat is lost and the reaction stops. Complicated magnetic fields are being used to hold the gas, in the hope that it will stay inside a sort of magnetic prison. So far it refuses to do so. Eventual temperatures as high as 300,000,000˚ will be needed."
Fred Hoyle (1960) The Nature of the Universe (Revised ed.), 1960
Read about examples of science similes
That deuterium 'refuses' to behave is an anthropomorphic metaphor, as clearly the plasma is not doing anything deliberately.
Read examples of anthropomorphism in science