I am designing a convergent nozzle as well as a CD(Converging-Diverging) nozzle. How do I find out the length of those nozzles? If the throat of the CD nozzle has 0 length then what should be the the length of converging and diverging section?
To convert as much of your built up pressure energy, your nozzle should be long enough for the built up pressure to decrease to ambient pressure or slightly below. This is true for both a convergent nozzle, and the convergent-divergent nozzle
The length of the different sections depend on the structure of around the nozzles. How much pressure can it handle, what is the maximum temperature it can handle.
You should transition from convergent to divergent, when the velocity of the air is almost supersonic.
You should then end your divergent part, when the pressure is equal to, or slightly lower than ambient pressure.
The reason you may want overexpand the air and have the output pressure be slightly lower than ambient pressure, could be to contain the air behind the engine in a straight line
It's what gives us shock diamonds in the exhaust