Based on the documentation, the default GPU is the one with the lowest id:
If you have more than one GPU in your system, the GPU with the lowest ID
If you want to run your code on the second GPU,it assumes that your machine has two GPUs, You can do the following trick.
open Terminal
open tmux by typing tmux (you can install it by sudo apt-get install tmux)
Note: By default, tensorflow uses the first GPU, so with above trick, you can run your another code on the second GPU, separately.
Hope it would be helpful!!