Automated Design Testing Procedures Using Software Simulation Tools

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

www.integratedsoft.

com

Automated Design Testing Procedures Using Software Simulation Tools

INTEGRATED Engineering Software

Content
Executive Summary....................................................................................................................................... 3 The Challenges .............................................................................................................................................. 3 Parametrics and Scripting ............................................................................................................................. 5

Parametrics ............................................................................................................................................... 6
Scripting ................................................................................................................................................... 6 Scripting Examples ....................................................................................................................................... 8 #1 - Halbach Array Run from Excel ........................................................................................................... 8 #2 - Stand Alone Insulator Design Program .............................................................................................. 8 #3 - Feedback Loop for Optimization........................................................................................................ 9 Summary ..................................................................................................................................................... 13 About INTEGRATED Engineering Software ................................................................................................. 13

Page 2

INTEGRATED Engineering Software

Executive Summary
As simulation software has become widespread, there are some common complaints from designers willing to optimize the way they use the software. Many complain about how time intensive the simulation can be for the user, even for repetitive aspects of the work. In the process of simulation related to design there will typically be a number of model variations to be tried, and time is also required to analyze all desired iterations of a design, in order to decide which one is optimal. Another problem with this is that anything that becomes tedious for the user becomes prone to input errors. Other common complaints involve training issues: how widely useful is the software within an organization? What about intermittent use, only a few times a year depending on the cycle of the work? How much time is spent on training and retraining people who make occasional use of the software? Professional simulation software should address these issues. Lack of features that address these problems, or lack of knowledge of those features, slows down the work and effectively adds a lot of cost to the use of simulation tools. This white paper will explain and provide examples of two common methods for automating aspects of the design process: parametrics and scripting.

The Challenges
Simulation software has become a standard tool for engineering design. Simulation not only provides design insight, which helps with strategic decision making, but it also reduces the number of physical prototypes required to be confident of a devices performance which leads to faster and less expensive development. As simulation software has become widespread, there are some common complaints from people looking for alternatives to the tool they are presently using. Many of these complaints involve how time intensive the simulation can be for the user, even for repetitive aspects of the work. In the process of simulation related to design there is a number of model variations that are usually tried, such as:

Sizes, shapes and positions of parts Applied voltage Various materials Tolerance testing (determine the effects of small machining variations or changes in material properties, etc.)

Page 3

INTEGRATED Engineering Software

An electric simulation will generally need a variety of performance related outputs for each of these, such as:

Maximum fields locations/distributions relative to breakdown values for the materials Analysis for potential corona or partial discharge inception Capacitance values Electric forces EMC/EMI criteria may need assessment

It may also need to output information that relates to other analysis (e.g. thermal, mechanical stability, etc.). Finally, each scenario should be readily assessed for materials cost, ease of manufacturing, and others. Suppose a simulation is expected to take 50 hours to analyze all desired iterations of a design, to then decide which one is optimal. You could start it on Friday when you leave work and have the answer when you come back Monday morning. So this is no real problem. However, add to that any initial setup time the user needs to put in. Next, add some time for evaluation of each scenario, decision making about what to try next, and some setup-restarting time. Now the process has become much more costly. It only effectively runs during working hours for an 8 hour day that means 6 working days to get the answer. Plus, whoever is running the simulation is dedicating his/her time and is mentally distracted from other work for that 6 day period. Another problem with this system is that anything that becomes tedious for the user becomes prone to input errors. Then there is another common complaint, involve training issues: how widely useful is the software within an organization? What about intermittent use? It is very common that a given user will run a specific simulation software only a few times a year depending on the cycle of their work. So how much time is spent on training and retraining people who make occasional use of the software? Professional simulation software should address these issues. Lack of features to address these problems, or lack of knowledge of the features, slows down the work and effectively increases the cost to the use of simulation tools. This white paper will explain and provide examples of two common methods for automating aspects of the design process: parametrics and scripting.

Page 4

INTEGRATED Engineering Software

Parametrics and Scripting


Parametrics
Parametrics refers to describing the components of a model according to parameters. A generic example of a block with a bore is shown below, first listing the obvious parameters of the block in isolation.

Parameters of the block in isolation:

Length Width Thickness Hole center Hole radius Hole depth Material

Consider that the block will be part of some model assembly, so absolute position and orientation are also normally required parameters. For CAD solid modeling, the approach of parametric geometry has been dominant for many years. This enables very easy experimentation with geometry once it has been created. However, this comes at the price of creating and working within the constraints that the parametrics comes along with. For that reason, a competing direct geometry approach is gaining wider acceptance because of the greater model flexibility. Regardless of how a geometry is generated, the ability to manipulate its parameters is important to the automation of simulation. One way is by the built-in parametric utilities within a given software package. For example, here is a description of a two loop parametric set up in the electric program COULOMB for the above geometry one parameter moving the hole location, the other moving the bottom surface. Note that this parametric works with the existing geometry; for this reason, whether it was created by a direct or parametric method is irrelevant.

Page 5

INTEGRATED Engineering Software

The parametric will analyze 28 (4x7) combinations of hole location and plate thickness and for each one present a plot of streamlines off the bottom surface and value of the electric field at a given location. Once the parametric analysis is completed, the results can be summarized in various ways. For example, the streamline plots can be examined individually, or run as an animation.

The field at point fills a data table which can be plotted in families of curves, such as the 4 curves below showing the effect of moving the bottom plate, for each of the 4 hole positions.

Page 6

INTEGRATED Engineering Software

For cases where the required outputs are known in advance, and all the combinations of parameters to be studied are also known in advance, a parametric feature tends to be the fastest way for a user to finish up analysis after creating the base model. While parametrics are very powerful and easy when appropriate, there are many cases where:

The number of parametric permutations is too large and the variations thus need to be controlled by actively making decisions based on results obtained during the analysis. A couple of examples would be intelligent optimization and coupled analysis - such as motion of a part where the field (hence force) is changing as the part moves. The desired variations are difficult or impossible to conceive as parameters (e.g. comparing results for square and circular parts). Running analysis should be accessible to people who are non-experts with the software.

Scripting
When parametrics are not practical, for more initial setup time a much more versatile automated analysis using scripts can be developed. The most essential feature of scripting is that software functions (draw a line, sweep a line to create a surface, apply voltage to a surface, inquire the field at a point) can be written in a file which then performs them in sequence. A powerful scripting environment must enable the use of variables, looping, etc. Scripting might be done internally or externally: 1. Internal Scripting: If the program itself enables the user to write and call the script without using any other software that makes the software appear more powerful because it is self-contained. However, it does not fundamentally add anything compared to external scripts and forces the user to learn and use the programming environment created for the scripts. 2. External Scripting: If external software can run scripts/batch which invoke the functions of the simulation software, then the user is able to pick their preferred environment and write/run their scripts from there, with the simulation software largely hidden from the user. For example, all the parameters of a script might be specified in an Excel spreadsheet containing a macro which will run the simulation when executed.

Page 7

INTEGRATED Engineering Software

External scripting also enables co-simulation such as coupling a mechanical motion simulation with a magnetic field/force simulation. In many cases, strengths of other programs can be used to make the simulation software more powerful. For example, if Matlab scripts are used to run the simulation then using the Matlab Optimization Toolbox might greatly streamline the whole process. Scripts can serve a multitude of purposes. The next section illustrates three examples.

Scripting Examples
(The following examples are scripts that are provided with INTEGRATED Engineering Software programs.)

#1 - Halbach Array Run from Excel


The Excel spreadsheet shown below is the interface to a tool for automatically generating a Halbach array according to some 7 selected parameters.

Page 8

INTEGRATED Engineering Software

When the [Run] button is clicked, a macro is invoked which reads the data into VBA within Excel and sets up the model by invoking appropriate commands for INTEGRATEDs 3D magnetic programs. For example, the lines of code below set the analysis as static, run the solver, and then loop though positions along the y-axis inquiring the field and putting y and B values into the spreadsheet: ret = IES.Physics_SetStaticMode() ret = IES.Solution_RunSolver(iErr) For i = 0 To 12 * (Number + 4) y1 = -Width * (Number + 4) / 2 + i * Width / 12 ret = IES.Analysis_GetMagneticField(0, y1, 0, Bxr, Bxi, Byr, Byi, Bzr, Bzi, iErr) rowNumber = CStr(13 + i) Worksheets("General").Range("A" + rowNumber).Value = y1 Worksheets("General").Range("B" + rowNumber).Value = Bzr Next i Note that INTEGRATED functions are shown in red above and are called by Excel as IES.{function} When the script has run, the data section is filled in and the plot is displayed.

Notes:

In order to run the script, which shows B along the axis for a proposed set of Halbach array parameters, you do not have to see an INTEGRATED program at all.
A user trying to come up with parameters for desired shape of B along the axis can keep editing parameters and clicking [Run]. The user should know about Halbach arrays, but doesnt need to know anything about INTEGRATED software. Only the person writing the script needs to know about the simulation software. The person writing the script can decide what parameters to include, what outputs to show and could include looping or feedback for optimization at their discretion.

Page 9

INTEGRATED Engineering Software

#2 - Stand Alone Insulator Design Program


The program shown below has similar goals as the previous Halbach array example. It is a tool for designing a specific insulator with a number of design parameters available to the user. Like in the previous model, only the person creating the program needs to understand ELECTRO. The user just needs to understand the specific tool and what it is telling them about a proposed set of parameters. This program has more history tracking features than the Halbach array example. However, the key difference is that instead of being a macro run from within Excel this example is a stand alone program created using C# within MS Developers Studio.

This sample provides a template for creating substantial third party tools for dedicated design purposes.

#3 - Feedback Loop for Optimization


For this example, supposed that it is necessary to achieve a uniform field of 500 gauss in the center (along the black line below) of the gap between two magnet pole faces and the only free parameter is the shape of the poles.

Page 10

INTEGRATED Engineering Software

The initial analysis shows the following B field distribution along the line:

One could divide the pole faces to have multiple control points, then set up a several nested parameters which shift them up and down, and compute the B field distribution for each, then select the most uniform near 500 Gauss result. That is a safe and easy way to setup analysis, but it will generate a huge number of scenarios to run and examine. An alternative is to make a script that has some feedback so that it adjusts the control points based on the current B field plot. A simple feedback loop was setup in Excel to do this for 6 control points. Each time a [Run] button is clicked the B field at 6 points along the center is computed and displayed in the table, then the 6 control points are shifted slightly based on the result. Each result is shown one row further down in the spreadsheet and one of the sample points is used to update a B versus iteration number plot:

Page 11

INTEGRATED Engineering Software

Note that the feedback accomplishes the goal very nicely for the 6 sampling points. However, when you plot the B field for the final result you see that it oscillates about the so good values obtained right at those points (red curve below):

Comparing the red curve with the original black curve the design goal is met much more closely. If this is still not good enough then other parameters will need to be considered as well. The final shape of the pole faces is:

Note how much straighter the flux lines are near the region of interest, as compared to the initial result.

Page 12

INTEGRATED Engineering Software

Summary
Some examples were presented to illustrate how parametrics and scripting can be used to automate simulation for design purposes. Parametrics are shown to be easy to setup and run for those cases readily described in parametric terms, but for projects that warrant the extra setup time, scripting provides a lot more power and especially when the script runs external to the simulation software.

About INTEGRATED Engineering Software


Since 1984, INTEGRATED has offered an innovative, world-class suite of complete solutions for engineering and scientific designs involving multiple disciplines - creating simulation software programs that analyze a full spectrum of physical problems. INTEGRATED Engineering Software is a leading developer of hybrid simulation tools for electromagnetic, thermal and particle trajectory analysis. We provide a complete line of fully integrated 2 and 3 dimensional simulation software. In many cases, it is a combination of variables that affects models rather than just the electromagnetic or particle trajectory field. When such a combination of factors is involved, thermal and power systems design analysis is also required. As the name of our company suggests, all our programs are seamlessly integrated, starting from a concept, through entry of the geometry and physics of the problem, to the selection of type of solver and the problem's solution. Once the problem has been solved, a vast number of parameters can be calculated or the field quantities displayed. At no extra cost, all our software packages include: Choice of solvers: Boundary Element Method (BEM), Finite Element Method (FEM) Finite Difference Time Domain (FDTD) get the right answer and independent verification. Choice of optimization tools: Parametric Analysis for those who need fast and easy optimization with a short learning curve. API and Scripting give more power to advanced users. Built-in material libraries: Customize and create your own library for easy access to the materials. Integration with MATLAB: Users MATLAB code files can include function calls to the INTEGRATED API to build geometry, assign physical parameters, solve, and obtain results. Parallelization: When used on 64 bit computers permits full utilization of available RAM to dramatically increase speed of solution and post-processing. Our software comes complete and ready to use. No need to purchase additional modules or options; all programs are fully functional CAE tools.

Page 13

INTEGRATED Engineering Software

Contact us for an evaluation


Send us your model, whatever the level of complexity. We will show you how to get results from your exact design no packaged demos. Contact us for an evaluation and start improving productivity today. A live demo is also available.

Phone: +1.204.632.5636 Fax: +1.204.633.7780 Email: info@integratedsoft.com Website: www.integratedsoft.com

Page 14

You might also like