Hello,
I am working on a simulation and need to control various sections of the CST software using MATLAB. In simpler terms, I am looking for a link between CST and MATLAB. I have accomplished this using functions available in the history list of the CST software. However, there are certain operations, such as parameter sweeps, that do not appear in the history list.
1. Regarding these operations, for which there is no auxiliary code in the history list, I have searched extensively and have been able to find a code for the Eigenmode Solver that executes correctly. The code is as follows:
SetupSolver = mws.invoke('ChangeSolverType','HF Eigenmode');
ParameterSweep = mws.invoke('ParameterSweep');
ParameterSweep.invoke('SetSimulationType','Eigenmode');
ParameterSweep.invoke('AddSequence','Sequence 1');
ParameterSweep.invoke('AddParameter_Samples','Sequence 1','Fx','0','180','5','False');
ParameterSweep.invoke('Start');
Since I am working on unit cell structures, I need to use the Frequency Domain Solver. Unfortunately, I have not found a code for parameter sweeps in this case, and all my efforts to create a similar code for the Frequency Domain Solver have been unsuccessful. Here’s the code I created for the Frequency Domain Solver, but it encounters issues:
SetupSolver = invoke(mws,'ChangeSolverType','HF Frequency Domain');
ParameterSweep = invoke(mws,'ParameterSweep');
ParameterSweep.invoke('SetSimulationType','FrequencyDomain');
ParameterSweep.invoke('AddSequence','Sequence 1');
ParameterSweep.invoke('AddParameter_Samples','Sequence 1','Fx','0','180','5','False');
ParameterSweep.invoke('Start');
What do you suggest for resolving the parameter sweep issue in the Frequency Domain Solver?
2. Another problem is that when using the MATLAB-CST link, none of the processes performed in CST are stored in the history list. As a result, if there is a need to modify the geometry of the structure, changes cannot be made within the CST program itself. This requires reapplying changes through the MATLAB code, which can be time-consuming. Do you have any suggestions for saving these processes in CST?
Thank you in advance for your assistance!