Sefer Tehillim (Psalms) consists of 150 mizmorim, most likely compiled (and perhaps even entirely written) by King David. The mizmorim are not in chronological order following the events that inspired them, as is clearly seen from their introductions. (Although I have not ruled out the possibility that they are in chronological order of their composition.) Let us assume that they are not just randomly permuted, but rather grouped in their specific order for a reason (or many reasons) realating to their content.
What are good (preferably medieval) sources that consistently discuss the order of the mizmorim? To be clear: I am looking for Jewish sources and commentaries that discuss reasons for the juxtapositions of the chapters in Tehillim.