Elecnet: Your Fastest Solution To A Better Design
Elecnet: Your Fastest Solution To A Better Design
An introduction to
ElecNet
for
Static 2D Modeling
J D Edwards
May 2014
We welcome your comments regarding Infolytica Corporation documents. You may send comments or corrections to
the following address:
email: [email protected]
fax: Documentation Department
(514) 849-4239
post: Documentation Department
Infolytica Corporation
300 Leo Pariseau, Suite 2222
Montreal, Quebec H2X 4B3
Canada
All rights reserved. No part of this document may be reproduced, translated to another language, stored in a retrieval
system, or transmitted in any form or by any means, electronic, photocopying, recording, or otherwise, without
written permission from Infolytica Corporation.
Chapter 1 Introduction 1
Overview ....................................................................................................... 1
Modeling in 2D and 3D................................................................................. 3
Electric field concepts ................................................................................. 4
Using ElecNet effectively ............................................................................ 7
Getting help .................................................................................................. 8
Chapter 5 Scripting 71
Introduction ................................................................................................ 71
Example model .......................................................................................... 72
Script for the model ................................................................................... 74
Creating a new script ................................................................................. 76
Automation with Excel............................................................................... 77
References 97
Chapter 1 1
Introduction
Chapter 1
Introduction
Overview
The principal aim of this document is to introduce new users to the power of ElecNet for solving
2D static electric field and current-flow problems. A tutorial with detailed instructions takes the
first-time user through the most important features of ElecNet. This is followed by a series of
case studies illustrating modeling techniques and introducing further features of the package. The
document concludes with an introduction to advanced features that make ElecNet a uniquely
powerful tool.
What is ElecNet?
ElecNet is the most advanced package currently available for modeling electrical devices on a
personal computer. It complements the package MagNet, which models magnetic devices.
ElecNet provides a “virtual laboratory” in which the user can create models from materials and
electrodes, view displays in the form of field plots and graphs, and get numerical values for
quantities such as charge and force. An ElecNet user needs only an elementary knowledge of
electric field concepts to model existing devices, modify designs, and test new ideas.
ElecNet is designed as a full 3D-modeling tool for solving static and low frequency time-varying
electric field problems. Many devices can be represented very well by 2D models, so ElecNet
offers the option of 2D modeling, with a substantial saving in computing resources and solution
time.
A feature of ElecNet is its use of the latest methods of solving the field equations and calculating
quantities such as force and torque. To get reliable results, the user does not need to be an expert
in electromagnetic theory or numerical analysis. Nevertheless, the user does need to be aware of
the factors that govern the accuracy of the solution. One of the aims of this document is to show
how the user can obtain accurate results. In 2D, problems can be solved very rapidly, so it is
usually not necessary to consider the trade-off between speed and accuracy. In 3D modeling, on
the other hand, this is an important consideration.
For the advanced user, ElecNet offers powerful facilities for user-defined adjustment of the model
parameters, and control of the operation of the package with scripts and spreadsheets.
Limitations
The information given in this document has been prepared for the free Trial Edition of ElecNet,
and for the full version where the licensed features are restricted to static electric fields and 2D
models. The full version of ElecNet includes parameterization: the automatic solution of
sequences of problems with modified model parameters, which is available as a licensed option.
Because parameterization is such a useful feature, the document includes examples of its use, but
alternative methods are also provided for those who do not have access to this feature.
Modeling in 2D and 3D
Some practical problems are essentially three-dimensional – examples include the end-winding
regions of rotating AC machines. Problems of this kind require the full 3D modeling capability of
ElecNet. In many cases, however, a 2D model will give useful results. Two common types of
device geometry allow 3D objects to be modeled in two dimensions: translational geometry and
rotational geometry.
Translational geometry
Translational geometry means that the object has a constant cross-sectional shape generated by
translation – moving the shape in a fixed direction. The diagram below shows an example.
With translational geometry, any slice perpendicular to the axis has the same shape. Inevitably,
this 2D approximation neglects fringing fields in the third dimension, so the model must be used
with caution. The shape is usually drawn in the XY plane, with the z-axis as the axis of
translation.
Rotational geometry
Rotational geometry means that the object has a shape formed by rotation about an axis, like
turning on a lathe. The diagram below shows an object formed in this way from the same basic U
shape used in the diagram above.
Objects with rotational geometry are usually described in cylindrical polar coordinates, with the
z-axis as the axis of rotation. The rotated shape is then defined in an RZ plane, which makes an
angle θ with the 3D X axis. This geometry differs from translational geometry in two important
respects. First, it is a true representation of a real 3D object, so highly accurate solutions are
possible. Secondly, there are different equations to be solved, and different methods required for
calculating quantities such as force and capacitance. For all built-in calculations, ElecNet handles
these differences automatically, so the user does not need to take account of the differences.
In ElecNet, the 2D cross-section of a rotationally symmetric model must be drawn in the XY
plane, with the Y axis as the axis of rotation. The XY coordinates then correspond to the RZ
coordinates of the conventional cylindrical polar coordinate representation.
Electric potential V
If the electric field does not vary with time, the vector E can be expressed as the gradient of a
scalar quantity V, known as the electric potential or voltage. Since scalar quantities are much
easier to handle than vector quantities, it is usual to solve electric field problems by calculating
the potential distribution, and to represent the field by an equipotential plot – contours of constant
V. The diagram below shows the equipotential plot for the same parallel-plate capacitor.
∫ D ⋅ da =
Ñ ∑q (1-2)
where the integral on the left is taken over a closed surface, and the summation on the right is the
sum of the electric charge (measured in coulombs) enclosed by the surface. From equation 1-2, D
has units of coulombs per square meter.
For most dielectric materials, when the field is not varying with time, there is a simple linear
relationship between the electric flux density D and the electric field strength E:
D = ε rε 0E (1-3)
where the dimensionless quantity εr is a property of the material known as the relative
permittivity or the dielectric constant. For empty space, and to a close approximation for air, εr =
1
If the electric field is perpendicular to the boundary between two materials, and there is no
surface charge at the boundary, equation 1-2 shows that the value of D will be the same in the two
materials. If the relative permittivity εr has values ε1 and ε2 in the two materials, equation 1-3
shows that the corresponding values of E are related by:
E1 ε 2
= (1-4)
E2 ε1
Equation 1-4 has important consequences for voids in a dielectric material, where the value of εr
in the material is higher than the value of εr in the void. In this case, the value of E in the void
will be higher than in the surrounding material, and this may result in electrical breakdown in the
void.
Current density J
In a conducting material, an applied electric field E will result in a flow of electric current
represented by the vector J. In most conductors, these are linearly related:
J =σE (1-5)
where J is the current density in amperes per square meter (A/m2), and σ is the conductivity of the
material in siemens per meter (S/m). Equation 1-5 is the field equivalent of Ohm’s law for
conductors.
There is an important difference between current-flow fields represented by J in conductors, and
electrostatic fields represented by E in devices such as capacitors. Most electrostatic fields are
unbounded: they extend beyond the ends of the electrodes, as can be seen in the field plot for the
parallel-plate capacitor. In principle, the field extends to infinity, although the magnitude decays
rapidly with distance. When modeling such devices, it is necessary to impose an artificial
boundary to limit the field to a finite region, and this is a possible source of error in the solution.
This problem does not arise with current-flow fields. When a conductor is embedded in an
insulating material for which the conductivity is effectively zero, the current flow is limited to the
volume of the conductor. This difference between electrostatic and current-flow fields will be
explored in the case studies.
Getting help
ElecNet is a powerful and complex package with many features that are not covered in this
introductory document. Although care has been taken to make the instructions in the document
clear and accurate, there may be occasions when the user is in difficulty. The first point of
assistance is the comprehensive help facility in ElecNet, which gives detailed explanations of the
features and instructions for their use.
Further help is available from the Infolytica web site: http://www.infolytica.com, where there is
extensive tutorial material and a gallery of examples of the application of ElecNet to a variety of
electric field modeling problems.
Chapter 2
This is an example of a device that can be represented quite well by a 2D model. The fringing
field above the channels is accurately modeled, and the part of the fringing field that is neglected
in a 2D model has only a minor effect on the calculation of force and capacitance. Fringing is
discussed later, on page 23.
Device Model
Brief description
Modeling the system involves the following steps:
• Draw the cross-section of one channel.
• Extend it in a straight line to form a solid body, and specify the material.
• In the same way, construct the second channel.
• Specify the electrodes.
• Define the bounded region of the problem as an air box within which the field will be
calculated.
• Instruct the program to solve the equations and display the results.
These steps are described in detail in the next sections.
Getting started
The instructions given below assume that you are familiar with Microsoft Windows, that you
have installed ElecNet, and started the application (usually by double-clicking the ElecNet icon).
The ElecNet Main window, shown below, should be visible. This is the default window, which
can be customized by experienced users.
1 Examine the ElecNet Main window, and identify the parts listed below.
• The Project bar displays information about the model, with tabs at the top labeled
Object, Material, etc. Initially, the Object page is displayed.
• The View area is the work area where the model is constructed and the results
viewed. Initially, the View1 window is displayed.
• Between the Project bar and the View window are vertical toolbars with buttons
for viewing and selecting objects.
• At the top of the Main window, there is the usual menu bar, and a row of
horizontal toolbars.
2 Move the pointer over the buttons on the toolbars, pausing on each for the “tooltip”
message that describes the action of the button.
• Toolbar buttons are duplicated on the menus. For example, the View menu gives
access to the same viewing tools as the buttons on the vertical View toolbar.
• Other toolbars and buttons can be added, by selecting Customize Toolbars from
the Tools menu.
Initial settings
1 On the File menu, click Save. Alternatively, click the Save button.
• Browse to a suitable folder for storing the model.
2 Save the model with the name Channels.
The model name in the Object page should change to Channels. The extension will be
.en in the full version of ElecNet, or .ente in the Trial Edition.
3 On the Tools menu, click Set Units to display a dialog:
2 In the Background Style drop-down list, select System Window Solid Color.
3 If this background is preferred, Click Set as Default, and click OK.
Displaying the grid
Display the whole of the construction grid as follows.
1 On the View menu, click Construction Grid.
You should see a grid of a few small points, widely spaced.
2 On the View menu, click Examine Model Dynamically, or click the Examine
Model button.
3 In the View 1 window, roll the mouse scroll wheel downwards to zoom out, until the
whole of the grid is visible.
• If you go too far, roll the scroll wheel upwards to zoom in.
• To restore the original display, double-click in the View 1 window. Alternatively,
on the View menu, click View All.
4 If there is no scroll wheel, proceed as follows to add a Dynamic Zoom button to the
View toolbar:
• On the Tools menu, click Customize Toolbars.
• Select the Commands page of the Customize dialog.
• In the Categories list, click View Toolbar.
• Drag the Dynamic Zoom button to the View toolbar.
• Click OK to close the Customize dialog.
5 Click the Dynamic Zoom button.
6 In the View 1 window, drag the pointer downwards to zoom out, so that more of the
grid is visible, and then release the button.
• Repeat as required until the whole grid is visible. If you go too far, drag upwards
to zoom in.
• To restore the original display, double-click in the View 1 window. Alternatively,
on the View menu, click View All.
25 25
40 40 40
50
70
P 80
3 If any lines have been drawn in the wrong place, correct them as follows.
• If the last line to be drawn was in the wrong place, undo this action with
Ctrl+Z, or click the Undo button. For other lines, proceed as follows.
• Double-click the last point, or press Esc, to stop line drawing.
• Click the Select Construction Slice Lines/Arcs button.
• Click the line that you want to delete.
The selected line should turn red.
• Press the Delete key.
• Click the Add Line button and redraw the line.
4 To terminate line drawing, use a double click to complete the last line, or press
Esc when the drawing is complete.
5 The finished outline of the channel should look like the picture on the next page.
5 10 5 5 10 5
25 25
40 40 40
P 50
70
80
Removing selections
After defining the electrodes in this way, part of the model will be selected in the View window.
This can interfere with subsequent displays. The following is a simple way of removing all
selections:
• In the Object page of the Project bar, click the model name.
Air box
An outer boundary is added to the model by creating a new component called an air box, which
encloses all the other components. The default boundary condition for the air box is Flux
Tangential (see appendix A), which means that the electric field is constrained to be parallel to
this boundary. This is a reasonable approximation if the boundary is sufficiently far away from
the device. It is usually satisfactory to make the radius of the air box about 10 times the radius of
the rest of the model.
Since the air box is much larger than the channels, it is not convenient to draw it with the mouse.
Instead, coordinates are entered with the keyboard as described below.
If the air box is made in the same way as the other components, it will contain holes
corresponding to the shapes of those components. This is undesirable, because it will cause
problems later when the model is modified. To prevent holes being formed, the construction slice
lines for the other components will be removed, as described in step 3 below.
1 On the View menu, click Construction Grid.
This turns off the construction grid display.
2 On the View menu, click Update Automatically. Alternatively, click the
Automatic View All button.
This keeps all of the components in view in the window.
3 Remove the construction slice lines as follows.
• Click the Select Construction Slice Lines/Arcs button.
• Press Ctrl+A to select all the lines.
All the lines are marked in red.
• Press Delete to delete the lines.
4 On the Tools menu, click Keyboard Input Bar if there is no check mark beside it.
The Keyboard Input bar should be displayed at the bottom of the Main window,
above the Status bar, with a text box for entering coordinates.
8 Change the coordinates in the text box to (400, 0), and then press Enter, or click the
Enter button. The brackets and comma can be omitted.
The display next to the Enter button should show (400, 0) mm, and the coordinate
display on the Status bar should show X:400 Y:0 Xg:400 Yg:0 Zg:0. A circle of
radius 400 mm should be shown in the View 1 window.
9 Click the Select Construction Slice Surfaces button.
10 Click inside the circle.
11 Click the Make Component in a Line button to make the air box.
• Change the Name to AirBox.
• Click in the Material box. Start typing AIR
• Alternatively, scroll down through the list and select the material.
It is essential to use AIR, which has a special function in ElecNet. Do not select
Virtual Air, which is a generic insulator material.
• The Distance should be 160 mm.
• Click OK.
12 On the File menu, click Save, or click the Save button.
It is good practice to save often, in case of computer problems.
The Polynomial Order is shown as Default. For this model, the default is order 1.
• In Polynomial Order, select 2 from the drop-down list.
• Click OK.
2 On the Solve menu, click Static 2D.
When the solver finishes, the equipotential lines should be smoother, as shown below,
indicating a more accurate solution.
3 Save the model again.
Post-processing
After a field solution has been obtained, other quantities can be calculated and displayed. This is
termed post-processing. ElecNet has a Results window that displays numerical values for
quantities such as force and charge; these are termed global quantities. In addition, shaded color
plots and contour plots of fields can be displayed in the Field page of the View window; field
values at any point in the model can then be displayed by moving the mouse pointer.
Each of the available fields can be viewed as a smoothed field. Smoothing applies averaging to
remove the discontinuities that are present in the computed field. A smoothed field is continuous
across mesh element boundaries where the materials are the same. Smoothed fields are not
continuous across element boundaries where the materials differ (true discontinuity exists at these
boundaries).
Field Extractor
It is instructive to display a graph of the electric field strength magnitude along a line just below
the inner channel, with end-point coordinates (–35, –25.5) and (35, –25.5). This will show the
high field values near the corners of the channel.
1 On the Tools menu, click Field Extractor to display a dialog:
For Y, entering only a Start value automatically sets the number of sampling points
to 1.
Since the X coordinate range is 70 mm, setting the iteration value to 141 will sample
the field at increments of 0.5 mm.
4 In the Field Name drop-down list, select |E| smoothed.
5 Click Graph.
6 Close the Field Extractor window.
Global quantities
Click the Results tab to display the Results window. This has pages for displaying the calculated
values of the quantities energy, force, charge and voltage for the model. Numerical results given
below were obtained with version 7.5 of ElecNet.
The display precision can be adjusted with a control at the top of the Results window; the default
precision is 3. For the results given below, the precision was set to 5.
Energy
By default, the Results window should display the Energy page. If this is not visible, click the
Energy tab. The displayed values should be similar to the following:
Stored Electric Energy 0.00091326 J
See appendix B for a discussion of energy.
Forces
ElecNet automatically calculates forces on all bodies in the model. A body is defined as a set of
connected components surrounded by the special material AIR. In this case, there are two bodies:
the inner and the outer channel components.
The force components and magnitudes, in newtons, should be similar to the following:
Body X Y Z Magnitude
Outer 4.1101e-005 0.041537 0 0.041537
Inner -1.5676e-005 –0.041488 0 0.041488
• Since this is a 2D model, the Z components are zero.
• By symmetry, the X components should also be zero. The non-zero values are an
indication of numerical error in the solution, but they are small in comparison with the Y
values.
• The Y components should be nearly equal and opposite. The small difference in
magnitude is an indication of numerical error in the solution. Theoretically, there is a
small difference between the magnitudes of the force values corresponding to a residual
force on the outer boundary, but this is extremely small.
The signs indicate a downward force on the inner conductor, and an upward force on the outer
conductor. This signifies a force of attraction, as expected from the opposite signs of the charges.
Torque values are also displayed, but they can be disregarded. From the symmetry of the model,
the torque values should be zero; non-zero torque values are further indications of numerical error
in the solution.
Solution accuracy
There are small discrepancies between the force values on the two components, which indicate
errors in the numerical solution. To reduce the errors, the solution can be repeated after making
the following change:
• In the Solver Options dialog, reduce the CG tolerance from 0.01% to 0.001%.
Reducing the CG tolerance will reduce the discrepancy between the magnitudes of the charges on
the two electrodes. It is generally advisable to make this change from the default CG tolerance of
0.01%. A value of 0.001% is used for the rest of this tutorial.
Note that reducing the CG tolerance does not eliminate the discrepancy between the magnitudes
of the force values. The problem here is the singularity in the value of E at each external corner,
which affects the accuracy of the force calculation. To some extent, the problem can be overcome
by reducing the adaption tolerance, but this creates a large number of mesh elements. A better
solution is to surround each channel with a thin layer of Virtual Air – a material that behaves as
air for the field solution, but it is treated as part of the channel for determining the forces; see
Appendix B. However, in the present case, the force discrepancy is small, so the Virtual Air shell
is not required.
2 Select the Parameters page and scroll down to the end of the list of parameters:
3 In the Expression field, type the following array for the vector, including the square
brackets:
[%Shift%mm, 0, 0]
The name of the user-defined parameter Shift must be preceded by a % symbol. The
suffix %mm converts values from millimeters to the basic units of meters.
4 Press Enter to accept the array.
If the field turns red, there is an error in the field, which must be corrected.
5 Click OK to close the Properties dialog.
6 Select the Problem page of the Project bar.
• Observe that six problems have been created, each with a different shift vector
for the inner channel.
• If ElecNet is licensed for parameterization, all of the problems will be marked for
solution, otherwise only the first problem will be marked.
7 On the Solve menu, click Static 2D.
• If ElecNet is not licensed for parameterization, only the first problem will be
solved automatically. In this case, the others can be solved manually as follows:
• Open the Parameters page of Model Properties, and delete the first item from the
Shift parameter list, so that the list becomes 1, 2, 3, 4, 5. Click Close.
• On the Solve menu, click Static 2D again. This solves for a displacement of
1 mm.
• Repeat this process for displacements of 2, 3, 4 and 5 mm.
• For each of the solutions in turn, inspect the solution as described below.
The instructions below for post-processing are applicable when ElecNet is licensed for
parameterization. With the Trial Edition, only one problem ID will be visible in any of the lists,
and it will not be possible to display animations or graphs of results.
Post-processing – 1
1 Select the Field page of the Project bar.
Notice that the Problem ID number is set to 1.
2 View the contour plot for V and the shaded plot for |E| as before.
3 Click the Problem ID drop-down list on the Field page, and select 2, corresponding to
a displacement of 1 mm.
4 Click Update View to display the plots for problem 2.
5 Use the Field Probe as before to explore the field magnitude values in different parts
of the model.
6 In the Field page, click Animate.
ElecNet generates an image of the plot for each problem ID, and then displays them
in sequence in the View window, with a tab labeled Untitled Animation 1.
7 After viewing the animation, close the window by clicking its Close box.
• This will display a Save Changes dialog. Click No.
Post-processing – 2
1 Display the Results window by clicking the Results tab.
2 In the Results window, click the Force tab.
Force values for problem 1 are displayed.
3 Click the Problem ID drop-down list on the Results window, and select Problem 2.
• Observe the force values for problem 2.
4 Similarly, observe the force values for the other problems.
5 Display a graph of force values as follows.
• For the Inner channel, click in the text box for the X component of force.
The Graph Selection button should be enabled.
• Click the Graph Selection button to display a graph:
Note that the displacement values are not displayed in this graph, because
ElecNet uses this method to show the variation of force with any parameter. The
displacement values corresponding to the problem numbers 1 to 6 are 0, 1, 2, 3,
4 and 5 mm respectively.
6 Close the graph window.
With the inner channel in a symmetrical position (problem 1), the maximum value of |E|
smoothed is 1.663 MV/m. This is the maximum value displayed in the color legend of the shaded
plot. The corresponding value for the original model is 2.512 MV/m, so it appears that the
modification has made a small reduction to the maximum field value. In reality, the reduction is
much greater than this. Theoretically, the maximum value of |E| in the original model is infinite at
the external corners. If the mesh size in the original model is reduced, the computed maximum
value of |E| will increase, apparently without limit. However, if the external corners are given a
small radius of 0.5 mm, the value of |E| does not increase. These effects can be tested by
progressively reducing the adaption tolerance; the table below shows results obtained with
ElecNet version 7.5.
Postscript
The table below compares the 2D results for the modified channels with the results from a 3D
model, using ElecNet version 7.5.
2D 3D
Stored electric energy 0.0008706 J 0.0009524 J
–7
Charge 1.741×10 C 1.905×10–7 C
Capacitance 17.41 pF 19.05 pF
Force on inner channel 0.03948 N 0.04044 N
For the 3D model, the enclosing air box is a cuboid with dimensions 800 mm × 800 mm × 960
mm; the solution parameters are the same as for the 2D model, except that the h-adaption
percentage is reduced from 25% to 5%.
The 3D solution gives a capacitance value that is 9.4% higher than the 2D result, whereas the
force value is only 2.6% higher. An explanation for this difference is that the capacitance per unit
area depends on E, whereas the force per unit area depends on E2. In the fringing field beyond the
ends of the channels, the value of E will diminish more slowly with distance than does the value
of E2. Consequently, this fringing field, which is ignored in a 2D solution, will have a greater
effect on the capacitance than it has on the force.
Chapter 3
Case Studies:
Translational Geometry
Introduction
The case studies in this chapter cover a range of modeling problems for devices with translational
geometry. Devices with rotational geometry are discussed in chapter 4. These case studies are
arranged in order of increasing difficulty, progressively introducing further features of ElecNet,
so it is advisable to work through them in sequence. The detailed descriptions of basic ElecNet
operations given in chapter 2 will not be repeated, but any new operations will be fully explained.
For all of the case studies in chapter 3 and chapter 4, the instructions assume that a new model is
being started, as described in the tutorial in chapter 2. To avoid tedious repetition, this instruction
is given in abbreviated form in the case studies.
In all modeling studies, it is necessary to ensure that an accurate solution has been obtained.
There are two principal sources of inaccuracy: approximating an open boundary by a boundary at
a finite distance from the device, and numerical errors in the finite-element solution. Errors
introduced by the open-boundary approximation will be examined in some of the case studies.
Errors in the numerical solution can be minimized by adjusting the solution tolerance values as
described in chapter 2, using the value of the conduction current in place of charge for current-
flow models.
In some models, there is only one electrode, so it is not possible to check the accuracy by
comparing values that should be equal. In these cases, the value of the charge or conduction
current can be monitored and the tolerance values altered until the change in the value is
acceptably small. The tolerance values given in the case studies have been determined in this
way. In cases where ElecNet does not calculate forces automatically from a simple model of the
material parts, results can be obtained by adding layers of the material Virtual Air: see Appendix
B.
The inner and outer squares have side lengths of 20 mm and 40 mm respectively.
Sample results
The results below were obtained with ElecNet version 7.5. For comparison, the analytical value
of the capacitance per meter length [1, 2] is 90.61 pF.
Stored electric energy: 4.5308×10–11 J
Charge on outer electrode: –9.0618×10–11 C
Charge on inner electrode: 9.0613×10–11 C
Capacitance from charge: 90.62 pF
Capacitance from stored energy: 90.62 pF
A
C
O
Surfaces represented by lines B and D are the electrodes; surfaces represented by lines A and C
are planes of symmetry, which can be represented by the default Flux Tangential boundary
condition. Lines A and D are 10 mm long; line B is 20 mm.
Creating the model
1 Start a new model and save it as Coaxial square 8th.
2 Set the model length units to millimeters.
3 Set and display the construction grid, with the minimum X and Y values set to zero.
4 Draw the outline of the quarter model, with the coordinate origin (point O in the
diagram above) at the center of the complete square.
5 Construct a component for the air region:
• Sweep distance: 1000 mm.
• Material: AIR.
6 Turn off the construction grid.
7 Make the outer electrode:
• In the Object page, click the + sign next to the component name to display the
faces.
• Identify and select the face for the outer electrode (corresponding to B).
• On the Model menu, click Make Electrode.
8 In the same way, make the inner electrode, using the face corresponding to D in the
diagram.
9 In the Electrode page, set the voltage of the inner electrode (Electrode#2) to 1 V.
4 Inspect the computed global quantities, and calculate the capacitance value as follows
(see appendix B for details):
• From the charge: C = Q / V, where Q is the average of the magnitude of the
charge on each electrode, and V is the voltage difference (1 V in this case).
• From the stored energy: C = 2W / V2, where W is the stored electric energy.
This value is one eighth of the capacitance of the complete model.
Sample results
The results below were obtained with ElecNet version 7.5. For comparison, the analytical value
of the capacitance per meter length [1, 2] is 90.61 / 8 = 11.33 pF.
Stored electric energy: 5.6641×10–12 J
Charge on outer electrode: –1.1328×10–11 C
Charge on inner electrode: 1.1328×10–11 C
Capacitance from charge: 11.33 pF
Capacitance from stored energy: 11.33 pF
The capacitance of the complete device is 8 × 11.33= 90.64 pF, which is close to the value of
90.62 pF from the full model.
Duality
It is instructive to interchange the electrode and symmetry boundaries in the model. Thus, the
faces represented by lines A and C become the electrodes, and the other faces have the default
Flux Tangential boundary condition. The result is the dual of the original quarter model, where
field lines and equipotentials are interchanged. The diagrams below shows the contour plots for
the dual model. Observe that the contour plot of V gives a better plot of field lines than does the
contour plot of the flux function in the original model; similarly, the contour plot of V in the
original model gives a better plot of equipotentials than does the contour plot of the flux function
in the dual model.
Trimmed resistor
The diagram below shows a resistor made from a flat sheet of resistive material, with electrodes
at the ends. The value of the resistance is adjusted by making a cut in the material. It is required
to determine the resulting value of the resistance, by finding the current that flows when the
voltage difference between the electrodes is 1 V.
15 15
30 30 O B 30
10 5
15 A
50 25
4 Inspect the computed global quantities, and calculate the resistance value as follows:
• From the current: R = V / I, where I is the average of the magnitude of the
conduction current at each electrode, and V is the voltage difference (1 V in this
case).
• From the ohmic loss: R = V2 / P, where P is the ohmic loss.
5 Select the Material page of the Object bar.
• Right click on Aluminum: 3.8e7 Siemens/meter and select Properties.
• In the Properties dialog, click the Electric Conductivity tab.
• Note the value of the conductivity at 20ºC.
The value should be 3.8×107 S/m
• Close the Properties dialog.
Sample results
The results below were obtained with ElecNet version 7.5.
Ohmic loss: 15304 W
Conduction current at outer electrode: –30608 A
Conduction current at inner electrode: 30609 A
Resistance from current: 16.34 µΩ
Resistance from ohmic loss: 16.34 µΩ
The conductivity of aluminum is 3.8×10 S/m, so the resistivity is 2.632×10–8 Ωm. If the material
7
is changed from aluminum to nichrome, the resistance from the half model will be:
ρ nich Ralum 110 × 10−8 × 16.34 × 10−6
=
Rnich = = Ω 682.9 µΩ
ρ alum 2.632 × 10−8
30 A C 30
D
60
Sample results
The results below were obtained with ElecNet version 7.5. For comparison, the analytical value
of the capacitance per meter length [1] is 50.64 pF.
Stored electric energy: 2. 4639×10–5 J
Charge on Electrode#1: 4.9299×10–8 C
Capacitance from charge: 49.30 pF
Capacitance from stored energy: 49.28 pF
Maximum value of |E| smoothed: 610.3 kV/m
Thus, the value of capacitance from the model is 2.6% lower than the analytical value.
Effect of air box size
To explore the effect of the air box size, the dimensions will be doubled and then doubled again.
1 View the solid model.
2 Select and delete the construction slice lines.
3 In the Object page, select the AirBox component.
4 On the Model menu, select Scale Components… to display a dialog:
30 A C 30
D
O 30
The default Flux Tangential boundary condition is correct for the surface represented by side A
for the symmetry boundary, so it is only necessary to assign a boundary condition to the surface
represented by side D as before.
Creating the model
1 Start a new model and save it as Cylinder plane half.
2 Set the model length units to millimeters.
3 Set and display the construction grid, with the minimum X and Y values set to zero,
and a spacing of 1 mm.
4 Draw the square boundary of the half model, with the coordinate origin at O.
5 Draw the semicircle, and make a component for the half cylinder:
• Material: Aluminum: 3.8e7 Siemens/meter.
• Sweep distance: 1000 mm.
6 Make an electrode from this component:
• Select the entire component in the Object page, instead of a set of faces.
• Set the voltage to 1000 (1 kV).
7 Delete the construction-slice arc for the half cylinder, but leave the lines for the
square.
8 Make the air box:
• Material: AIR.
• Sweep distance: 1000 mm.
9 Turn off the construction grid.
10 Apply the Ground boundary condition to the face that corresponds to line D in the
diagram.
Sample results
The results below were obtained with ElecNet version 7.5.
Stored electric energy: 1.2321×10–5 J
Charge on Electrode#1: 2.4614×10–8 C
Capacitance from charge: 24.61 pF
Capacitance from stored energy: 24.64 pF
Maximum value of |E| smoothed: 609.3 kV/m
As expected, the capacitance values are half of those obtained with the full model, and the
maximum value of |E| is virtually unchanged.
18 18
2 2
1 19
We require a dielectric material for the components representing the PCB. For this case study, the
specified relative permittivity matches a standard material in the ElecNet library: EP05: Relative
permittivity 5. For most practical problems, it would be necessary to create a new user-defined
material with the required properties.
Short line
18 18
17 2 17
2 2
2 2
As before, a standard material in the ElecNet library: EP05: Relative permittivity 5 is used for the
board material.
An alternative model could be constructed using a single component for the PCB, as in the
previous case study, with extra faces created for the two electrodes.
Capacitance values
Capacitance values can be obtained with the ElecNet RLC Matrix Calculator as follows:
1 On the Extensions menu, click RLC Matrix Calculator to display the Matrix
Calculator dialog:
• Click Scale Factor and type the value 0.1 in the text box.
• Click Shift Vector and edit the text box: (60, 60, 0).
• Click Apply the Transformation to a Copy of the Selection.
• Click OK.
A new air box should appear in the View 1 window, as shown below, and there
should be a new component in the Object page.
4 In the Object page, change the name of the new component to Exterior.
5 Display the tree directory for the AirSpace component.
• Select Face#3
• Hold down the Ctrl key, and select Face#4.
These faces are the half-cylinders that form the curved surface of the Airspace
component, as can be seen by rotating the view of the model.
6 On the Boundary menu, click Even Periodic to display the Periodic Data dialog:
• Click Scale Factor and type the value 0.1 in the text box.
• Click Shift Vector and edit the text box: (60, 60, 0).
These settings are identical to those in the Transform Components dialog that
was used to create the Exterior component.
• Click OK to close the Set Periodic Transformation dialog.
• Click OK to close the Periodic Data dialog.
A new item BoundaryCondition#1 (EP) should appear in the Object page. The curved
surfaces of the two components will be marked with patterns representing the
boundary condition, which can be seen by rotating the view of the model.
Equipotential lines inside the larger circle show the true field for this portion of the
open boundary problem. Those inside the smaller circle are a transformed
representation of the field outside the larger circle.
4 Note the values in the Results window and compare them with the previous values
obtained with a large air box.
Sample results
The results below were obtained with ElecNet version 7.5:
Large air box Open boundary
Stored electric energy (J): 0.00091326 0.00091253
Charge on Electrode#1 (C): –1.8265×10–7 –1.8250×10–7
Charge on Electrode#2 (C): +1.8265×10–7 +1.8251×10–7
Force on Outer channel (N): +0.041531 +0.041476
Force on Inner channel (N): –0.041487 –0.041488
In this example, the differences between the large air box results and the open boundary results
are small, indicating that the size of the large air box has been correctly chosen.
Chapter 4
Case Studies:
Rotational Geometry
Introduction
This chapter follows the same pattern as Chapter 3; it covers a variety of modeling problems for
devices with rotational geometry, arranged in order of increasing difficulty.
Constructing a model with rotational geometry is different from the procedures used in chapters 2
and 3. The model is constructed as part of a solid of revolution by rotating shapes about an axis.
This axis must be the Y axis of the normal XY drawing plane. Components are formed by
sweeping in an arc instead of sweeping in a line. The subtended angle of the arc is unimportant
for a 2D model, so the ElecNet default angle of 90º will be used for all of the case studies. This
construction technique is described in detail in the first case study: Disc above a Plane.
The disc has a diameter of 40 mm and a depth of 10 mm, and there is a uniform gap of 10 mm
between the disc and the plane. The plane is grounded and the disc is maintained at a voltage of
10 kV with respect to ground. A cross-sectional view is shown below; the plane is considered to
be of infinite extent.
80
A C 100
20
10
10 D
P 100
8 Make the air box by selecting the interior of the square and sweeping in an arc, with
the default sweep parameters.
9 Apply the Ground boundary condition to the face of the air box that corresponds to
line D in the diagram.
10 Make an electrode from the disc component:
• Select the entire component in the Object page, instead of a set of faces.
• Set the voltage to 10000 (10 kV).
Solving and post-processing
For models with rotational symmetry, the ElecNet solver uses polynomial order 2 by default.
There will be no need to change the polynomial order from that default value.
The suggested solver settings should give an accurate 2D solution without excessive computing
time. The user is invited to try the effect of different settings.
1 Set the options for solving, with the following changes from the default settings:
• Solver Options:
CG tolerance 0.001%,
• Adaption Options:
Use h-adaption,
Tolerance 0.1%.
2 Solve as Static 2D.
3 Inspect the contour plot of V and the shaded plot of the smoothed |E| values.
Observe the high value of electric field strength at the edges of the disc,
corresponding to the corners in the 2D representation. Theoretically, the field is
infinite at these edges. To reduce the maximum value of E, it would be necessary to
alter the shape of the electrode – see below.
4 Inspect the computed global quantities, and calculate capacitance values as follows
(see appendix B for details):
• From the charge: C = Q / V, where Q is the charge on the electrode, and V is the
voltage relative to ground (10 kV in this case).
• From the stored energy: C = 2W / V2, where W is the stored electric energy.
Sample results
The results below were obtained with ElecNet version 7.5:
Stored electric energy: 0.00016795 J
Charge on Electrode#1: 3.3582×10–8 C
Capacitance from charge: 3.358 pF
Capacitance from stored energy: 3.359 pF
Two spheres
The diagram below shows two conducting spheres as used for high voltage measurement. The
objectives are to examine the electric field distribution, to determine the capacitance of the
system, and compare the results with values obtained by analytical solution of the field equations.
Each sphere has a diameter of 62.5 mm, the gap between the spheres is 60 mm, and the voltage
between the spheres is 185 kV.
A
207.5
62.5
30 B
P 300
Sample results
The results below were obtained with ElecNet version 7.5:
Stored electric energy: 0.019665 J
Charge on Electrode#1: 4.2517×10–7 C
Capacitance from charge: 4.596 pF
Capacitance from stored energy: 4.597 pF
Maximum value of |E| smoothed: 5.351 kV/mm
The capacitance for the full model is half of the value for the half model: 2.298 pF. The analytical
values [3] are: capacitance = 2.349 pF, maximum |E| = 5.352 kV/mm.
Chapter 5
Scripting
Introduction
Up to this point, ElecNet has been used interactively, with the mouse and the keyboard, to build
models and analyze the results. ElecNet can also be controlled by scripts and scripting forms.
Scripts are text files containing commands that control ElecNet. A script can be recorded during
an ElecNet session. When this script is run, all the operations that were carried out during the
recording session will be repeated automatically. Scripts created in this way can be edited to
change the operations, and scripts that are more powerful can be created with the VBScript
programming language.
Recording a script is often an effective way of finding out how to use the ElecNet scripting
commands, in preparation for writing special-purpose user scripts.
Scripting forms take scripting a stage further by providing a graphical user interface for the user
to interact with the script. A form can have text boxes for entering values, buttons for starting
actions, and areas for displaying results. Scripting forms are not covered in this document, but
sources of information are given below.
The most advanced kind of scripting uses another application to communicate with ElecNet
through the Microsoft ActiveX Automation Interface. Microsoft Excel, for example, can be used
in this way. A script in the form of an Excel macro can command ElecNet to build and solve a
model, using data entered on the spreadsheet, and then get results back from ElecNet to display
on the spreadsheet. An example of this form of scripting is given in the section “Automation with
Excel” on page 77.
Further information
The ElecNet Help gives full particulars of the ElecNet scripting commands. Guidance on writing
scripts is available from the Support area of the Infolytica website, www.infolytica.com.
Example model
To illustrate the principles of scripting, a simple model will be used. The diagram below shows
two parallel plates, maintained at different voltages. The plates are deep enough for a 2D model
to be used.
The cross section of the system is shown below, with dimensions in millimeters.
2 12 2
20 P 20
This is an open boundary problem, which could be handled by the open boundary technique
described in the case study on page 58. However, for simplicity, a simple circular boundary will
be used.
Creating the model
1 Save the file as Parallel plates.
2 Set the model length units to millimeters.
3 Display the construction grid.
The default grid extent and spacing are satisfactory.
4 Let the coordinate origin be the point P mid-way between the plates, so that the plates
are disposed symmetrically about the origin.
5 Construct a component for each plate:
• Material: Aluminum: 3.8e7 Siemens/meter.
• Sweep distance: 1000 mm.
6 Delete the construction slice lines.
7 Create a circular air box with a radius of 400 mm.
• Material: AIR.
• Sweep distance: 1000 mm.
Sample results
The results below were obtained with ElecNet version 7.5.
Stored electric energy: 0.00049236 J
X component of force on left plate: 0.02659 N
X component of force on right plate: –0.02663 N
Charge on left plate: 1.6411×10–7 C
Charge on right plate: –1.6413×10–7 C
Capacitance from charge: 27.35 pF
Capacitance from stored energy: 27.35 pF
Line Script
1 'Script to get values of |E| at points in a 2D field
2
3 Set Mesh = getDocument.getSolution.getMesh(1)
4 Set Field = getDocument.getSolution.getSystemField _
5 (Mesh,"|E| smoothed")
6 ReDim Value(0)
7 Do
8 X = InputBox("Enter the X co-ordinate:",,0)
9 Y = InputBox("Enter the Y co-ordinate:",,0)
10 Call Field.getFieldAtPoint (X, Y, 0, Value)
11 Response = MsgBox("The value of |E| is " & Value(0) & Chr(10) _
12 & "Enter another point?", VbYesNo)
13 Loop Until (Response = VbNo)
Line Comment
1 Any line starting with a single quote character (') is a comment, which is ignored when the
script runs.
2 Blank lines are ignored when the script runs.
3 This gets the solution mesh and creates an object handle Mesh, required in line 5.
4 This gets the required field and creates an object handle Field, required in line 10. An
underscore preceded by a space character means the statement continues on the next line.
5 This is the continuation of line 4.
6 An array with one element is created, for use in lines 10 and 11.
7 This is the start of a repeat loop that ends at line 13.
8 The VBScript InputBox function is used to get the X co-ordinate value entered by the user.
9 The VBScript InputBox function is used to get the Y co-ordinate value entered by the user.
10 The required field value is returned in the first element of the array Value.
11 The VBScript MsgBox is used to display the result and get a yes/no response from the user.
Strings are enclosed between double quote (") characters.
The & operator joins strings and converts numbers to strings.
Chr(10) is a special character, used to start a new line in the message box.
12 This is the continuation of line 11. Returned values are VbYes or VbNo.
13 This is the end of the repeat loop that started at line 7.
The core of the Excel implementation is a set of macros or subroutines, written in Visual Basic
for Applications (VBA), which are similar in principle to the scripts discussed above. There are
four buttons on the worksheet, each linked to a macro, which do the following:
• Start ElecNet: start the ElecNet application and set the length units.
• Close ElecNet: close the model file, close the application and release resources.
• ElecNet Visibility: make ElecNet visible or invisible.
• Run Model: get data values from cells D5 to D11, send commands to ElecNet to build
and solve the model, get the X components of force on the plates and the charge values
from ElecNet, and display the results in cells D13 to D17.
The macro activated by the Run Model button is the core of the implementation. For clarity, this
macro calls other subroutines that carry out specific tasks such as creating one plate.
The sections below describe how to set up the Excel worksheet and create the subroutines. This is
an advanced topic, which assumes some familiarity with Microsoft Excel and the Visual Basic for
Applications (VBA) macro language used in Excel.
Registered users can download a copy of the complete Excel workbook, containing the worksheet
and the macro module, by clicking here.
The instructions below relate to Microsoft Office Excel 2013. Other versions of Excel may
behave differently.
Excel worksheet – 1
1 Start Excel.
2 If the Developer tab in the Ribbon is not visible, do the following:
• Click the Office button, and select Excel Options.
• On the Popular page, click Show Developer Tab in the Ribbon.
• Click OK.
3 Start a new Excel workbook.
4 Save the file as Parallel plates.xlsm
This is an Excel macro enabled workbook.
5 Enter the text and numerical values exactly as shown on the previous page, except for
cells D13 to D17, which should be left blank.
6 Set the numerical format of cells as follows:
• D5 to D10: one decimal place.
• D13 and D14: six decimal places.
• D15 and D16: five decimal places.
• D17: two decimal places.
• All other cells can use the default formatting.
Option Explicit
Excel worksheet – 2
1 Return to the Excel window by clicking the Excel icon on the Windows task bar.
2 On the Developer tab, click Insert and select the Button from Form Controls.
This is the small rectangle in the top left-hand corner of the group of controls.
3 Click on worksheet cell E1 to insert a button.
A dialog box should appear:
Testing – 1
1 Click Start ElecNet.
• If the macro is working correctly, the ElecNet window should open.
• If the macro contains fatal errors, there will be a Visual Basic dialog similar to
the following.
Completion
1 Return to the Visual Basic editor.
2 Type in the remainder of the code listed below.
Public Sub RunModel()
' Subroutine called by the Run Model button.
' Build and solve the model.
Dim Q1 As Double, Q2 As Double
Dim Fx, Fy, Fz
If Not Running Then
Call MsgBox("ElecNet is not running.", vbOKOnly)
Else
' Build the parallel plate model
NewModel
GetData
Call MakePlate(Lx, Ly, Lz, (Lx + Lg) / 2, 0, "Plate#1")
Call MakePlate(Lx, Ly, Lz, -(Lx + Lg) / 2, 0, "Plate#2")
MakeElectrodes
OpenBoundary
' Solve the model and get results from ElecNet.
Call Doc.solveStatic2D
With Sheets("Sheet1")
Call Sol.getForceOnBody(1, 1, Fx, Fy, Fz)
.Cells(13, 4).Value = Fx
Call Sol.getForceOnBody(1, 2, Fx, Fy, Fz)
.Cells(14, 4).Value = Fx
Q1 = Sol.getChargeOnElectrode(1, 1)
.Cells(15, 4).Value = Q1 * 1000000#
Q2 = Sol.getChargeOnElectrode(1, 2)
.Cells(16, 4).Value = Q2 * 1000000#
.Cells(17, 4).Value = (Q1 - Q2) / (2 * Vd) * 1000000000000#
End With
End If
End Sub
3 Return to Excel.
4 Insert a new button named Run Model, linked to the Visual Basic subroutine
RunModel.
5 Test this button.
• If necessary, correct errors as before.
6 If it is difficult to find the errors, proceed as follows.
7 Place the insertion point anywhere in the RunModel() subroutine.
Subroutine StartElecNet
This subroutine starts the ElecNet program, and assigns values to some object variables for
convenience in the rest of the module. The value of the global variable Running indicates
whether ElecNet is already running. It has the value False initially, but is set to True when
ElecNet is started, and reset to False when ElecNet is closed.
Subroutine CloseElecNet
This subroutine closes the current model if one has been built, then closes the ElecNet application
and resets variables.
Subroutine Visibility
This subroutine determines whether the ElecNet window should be visible, by testing the value of
the global variable Visible. The value (True or False) is set by the user’s response to a
question in a dialog box.
Subroutine RunModel
This subroutine calls other subroutines described below to get data from the worksheet and build
the model. It solves the model, and display results on the worksheet.
Subroutine NewModel
This subroutine closes the current model and starts a new model. It also resets some object
variables so that they refer to the new model, and sets the ElecNet solving parameters.
Subroutine GetData
This subroutine gets data from designated cells on the first worksheet, which is assumed to have
the Excel default name Sheet1. The subroutine does no data checking, and simply assumes that
valid data have been entered in numeric form in the worksheet. A production version of the
subroutine should include checks for the data format, and conversion from strings to numbers if
required.
Subroutine MakePlate
This subroutine creates a plate, using data supplied in the parameter list. It is called twice by the
subroutine SolveModel to create the two plates. The ElecNet commands are similar to those
found in a User Script Log file, apart from the string manipulation to use the name of the material
from the worksheet.
Subroutine MakeElectrodes
This subroutine makes the two electrodes by selecting component surfaces, and sets the voltage
on one electrode to the specified voltage difference between the plates.
Subroutine OpenBoundary
This subroutine implements the Kelvin transformation to represent an open boundary. It creates
an interior air space component surrounding the model, and a small exterior air component. The
components are linked with an even periodic boundary condition.
Appendix A
∂ρ
div J = − (A-3)
∂t
D ε=
= E ε 0ε r E (A-4)
J =σE (A-5)
where ρ is the charge density (charge per unit volume) which is the source of the electric field.
Equation A-2 is the differential form of Gauss’s law – equation 1-2 of Chapter 1.
In electrostatic problems, if charges are confined to the surfaces of conductors and insulators, so
that there is no free charge within the volume of a material, equation A2 reduces to:
div D = 0 (A-6)
To solve this equation, we use equation A-1 to express the electric field strength E in terms of the
electric potential V through the equation
E = −gradV (A-7)
Equation A-6 then becomes
div ( ε grad V ) = 0 (A-8)
which is solved numerically by the finite-element method to determine the electric field in the
device (see the section “Numerical Solution” on page 90). At the surface of an electrode, the
integral form of equation A2 relates the charge to the surface integral of D.
For current-flow problems, within the volume of the conductor equation A-3 becomes:
div J = 0 (A-9)
giving a similar equation to A-8:
div (σ grad V ) = 0 (A-10)
At the surface of the conductor, the integral form of equation A3 relates the conduction current,
which is the rate of flow of charge, to the surface integral of J.
Open boundaries
Consider a 2D electrostatic or current-flow problem with translational symmetry that has an open
boundary. Let the 2D model be enclosed in a circle of radius R, so that all the material parts of the
model are inside the circle. The field region comprises two parts: the finite interior of the circle,
and the infinite space outside the circle. In both regions, we have:
E = −gradV [A-7]
For this problem, the Kelvin transformation [5] gives the following useful result: the infinite
space outside the circle of radius R is equivalent to the interior of another circle of any finite
radius kR, if the potentials of all corresponding points on the two circles are identical. To
implement this in ElecNet, it is necessary to construct two air boxes: a normal circular air box
surrounding the model, and a second circular air box to represent the infinite external space. An
even periodic boundary condition is imposed on corresponding curved surfaces of the two air
boxes, forcing the potentials to have the same values at corresponding points. An example of a
manual implementation is given in the case study on channels with an open boundary (page 58),
and a scripting example is given on page 77.
Numerical solution
Introduction
The core of ElecNet is a powerful technique for solving the electrostatic field equations
numerically. Most of this process is automatic and virtually transparent to the user, but it is
necessary to control the process by setting the solver and adaption options. As with the
fundamental equations, it is helpful if the user has some understanding of the method.
ElecNet employs the finite-element method [6] to solve the 2D form of equation A-8 or A-9 for
the electric potential. With this method, the region of the problem is divided into a mesh of
triangular elements, and the potential in each element is approximated by a simple function of the
x and y (or r and z) coordinates. The simplest function is a linear variation with position; this
gives first-order elements, where the potential inside a triangular element is obtained from the
potentials at the three vertices or nodes. High-order elements use high-order polynomials and
additional nodes to represent the potential. The problem of solving equation A-8 or A-10 then
reduces to the solution of a set of linear equations for the unknown potentials at all the nodes.
This must be repeated several times if the model contains non-linear dielectric materials.
The accuracy of the finite-element solution depends on three factors: the nature of the field, the
size of the elements, and the element order. In regions where the direction or magnitude of the
field is changing rapidly, high accuracy requires small elements or a high element order. In
addition, the methods used to find the finite-element solution are iterative, with an adjustable
error criterion for terminating the process.
Solver
When non-linear dielectric materials are present, the permittivity ε depends on the local value of
E. Equation A-8 or A-10 is solved as follows:
• Constant values of permittivity are chosen for each element, from the initial point of the
material ε / E curve.
• The resulting linear equations are solved numerically for the electric potential, using the
semi-iterative conjugate gradient method.
• The field strength values are calculated from the potential, and these results are used to
calculate new values for the element permittivities.
• The process is repeated until the element permittivity values have converged.
CG steps
At each step in the conjugate gradient process, the change in the solution is monitored. The
process continues until the change is less than the CG Tolerance. For most static problems, the
default value of 0.01% appears to be too large. A value at least 10 times smaller may be required
for accurate results.
Method of permittivity calculation
For 3D problems, ElecNet gives a choice of the Newton-Raphson method or successive
substitution for calculating updated element permittivity values. The default Newton-Raphson
method normally converges more rapidly, but there can be convergence problems with some
material characteristics, in which case the successive substitution method is required. Only the
Newton-Raphson method is available for 2D problems.
Newton steps
At each step in the permittivity calculation process, the change in the solution is monitored. The
process continues either until the change is less than the Newton Tolerance, or until the limit of
Maximum Newton Iterations is reached. For most problems, the default values of 1% and 20
iterations should be satisfactory.
Polynomial order
The solver polynomial order setting is a global value that applies throughout the model. If its
setting is left at Default, MagNet will use order 1 in translational geometry, and order 2 in
rotational geometry. Order 1 gives a fast solution of low accuracy, and is useful for initial tests on
a complex model, but it is not satisfactory in rotational geometry. For 3D models the polynomial
order of elements in particular components can be specified separately (see “Control of the mesh
structure” on page 92), but for 2D models the solver polynomial order option sets the value that
will be used for the entire model.
With some models, increasing the polynomial order is as effective as using adaption to improve
the solution accuracy. In most cases, however, good results will be obtained by setting the
polynomial order to 2 and using adaption as described below.
Adaption
Adaption is the process of automatic refinement of the mesh to improve the solution accuracy.
For 3D models, there is a choice of two adaption methods: h-type adaption, where element sizes
are halved, and p-type adaption, where the element polynomial order is increased. For 2D models,
only h-type adaption is available.
A consequence of the finite-element approximation to the true field is a discontinuity in the value
of E from one element to the next. ElecNet determines which elements to refine by calculating
the discontinuity error values. At each adaption step, elements with the largest error are refined
first. The adaption option Percentage of Elements to Refine determines the percentage of the total
number of elements that will be refined at each step. The default value of 25% is generally
satisfactory for 2D models. For 3D models, where the number of elements increases very rapidly
at each step, a lower value is appropriate.
After each adaption step, the change in the calculated value of stored electric energy is monitored.
Adaption continues until this change is less than a specified tolerance, or the specified number of
steps has been reached. As the case studies demonstrate, the default tolerance of 1% is generally
too large for a high-accuracy solution. If the quantity of interest is the force or torque, rather than
an energy-related quantity such as capacitance, a more accurate solution may be required, and the
change in the stored electric energy may not be a good indicator. In such cases it is often
advantageous to set the tolerance to a very low (but non-zero) value, and control the mesh
refinement by adjusting the maximum number of adaption steps. The optimum setting can be
determined by changing the number of steps and monitoring the change in the force or torque
value.
Appendix B
1.6D
b
a
energy.
dD
0
o0 c E
1000
The energy density is the area between the D-E curve and the D axis, which is the area oab in the
diagram. The total energy stored in the device is just the integral of the energy density over the
volume:
=
W wdv ∫ ( ∫ E ⋅ dD ) dv
∫= [J]. (B-2)
When a device is solved in ElecNet, the stored energy value displayed in the Energy tab of the
Post-processing bar is the values of W given by equations B-2.
Applications
The usual definition of capacitance is the charge per volt (see page 95). If the stored energy is
calculated in the usual way as ½CV2, this will differ from the stored energy W; in fact, it is equal
to the equivalent linear energy
=
Wlin ∫ ½D ⋅ E dv [J] (B-3)
which is greater than W. If a precise value of the stored energy is required, for example when
energy is dumped from a capacitor, then the value of the stored energy W will be a better estimate
than the value of ½CV2.
Force calculation
Maxwell stress
In principle, the electrostatic force can be calculated from the Maxwell stress concept [7] which
gives the stress, or force per unit area, directly in terms of the electric field strength. If En and Et
are the components of field strength normal and tangential to a surface, and σn and σt are the
corresponding components of stress, then:
=σ n ½ε 0 ( En2 − Et2 ) (B-4)
σ t = ε 0 En Et (B-5)
If the surface is closed, and passes entirely through air, the total force and torque may be
determined by integrating the stresses over the surface. This result is completely general; it is
independent of the nature of the objects inside the surface, which may include conductors and
dielectric materials.
If the Maxwell stress method is used to calculate forces from a standard numerical solution for
the field, it is difficult to get accurate results. The integral for the force or torque may be
unreliable if it comprises terms that alternate in sign, leading to an accumulation of numerical
errors. It is also very sensitive to the accuracy of the numerical solution. Users require
considerable skill and experience to get good results by this method.
ElecNet avoids this difficulty with the Maxwell stress method by implementing a method based
on virtual work. This requires no skill on the part of the user, and it usually gives accurate values
for the force and the torque.
Forces on bodies
ElecNet calculates the forces and torques on all the bodies in a device automatically. A body is
defined as a set of connected regions completely surrounded by the special material AIR.
Capacitance calculation
Two terminals
If a system has two electrical terminals, specified by two electrodes or a single electrode and
ground, the magnitude of the charge on each electrode is given by
Q = CV (B-6)
where C is the capacitance and V is the voltage between the terminals. The capacitance is
therefore given by
Q
C= (B-7)
V
where Q is the charge calculated from the field solution with equation 1-2:
=
Q ∫ D ⋅ da
Ñ (B-8)
=
W wdv ∫ ( ∫ E ⋅ dD ) dv
∫= [J]. [B-2]
The RLC calculator determines the capacitance values in an equivalent network where there is a
capacitance Ci0 between electrode i and ground, and a capacitance Cij between electrode i and
electrode j. In the above example, the charges are given by
Q1 C10V1 + C12 (V2 − V1 ) (C10 − C12 )V1 + C12V2
=
Q = = (B-15)
Q2 C20V2 + C12 (V1 − V2 ) C12V1 + (C20 − C12 )V2
The coefficients in B-13 and B-15 are related by
C12 =
c12 =
c21 , C10 =
c11 − c12 , C20 =
c22 − c21 (B-16)
References
1 W.R. Hayt, Engineering Electromagnetics. New York: McGraw Hill, 4th edition, 1981.
2 M.A.R. Gunston, Microwave Transmission Line Impedance Data. London: Van Nostrand, 1972.
3 B. Popovic, Introductory Engineering Electromagnetics. Addison Wesley, 1971.
4 D.K. Cheng, Fundamentals of Engineering Electromagnetics. Addison-Wesley, 1993.
5 E.M. Freeman and D.A. Lowther, ‘A novel mapping technique for open boundary finite element
solutions to Poisson’s equation’, IEEE Transactions on Magnetics, 24, 1988, pp. 1934-2936.
6 P.P. Silvester and R.L. Ferrari, Finite Elements for Electrical Engineers, 2nd ed. Cambridge
University Press, 1990.
7 J. A. Stratton, Electromagnetic Theory. New York: McGraw Hill, 1941.