How to Handle Three-Dimensional Boundary Conditions

Hello,
Your question is strongly related to the setting of an appropriate variational formulation.
You may look at About MHD equations, otherwise you have to say more on the specific form of your equations and boundary conditions.