You are on page 1of 23

ActiveField Conductor Example

This document is a self-descriptive tutorial of a problem analysis report creation in MS


Word. Time-Harmonic Magnetic problem of a shielded conductor is examined. VBA
macros control QuickField, change the model parameters and automatically generate
tables and graphs for results presentation in the report.
This example is compatible with both Students and Professional versions of QuickField
5.1 and higher.

Compatible with QuickField 5.2

Student

Preface............................................................................................................3
Model description..........................................................................................4
First step: QuickField problem creation.......................................................5
Second step: Geometrical model drawing....................................................7
Third step: Mesh building and geometrical objects labeling........................9
Fourth step: Labels creation and definition.................................................11
Fifth step: Problem solving and results viewing.........................................12
Sixth step: Problem parameters iteration....................................................14
Result tables.................................................................................................17
Bonus Step: Field pictures and graphs........................................................20
Resulting field pictures................................................................................22
Result graphs................................................................................................23

ActiveField Conductor Sample

Detailed table of contents


Preface............................................................................................................3
Model description..........................................................................................4
First step: QuickField problem creation.......................................................5
VBA programming basics
Setting a reference to QuickField Object Library
QuickField starting
Problems and models creation
Problem properties definition
Second step: Geometrical model drawing....................................................7
Shapes addition
Model window scale setting
Model file saving
Third step: Mesh building and geometrical objects labeling........................9
Mesh size reduction
Mesh generation
Shapes labeling
Fourth step: Labels creation and definition.................................................11
New labels creation
Definition of block physical data
Definition of edge properties
Fifth step: Problem solving and results viewing.........................................12
Problem solving
Field picture viewing
Local values calculation
Integral values calculation
Result display
Sixth step: Problem parameters iteration....................................................14
Conductor parameter input
Parameter accepting
Preparations to iteration
Iterations
Result placing into tables
Result tables.................................................................................................17
Variable shield thickness.......................................................................17
Variable shield conductivity...................................................................18
Variable shield permeability..................................................................19
Bonus Step: Field pictures and graphs........................................................20
Old field pictures removal from the document
Preparations for getting picture
Image copying
Insert position setting
Image pasting and resizing
Plotting
Resulting field pictures................................................................................22
Result graphs................................................................................................23

ActiveField Conductor Sample

Preface.
This example describes the step-by-step process of creation Microsoft Word document
interacting with QuickField server and obtaining the results of field analysis. It is
divided in several steps. Each step ends by a button. By pressing this button you may
see how the just written code works.
This example is fully compatible with Students and Professional versions of QuickField
5.1 and higher. Free Students QuickField may be downloaded from QuickField Support
site www.quickfield.com. To display the graphs you should have Microsoft Graph
installed. Microsoft Graph is included into any Microsoft Office suite.
Main content of this document is in the macros therefore macros should be enabled. You
have to enable running macros in the menu Tools -> Macro -> Security -> Security
Level. If the settings were set to High you may need to change the Security level
Medium or Low, then close the document and open it again.
For more information about changing the security level with MS Word please refer to Microsoft Office
Help, the topic "Protection from documents that might contain viruses".

ActiveField Conductor Sample

Model description.
Copper conductor with round cross-section 2 mm
diameter is placed to the origin of coordinates. It
carries electric current with variable frequency
and amplitude, but as a default we will assume 50
Hz and total current 100 Amperes.
Cylindrical shield with internal radius 4 mm
surrounds the conductor. We will analyze
dependence of the electric field parameters from
the shield thickness in the range 0.5 mm to 5.5
mm, and its material electrical conductivity and
magnetic permeability.
We will also compare results for shield with shortcircuited ends (zero voltage), open ends (zero total
current) and without shield.
To measure the field characteristics we will use the tester steel rod with 1 mm radius.
Distance between the centers of tester and conductor is 12 mm.
We will measure the following values:
Tester voltage
Flux density
Joule heat density in the conductor and in the shield
To measure the voltage and flux density we will use the point with coordinates (0.0112,
0) in the vicinity of the tester surface.
The model is surrounded by the cylindrical boundary with radius 10 cm and zero
Dirichlet boundary condition (A=0). Space between conductor, shield and tester is filled
by air. The physical setup corresponds to Time-Harmonic Magnetic formulation of
QuickField.
If you use Students QuickField it is recommended to restrict the finite-element mesh
size. For doing that you should set manual mesh steps: at the outer shield boundary 2
mm, at the outer tester surface 1 mm, at the external problem boundary - 5 cm.
Central part of this model setup is shown in the picture above.

ActiveField Conductor Sample

First step: QuickField problem creation.


This is a first step of MS Word document creation utilizing ActiveField technology. It is
convenient to start solution procedure by pressing a button, so lets insert a button into
your document. Activate Control Toolbox and choose Command button. The button
will be inserted into your document, and you may edit the text displayed on it.
VBA programming basics
Now we need to create a VBA program, associated with this button. If you are in Design
Mode of MS Word - double click this button, or press Alt+F11 and Visual Basic Editor
will be launched. The default procedure associated with the button is:
Private Sub CommandButton1_Click()
End Sub

Setting a reference to QuickField Object Library


First of all you should add a reference to QuickField Object Library. Choose Tools ->
References and check QuickField 5.2 Object Library in the dialog displayed. Absence
of such a string in the list means that QuickField is not properly installed on your
computer.
QuickField starting
This simple code starts QuickField server and displays its windows:
Dim QF As New QuickField.Application
QF.MainWindow.Visible = True

Problems and models creation


Create new problem and model, and check whether are they created:
Dim
Dim
Set
Set

Prb
Mdl
Prb
Mdl

As QuickField.Problem
As QuickField.Model
= QF.Problems.Add
= QF.Models.Add

If you click the button twice without closing QuickField then two examples of problems
and models will be created. To avoid this you should close all open QuickField
documents prior to creation of new ones. Following strings do that:
QF.Problems.Close
QF.Models.Close

Problem properties definition


Now we should initialize problem properties and save problem file. Please, take into
account that all files will be stored in the same folder where this document is located.
Alternatively you may define the full path. In this case you will need to use the full
name path in the problem properties definition and then saving the model and data file.
' Define problem parameters
Prb.Class = qfPlaneParallel
Prb.ProblemType = qfTimeHarmonicMagnetics
Prb.Frequency = 50
Prb.Coordinates = qfCartesian
Prb.LengthUnits = qfMeters
Prb.ReferencedFile(qfModelFile) = Path & "\Conduct.mod"
Prb.ReferencedFile(qfDataFile) = Path & "\Conduct.dhe"
' Save the problem
Prb.SaveAs Path & "\Conduct.pbm"

ActiveField Conductor Sample


Here we set the problem type as Plane-Parallel Time-Harmonic Magnetics in the
Cartesian coordinate system and 1 meter as a length unit. Current frequency will be
constant now, and we have set it to 50 Hz.
The code for problem creation should be copied to VBA procedure CreateProblem for
using in the following steps of this example. It is more convenient to set QF, Prb and
Mdl as global variables.
First Step

ActiveField Conductor Sample

Second step: Geometrical model drawing.


Procedure DrawModel defines the model creation:
Shapes addition
' Draw Conductor
Mdl.Shapes.AddEdge QF.PointXY(0, 0.002), _
QF.PointXY(0, -0.002), 3.1416
Mdl.Shapes.AddEdge QF.PointXY(0, -0.002), _
QF.PointXY(0, 0.002), 3.1416

Last two strings add two arcs of 3.1416 each, i.e. draw a circle with 0.002-meter
radius.
Arguments of functions AddEdge are the objects of Point class. Correct ways of getting
these objects are Application object methods PointXY or PointRA. Do not forget to
mention Application object (QF.) while using its methods.
Drawing procedures for internal and external surfaces of shield, tester and external
boundary are similar to described above:
' Draw Shield
Mdl.Shapes.AddEdge QF.PointXY(0, 0.004), _
QF.PointXY(0, -0.004), 3.1416
Mdl.Shapes.AddEdge QF.PointXY(0, -0.004), _
QF.PointXY(0, 0.004), 3.1416
Mdl.Shapes.AddEdge QF.PointXY(0, 0.005), _
QF.PointXY(0, -0.005), 3.1416
Mdl.Shapes.AddEdge QF.PointXY(0, -0.005), _
QF.PointXY(0, 0.005), 3.1416
' Draw Tester
Mdl.Shapes.AddEdge QF.PointXY(0.012, 0.001), _
QF.PointXY(0.012, -0.001), 3.1416
Mdl.Shapes.AddEdge QF.PointXY(0.012, -0.001), _
QF.PointXY(0.012, 0.001), 3.1416
' Draw Boundary
Mdl.Shapes.AddEdge QF.PointXY(0, 0.1), _
QF.PointXY(0, -0.1), 3.1416
Mdl.Shapes.AddEdge QF.PointXY(0, -0.1), _
QF.PointXY(0, 0.1), 3.1416

Model window scale setting


To see the resulting model you need to display the model window. It is also possible to
maximize this window:
Dim Win As QuickField.ModelWindow
' Show and maximize model window
Set Win = Mdl.Windows(1)
Win.WindowState = qfMaximized
Method Zoom controls the scale of the model display. Please, take into account that class
Window doesnt have Zoom method, so the object Win should be an instance of
ModelWindow class.

We are interested in analysis not the full model, but only its central part with conductor
and tester. Convenient level of scaling could be defined by the parameters of the Zoom
method, or alternatively by call without parameters, but before the addition of the
external boundary. Respectively Win should be defined and initialized before this point.
' Set properly scale
Win.Zoom

ActiveField Conductor Sample


Model file saving
Model file should be saved:
Mdl.SaveAs Path & "\Conductor.mod"

After each step of this document you can see a button launching the code created at this
step. For example, the button after this second step corresponds to the following
procedure:
Private Sub CommandButton2_Click()
CreateProblem
DrawModel
End Sub

If you create your own document according to our instructions then instead of adding
new buttons you may edit the code of existing one.
Second Step

ActiveField Conductor Sample

Third step: Mesh building and geometrical objects


labeling.
It is necessary to build a finite-element mesh prior to solving a problem in QuickField.
You may launch the code created on "Second step" of this document, and then in
QuickField window run meshing procedure by choosing "Build Mesh In All Blocks"
from user interface menu. Professional version of QuickField needs no other actions.
Students version mesh restrictions require you manually adjust the mesh settings to fit
into 200 nodes range.
Mesh size reduction
Default settings lead to mesh of 3356 nodes this is beyond Students version limits.
Code shown below control element sizes, and the resulting mesh will be just 156 nodes:
' Enlarge spacings to reduce mesh size
Mdl.Shapes.Vertices.Nearest _
(QF.PointXY(0, 0.1)).Spacing = 0.04
Mdl.Shapes.Vertices.Nearest _
(QF.PointXY(0, -0.1)).Spacing = 0.04
Mdl.Shapes.Vertices.Nearest _
(QF.PointXY(0, 0.005)).Spacing = 0.002
Mdl.Shapes.Vertices.Nearest _
(QF.PointXY(0, -0.005)).Spacing = 0.002
Mdl.Shapes.Vertices.Nearest _
(QF.PointXY(0.012, 0.001)).Spacing = 0.001
Mdl.Shapes.Vertices.Nearest _
(QF.PointXY(0.012, -0.001)).Spacing = 0.001

It is possible to set the steps of discretization for edges or blocks instead of vertices. In
this case the code will be little bit shorter.
Mesh generation
Now Students version is able to build the mesh according to its restrictions:
' Build mesh
Mdl.Shapes.BuildMesh

Last operation required is label assignment to those blocks, vertices and edges, which
should have physical properties defined.
Shapes labeling
All the blocks should be labeled:
Mdl.Shapes.Blocks.Nearest(QF.PointXY(0, 0)).Label = _
"Conductor"
Mdl.Shapes.Blocks.Nearest(QF.PointXY(0, 0.003)).Label = "Air"
Mdl.Shapes.Blocks.Nearest(QF.PointXY(0, 0.0045)).Label = _
"Shield"
Mdl.Shapes.Blocks.Nearest(QF.PointXY(0, 0.01)).Label = "Air"
Mdl.Shapes.Blocks.Nearest(QF.PointXY(0.012, 0)).Label = _
"Tester"

Two edges forming the external boundary should be labeled to set the zero Dirichlet
boundary condition:
Mdl.Shapes.Edges.Nearest(QF.PointXY(0.1, 0)).Label = "Bound"
Mdl.Shapes.Edges.Nearest(QF.PointXY(-0.1, 0)).Label = "Bound"

ActiveField Conductor Sample

10

It is possible now to save the model (the name was assigned to it at the previous step).
Mdl.Save

Third Step

ActiveField Conductor Sample

11

Fourth step: Labels creation and definition.


New labels creation
QuickField stores material properties in the separate data file. Problem file contains the
link to it. During "First Step" we have defined the data file name in the problem
properties as "Conductor.dhe". Class Problem has method Labels allowing getting a
collection of labels from the problem data file without necessity to open data file
separately.
Prb.Labels(qfBlock).Add.Name
Prb.Labels(qfBlock).Add.Name
Prb.Labels(qfBlock).Add.Name
Prb.Labels(qfBlock).Add.Name
Prb.Labels(qfBlock).Add.Name

=
=
=
=
=

"Air"
"Conductor"
"Shield"
"Tester"
"Bound"

Prb.Save

Definition of block physical data


Additional variables are required to modify material data:
Dim Lab As QuickField.Label
Dim LaBlHE As QuickField.LabelBlockHE
Dim LaEdHE As QuickField.LabelEdgeHE

Following code fragment is needed for each block label:


' Define Conductor properties
Set Lab = Data.Labels(qfBlock)("Conductor")
Set LaBlHE = Lab.Content
LaBlHE.Kxx = 1
LaBlHE.Kyy = 1
LaBlHE.Conductivity = 60000000
LaBlHE.Loading = 100
LaBlHE.TotalCurrent = True
Lab.Content = LaBlHE
Last operator refreshes Lab object content. Dont forget to do it!

Definition of edge properties


The following code is related to the external boundary edges:
' Define Bound edge properties
Set Lab = Data.Labels(qfEdge)("Bound")
Set LaEdHE = Lab.Content
LaEdHE.Dirichlet = 0
Lab.Content = LaEdHE

Fourth Step

ActiveField Conductor Sample

12

Fifth step: Problem solving and results viewing.


Problem solving
SolveProblem method solves the problem; AnalyzeResults method opens the
postprocessor window:
' Do solve problem
Prb.SolveProblem
If Prb.Solved Then
' Show postprocessor window
Prb.AnalyzeResults
End If

Field picture viewing


First thing we should do is to set the field picture display parameters. Zoom method
parameters are the coordinates of the rectangle we are interested in, and chosen way of
presentation is the color map of potential.
The last operator is needed to apply the defined parameters to window Win:
Dim Win As QuickField.FieldWindow
Dim PS As QuickField.FieldPicture
' Adjust postprocessor window scale
Set Win = Prb.Result.Windows(1)
Win.Zoom QF.PointXY(-0.006, -0.005), _
QF.PointXY(0.013, 0.005)
' Change postprocessor window properties
Set PS = Win.PictureSettings
PS.ColorMap = qfVoltage
PS.Equilines = False
Win.PictureSettings = PS

Local values calculation


These variables are for storing of calculated voltage, flux density and power:
Dim V As Double, B As Double, P As Double

Then we may check local parameters in the vicinity of the tester surface. Object of
FieldPointHE class related to some point should be declared. Local field characteristics
may be obtained from this object properties:
Dim FP As QuickField.FieldPointHE
Set FP = Prb.Result.GetLocalValues(QF.PointXY(0.0112, 0))
V = FP.ElectroPotential.R
B = FP.FluxDensity.RMS

Integral values calculation


We also need to know the power losses in the shield and conductor. These are integral
characteristics. Contour should be defined to calculate any integrals. The corresponding
object of Contour class may be obtained through postprocessor window object. We
should clear this contour first and then add blocks of conductor and shield to it.
Then we may calculate integral values (type qfInt_Power) along this contour:

ActiveField Conductor Sample

13

Dim Cnt As QuickField.Contour


' Build contour
Set Cnt = Win.Contour
Cnt.Delete
Cnt.AddBlock "Conductor"
Cnt.AddBlock "Shield"
' Get integral value
P = Prb.Result.GetIntegral(qfInt_Power, Cnt)

Result display
At the next step we will insert calculated values into this document. Here we display the
calculated values by simple Message Box:
MsgBox "Potential = " & Format(V, "0.00000") & " V"
& vbCrLf & _
"Flux density = " & Format(B, "0.00000") & " T" _
& vbCrLf & _
"Shield thickness = 1 mm" & vbCrLf & _
"Joule heat = " & Format(P, "0.000") & " W", , _
"Conductor tester"

This message box will be displayed as a result:


Fifth Step

ActiveField Conductor Sample

14

Sixth step: Problem parameters iteration.


We want to analyze the field behavior as a result of shield size and properties changes.
We also want to modify the current frequency and amplitude, and define short-circuit
and open end shield. Current amplitude and frequency will be set in this text only.
Conductor parameter input
Current amplitude: 100

A.

Current frequency: 50

Hz.

Parameter accepting
Following simple code accepts the values entered in the Edit Boxes above:
Private Sub GetParameters()
Dim I As Double, f As Double
Dim TB As TextBox
' Get current value
Set TB = TextBox1
If IsNumeric(TB.Value) Then
I = CDbl(TB.Value)
Else
I = 100
End If
' Get frequency value
Set TB = TextBox2
If IsNumeric(TB.Value) Then
f = CDbl(TB.Value)
Else
f = 50
End If
End Sub

Preparations to iteration
Results will be displayed in tables. Columns will correspond to the cases of short-circuit
shield, open end shield and absence of the shield. First group of tables shows the field
dependence upon the thickness of copper and steel shields, next group of tables is
related to variable conductivity of the shield with fixed size, and the last group of tables
is related to variable magnetic permeability of the shield with fixed size.
We will observe three parameters voltage in the tester (steel rod at some distance from
the conductor with current) beyond the shield, flux density in some fixed point of the
tester and density of Joule losses in the conductor and screen (losses in the tester may be
neglected).
There were no parameters used in the previous steps. Thats why we may copy
procedures
CreateProblem,
DrawModel,
MeshAndLabel,
DefineData,
SolveAndGetResult and name new procedures respectively:
Private
Private
Private
Private

Sub
Sub
Sub
Sub

CreateProblem6()
DrawModel6()
MeshAndLabel6()
DefineData6(Optional
Optional
Optional
Private Sub SolveAndGetResult6(V
P

OpenEnd As Boolean = False, _


Cond As Double = 7000000, _
Perm As Double = 1000)
As Double, B As Double, _
As Double)

ActiveField Conductor Sample

15

Iterations
Following changes should be made:
1. In CreateProblem6 the string displaying the main menu of QuickField should
be removed.
2. In GetParameters local variables f and I should be converted to global ones,
and frequency in CreateProblem6 should be set to f instead of 50 Hz.
3. Closing of all old models should be transferred from CreateProblem6 into
DrawModel6.
4. The code of closing postprocessor window (if it is open) should be added to
DrawModel6:
If Not Prb.Result Is Nothing Then Prb.Result.Close

5. The code of window display and scale setting should be removed from
DrawModel6.
6. External shield radius should be set equal to (0.004 + L) instead of 0.005
there L is the shield thickness.
...

...

Mdl.Shapes.AddEdge QF.PointXY(0, 0.004 + L), _


QF.PointXY(0, -(0.004 + L)), 3.1416
Mdl.Shapes.AddEdge QF.PointXY(0, -(0.004 + L)), _
QF.PointXY(0, 0.004 + L), 3.1416

7. Function MeshAndLabel6 should be changed according to the new model


geometry:
' Enlarge spacings to reduce mesh size
Mdl.Shapes.Edges.Nearest(QF.PointXY(0.1, 0)).Spacing = 0.05
Mdl.Shapes.Edges.Nearest(QF.PointXY(0.004 + L, 0)).Spacing =
0.002
Mdl.Shapes.Edges.Nearest(QF.PointXY(0.013, 0)).Spacing = 0.001
' Label shapes
...
...

Mdl.Shapes.Blocks.Nearest _
(QF.PointXY(0, 0.004 + L / 2)).Label = "Shield"

8. There are three new parameters defining shield properties in DefineData:

9.

Set Lab = Data.Labels(qfBlock)("Shield")


Set LaBlHE = Lab.Content
LaBlHE.Kxx = Perm
LaBlHE.Kyy = Perm
LaBlHE.Conductivity = Cond
LaBlHE.Loading = 0
LaBlHE.TotalCurrent = OpenEnd
Lab.Content = LaBlHE
Local parameters V, B and P became output parameters of the procedure
SolveAndGetResult6. No more need to display them by Message Box.

10. The code for changing of the postprocessor window settings in the procedure
SolveAndGetResult6 is no longer needed and may be deleted.
Result placing into tables
Now we have to iterate shield parameters and insert results into the tables. It is more
convenient to prepare tables beforehand than create them in VBA code. In this

ActiveField Conductor Sample

16

example the tables are already prepared, and you can see them in Result tables
section.
Procedure SaveValues inserts the results of one solved problem into the tables. E.g.
if Table = 2, Row = 4, Col = 3, then V, B and into P will be inserted to the cell
(4, 3) of tables 4, 5 and 6 respectively
Private Sub SaveValues(Table As Integer, _
Row As Integer, Col As Integer, _
V As Double, B As Double, P As Double)
Tables((Table - 1) * 3 + 1).Cell(Row, Col).Select
Selection.Text = Format(V, "0.0000")
Tables((Table - 1) * 3 + 2).Cell(Row, Col).Select
Selection.Text = Format(B, "0.0000")
Tables((Table - 1) * 3 + 3).Cell(Row, Col).Select
Selection.Text = Format(P, "0.0000")
End Sub
Procedure SaveValuesAir inserts the results calculated without shield into

the

tables.
Main procedure CommandButton6_Click is relatively long, but simple. It creates the
problem and then in the loop the geometry and data are defined, mesh built, problem
solved and results are stored in the tables. If you have minimal experience in Visual
Basic programming you may create this procedure by yourself.
Sixth Step

ActiveField Conductor Sample

17

Result tables.
Variable shield thickness.
Table 1. Tester voltage V vs. shield thickness.

Shield
thickness
0.0005
0.0015
0.0025
0.0035
0.0045
0.0055

Short-circuited shield
Copper
Steel
0.0244
0.0233
0.0183
0.0143
0.0131
0.0140
0.0095
0.0046
0.0073
0.0042
0.0058
0.0013

Open-ended shield
Copper
Steel
0.0255
0.0255
0.0253
0.0254
0.0253
0.0255
0.0255
0.0256
0.0256
0.0259
0.0254
0.0255

Without
shield

Open-ended shield
Copper
Steel
0.0018
0.0018
0.0018
0.0018
0.0017
0.0018
0.0016
0.0016
0.0016
0.0017
0.0017
0.0017

Without
shield

Open-ended shield
Copper
Steel
8.0198
16.4561
7.3687
107.0687
7.3743
101.8588
7.3853
78.6607
7.4027
62.7635
7.4261
72.9334

Without
shield

0.0255

Table 2. Tester flux density T vs. shield thickness.

Shield
thickness
0.0005
0.0015
0.0025
0.0035
0.0045
0.0055

Short-circuited shield
Copper
Steel
0.0017
0.0017
0.0013
0.0010
0.0009
0.0010
0.0006
0.0003
0.0005
0.0003
0.0004
0.0001

0.0017

Table 3. Conductor Joule heat W vs. shield thickness.

Shield
thickness
0.0005
0.0015
0.0025
0.0035
0.0045
0.0055

Short-circuited shield
Copper
Steel
8.5478
38.6788
8.3062
54.9524
8.1790
36.6359
7.9918
53.2250
7.8603
45.7212
7.7672
53.9812

7.3669

ActiveField Conductor Sample

18

Variable shield conductivity.


Table 4. Tester voltage V vs. shield conductivity.

Shield
conductivity
0.7e+7
1.7e+7
2.7e+7
3.7e+7
4.7e+7
5.7e+7
6.7e+7

Shortcircuited
shield
0.0163
0.0134
0.0129
0.0127
0.0126
0.0126
0.0125

Open-ended
shield

Without
shield

0.0255
0.0255
0.0255
0.0255
0.0255
0.0255
0.0255

0.0255

Table 5. Tester flux density T vs. shield conductivity.

Shield
conductivity
0.7e+7
1.7e+7
2.7e+7
3.7e+7
4.7e+7
5.7e+7
6.7e+7

Shortcircuited
shield
0.0012
0.0010
0.0009
0.0009
0.0009
0.0009
0.0009

Open-ended
shield

Without
shield

0.0019
0.0019
0.0019
0.0019
0.0019
0.0019
0.0019

0.0017

Table 6. Conductor Joule heat W vs. shield conductivity.

Shield
conductivity
0.7e+7
1.7e+7
2.7e+7
3.7e+7
4.7e+7
5.7e+7
6.7e+7

Shortcircuited
shield
66.9630
37.5528
27.1427
22.1130
19.1763
17.2579
15.9092

Open-ended
shield

Without
shield

63.1161
78.5154
67.9755
57.0525
48.7496
42.5992
37.9587

7.3669

ActiveField Conductor Sample

19

Variable shield permeability.


Table 7. Tester voltage V vs. shield permeability.

Shield
permeability
1
3.16
10
31.6
100
316
1000

Shortcircuited
shield
0.0254
0.0254
0.0254
0.0253
0.0249
0.0224
0.0163

Open-ended
shield

Without
shield

0.0254
0.0255
0.0255
0.0255
0.0255
0.0255
0.0255

0.0255

Table 8. Tester flux density T vs. shield permeability.

Shield
permeability
1
3.16
10
31.6
100
316
1000

Shortcircuited
shield
0.0019
0.0019
0.0019
0.0019
0.0018
0.0017
0.0012

Open-ended
shield

Without
shield

0.0019
0.0019
0.0019
0.0019
0.0019
0.0019
0.0019

0.0017

Table 9. Conductor Joule heat W vs. shield permeability.

Shield
permeability
1
3.16
10
31.6
100
316
1000

Shortcircuited
shield
8.1573
8.1812
8.2730
8.7208
11.5936
29.1090
66.9630

Open-ended
shield

Without
shield

8.0198
8.0204
8.0265
8.0872
8.6929
14.6182
63.1161

7.3669

ActiveField Conductor Sample

20

Bonus Step: Field pictures and graphs.


You are possibly interested in making better presentation of the results. QuickField
allows you to display and export field pictures, and also make plots.
At this step we will insert into this document two field pictures (stress and total current
distributions), and dependencies of physical results upon the shield thickness. Plots
were drawn in Microsoft Graph because QuickField postprocessor is unable to show
several problems in the same window.
Old field pictures removal from the document
Every image inserted into the document represents InlineShape object. You have to
remove old images before insertion of new ones. To avoid excess removal (e.g. buttons
are also InlineShapes), we will assign special AlternativeText to every needed
image to distinct them from others:
Dim IShp As InlineShape
' Delete old pictures
For Each IShp In InlineShapes
If Len(IShp.AlternativeText) > 9 Then
If Left(IShp.AlternativeText, 10) = "My Picture" _
Then IShp.Delete
End If
Next IShp

Preparations for getting picture


Field picture scale should be convenient.
Dim Win As QuickField.FieldWindow
' Set properly postprocessor window scale
Set Win = Prb.Result.Windows(1)
Win.Zoom QF.PointXY(-0.006, -0.005), QF.PointXY(0.013, 0.005)

The last thing to do is field picture parameters setting.


Dim PS As QuickField.FieldPicture
' Copy strength picture
Set PS = Win.PictureSettings
PS.ColorMap = qfKGrad
PS.ColorGrades = 200
PS.Equilines = False
Win.PictureSettings = PS

Image copying
GetPicture method from class FieldWindow copies a picture to the clipboard.
Win.GetPicture

Insert position setting


To paste the image from the clipboard into Word document you should set the cursor
(selection) in the needed position. It is convenient to prepare the bookmark in advance
and then set the cursor to this bookmark.
Selection.GoTo What:=wdGoToBookmark, Name:="Picture1"

Image pasting and resizing


Now you may paste the picture and adjust its size.

ActiveField Conductor Sample

21

Selection.Paste
Selection.MoveLeft Extend:=wdExtend
With Selection.InlineShapes(1)
.Width = .Width * 0.7
.Height = .Height * 0.7
.AlternativeText = "My Picture"
End With

Second image should be inserted by the same way.


Plotting
We will not discuss here the code for plotting. You may browse it in VBA editor by
pressing Alt+F11.
Tables 2 and 3 content the data for plots of the parameters vs. thickness. Before making
plots you should fill up the tables (run "Sixth Step").
Get Field Pictures

Draw Graphs

ActiveField Conductor Sample

22

Resulting field pictures.


Strength distribution

Total Current Density distribution

ActiveField Conductor Sample

Result graphs.

23

You might also like