You will need to have your centre of lift in front of the centre of mass, this is important because it is the reason you will be able to submerge.
Finally you will need to make your ships centre of mass close to the bottom of it, this helps prevent capsizing as well as helping you to dive.
original text from steamcommunity.com