Part 1: Overview
The following elements are used by me in the interest of replicating the real functions of submarines.
-)Neutral Buoyancy: Utilizing buoyant blocks with their buoyancy adjusted so that the Submarine doesn't sink nor float. This is the heart of my submarine's function as it allows the rest to work properly.
-)Ballast control: A simulation of the function where a submarine's tanks are filled with air and water for surfacing and sinking respectively. The General method I use is a vertical engine which acts on the neutral buoyancy to push the sub up and down.
-)Hydroplane pitch: Real Submarines don't just change their depth with ballast, much like airplanes do with elevators Submarines use control surfaces to adjust their pitch in forward motion. I design my pitch to work just like with planes, to allow you to transfer forward motion into surfacing or diving.
-)Rudder: While many people use the Yaw Power of Gyroscopes, but my method involves putting a wing on the vessel's COM alongside another on rotator in the rear. With some adjustment (making the wing longer then scaling down) you'll get natural rudder control.
-)Underwater engine: An engine capable of functioning underwater, this is important for pushing your submarine forward. Yet engines in SP mostly stop working underwater, but there are solutions.
These are the elements that make up my submarine's functions, and the overall design takes heavy influence from willy1111's G2 Submarine. It's use of near neutral buoyancy and hydroplanes inspired my overall method heavily.
Now that you know the general method to my submarine's functions, here is the tutorial!
Part 2: Building
Put the body of your submarine together, build the hull, the conning tower, and add the control surfaces.
Link the control surfaces to rotators so that they can move freely..
Add your propulsion and ballast engines. Whether you use a rotator and wing engine or VTOL nozzles with a detached VTOL engine put on floats. Put your forward propulsion engine (or engines) on the back while putting the engine that will push your sub up and down (the ballast engine) at or near the COM.
You will want to mount your ballast engine on a floppy rotator with a gyroscope keeping it level.
- Control Surfaces:
There are two types of control surfaces to work with, one which controls pitch and another which controls yaw.
Depending on the size of your submarine, you can either use normal sized wings or need to use very wide wings scaled down to size. If your submarine is small (Less than around 100 feet) you can use use normal wings. If you initially used fuselage blocks to build the control surfaces of your sub's body, attach the wings to these.
Make sure the front and rear control surfaces for pitch turn opposite ways, this creates the opposing force which will direct your forward motion into a change of direction. For Yaw control put wings on your yaw rotators and add a long vertical wing to the vessel's COM to provide a forward stability in turning.
Note: You may want to use the same wing dimensions for all control surfaces except for the front hydroplanes, which you will want to be wider than the back. Scaling them down can allow any wing dimension to fit your sub's control surfaces without affecting their responsiveness.
Two main types of engines are suitable for powering a submarine's propulsion and ballast mechanism. One consists of installing VTOL nozzles with the engine detached and floating, another more advanced engine involves the use of unlimited spinning rotators with wings attached. One such engine is linked above, alongside another used for ballast.
- Neutral Buoyancy:
The best way to implement neutral buoyancy for me is to take two fuselage blocks. Attach them to your build with one near the bow (front) and one near the stern (back).
Start by upping their buoyancy until the submarine floats, if the front or rear starts to droop in the water nudge the buoyancy blocks positions until the submarine floats level.
Now that your sub is level, it's time to make adjustments. There are two ways you can change the buoyancy of these two blocks. One is to simply change their size, adjusting length and the size of the faces.
If you have access to XML modding or the Overload mod you can adjust the buoyancy number. Though it won't show on the options menu for those parts you can set the buoyancy well past 100%.
Set the buoyancy to neutral, if your sub sinks set it higher, if it floats set it lower. As you keep at it, you'll get closer and closer to neutral buoyancy till you finally reach that value.
- Fine Adjustment:
Making your submarine work right can take fine adjustments to several areas, the power of your engine, angle of control surfaces, ballast and buoyancy, you'll want to revisit certain parts of your sub's function to get everything working just right.
If you have any questions do ask in the comments