How to split the system by different groups?

Hi everyone. How can I split the system into different independent areas or groups?

For example:
For group 1, nodes 1, 2, 3, 4 and 5 deliver water (other nodes, demand base is 0)
For group 2, nodes 1, 2, 6 and 7 provide water (other nodes, demand base is 0)

Now, I can do this, but by creating one file for every group. Therefore, I would like to know if I can create different groups in just one file.