The juàn reading is reserved for animal enclosures: 猪圈 (pigsty), 羊圈 (sheepfold), 圈养 (rear in captivity). If the 'enclosure' is metaphorical (social, geometric) use quān; if it's a literal pen for livestock use juàn.
mistakes
This reading is the pen itself, a noun. Penning an animal up is the verb 圈, first tone. A third reading of the same character, easy to lose because it differs from this one only by tone.
Outer enclosure radical (wéi) - wraps the phonetic to depict the fenced boundary of a livestock pen. The frame is the meaning here: a closed perimeter holding animals inside.
Inner 卷 supplies the sound. The juàn reading preserves the phonetic more faithfully than the quān reading does - the tone shifted but the rime stayed close to juǎn.