How do I apply two periodic boundary conditions?

Combine them into once, as for instance shown in: