It's from psychology: it's where an intelligence develops a model of a thing and then mentally simulates what will happen to it given X. Caledionian crows are capable of developing mental models in solving problems, for example. A mental model of a person is basically where you've acquired enough information of them to approximate their intentions or actions. (Or you might use existing archetypes or your own personality for modeling--put yourself in their shoes.) For example, a lot of the off color jokes by Jimmy Carr would seem malicious from a stranger, misogynist, or racist, whereas you can see with someone like Carr that the intention is to derive amusement from the especially offensive rather than to denigrate a group.
From Costanza's original thread (entire text):
Meta: