3D version of free boundary condition for mhd wave