CST Studio Suite - Advanced Topic

download CST Studio Suite - Advanced Topic

of 109

Transcript of CST Studio Suite - Advanced Topic

  • 8/10/2019 CST Studio Suite - Advanced Topic

    1/109

    CST STUDIO SUITE 2006

    CST DESIGN ENVIRONMENT | CST MICROWAVE STUDIO

    CST EM STUDIO | CST PARTICLE STUDIO | CST DESIGN STUDIO

    A D V A N C E D TO P I C S

    C S T S T U D I O S U I T E 2 0 0 6

  • 8/10/2019 CST Studio Suite - Advanced Topic

    2/109

    Copyright

    2005

    CST GmbH Computer Simulation Technology

    All rights reserved.

    Information in this document is subject to change

    without notice. The software described in this

    document is furnished under a license agreement

    or non-disclosure agreement. The software may

    be used only in accordance with the terms of those

    agreements.

    No part of this documentation may be reproduced,

    stored in a retrieval system, or transmitted in

    any form or any means electronic or mechanical,

    including photocopying and recording for any

    purpose other than the purchasers personal use

    without the written permission of CST.

    Trademarks

    CST MICROWAVE STUDIO,CST DESIGN ENVIRONMENT,

    CST EM STUDIO, CST PARTICLE STUDIO, CST DESIGN

    STUDIO are trademarks or registered trademarks of

    CST GmbH.

    Other brands and their products are trademarks or

    registered trademarks of their respective holders and

    should be noted as such.

    CST Computer Simulation Technology

    www.cst.com

  • 8/10/2019 CST Studio Suite - Advanced Topic

    3/109

    CST STUDIO SUITE 2006 Advanced Topics 1

    September 24th, 2005

    Contents

    CHAPTER 1 - INTRODUCTION.................................................................................................................. 3

    CHAPTER 2 THE SIMULATION METHOD.............................................................................................. 42.1 Background of the Simulation Method...................................................................................4

    The Finite Integration Technique (FIT) ................................................................................... 4CST MICROWAVE STUDIOSolvers.................................................................................... 7CST EM STUDIOSolvers................................................................................................... 9CST PARTICLE STUDIOSolvers ..................................................................................... 10References ........................................................................................................................... 11

    2.2 Error Sources / Sources of Inaccuracy ................................................................................12Disagreement between Simulation Model and Reality.......................................................... 12Inaccuracies due to the Simulation....................................................................................... 12

    CHAPTER 3 MESH GENERATION ........................................................................................................143.1 Methods of Hexahedral Mesh Generation ...........................................................................143.2 Hexahedral Mesh Generation for High Frequency Problems ..............................................153.3 Hexahedral Mesh Adaptation for High Frequency Problems...............................................203.4 Hexahedral Mesh Generation for Low Frequency Problems ...............................................25

    3.5 Hexahedral Mesh Adaptation for Low Frequency Problems................................................293.6 Tetrahedral Mesh Generation ..............................................................................................333.7 Recommended Initial Hexahedral Discretizations ...............................................................39

    Coaxial Structures ................................................................................................................ 39Planar Structures.................................................................................................................. 39Helical Structures ................................................................................................................. 40

    3.8 Mesh Tuning........................................................................................................................41Local Mesh Parameters for Hexahedral Mesh Generation................................................... 41Local Mesh Parameters for Tetrahedral Mesh Generation................................................... 46

    CHAPTER 4 PERFORMANCE IMPROVEMENTS..................................................................................484.1 General Hints.......................................................................................................................484.2 High Frequency Transient Simulations ................................................................................48

    Non Resonating Structures................................................................................................... 52Resonating Structures .......................................................................................................... 53

    4.3 Auto-Regressive Filtering (AR-Filter) ...................................................................................544.4 Meshing Thin Conductors Using Tetrahedral Grids .............................................................61

    CHAPTER 5 - CAD DATA IMPORT AND HEALING .................................................................................625.1 Import 2D Files ....................................................................................................................635.2 Import 3D Files ....................................................................................................................645.3 Inspect and Repair the Imported Model...............................................................................665.4 Parameterize the Imported Model .......................................................................................72

  • 8/10/2019 CST Studio Suite - Advanced Topic

    4/109

    2 CST STUDIO SUITE 2006 Advanced Topics

    CHAPTER 6 TEMPLATE BASED POST-PROCESSING .......................................................................756.1 Framework to Control Result Templates .............................................................................756.2 Pre-Loaded Post-processing Templates..............................................................................77

    Example for Post-processing Templates .............................................................................. 77

    CHAPTER 7 - VBA MACRO LANGUAGE.................................................................................................837.1 Introduction..........................................................................................................................837.2 VBA Development Environment ..........................................................................................83

    VBA Help System ................................................................................................................. 84VBA Editor Shortcuts ............................................................................................................ 85

    7.3 VBA Language Elements.....................................................................................................86Subroutines and Functions ................................................................................................... 86Variables, Data Types and Type Conversions...................................................................... 87

    Applications, Objects and Their Methods ............................................................................. 88Flow Control ......................................................................................................................... 90File Operations ..................................................................................................................... 91Graphical User Interface Builder........................................................................................... 91

    Mathematical Functions, Operators and Constants.............................................................. 927.4 Concepts of Macro Programming in CST STUDIO SUITE...............................................93

    User-Defined Functions ........................................................................................................ 93Local Project Macros ............................................................................................................ 94Global Macros and Global Library Path ................................................................................ 94

    7.5 Control Macros ....................................................................................................................95Result1D Object ................................................................................................................... 96Result3D Object ................................................................................................................... 98

    Adding Data Items to the Navigation Tree............................................................................ 99Traverse Folders and Select Items from the Navigation Tree............................................... 99

    Access the Currently Displayed Plot Data .......................................................................... 100Access Farfield Data from a VBA Script ............................................................................. 101

    7.6 Structure Macros ...............................................................................................................102Create a Structure Macro or a New Project Template ........................................................ 102Difficulties in Creating Structure Macros............................................................................. 104Use Dialog Boxes in Structure Macros ............................................................................... 105Common Pitfalls in the Usage of Structure Macros ............................................................ 105

    7.7 Pre-Loaded VBA Macros...................................................................................................106

  • 8/10/2019 CST Studio Suite - Advanced Topic

    5/109

    CST STUDIO SUITE 2006 Advanced Topics 3

    Chapter 1 - IntroductionThis manual is primarily designed for advanced users of CST STUDIO SUITETMwho arealready familiar with the basic concepts of using the software.

    Before you start reading this book, we strongly recommend you carefully work throughthe Getting Startedmanuals and the Tutorials.

    This collection of Advanced Topicsoffers some additional information on subjects thatare usually of a more involved nature. The following list gives a short summary of thismanuals contents:

    Chapter 2 is dedicated to the FI method, which is the underlying mathematicalsimulation technique. After a general introduction into the methodsfundamentals, the PBA technique (Perfect Boundary Approximation) is alsointroduced. Further sections in this chapter then explain possible sources oferrors or inaccuracies.

    Chapter 3 focuses on mesh generation strategies for both, hexahedral andtetrahedral meshes.

    Chapter 4 introduces some techniques helping to improve the performance ofsimulations.

    Chapter 5 covers the basic principles of importing CAD data in two and threedimensions. Some hints are given on how to improve the robustness andreliability of exchanging CAD data files.

    Chapter 6 explains the Postprocessing Templatesand how they can be utilizedto automate the post-processing.

    Chapter 7 provides an introduction to the key concepts of the VBA-basedmacro programming language used in CST STUDIO SUITETM. You will obtaininformation on the most important VBA elements through a couple of examples.

    A basic understanding of these language elements will be very helpful for youin order to write your own macros and user-defined functions.

    Please note that this book is not intended to be a complete reference guide. Forsuccessfully mastering these more advanced topics, we strongly recommend that youvisit a specialized training class. Please contact your local support center for moreinformation.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    6/109

    4 CST STUDIO SUITE 2006 Advanced Topics

    Chapter 2 The Simulation Method

    2.1 Background of the Simulation Method

    The Finite Integration Technique (FIT)

    CST STUDIO SUITETM is a general-purpose electromagnetic simulator based on theFinite Integration Technique (FIT), first proposed by Weiland in 1976/1977 [1]. Thisnumerical method provides a universal spatial discretization scheme applicable tovarious electromagnetic problems ranging from static field calculations to high frequencyapplications in time or frequency domain. In the following section the main aspects ofthis procedure are explained and extended to specialized forms concerning the different

    solver types.

    Unlike most numerical methods, FIT discretizes the following integralform of Maxwellsequations rather than the differential one:

    = AA

    Adt

    BsdE

    rr

    rr,

    +

    =

    AA

    AdJt

    DsdH

    rrv

    rr,

    = VV

    dVAdD rr

    , 0=V

    AdBrr

    .

    To solve these equations numerically, you must define a finite calculation domain,enclosing the considered application problem. Creating a suitable mesh system splitsthis domain up into many small elements, or grid cells. For simplicity, we will restrict thefollowing explanations to orthogonal hexahedral grid systems first.

    The firstorprimary meshcan be visualized in CST STUDIO SUITETMin the Mesh View;however, internally a second or dual mesh is set up orthogonally to the first one. Thespatial discretization of Maxwells equations is finally performed on these two orthogonalgrid systems where the degrees of freedom are introduced as integral values. Referringto the following picture, the electric grid voltages e and magnetic facet fluxes b areallocated on the primary grid G . In addition, the dielectric facet fluxes das well as the

    magnetic grid voltages hare defined on the dual grid G~

    (indicated by the tilde):

  • 8/10/2019 CST Studio Suite - Advanced Topic

    7/109

    CST STUDIO SUITE 2006 Advanced Topics 5

    Now Maxwells equations are formulated for each of the cell facets separately asdemonstrated in the following. Considering Faradays Law, the closed integral on theequations left side can be rewritten as a sum of four grid voltages without introducingany supplementary errors. Consequently, the time derivative of the magnetic flux definedon the enclosed primary cell facet represents the right-hand side of the equation, asillustrated in the figure below. Repeating this procedure for all available cell facetssummarizes the calculation rule in a matrix formulation, introducing the topologicalmatrix C as the discrete equivalent of the analytical curl operator:

    Applying this scheme to Ampres law on the dual grid involves the definition of a

    corresponding dual discrete curl operator C~

    . Similarly the discretization of the

    remaining divergence equations introduces discrete divergence operators S and S~

    ,belonging to the primary and dual grids, respectively. As previously indicated, thesediscrete matrix operators consist of elements 0, 1 and -1, representing merelytopological information. Finally we obtain the complete discretized set of Maxwells GridEquations(MGEs):

    bCedt

    d= , jdhC +=

    dt

    d~,

    qdS =~ , 0Sb= .

  • 8/10/2019 CST Studio Suite - Advanced Topic

    8/109

    6 CST STUDIO SUITE 2006 Advanced Topics

    Compared to the continuous form of Maxwells equations, the similarity between bothdescriptions is obvious. Once again it should be mentioned that no discretization errorhas yet been introduced. A remarkable feature of FIT is that important properties of thecontinuous gradient, curl and divergence operators are still maintained in grid space:

    0CSSC ==~~

    0rotdiv

    0SCSC == TT~~

    0gradrot

    At this point it should be mentioned that even the spatial discretization of a numericalalgorithm could cause long-term instability. However, based on the presentedfundamental relations, it can be shown that the FIT formulation is not affected by suchproblems since the set of MGEs maintain energy and charge conservation [2].

    Finally, the missing material relations introduce inevitable numerical inaccuracy due tospatial discretization. In defining the necessary relations between voltages and fluxes,their integral values have to be approximated over the grid edges and cell areas,respectively. Consequently, the resulting coefficients depend on the averaged materialparameters as well as on the spatial resolution of the grid and are summarized again incorrespondent matrices:

    EDrr

    = eMd =

    HBrr

    = hMb =

    SJEJrrr

    += SjeMj +=

    Now all matrix equations are available to solve electromagnetic field problems on thediscrete grid space. The fact that the topological and metric information is divided intodifferent equations has important theoretical, numerical and algorithmic consequences[2].

    In addition to orthogonal hexahedral grids, FIT can also be applied to more generalmesh types such as topologically irregular grids (subgrids) and tetrahedral grids,respectively. The picture below shows the allocation of the electric voltages andmagnetic fluxes on a tetrahedral mesh cell.

    The application of FIT to these more general types of meshes can be seen as anextension to the basic method outlined above. However, due to the limited space in thismanual these advanced techniques cannot be presented here. Please refer to thereferences for more information [4].

    ek

    e

    ei

    bn

  • 8/10/2019 CST Studio Suite - Advanced Topic

    9/109

    CST STUDIO SUITE 2006 Advanced Topics 7

    In the case of Cartesian grids, the FIT formulation can be rewritten in time domain toyield standard Finite Difference Time Domain methods (FDTD). However, classicalFDTD methods are limited to staircase approximations of complex boundaries. Incontrast, the Perfect Boundary Approximation (PBA) technique [3] applied to the FITalgorithm maintains all the advantages of structured Cartesian grids while allowing

    accurate modeling of curved structures. The FI method can be even further enhanced bythe Thin Sheet Technique(TST) which improves the modeling of thin perfectly electricconducting sheets.

    As demonstrated, the FIT formulation is a general method and therefore can be appliedto all frequency ranges from DC to high frequencies.

    One outstanding feature of CST STUDIO SUITETM is the Mesh on DemandTMstrategy,which is a combination of hexahedral grids (including PBA and TST) and tetrahedralgrids. This flexibility allows choosing the best-suited mesh type for every particularapplication. The Mesh on DemandTMapproach is exceptionally powerful in combinationwith the Method on DemandTMcapability which allows choosing the most efficient solver

    module for the given problem.

    Currently, three electromagnetic solver products are available within CST STUDIOSUITETM:

    1. CST MICROWAVE STUDIO(MWS), covering the high frequency range, bothin transient and in time harmonic state

    2. CST EM STUDIO (EMS), the low-frequency package, which includes avariety of static and low frequency solvers

    3. CST PARTICLE STUDIO(PS), the particle tracking solver package

    CST MICROWAVE STUDIO

    SolversThree solver types are available concerning high frequency electromagnetic fieldproblems: transient, frequency domain and eigenmode solver. More details about thesesolvers can be found in the CST MICROWAVE STUDIO Getting Startedmanual. Thepurpose of the following section is to provide basic information about the solvers and topresent the corresponding fundamental equations.

    Transient Solver

    The CST MICROWAVE STUDIOtransient solver allows the simulation of a structuresbehavior in a wide frequency range in just a single computation run. Consequently, this

    is an efficient solver for most driven problems, especially for devices with openboundaries or large dimensions. Refer to section 4.2 to get detailed information on howto improve the solvers performance.

    The transient solver is based on the solution of the discretized set of Maxwells GridEquations. Substituting the time derivatives by central differences yields explicit updateformulation for the loss-free case:

    n

    S

    nnn t jbMCMee ++= + 112/12/1~

    ,

    2/11 ++ = nnn t eCbb .

    Regarding the relations above, calculation variables are given by electric voltages and

  • 8/10/2019 CST Studio Suite - Advanced Topic

    10/109

    8 CST STUDIO SUITE 2006 Advanced Topics

    magnetic fluxes. Both types of unknowns are located alternately in time, as in the well-known leap-frog scheme shown below:

    For example, the magnetic flux at tnt += )1( is computed from the magnetic flux at

    the previous time step tnt = and from the electric voltage at half a time step before,

    at tnt += )2/1( .

    Explicit time integration schemes are conditionally stable. The stability limit for the time

    step tis given by the Courant-Friedrichs-Levy (CFL)-criterion--

    222111

    +

    +

    zyx

    t

    --which has to be fulfilled in every single mesh cell.

    Frequency Domain Solver

    The CST MICROWAVE STUDIO

    frequency domain solver is useful for simulatingelectrically small to mid-size problems or for narrowband structures. Other applicationareas are problems where arbitrary periodic boundaries or even unit cell boundaries areneeded.

    The frequency domain solver is based on Maxwells Grid Equations in the time harmoniccase ( i/ t ). For loss-free problems this leads to the following second-order

    relation:

    ( ) jeMCMC iJiEcurlcurl == 221

    1

    ~rr.

    The general-purpose frequency domain solver can be used together with hexahedral ortetrahedral grids.

    The general-purpose solver is accompanied by a solver module specialized for S-parameter calculations in highly resonant loss-free structures such as filters. This solverdoes not compute fields but is extremely fast compared to other simulation methods. Asa third alternative, an extension of the latter solver is available which is able to calculatethe fields as well. However, the additional field computation takes quite a bit of time,significantly reducing performance.

    ten-1/2 en+1/2bn bn+1

  • 8/10/2019 CST Studio Suite - Advanced Topic

    11/109

    CST STUDIO SUITE 2006 Advanced Topics 9

    Eigenmode Solver

    The CST MICROWAVE STUDIO eigenmode solver allows computation of thestructures eigenmodes and the corresponding eigenvalues.

    The eigenmode solver is based on the eigenvalue equation for non-driven and loss-freetime harmonic problems. The solution is obtained in the loss-free case via the Krylov-Subspace or Jacobi-Davidson method:

    eMCeMC 221

    1

    ~==

    EEcurlcurlrr

    .

    For lossy problems, a Jacobi-Davidson solver is used.

    CST EM STUDIOSolvers

    Five different solver types are available: electrostatic, stationary current, magnetostatic,low-frequency and stationary thermal solvers. More details about these solvers can befound in the CST EM STUDIO Getting Startedmanual. The purpose of this section isto describe the fundamental equations on which the solvers are based.

    Electrostatic Solver

    Based on the discretized Faradays Law without time dependency ( 0/ = t ) and the

    appropriate divergence equation, you can construct a linear equation system forelectrostatic problems:

    qSMS eT

    ==

    ~~

    graddiv

    This solver module can be used together with hexahedral or tetrahedral grids.

    Stationary Current Solver

    Based on the discretized Amperes Law without time dependency ( 0/ = t ) and the

    appropriate divergence equation, you can construct a linear equation system forstationary current problems:

    0SMS jT ==

    ~~0 graddiv

    Magnetostatic Solver

    To solve magnetostatic field problems, a non-physical vector field hiis constructed in afirst step fulfilling Ampres Law:

    jhC i==~

    JHrot irr

    In general, this field contains magnetic charges that can be eliminated by solving ascalar field problem:

  • 8/10/2019 CST Studio Suite - Advanced Topic

    12/109

    10 CST STUDIO SUITE 2006 Advanced Topics

    mi qhMS == miHdiv r

    mmmgraddiv qSMS T ==

    Finally, the actual magnetic field vector solution can be obtained from the hifield and thescalar potential by:

    m

    T

    i Shh =

    This solver module can be used together with hexahedral or tetrahedral grids.

    Low Frequency Solver

    The Low Frequency Solver is based on Maxwells Grid Equations in the time harmoniccase ( i/ t ), which leads to the following second-order relation:

    ( ) jeMMCMC iiJiEicurlcurl =+=+ 221

    1

    ~rr.

    This solver module can be used together with hexahedral or tetrahedral grids.

    Stationary Thermal Solver

    Based on the discretized Fouriers Law of Heat Conduction without time dependency( 0/ = t ) and the appropriate divergence equation, a linear equation system for

    stationary thermal problems can be derived:

    QTQTgradkdiv k && == TSMS ~~

    CST PARTICLE STUDIOSolvers

    CST PARTICLE STUDIOTM contains some of the solver modules which have beenalready discussed above:

    Electrostatic solver Magnetostatic solver Eigenmode solver

    In addition to this, CST PARTICLE STUDIOTM

    also includes some specialized solverswhich will be explained in the following. Note that CST PARTICLE STUDIOTM iscurrently operating on hexahedral grids only.

    Particle Tracking Solver

    The CST PARTICLE STUDIO Particle Tracking Solver calculates the effect ofelectromagnetic fields on the movement of charged particles.

    The solver is based on the discretized versions of the electric- and magnetic force law:

  • 8/10/2019 CST Studio Suite - Advanced Topic

    13/109

    CST STUDIO SUITE 2006 Advanced Topics 11

    )(d

    dBvEq

    t

    vm

    rr+= , )(

    2/12/12/111 +++++ ++= nnnnnnn BvEtvmvmrr

    ,

    v

    t

    r rr

    =

    d

    d

    12/12/3 +++ += nnn vtrr rrr

    .

    Gun Iteration Solver

    The Gun Iteration Solver performs alternately electromagnetic calculations of spacecharge effects and particle tracking calculations. Based on a previous particle trackingrun, the corresponding electric space charge caused by the particles is calculated. Thenthe electric field caused by the space charge is calculated and considered for the nextparticle tracking iteration. This iteration is repeated until convergence is reached. Thepicture below illustrates this scheme:

    References

    [1] Weiland, T.: A discretization method for the solution of Maxwell's equations for six-

    component fields: Electronics and Communication, (AE), Vol. 31, pp. 116-120, 1977.

    [2] Weiland, T.: Time domain electromagnetic field computation with finite differencemethods. International Journal of Numerical Modelling, Vol. 9, pp. 295-319, 1996.

    [3] Krietenstein, B.; Schuhmann, R.; Thoma, P.; Weiland, T.: The Perfect BoundaryApproximation technique facing the challenge of high precision field computation: Proc.of the XIX International Linear Accelerator Conference (LINAC98), Chicago, USA,pp. 860-862, 1998.

    [4] T. Weiland: RF & Microwave Simulators - From Component to System DesignProceedings of the European Microwave Week (EUMW 2003), Mnchen, Oktober 2003,

    Vol. 2, pp. 591 - 596.

    START

    END

    Gun Iteration:

    Calculateelectrostatic

    field distribution

    Track particles andmonitor space-charge

    Hasspace-chargeconverged?

    Relaxation ofspace-charge

  • 8/10/2019 CST Studio Suite - Advanced Topic

    14/109

  • 8/10/2019 CST Studio Suite - Advanced Topic

    15/109

    CST STUDIO SUITE 2006 Advanced Topics 13

    high frequency problems, the PML technique (Perfectly Matched Layer) is wellsuited and very accurate even when the structure is close to the object. CSTSTUDIO SUITETM chooses the optimum size of the surrounding simulation boxautomatically, but in some rare cases it may be worthwhile to check the sensitivityof the result to changes of this box.

    Waveguide ports have a specific open boundary technique in which the wavesare decomposed into their mode patterns. This technique allows even higheraccuracies than the PML boundary condition mentioned above. In cases ofinhomogeneous ports such as microstrip lines, combined with very large frequencybands, it might be necessary to activate special treatment to keep the error below -50 or -60 dB. As mentioned before, the size of the waveguide port must be definedlarge enough.

    Even if the field values are calculated correctly, interpolation errors may stilloccur, e.g. when deriving secondary field quantities or when calculating the fieldvalues at locations other than the grids edges.

    Numerical errorsmay be caused by the finite representation of numbers but cantypically be neglected for the explicit algorithm in time domain. However, except for

    the transient solver, a numerical error may arise when the correspondent matrixsystem is solved.

    Taking these potential sources of inaccuracies into account, you can ensure obtaininghigly accurate simulation results by performing mesh convergence studies.

    Furthermore CST STUDIO SUITE offers the feature of simulating the same structurewith different discretization types and solvers. This powerful option allows you todouble-check the results in critical cases by even using fundamentally differentmathematical approaches.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    16/109

    14 CST STUDIO SUITE 2006 Advanced Topics

    Chapter 3 Mesh GenerationAfter you have set up your model geometrically and assigned the appropriate powersources and boundary conditions, your model has to be translated into a computeraccessible format. As already mentioned above, the FI method, which is the foundationof CST STUDIO SUITETM, is a volume discretization method. Your calculation domainhas to be subdivided into small cells on which Maxwells Grid Equationsmust be solved.CST STUDIO SUITETM can use the FI formulation on orthogonal Cartesian grids or ontetrahedral grids. The mesh influences the accuracy and speed of your simulation, so itis worth spending some time on understanding this process.

    3.1 Methods of Hexahedral Mesh Generation

    In general, there are three ways to define a hexahedral mesh: manually, automaticallyand adaptively. We will introduce their principles briefly before discussing details of the

    implementation in CST STUDIO SUITETM.

    Manual Meshing

    A manual mesh can be defined at any time, even before the geometrical model isgenerated. This is an old-fashioned way of working which we do not recommend.

    Automatic Mesh Generation Expert System

    This is probably the most effective way of working with CST STUDIO SUITETM. Themesh generator determines the important features of your structure and automaticallycreates a mesh, which represents your structure and the fields equally well. This means

    that the frequency range and dielectrics, metallic edges, etc. are considered by theexpert system, but certain mesh properties for individual shapes can also be setmanually. At the first level, this mesh generator is governed by only a few settings, butthere are many other possibilities to influence the meshing. Furthermore, ProjectTemplates facilitate the mesh creation, and with a little bit of experience, you will be ableto obtain reliable solutions in minimal time.

    Adaptive Meshing (Energy Based or Expert System Based)

    Adaptive meshing replaces your expertise by repeatedly running the simulation andevaluating the solutions. Usually regions with high field concentration or field gradientsare recognized where the mesh needs to be locally refined. If the deviation in the results

    falls below a given accuracy level, the adaptation terminates. This approach alwaysimproves the start solution at the expense of simulation time. Since the CST STUDIOSUITETM expert mesher always guarantees a reasonable initial mesh and thus a goodstarting solution for the mesh adaptation process, the number of passes will normally besmall.

    This following diagram shows the comparison of expert system meshing and adaptivemesh refinement.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    17/109

    CST STUDIO SUITE 2006 Advanced Topics 15

    However, modifications to the structure force conventional mesh adaptation algorithmsto start again from the beginning with each and every change of a parameter. Thereforethe adaptive expert system hexahedral mesh refinementtrains the expert system for agiven structure. It can then maintain the mesh properties while the associated structureparts are slightly modified.

    You can increase your own expertise on mesh generation by analyzing the steps takenby the adaptive mesh refinement. You can use this knowledge to manually tune themesh to increase the simulation speed for subsequent simulations.

    The strategies for mesh generation are quite different for high frequency problems ascompared to low frequency applications.

    3.2 Hexahedral Mesh Generation for High Frequency

    ProblemsAfter this overview of meshing techniques, we go into the details of CST STUDIOSUITETMs hexahedral mesh generation for high frequency problems. The expertsystemuses lots of parameters controlling the mesh generation, having either local orglobal influence on the mesh. There are a few settings which you may frequentlymodify in order to obtain highly efficient meshes. Let's start with the most importantglobal ones:

    Lines per wavelength Lower mesh limit Ratio limit (or smallest mesh cell)

    Refinement at PEC-edges

    These parameters are also set by the Project Templates and the adaptive expertsystem mesh refinement. Let's start a new project, e.g. a simple coupled microstripline. In this case the following dialog appears:

  • 8/10/2019 CST Studio Suite - Advanced Topic

    18/109

    16 CST STUDIO SUITE 2006 Advanced Topics

    Select the Planar Coupler template. The info box tells which parameters are set by thistemplate in order to optimize the settings for planar structures. The structure used forthe following explanations is shown in the picture below:

    Now visualize the mesh by entering the Mesh View(Mesh Mesh View, ).

  • 8/10/2019 CST Studio Suite - Advanced Topic

    19/109

    CST STUDIO SUITE 2006 Advanced Topics 17

    a) Default Settings b) Project Template Settings

    The picture above shows the grid being created using the default settings on the leftside and using the Project Templatessettings on the right side.

    The red dots in the model are critical points (called fixpoints) at which the expertsystem finds it necessary to set mesh lines. They can be found on the bounding box,at the ends of straight lines, at circle centres and radii. In addition to these fixpoints,the yellow dots (white in the picture) show points where the automatic meshgeneration improves the mesh density.

    Different settings of the global meshing parameters explain the different grids seen

    above. For a closer look, open the special settings dialog box (Mesh MeshProperties or the corresponding icon ). Again, the default settings are shown on theleft, and the Project Templatessettings are displayed on the right.

    a) Default Settings b) Project Template Settings

  • 8/10/2019 CST Studio Suite - Advanced Topic

    20/109

    18 CST STUDIO SUITE 2006 Advanced Topics

    Mesh type

    The Mesh type setting is the general switch between hexahedral and tetrahedralmeshes. Please note that this applies to the mesh preview only. The solver modules willautomatically switch to the corresponding mesh type if necessary.

    Lines per wavelength

    The Lines per wavelength parameter describes the spatial sampling rate of the field. ALines per wavelength setting of 10 means that a plane wave propagating along one ofthe coordinate axes is sampled at least 10 times. The reduction of the wavelength whenpropagating through dielectric materials is taken into account here.

    Lower mesh limit

    The diagonal of the calculation domains smallest boundary face is divided by the valueof the Lower mesh limit parameter. The resulting value will then be taken as a

    maximum mesh step width. Therefore both the Lines per wavelength and the Lowermesh limitsettings determine the maximum step width of the mesh.

    Mesh line ratio limit / smallest mesh step

    The Mesh line ratio limit parameter controls the ratio between the largest and thesmallest mesh steps. Since the mesh lines are snapped to fixpoints, the smallest meshstep is usually determined by the structures details. If no lower limit is applied, thiscould result in very small mesh steps severely affecting the simulation performance(see section 4.2). Therefore, the Mesh line ratio limit parameter limits the creation ofsmall mesh steps relative to the size of the largest mesh steps. In case of small detailsresulting in clustered fixpoints, mesh lines may not be placed at all fixpoints' positions.

    The following picture illustrates the meaning of theMesh line ratio limitparameter:

    dxn

    dyi

    The smallest mesh step in this picture corresponds to dy i, whereas the largest meshstep is dxn. Therefore, the Mesh line ratio limit parameter needs to be chosen large

    enough to allow the mesh ratio to be at least dxn/ dyi. Otherwise the two mesh lines atthe ends of the mesh step dyiwill merged together to a single line.

    It is obvious from the explanations above that the Mesh line ratio limitparameter has tobe adjusted carefully. Too small settings of this parameter prevent the mesh fromresolving small details. On the other hand, specifying very large values may result invery small mesh steps significantly affecting the performance of the simulation.

    As an alternative to the specification of the Mesh line ratio limitparameter, the size ofthe Smallest mesh step can also be specified directly as a global mesh setting.

    The mesh properties dialog box also shows some statistics about the total number of

    mesh cells, the smallest and the largest mesh step sizes and the number of mesh linesalong each coordinate direction.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    21/109

    CST STUDIO SUITE 2006 Advanced Topics 19

    Further settings of the expert system can be adjusted from within the Special MeshProperties which can be displayed by clicking the Specials button in the meshproperties dialog box.

    The General page contains an option Equilibrate mesh to reduce the local ratiobetween adjacent mesh steps resulting in much smoother density transitions.

    Furthermore, a special model for improved modelling of singularities at PEC or lossymetal edges can be controlled by the Use singularity model for pec and lossy metal

    edgesbutton. Activating this feature significantly reduces the need for very fine meshesaround such edges in order to achieve typically required accuracies.

    Finally, the Mesh type can be controlled, too. We do not recommend changing theglobal Mesh type to Staircase mesh unless the inaccuracy of imported CAD modelscauses the PBA mesher to fail.

    The PBA acceleration option allows using a new matrix calculator which should befaster and more robust for complex models. This will become the default setting infuture releases.

    The Refinement page of the special mesh properties dialog box also contains some

    useful and frequently changed settings.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    22/109

    20 CST STUDIO SUITE 2006 Advanced Topics

    Due to the field singularities at PEC or lossy metal edges, the mesh usually needs to berefined around these edges. This is necessary even when the special singularitytreatment is activated on the Generalpage. The Refine at pec / lossy metal edges byfactoroption forces the expert system to automatically refine the mesh at critical edgesby the given factor. The default setting is 2, but many of the Project Templatesalreadyincrease this factor to 4 or more.

    The Consider pec / lossy metal edges along coordinate axes only switch determineswhether the automatic refinement should be applied only to such edges. Since the

    refinement is also necessary along curved edges, this option should not normally beactivated.

    The Wavelength refinementoption ensures that the mesh will be automatically refinedin substrates according to the corresponding material properties in order to meet theLines per wavelengthcriterion described above. This setting is the default choice andshould always be used for high frequency applications.

    3.3 Hexahedral Mesh Adaptation for High FrequencyProblems

    Performing a single simulation does not provide any information about the accuracy ofthe solution. As mentioned in section 2.1, the FI method guarantees that thediscretization error decreases with an increasing number of mesh cells. This propertycan be used to check the accuracy by refining the mesh, re-running the simulation andcomparing the results. It is, however, important to find a good compromise betweenmesh density (affecting the simulation time) and accuracy.

    The Project Templates try to adjust the global mesh settings to the particular kind ofstructure in order to obtain reasonable accuracy. The resulting mesh can then be usedas an initial mesh for a subsequent mesh adaptation run.

    The following picture shows how the adaptive process is activated, e.g. for the transient

    solver by simply checking theAdaptive mesh refinementoption:

  • 8/10/2019 CST Studio Suite - Advanced Topic

    23/109

    CST STUDIO SUITE 2006 Advanced Topics 21

    The Delta Squantity is defined as the maximum deviation of the S-parameters betweentwo subsequent passes. This deviation is calculated by determining the actual distancebetween the corresponding curves in the complex plane rather than simply doing afrequency-by-frequency comparison. Small shifts in resonance frequencies thereforecause small differences only. Furthermore a weighting function is applied decreasingthe contribution of errors at frequencies farther away from the center of the frequencyband.

    The mesh adaptation stops once the S-parameters converge such that the Delta Svalue falls below a certain limit (2% by default).

    For the example consisting of two adjacent striplines, the mesh adaptation stops after 3passes if the initial mesh were created using the Project Template. The meshadaptation takes 6 passes using the default initial mesh.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    24/109

    22 CST STUDIO SUITE 2006 Advanced Topics

    The mesh has been significantly refined along the PEC edges during the adaptivepasses. In particular, additional mesh lines have been inserted between the conductorsand at the edges of the stripline driven by the excitation:

    The adaptive meshing process can be controlled by setting its parameters in theAdaptive Mesh Refinement dialog box which you can open by clicking the AdaptivePropertiesbutton in the solver control dialog box.

    2%

  • 8/10/2019 CST Studio Suite - Advanced Topic

    25/109

    CST STUDIO SUITE 2006 Advanced Topics 23

    The Maximum Delta S parameter determines the desired accuracy of the adaptiveprocess. The adaptation will be terminated when the current Delta Svalue (see above)falls below this limit. You can also force the mesh adaptation to perform a Minimumnumber of passes by setting the corresponding value. Furthermore, the Maximumnumber of passescan be specified as a termination criterion. The mesh adaptation will

    stop once the specified maximum number of passes is reached regardless of the actualDelta Svalues.

    The mesh adaptation process can be carried out by either an Energy basedstrategy oran Expert system based strategy. The Project Templates activate the Energy basedmethod by default for planar structures.

    Energy based mesh refinement

    This is the conventional approach to mesh adaptation. While the electromagnetic fieldsimulation is performed, the energy density in the computation domain is recorded.Regions with high energy density and high field gradients are identified, and the mesh

    is locally refined there.

    The amount of refinement per pass is controlled by the Factor for mesh cell increase. Asetting of 0.7 means that 0.7 times more mesh cells will be used for the next calculationthan were used for the previous one. In other words, the number of mesh cellsincreases by about 70 % from pass to pass.

    This adaptation strategy is a field-based approach that delivers mesh refinement instrategically important regions. The disadvantage of this method is that the refinementregions are coupled neither to the structure parts nor to the global meshing parameters.Parameter studies and optimizations will therefore lead to repeated adaption runs,which negatively affect the overall performance.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    26/109

    24 CST STUDIO SUITE 2006 Advanced Topics

    Adaptive expert system mesh refinement

    The major difference between this strategy and Energy based refinement is that theformer adjusts the expert systems parameters directly. As a result of this approach, theexpert system is trained for a particular structure so that the same settings can be kept

    for subsequent calculations.

    The contents of the adaptive mesh refinement dialog box change if the Refinementstrategyis set to Expert system based:

    The Mesh incrementparameter determines the absolute increase for the Lower meshlimitand Lines per wavelengthvalues per adaptation pass.

    At the end of a successful expert system based mesh adaptation, CST STUDIOSUITETMinforms you that the expert system has been trained to yield accurate resultsfor this structure. This means that it will not be necessary to start further adaptation runswith this structure since the quality of the mesh will be maintained even if you slightly

    change the geometry during parametric sweeps or automatic optimizations.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    27/109

    CST STUDIO SUITE 2006 Advanced Topics 25

    3.4 Hexahedral Mesh Generation for Low FrequencyProblems

    This section goes into the details of CST STUDIO SUITETMs hexahedral meshgeneration for either static or low frequency problems. The mesh generation system

    uses lots of parameters controlling the mesh generation, having either local or globalinfluence on the mesh. There are a few settings which you may frequently modify inorder to obtain highly efficient meshes. Let's start with the most important global ones

    Lower mesh limit Ratio limit (or smallest mesh cell) Refinement at PEC-edges Mesh refinement inside dielectric/permeable material

    These parameters are also set by the Project Templates and the adaptive expertsystem mesh refinement. Let's start a new project, e.g. a simple C-magnet. In thiscase the following dialog appears:

    Select the Magnetostatics template. The info box tells which parameters are set by thistemplate in order to optimize the settings for this type of structure. The example usedfor the following explanations is shown in the picture below:

  • 8/10/2019 CST Studio Suite - Advanced Topic

    28/109

    26 CST STUDIO SUITE 2006 Advanced Topics

    Now visualize the mesh by entering the Mesh View(Mesh Mesh View, ).

    a) Default Settings b) Project Template Settings

    The picture above shows the grid created using the default settings on the left sideand using the Project Templatessettings on the right side.

    The red dots in the model are critical points (called fixpoints) at which the expertsystem finds it necessary to set mesh lines. They can be found on the bounding box,at the ends of straight lines, at circle centers and radii. In addition to these fixpoints,

    the yellow dots show points where the automatic mesh generation improves the meshdensity.

    Different settings of the global meshing parameters explain the different grids seenabove. For a closer look, open the special settings dialog box (Mesh Mesh

    Properties or the corresponding icon ). Again, the default settings are shown on theleft side, and the Project Templatessettings are displayed on the right side.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    29/109

    CST STUDIO SUITE 2006 Advanced Topics 27

    a) Default Settings b) Project Template Settings

    Mesh type

    The Mesh type setting is the general switch between hexahedral and tetrahedralmeshes. Please note that this applies to the mesh preview only. The solver modules willautomatically switch to the corresponding mesh type if necessary.

    Lower mesh limit

    The diagonal of the calculation domains smallest boundary face is divided by the valueof the Lower mesh limit parameter. The resulting value will then be taken as amaximum mesh step width.

    Mesh line ratio limit / smallest mesh step

    The Mesh line ratio limit parameter controls the ratio between the largest and thesmallest mesh steps. Since the mesh lines are snapped to fixpoints, the smallest meshstep is usually determined by the structures details. If no lower limit is applied, this

    could result in very small mesh steps severely affecting the simulation performance.Therefore, the Mesh line ratio limitparameter limits the creation of small mesh stepsrelative to the size of the largest mesh steps. Please note that in case of small detailsresulting in clustered fixpoints, mesh lines may not be placed at all fixpoints' positions.The following picture illustrates the meaning of theMesh line ratio limitparameter:

    dxn

    dyi

  • 8/10/2019 CST Studio Suite - Advanced Topic

    30/109

    28 CST STUDIO SUITE 2006 Advanced Topics

    The smallest mesh step in this picture corresponds to dy i, whereas the largest meshstep is dxn. Therefore, the Mesh line ratio limit parameter needs to be chosen largeenough to allow the mesh ratio to be at least dxn/ dyi. Otherwise the two mesh lines atthe ends of the mesh step dyiwill merge together into a single line.

    It is obvious from the explanations above that the Mesh line ratio limitparameter mustbe adjusted carefully. Too small settings of this parameter prevent the mesh fromresolving small details. On the other hand, specifying very large values may result invery small mesh steps, significantly affecting the performance of the simulation.

    As an alternative to the specification of the Mesh line ratio limitparameter, the size ofthe Smallest mesh step can also be specified directly as a global mesh setting.

    The mesh properties dialog box shows some statistics on the total number of meshcells, the smallest and the largest mesh step sizes and the number of mesh lines alongeach coordinate direction.

    Even more settings of the expert system can be adjusted from within the Special MeshProperties which you can view by clicking the Specialsbutton in the mesh propertiesdialog box.

    The General page contains the option Equilibrate mesh to reduce the local ratiobetween adjacent mesh steps resulting in much smoother density transitions.

    Furthermore, a special model for improved modelling of singularities at PEC or lossymetal edges can be controlled by the Use singularity model for pec and lossy metaledgesbutton. Activating this feature significantly reduces the need for very fine meshesaround such edges in order to achieve typically required accuracies.

    Finally, the Mesh type can be controlled, too. We do not recommend changing theglobal Mesh type to Staircase mesh unless the inaccuracy of imported CAD modelscauses the PBA mesher to fail.

    The PBA accelerationoption allows you to use a new matrix calculator which should befaster and more robust for complex models. This will become the default setting infuture releases.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    31/109

    CST STUDIO SUITE 2006 Advanced Topics 29

    The Refinement page of the special mesh properties dialog box also contains someuseful and frequently changed settings.

    Due to the field singularities at PEC or lossy metal edges, the mesh usually needs to berefined around these edges. This is necessary even when the special singularitytreatment is activated on the Generalpage. The Refine at pec / lossy metal edges byfactoroption forces the expert system to automatically refine the mesh at critical edgesby the given factor. The default setting is 2, but many of the Project Templatesalready

    increase this factor to 4 or more.

    The Consider pec / lossy metal edges along coordinate axes only switch determineswhether the automatic refinement should only be applied to such edges. Since therefinement is also necessary along curved edges, this option should not normally beactivated.

    The Low frequency refinement option ensures that the mesh will be automaticallyrefined in substrates according to the corresponding material properties by the factors

    r and r , respectively. This setting is the default choice and should always be

    used for static or low frequency frequency applications.

    3.5 Hexahedral Mesh Adaptation for Low FrequencyProblems

    Performing a single simulation does not provide any information about the accuracy ofthe solution. As mentioned in section 2.1, the FI method guarantees that thediscretization error decreases with an increasing number of mesh cells. This propertycan be used to check the accuracy by refining the mesh, re-running the simulation andcomparing the results. It is, however, important to find a good compromise betweenmesh density (affecting the simulation time) and accuracy.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    32/109

    30 CST STUDIO SUITE 2006 Advanced Topics

    The Project Templates try to adjust the global mesh settings to the particular kind ofstructure in order to obtain reasonable accuracy. The resulting mesh can then be usedas an initial mesh for a subsequent mesh adaptation run.

    The following picture shows how the adaptive process is activated, e.g. for the

    magnetostatic solver by simply checking theAdaptive mesh refinementoption:

    In the C-magnet example, the adaptation stops after 5 passes, if the initial mesh werecreated using the Project Template. The energy error, which is defined as the deviationof the energy between two consecutive passes, has fallen below 1%.

    1%

  • 8/10/2019 CST Studio Suite - Advanced Topic

    33/109

  • 8/10/2019 CST Studio Suite - Advanced Topic

    34/109

    32 CST STUDIO SUITE 2006 Advanced Topics

    The mesh adaptation process can be carried out by either an Energy basedstrategy oran Expert system based strategy. The Project Templates activate the Energy basedmethod by default for magnetostatic applications.

    Energy based mesh refinement

    This is the conventional approach to mesh adaptation. While the electromagnetic fieldsimulation is performed, the energy density in the computation domain is recorded.Regions with high energy density and high field gradients are identified, and the meshis locally refined there.

    The amount of refinement per pass is controlled by the Factor for mesh cell increase. Asetting of 0.7 means that 0.7 times more mesh cells will be used for the next calculationthan were used for the previous one. In other words, the number of mesh cellsincreases by about 70 % from pass to pass.

    This adaptation strategy is a field-based approach, which delivers mesh refinement in

    strategically important regions. The disadvantage of this method is that the refinementregions are coupled neither to the structure parts nor to the global meshing parameters.Parameter studies and optimizations will therefore lead to repeated adaption runs,which negatively affect overall performance.

    Adaptive expert system mesh refinement

    The major difference between this strategy and Energy based refinement is that theformer adjusts the expert systems parameters directly. As a result of this approach, theexpert system is trained for a particular structure so that the same settings can be keptfor subsequent calculations.

    The contents of the adaptive mesh refinement dialog box change if the Refinementstrategyis set to Expert system based:

    The Mesh incrementparameter determines the absolute increase for the Lower meshlimitvalue per adaptation pass.

    At the end of a successful expert system based mesh adaptation, CST STUDIOSUITETMinforms you that the expert system has been trained to yield accurate results

  • 8/10/2019 CST Studio Suite - Advanced Topic

    35/109

    CST STUDIO SUITE 2006 Advanced Topics 33

    for this structure. This means that it will not be necessary to start further adaptation runswith this structure since the quality of the mesh will be maintained even if you slightlychange the geometry during parametric sweeps or automatic optimizations.

    3.6 Tetrahedral Mesh GenerationThe following section focuses on the principles of tetrahedral mesh generation. Thesegeneral considerations apply to both high and low frequency problems.

    First, we explain the basic procedure of creating a tetrahedral mesh. Let us assume thata model consisting of several parts needs to be meshed. The solution methods requireconsistent meshes at the interfaces of different parts in order to set up the matrixequations correctly.

    The following picture shows two blocks touching each other at one of their faces. If themeshes were created independently for both blocks, the meshes might become

    inconsistent at the interfaces.

    Inconsistent Mesh Consistent Mesh

    The typical solution to this problem is to create a non-manifold simulation model first.This intermediate operation converts coincident faces from two solids to a singlecommon double-sided face. Once this is done, the edges and faces of the model canbe meshed in a first step. Based on this surface mesh, the volume mesh can then becreated afterward. The non-manifold model guarantees that the surface meshes ofneighboring solids are identical at their interfaces since they are built from the samesurface mesh of the mutual double-sided face.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    36/109

    34 CST STUDIO SUITE 2006 Advanced Topics

    The following picture illustrates this procedure:

    The tetrahedral mesh generation can be summarized as follows:

    1. Build the non-manifold simulation model.2. Mesh the models edges and faces surface meshing.3. Mesh the models volumes based on surface mesh volume meshing.

    Once the initial volume mesh is created, its quality can be improved by mesh

    smoothing or mesh optimization.

    Mesh smoothing is an iterative scheme that moves the mesh nodes in order toimprove the quality of the tetrahedrons.

    In contrast, mesh optimization is a technique that swaps edges and faces andreconnects them to form better quality tetrahedrons. The following picture shows a 2Dexample of how mesh optimization can improve mesh quality:

    The tetrahedral mesh will be automatically created whenever a solver is startedrequesting this type of mesh. However, in order to visualize the mesh before running a

    simulation, you can enter the mesh view at any time (Mesh Mesh View , ). The

    global mesh properties dialog box (Mesh Mesh Properties, ) allows you tochange the mesh preview to the tetrahedral mesh type if this has not already been

    done by a previous solver run.

    Cell A Cell BNon-manifold

    model

    Mesh surface

    Mesh interior

    edge swapping

  • 8/10/2019 CST Studio Suite - Advanced Topic

    37/109

    CST STUDIO SUITE 2006 Advanced Topics 35

    a) High Frequency b) Low Frequency

    Since the creation of the tetrahedral mesh is a computational expensive task, the meshis not automatically updated after each change. You can force a mesh update byclicking the Update button in the mesh properties dialog box or by choosingMeshUpdatefrom the main menu ( ).

    The global meshing parameters such as Steps per wavelength and Min. number ofstepscorrespond to the Lines per wavelengthand Min. number of linessettings for thehexahedral mesh generation. Refer to the corresponding sections above for detailsconcerning the meaning of these settings.

    It is important to note that the high frequency tetrahedral mesh based solver uses asecond order technique. Therefore, the default setting of 4 steps per wavelengthcorresponds to the 10 lines per wavelength default setting used for the hexahedral

    mesh creation.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    38/109

    36 CST STUDIO SUITE 2006 Advanced Topics

    d

    h

    d = h * curvature refinement ratio

    The tetrahedral mesh generation can be further controlled by parameters specified inthe Specials dialog box. This dialog box contains two pages in order to influencesurface mesh generation and volume mesh generation, respectively:

    On the Surface mesh tab, the Surface optimizationoption and the Surface smoothingshould normally be kept at their defaults.

    The Curvature refinementparameters control the quality of the approximation of curvedfaces by the surface mesh.

    The Curvature refinement ratiospecifies the ratio of the maximum deviation (d) of thesurface mesh from the actual shape of the structure divided by the edge length (h) ofthe surface triangle (as shown in the picture above). Smaller values lead to betterapproximations of curved objects. Typical values are between 0.01 and 0.1.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    39/109

  • 8/10/2019 CST Studio Suite - Advanced Topic

    40/109

    38 CST STUDIO SUITE 2006 Advanced Topics

    Small structure details (features) can be suppressed by setting the Size of thesmallest feature. If this value is set to zero, all details will be meshed. If a value greaterthan zero is specified, all features below this size will be suppressed as shown in thenext picture:

    The Volume meshtab contains parameters to control the volume mesh creation stage:

    The Volume optimization and Volume smoothing options should normally be keptactivated.

    The Density transitions slider allows you to adjust how quickly the mesh changesbetween regions of different mesh densities. Smooth transitions result in good meshquality but also increase the number of tetrahedrons in the mesh. The default setting isa good compromise for many cases and can usually be kept.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    41/109

    CST STUDIO SUITE 2006 Advanced Topics 39

    3.7 Recommended Initial Hexahedral Discretizations

    The purpose of this section is to provide guidelines for the discretization of some typical

    types of structures using hexahedral meshes. We also recommend visiting a specialtraining class on this topic. Please contact your support center for details.

    Coaxial Structures

    The following picture shows the coarsest recommended discretization for a coaxialstructure as it may, for example, be used as initial mesh for adaptive mesh refinements:

    Make sure to adjust the Mesh line ratio limit parameterso that you have mesh lines atthe center of the coaxial structures as well as at the inner and outer radii.

    Planar Structures

    Planar structures are usually quite sensitive in regard to meshing. We stronglyrecommend using the corresponding Project Template to adjust the meshingparameters to this type of structure.

    One of the most critical settings is the choice of the Mesh line ratio limitparameter. Theexpert system automatically identifies the small thickness of the conductors and avoids

    snapping the mesh lines to these tiny steps. Therefore, the Mesh line ratio limit cannormally be chosen relatively large. However, sometimes planar structures have smalldistances between structure edges in the metallization planes. In such cases, it must becarefully decided whether to place mesh lines at these positions.

    Please note:The identification of conductor thickness as described above isonly performed when the Merge fixpoints on thin PEC and lossy sheetssetting is activated on the Fixpointspage of the Special Mesh Propertiesdialog box. This option is automatically set by the Project Templatesforplanar types of structures.

    The following picture shows a microstrip step (two microstrips with slightly different

    widths connected to each other):

  • 8/10/2019 CST Studio Suite - Advanced Topic

    42/109

    40 CST STUDIO SUITE 2006 Advanced Topics

    The picture on the left shows a mesh with a Mesh line ratio limitof 10. In this case, themesh is not able to snap to the edges of both line segments, which results in poordiscretization of the step. The picture on the right illustrates that the mesh lines cansnap to the geometric details when the Mesh line ratio limitparameter is increased to20 in this case.

    We strongly recommend that you inspect your mesh carefully and, in case of unwanted

    merging of mesh lines, increase the Mesh line ratio limitparameter accordingly.Furthermore, we recommend using at least 1-2 mesh lines across the width of themicrostrips top conductor and 1-3 mesh lines along the height of the substrate.

    Helical Structures

    The following picture shows the recommended initial discretization for a helicalstructure:

    1-2 mesh lines

    3-5 mesh lines

    1-3 mesh lines1-2 mesh lines

  • 8/10/2019 CST Studio Suite - Advanced Topic

    43/109

    CST STUDIO SUITE 2006 Advanced Topics 41

    We recommend using at least 1-2 mesh lines across the diameter of the helixs cross-section. Furthermore, 3-5 mesh lines should be used along the helixs axis in betweenthe turns.

    In cases where the diameter of the cross-section is very small, you should also considermodeling the helix as an infinitely thin PEC wire.

    3.8 Mesh Tuning

    So far we have discussed how to obtain simulation results and how to check theirreliability with minimal effort spent on the meshing process. If you now feel confidentwith the global parameters and switches, let's go on to improve the mesh with respectto simulation time and memory requirements. Please note that there is an additionalchapter 4 on performance tuning.

    Local Mesh Parameters for Hexahedral Mesh Generation

    Until now we have discussed the approach to creating a mesh and studying theconvergence by setting only a few parameters. CST STUDIO SUITETM offers furtheruseful ways of influencing the mesh, which can be used to save mesh points and thusdecrease simulation time. After selecting one shape and pressing the right mousebutton, you can open the Mesh Propertiesdialog box from the context menu:

    This dialog box contains a couple of shape specific settings which are discussed below.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    44/109

    42 CST STUDIO SUITE 2006 Advanced Topics

    Consider for automesh

    If the Consider for automeshoption is switched off, CST STUDIO SUITETMwill considerneither the dielectric properties nor any fixpoint of the particular shape, not even thebounding box. This option is sometimes useful when dealing with imported geometries.

    Let us now assume that you imported a sphere, but instead of an analytic description(left side), you got a faceted representation of it (right side):

    Although this is not a bad approximation of the spheres geometry, it is obviously notperfect. The CST STUDIO SUITETMmesher always tries to model the shapes exactlyas they have been defined. As a result, it will mesh this faceted approximation withfixpoints at the end of every straight line. And as you see below, instead of a veryefficient grid representation (left), you end up with an unnecessarily large number ofmesh points (right):

    In case of a simple sphere, a reconstruction can be easily carried out, but in generalyou will need to keep your imported geometry as is. Switching off the Consider forautomeshoption will result in a representation as shown in the picture below:

  • 8/10/2019 CST Studio Suite - Advanced Topic

    45/109

    CST STUDIO SUITE 2006 Advanced Topics 43

    Now no fixpoints have been generated for the faceted sphere which leads to a moreefficient mesh representation of the object. This option is also useful if your importedgeometry is flawed because fixpoints are usually located at the most critical points of ageometric object. You should consider using this option if your structure contains anobject that forces a lot of additional mesh lines but does not contribute much to the fieldsolution to your problem.

    Maximum mesh step width

    This option allows you to locally increase the mesh density. This is important if you wantto maintain a coarser grid in the peripheral regions but accurately sample the fields inthe area of interest. For simplicity, let us again consider the sphere with its defaultmesh:

    If we want to refine the mesh in the spheres volume, different values can be assignedto the three spatial directions in the Maximum mesh step width frame. You may alsomake use of parameters (e.g. zdensity = 0.3 here).

  • 8/10/2019 CST Studio Suite - Advanced Topic

    46/109

    44 CST STUDIO SUITE 2006 Advanced Topics

    Especially in the case of PEC objects, the adjacent surrounding space is even moreimportant than its interior. CST STUDIO SUITETMoffers the possibility to simply extendthe volume within which the special settings will be applied:

  • 8/10/2019 CST Studio Suite - Advanced Topic

    47/109

    CST STUDIO SUITE 2006 Advanced Topics 45

    Priority

    The Priority setting determines a weight for the fixpoints of one geometrical objectcompared to another. If two fixpoints of different objects are so close together that theratio limit does not allow the resolution of both of them, then a mesh line will be

    snapped to the point with the higher priority.

    Mesh type

    The type of structure representation can be individually determined for every object.The Defaultsetting means that the global setting is taken, as chosen in the global Mesh

    properties, Specials dialog box (usually PBA). For corrupted import data, where thehealing algorithm failed, or for very large and complex CAD imports, switching to thestandard staircase mesh might be helpful.

    Manually set fixpoints

    As explained above, too many fixpoints can be avoided by switching off the Considerfor automesh option. As a result, the fixpoints at the circumference of the importedsphere are also missing. It is, however, possible to manually set fixpoints at arbitrarylocations. The pick operations which can be used for structure generation createfixpoints when applied in the Mesh view:

    Manually defined fixpoints are marked by blue dots and have the highest priority in themesh priority scheme.

    no fixpoint manual fixpoint

  • 8/10/2019 CST Studio Suite - Advanced Topic

    48/109

    46 CST STUDIO SUITE 2006 Advanced Topics

    Local Mesh Parameters for Tetrahedral Mesh Generation

    In the same way as explained above for the hexahedral mesh generation, the

    tetrahedral mesh generation allows you to set local mesh parameters for individualshapes:

    The mesh properties dialog box for a particular shape allows you to set a Max. stepwidthfor the shapes volume, which then locally overrides the global setting.

    The tetrahedral mesh generation usually tries to generate tetrahedrons as equilateral aspossible in order to obtain a high quality mesh. Therefore, the Max. stepwidthsetting is asingle value consistently applied to all directions.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    49/109

    CST STUDIO SUITE 2006 Advanced Topics 47

    Now consider the following structure as an example:

    The feeds are modelled by two cylinders with a relatively small radius. Using the defaultsettings, the shape of the cylinders is not accurately represented by the tetrahedralmesh as shown in the following picture:

    Specifying a maximum mesh step width for the two cylinders (e.g. half the radius) forcesthe mesher to sample the cylinders more accurately. As an alternative, the curvaturerefinement factor could be increased which would also yield a better resolution of thecylinders. The latter criterion, however, would be applied to all other shapes as well,which is not always the desired solution.

    Shape mesh setting(stepwidth = radius / 2)

  • 8/10/2019 CST Studio Suite - Advanced Topic

    50/109

    48 CST STUDIO SUITE 2006 Advanced Topics

    Chapter 4 Performance ImprovementsThe following section starts by showing some general hints on how to increase theperformance of your simulation runs. Then special aspects of high frequency transientsimulations are discussed in more detail. Finally, some suggestions concerning themeshing of thin conductors using tetrahedral grids are given.

    4.1 General Hints

    Use the PBA technique and its TST extension. Always make use of geometric symmetry planes and of all known S-parameter

    symmetries. Avoid an unnecessarily large calculation domain size. Choose the solver module best suited to the particular application. Consider splitting the structure into smaller parts and combining them in CST

    DESIGN STUDIO. Consider using the multi-processor or distributed computing options. Use a high-end PC.

    4.2 High Frequency Transient Simulations

    The transient solver uses an explicit time integration scheme, which implies that thesolution is derived by simple matrix vector multiplications. This results in linear scalingof the numerical effort with the number of mesh points. Consequently the easiest way ofreducing the simulation time is to use symmetry conditions, which reduce the number ofmesh points by up to a factor of 8.

    The number of mesh cells also can be significantly reduced by using shape specificmesh settings properly. Therefore we recommend reading through chapter 3 in order tofind a good compromise between simulation speed and manual work involved in tuningthe mesh.

    To better understand the following explanations, let's look at how the transient solvercalculates S-parameters.

    The transient solver operates with time pulses, which can be easily transformed into thefrequency domain via a Fast Fourier Transformation (FFT). The S-parameters can thenbe derived from the resulting frequency domain spectra:

  • 8/10/2019 CST Studio Suite - Advanced Topic

    51/109

    CST STUDIO SUITE 2006 Advanced Topics 49

    For instance, a division of the reflected signal by the input signal in the frequencydomain yields the reflection factor S11. Within just one simulation run in time domain,the full broadband information for the frequency band of interest can be extractedwithout the risk of missing any sharp resonance peaks.

    CST STUDIO SUITETM automatically calculates the appropriate excitation time pulsefrom the frequency range setting. The default Gaussian-shaped pulse guarantees anonzero spectrum in the frequency domains band of interest, which allows an accuratecalculation of the S-parameters.

    Please note: The number of frequency samples in Solver Parameters Specials ... Solver Number of F-Stepsdetermines how many frequencypoints are calculated in the FFT. This does not require much calculationeffort, so there is no need to reduce this number (default is 1000). Note thatthe number of frequency points determines the quality of the S-parameterplots.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    52/109

    50 CST STUDIO SUITE 2006 Advanced Topics

    Numerical Effort ~ Nt (Number of simulated Timesteps)

    Nt = t_end / t

    Numerical Effort can be reduced by

    a) Increasing

    t

    b) Decreasing t_end

    t_endt

    Numerical Effort ~ Nt (Number of simulated Timesteps)

    Nt = t_end / t

    Numerical Effort can be reduced by

    a) Increasing

    t

    b) Decreasing t_end

    Numerical Effort can be reduced by

    a) Increasing

    t

    b) Decreasing t_end

    t_endt

    Now take a closer look at the time pulses. The numerical effort and hence the totalcalculation time is determined by the total number of timesteps to be calculated. It canbe reduced in two ways: a) Increasing the timestep width t or b) reducing the timet_end (see picture above).

    a) Increasing t

    Thin wires Thin microstrips

    wt 30allows fine meshing

    t

    smalltslow

    t

    RATIO < 5ONE mesh line

    largetfast

    wt

  • 8/10/2019 CST Studio Suite - Advanced Topic

    53/109

    CST STUDIO SUITE 2006 Advanced Topics 51

    b) Decreasing t_end

    t1 t2

    -50

    0.5

    Time / ns

    Field Energy / dB

    1

    Non-Resonating structure: t2 t1

    -100

    -150

    Duration of Excitation Pulse (t1)

    + Duration of Transient Process (t2)

    ______________________________

    Total Time (t_end)

    = Energy Rise-TimeIndependent of structures behaviour !!!

    (only defined by frequency band)

    = Energy Rise-TimeIndependent of structures behaviour !!!

    (only defined by frequency band)

    = Energy Fall-Time to desired dB-levelDependent on structures behaviour(number and Q-values of resonances)

    = Energy Fall-Time to desired dB-levelDependent on structures behaviour(number and Q-values of resonances)

    t1 t2

    -50

    -100

    -1501 2 3

    Time / ns

    Field Energy / dB

    Resonating structure: t2 >> t1

    Reduce t2(small frequency band)Calc. only frequencies of interest / use AR-Filter

    Reduce t1 (increase frequency band,until t2 > t1 shorter excitation pulse)

    The total calculation time t_end is the sum of the duration of the excitation pulse t1 andthe duration of the transient process t2. Depending on the structures behavior, it isuseful to reduce either t1 or t2.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    54/109

    52 CST STUDIO SUITE 2006 Advanced Topics

    Non Resonating Structures

    For non-resonating structures t_end can be shortened by reducing t1. This value is

    determined by the excitation pulse length and therefore directly influenced by thefrequency range setting. The larger the bandwidth, the shorter the excitation time. Inother words, for non-resonating structures you should always avoid very small frequencybands. This is demonstrated in the next picture for a coaxial line. By defining a widerfrequency band, calculation time can be significantly reduced:

    Please note that for models without a cut-off frequency (e.g. TEM and microstripstructures), DC should always be included in the frequency range since it shortens theexcitation pulse by a factor of 2. For instance, the excitation time for a frequency range0.01 ... 10 GHz is twice as long as for a range 0 ... 10 GHz.

    Regarding the choice of an appropriate upper frequency limit, two points have to beconsidered: you should avoid a) the excitation of resonances at higher frequencies andb) a large increase in the number of mesh points.

    However, if t_end is determined by the transit time of the signals, reducing t1 is not very

    efficient. That means that if the propagating pulse arrives at the output long after theexcitation signal has vanished, the reduction of t1 will not influence the total time t_endsignificantly.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    55/109

    CST STUDIO SUITE 2006 Advanced Topics 53

    Resonating Structures

    For resonating structures the reduction of t1 has no remarkable effect either since the

    total calculation time is dominated by the transient process t2.

    However, if you are just interested in the resonance frequency of a system, onepossibility to reduce the calculation time t2 is to stop the simulation before the timesignals have decayed to zero. This can be achieved by reducing the following:

    1) the accuracy in the transient solvercontrol dialogbox.(Default setting: -30 dB. Inthis case the solver stops when the remaining energy in the calculation domaindecreases to -30 dB compared to the maximum energy.)

    2) the maximum number of pulses in the transient solvers special settings(SpecialsSteady State). (Default setting: 20 pulse lengths. In this case the solver

    stops when the simulation time reaches 20 durations of the excitation pulse.)

    If there is still a certain amount of energy left in the structure when stopping the solver, atruncation error will appear. It causes ripples in the S-Parameter curves but does notshift the poles frequency.

    Time Signals not decayed to zero

    Reducingthe TruncationError:

    a)Increase Accuracy (Energylevel), e.g.60dB

    or-without increasingt_end -

    b)UseAR-Filterto predict accurateS-Parameters even for non

    -decayed signals

    Energy-level 30 dB

    Approx. 1 pulse-length

    Truncation Error may cause ripplesin theS-Parameters ( sinx/x -function)

    Trunc. Error DOES NOT SHIFT reson.frqs !

    In order to shorten the calculation time t2 for resonant structures and avoid thetruncation error, you can make use of the Autoregressive Filter (Results Time SignalCalculations AR Filter). Refer to section 3.7 for details of this technique. If you havefound appropriate settings for the AR Filter, it can be used during the time domaincalculation to stop the solver once it converges to a sufficient accuracy (transient solvercontrol dialog box, Specials AR Filter).

    Some other suggestions for increasing the simulation performance of the transientsolver are the following:

    Avoid unnecessary field monitors (farfield monitors are less critical). Use open (PML) boundaries only for radiation problems.

  • 8/10/2019 CST Studio Suite - Advanced Topic

    56/109

    54 CST STUDIO SUITE 2006 Advanced Topics

    Do not include cut-off in your frequency range if you are not interested in theresults below cut-off. Choose the lower frequency limit 10% higher than the cut-offfrequency of the waveguide.

    4.3 Auto-Regressive Filtering (AR-Filter)The performance of the high frequency transient solver can be significantly reducedwhen strongly resonating devices are simulated. The main reason for this is thatcalculating the S-parameters using a Fourier Transform requires the time signals to havesufficiently decayed to zero; otherwise a truncation error will occur.

    Especially for highly resonating devices, a ringing in the time signals may occur so thatthe signals decay very slowly and therefore require long simulation times for accurateFourier Transforms.

    If a S-parameter calculation is performed using time signals which still exhibit some

    oscillation, a ripple will appear on the S-parameters as shown in the picture below:

    Please note that the curves minimum or maximum locations (i.e. the position of theresonance frequencies) are not affected by the ripple, so if this is the only information

    needed from the simulation, the truncation error may be tolerated.

    Otherwise, the usage of the AR-filter feature may be useful. The idea of this technique isto train an auto-regressive (AR) filter by using a short interval of the time signals.

    Afterwards, the AR-filter is used to predict the signal for the next time steps. Once theprediction and the actual simulation agree sufficiently, the AR-filter contains all relevantinformation about the device. Therefore the simulation can be stopped, and the S-parameters can be derived mathematically from the AR-filters representation.

    The following picture shows a typical time signal for a strongly resonating structure. Itcan be clearly seen that the time signals decay very slowly:

  • 8/10/2019 CST Studio Suite - Advanced Topic

    57/109

    CST STUDIO SUITE 2006 Advanced Topics 55

    Once such a simulation is completed (or aborted manually), you can enter the AR-filterdialog box by choosing ResultsTime Signal CalculationsAR-Filter for Port Signals:

    First, you should always press the Defaultsbutton to let the dialog optimize its settingsfor currently available time domain data.

    Next, you should carefully inspect the signals and determine the time when theexcitation pulse has vanished. In the example above, this may be at around 2 ns.

    Afterward, enter this time in the First time stepfield to start the AR-filter analysis whenthe devices response is dominated by the resonant parts only.

    Now check the order of the AR-filter. If the signal contains a few resonances only (e.g.you are expecting only a few poles inside the frequency band of interest), you shouldstart with a Max. order of filter set to 40. After making these settings, the dialog boxshould look as follows:

  • 8/10/2019 CST Studio Suite - Advanced Topic

    58/109

    56 CST STUDIO SUITE 2006 Advanced Topics

    Now click the Start button to perform the AR-filter analysis. Once the computation isfinished, a dialog box will appear containing handy information.

    A header provides information about the AR-filters settings and the currentlyinvestigated time signal:

    ===================================================================Analysis 1 of 2 for stimulation port 1, mode 1===================================================================

    First time step : 2.001828e+000 nsSkip time steps : 10Max. frequency : 1.020000e+001 GHzMax. order of filter : 40Relative Window length: 2.000000e+000

    Input signal samples : 7913Input signal length : 5.617186e+001 ns

    The AR-filter information is extracted from a window that moves along the time signal.The following information displays the bounds of this window for each evaluation stepand the energy error of the resulting filter approximation. This error should ideally bebelow 1e-3 in order to obtain good accuracy.

    -------------------------------------------------------------------------------step | window range | rel. wnd. | filter | energy | pulses to

    | ns | length | order | error | calculate------|---------------------------|-----------|--------|-----------|-----------1 | 1.7747e+000 - 4.6141e+000 | 2.50 | 32 | 4.83e-007 | 1.95e+000

    2 | 1.8457e+000 - 4.6851e+000 | 2.50 | 33 | 4.80e-007 | 1.98e+0003 | 1.9166e+000 - 4.7561e+000 | 2.50 | 30 | 1.00e-006 | 2.01e+0004 | 1.9876e+000 - 4.8271e+000 | 2.50 | 30 | 1.14e-006 | 2.04e+0005 | 1.4907e+000 - 4.8981e+000 | 3.00 | 36 | 8.60e-007 | 2.07e+0006 | 1.5617e+000 - 4.9691e+000 | 3.00 | 37 | 1.38e-006 | 2.10e+0007 | 1.6327e+000 - 5.0401e+000 | 3.00 | 35 | 2.68e-006 | 2.13e+000

    -------------------------------------------------------------------------------filter step 2 used for s-parameter calculation-------------------------------------------------------------------------------

    ===================================================================Analysis 2 of 2 for stimulation port 1, mode 1===================================================================

    First time step : 2.001828e+000 nsSkip time steps : 10Max. frequency : 1.020000e+001 GHzMax. order of filter : 40Relative Window length: 2.000000e+000

  • 8/10/2019 CST Studio Suite - Advanced Topic

    59/109

    CST STUDIO SUITE 2006 Advanced Topics 57

    Input signal samples : 7913Input signal length : 5.617186e+001 ns

    ----------------------------------------------------------