Beruflich Dokumente
Kultur Dokumente
Background
Background
Goji Ltd develops technology for spatially controlled
energy delivery
Goji processes of dielectric heating involve complex
co-simulations
Many user-defined combinations of monitors are
to be evaluated
An in-house tool was developed to facilitate such
manipulations (SARA)
Who is SARA?
Product Overview
SAR, Antenna & Resonator Analyzer
Design Challenges
User-friendly (fire and forget)
Run CST Run SARA
Programmer-friendly
Robust and flexible coding environment
Performance
Accuracy and running time should be acceptable
Disk space
A single process should be manageable
Selected Architecture
VB.NET
GUI
Matlab
Project Management
Main Calculations
Additional tools
Data manipulation
(CSTResultReader
library)
10
VB.NET VBA
VB.NET VBA
CST offers Command Line options for invoking VBA
via external programs (Windows, Matlab, etc.)
Command Line options in CST help files
Application note Calling CST studio from Matlab
Installation path
MWS option
VB.NET VBA
Public Sub some_function_1()
model_path = a_model_path
Using sw As StreamWriter = New StreamWriter("C:\script.bas")
sw.WriteLine("'#include "sara_globals.lib")
sw.WriteLine("Option Explicit")
sw.WriteLine("sub main()")
sw.WriteLine(" OpenFile ("model_path.cst") ")
sw.WriteLine(" ports_num=Solver.GetNumberOfPorts")
sw.WriteLine(" analyze_files()")
sw.WriteLine(" Data_Process()")
sw.WriteLine(" SARA_done()")
sw.WriteLine(" Wait(100000000)")
sw.WriteLine("End Sub")
End Using
End Sub
VB.NET VBA
The same command line is used in VB.NET
regardless of the selected process
The auxiliary script is written in real time, and its
internal content is determined by the user input
Troubleshooting
VBA engine blocks nested macros, therefore weve
included our own library of functions
(SARA_globals.lib)
To avoid automatic closing of CST at the end of SARA
process we add Wait(100000000) to view results
When dealing with CST externally, one should recognize
already-open CST instances. We use the task manager.
Matlab VBA
Matlab VBA
Main problems with manipulating CST results
Most calculations are relatively heavy for VBA
ASCII export is both time- and storage-consuming
Pros
Fast processing
External data
manipulation
Works with Matlab
Cons
Writing back into CST
Limited functionality
Only hexahedral
mesh is supported
16
Results:
i 1
i 1..100
10k cells
300k cells
1350k cells
VBA, regular
18s
49s
146s
VBA, no selection
0.86s
20s
81s
Matlab
0.27s
2.75s
11s
18
ModelCache\model.mif
History list information
Frequency range
Units
Boundaries
Material properties
Ports information
Etc
Result\model.res
Available results
Existence. Not data.
Type
HIDDENITEM
Monitors name and type
The End
24