Method of Characteristics
This is a code I wrote when designing a small scale rocket engine nozzle. It is very common to map a cubic function to ideally calculated input and output nozzle diameters; however, this can lead to flow instability and shocks inside the nozzle. This code uses the method of characteristics (where each line is a characteristic solution of the Prandtl-Meyer expansion fan) to generate shock mitigating nozzle curvature. This generation can be based off of ideal exit pressure (expansion ratio) or mach number. While it was not practical to machine a nozzle matching this exact specification, I was able to 3d print one, and hope to resin print a functional nozzle in the future.