CST Studio Suite® provides an interface for parameter sweeping and optimization for designs. In this short note we describe different possibilities. It is a good practice to parametrize a design instead of putting fixed values in the geometry. These parameters can then be swept using the parameter sweep option or optimized in the optimizer. But parameters can also be defined in macros and in the the post processing templates. This enables calculation of integrals or impedances based on swept parameters, such as position or offset. Post processing templates are the same as macros. They can be run automatically after each solver run or manually, while macros can only be executed manually. Their internal structure is also a bit different. If a parameter is defined in a post processing template and a sweep is defined, then MWS will perform the desired sweep by recalculating the whole structure for every point. This is far from efficient. In order to overcome this limitation following methods can be used. Either:
- Write a new post processing template that covers your needs.
This is of course the best solution, but it needs some time in order to work through the scripts. Or:
- Use the optimizer.
In order to use the optimizer do as follows:
- Define parameters.
- Use them in the template based post processing
- Choose Simulation type → Template Based Postprocessing
- Set up parameter ranges in the optimizer
- Set up a dummy optimization goal and run the optimizer
This results in the desired optimization curves. But this method has some disadvantages:
- Curves are not annotated correctly
- The points are not true sweeps but optimization jumps
The best results can be obtained by use of sweep in the Design Studio®. For this do as follows:
- Define parameters with some initial value
- Use them in the template based post processing
- Save the 3D design
- Start a new empty Design Studio® project.
- Define global parameters across the design studio project
- Block Simulation Tree → Field Simulators → Microwave Studio Block, then point to the main project which was saved in the previous step.
- Go to block properties and connect the global parameters with block parameters.
- New task → Generalized → Block and choose Project type and solver type, i.e. MWS and Eigenmode Solver.
- New task → Simulation and Control → Parameter sweep.
- In the navigation tree add a new sweep task
- New task → Generalized → Block and choose Project type and solver type: Post processing Templates > Update Tasks
The results will be visible in the 1D result tree.
Acknowledgements
The author acknowledges help of Felix Wolfheimer and Stefan Löbig of CST.