In the following excerpt from a novel, the protagonist reflects on a recent event:
"As she gazed out at the turbulent sea, she felt like Odysseus, caught in the maelstrom of fate, yearning for home. The waves crashed against the shore, each one echoing her inner turmoil, as though Poseidon himself was testing her resolve."
Which of the following literary devices is primarily at play in this excerpt?