AFAIK the largest DG installed on any sub during WWII were the two 203mm whoppers aboard the French Submarine Surcouf:
http://en.wikipedia.org/wiki/French_submarine_Surcouf
The Japanese I-400 only had a single 140mm DG:
http://en.wikipedia.org/wiki/I-400_class_submarine
Nothing like this size was ever installed on a U-boat. The largest gun produced for the German Navy in WWII were the 8×
380 mm/L48.5 SK-C/34 installed on Bismarck. You could do what CCIP did with a Catalina a couple of years ago and install a BB turret on the front of your boat if you want to get involved in surface engagements.