The primary goal of this study is to use CFD analysis to investigate the impact that a cavity has on the pressure at the base of a structure. In this analysis, we took into account the NPR, the cavity aspect ratio, and the cavity position. In this case, the area ratio is 3.24 and the Mach number is 2.0. Simulations were run with L/D ratios between 1 and 6, and NPRs of 3, 5, 7.8, 9, and 12. The 2-dimensional model was developed using ANSYS Fluent's Design Modeler. The nozzle is operating at Mach 2.0. Base pressure and wall pressure in the duct were the primary research foci. The C-D nozzle was created for this research. ANSYS Fluent was used to verify the CFD findings. When the nozzles are under-expanded and the cavity is at 0.5D, passive control as a cavity is shown to be effective. It appears that 1D is the bare minimum for duct length. Because the shear layer gets reattached to the duct wall at 1D and the boundary layer grows after reattachment, passive control is not observed in the flow process regardless of whether the cavity is located at 1D, 1.5D, 2D, or 3D. An oscillating base pressure is seen at shorter duct lengths. This phenomenon does not occur at longer duct lengths. Whether or not there are cavities in the duct, the flow field is the same.