Devices which generate high-power microwaves due to the interaction of electron beams with electromagnetic fields can be simulated with CST PARTICLE STUDIO®. The fully relativistic, self-consistent particle-in-cell solver, including full space charge effects, is used to simulate a virtual cathode oscillator (vircator). The simulation aids understanding and gives insight into the physics governing the operation of the device. The general level of sensitivity of the device is evaluated for different prospective variable parameters. The ones which cause a significant variation in device operation or efficiency are then used as input for the optimizer in order to find the best parameter sets for maximum efficiency at different frequencies of interest.