Imported Upstream version 4.6.0
[debian/atlc] / docs / html-docs / rect_in_rect.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
2 <HTML>
3 <HEAD>
4 <META name="generator" content="Mostly bluefish & vi. Sometimes netscape">
5 <META http-equiv="CONTENT-TYPE" content="text/html; charset=iso-8859-1">
6
7 <META name="DESCRIPTION" content="FAQ for atlc">
8 <META name="KEYWORDS" content="atlc tutorial arbitrary transmission line calculator">
9 <TITLE>The arbitrary transmission line calculator (atlc) Tutorial</TITLE>
10 </HEAD>
11 <BODY>
12
13 <H1><CODE>create_bmp_for_rect_in_rect</CODE></H1>
14 <strong><a name="create_bmp_for_rect_in_rect">create_bmp_for_rect_in_rect</a></strong> is used for generating a bitmap containing a  <strong>rect</strong>angular conductor placed <STRONG>in</STRONG>side  another <strong>rect</strong>angular conductor. There can be two dielectrics and the inner conductor can be placed at any position inside the outer conductor. This makes <STRONG>create_bmp_for_rect_in_rect</STRONG> very powerful. If there is only one dielectric and the two rectangular conductors are coaxial with one another, then <a href="create_bmp_for_rect_cen_in_rect.1.html">create_bmp_for_rect_cen_in_rect</a> is easier to use. 
15
16 <pre>
17 parrot /export/home/davek/atlc-2.02/src % create_bmp_for_rect_in_rect
18 Usage: create_bmp_for_rect_in_rect [-b bmp_size] [-f outfile] [-v] W H a b c d w h Er1 Er2 
19
20 where W, H, a, b, c, d, w, and h  are all in mm or all in inches
21 (they *must* use the same units. Non-integers allowed for all parameters)
22 options are:
23   -b bmp_size
24      Sets the size of the bitmap, the range 1 to 15 (default 3).
25   -f outfile 
26      Write output to 'outfile' instead of stdout
27   -v         
28      Write diagnostic information to stderr
29 -----------------------------------------------------------------------  ^
30 |                                                                     |  |
31 |               Dielectric, permittivity=Er1                          |  |
32 |                                                                     |  |
33 |       &lt----------------d-------------------------&gt;                  |  |
34 |                                                                     |  |
35 |             &lt----------w-----------&gt;                                |  |
36 |             ------------------------   ^                            |  |
37 |             |                      |   |                            |  |
38 |             |  Metallic conductor  |   |                            |  H
39 |&lt-----b-----&gt;|  conductor (can be   |   c                            |  |
40 |             |  off-centre)         |   |                            |  |
41 |             |                      |   |                            |  |
42 |       |------------------------------------------- ^                |  |
43 |       |..........................................| |                |  |
44 |       |.....Dielectric, permittivity=Er2.........| |                |  |
45 |&lt--a--&gt;|.......(can be off centre )...............| h                |  |
46 |       |..........................................| |                |  |
47 |       |..........................................| |                |  |
48 -----------------------------------------------------------------------  v
49 &lt;----------------------------------W---------------------------------&gt;
50
51 ***WARNING*** Since the output from create_bmp_for_rect_in_rect is binary data (the bitmap) it
52 will screw up your terminal unless you redirect the output to a file. The '-f' option can be used to send the output to 'outfile' 
53 parrot /export/home/davek/atlc-2.02/src % 
54
55 </pre>
56
57 Here's an example of using <code>create_bmp_for_rect_in_rect</code>.<br>
58 <img src="jpgs/test.jpg" alt="test for create_bmp_for_rect_in_rect" height="128"><br>
59 The outer conductor (green) has internal dimensons of 61.5 x 20.13 mm (W=61.5, H=20.13), the dielectric PTFE (blue) is 50 x 5.1 mm (d=50.0, h=5.1) and the conductor has dimensions of 15 x 1 mm (w=15.0, h=1.0). The left hand edge of the dielectric is 5.1 mm from the outer conductor's side wall (a=5.1) and the left hand edge of the conductor is 22.5 mm (b=22.5) from outer conductor's side wall. Since PTFE has a relative permittivity of 2.1 (a value known by <code>atlc</code> and <code>create_bmp_for_rect_in_rect</code>) it is simply put on the command line, as is the vacuum (white region). 
60
61 <pre>
62 create_bmp_for_rect_in_rect 61.5 20.13 5.1 22.5 0.5 50 15.0 5.0 1.0 2.1; test.bmp
63 </pre>
64
65 The output was redirected to a file <code>test.bmp</code>, which would then be read with atlc. 
66
67 <pre>
68 % atlc test.bmp
69 </pre>
70
71 That is all that needs to be done.<br>
72 <br>
73 It should be noted that <code>create_bmp_for_rect_in_rect</code> must attempt to fit your dimensions to a square grid. If all dimensions are small integers, this is easy to do, but in some cases this is not possible without having very large grids. In this case, <code>create_bmp_for_rect_in_rect</code> can only generate an approximation of what you want. For example, assume a structure is 120x240.0001 mm wide. It's impossible to represent that on a square grid, without having a grid of at least 1200000 x 2400001, which would be prohibitively large and requre an enormous amount of time for <code>atlc</code> to analyse. In this case, <code>create_bmp_for_rect_in_rect</code> will approximate this structure. Here is a very approximate idea of the sizes of the bitmaps, and the time to analyse in atlc, for various values of b. 
74
75 <table border="10">
76 <tr>
77 <td>b</td>
78 <td>size (kb)</td>
79 <td>time (min:sec, for single 125 MHz CPU, Er1=Er2)</td>
80 </tr>
81
82 <tr>
83 <td>1</td>
84 <td>35</td>
85 <td>0:10</td>
86 </tr>
87
88 <tr>
89 <td>2</td>
90 <td>74</td>
91 <td>0:38</td>
92 </tr>
93
94 <tr>
95 <td>3</td>
96 <td>74</td>
97 <td>0:38</td>
98 </tr>
99
100 <tr>
101 <td>4</td>
102 <td>195</td>
103 <td>3:59</td>
104 </tr>
105
106 <tr>
107 <td>5</td>
108 <td>278</td>
109 <td></td>
110 </tr>
111
112 <tr>
113 <td></td>
114 <td></td>
115 <td></td>
116 </tr>
117
118 <tr>
119 <td></td>
120 <td></td>
121 <td></td>
122 </tr>
123
124 <tr>
125 <td></td>
126 <td></td>
127 <td></td>
128 </tr>
129
130 <tr>
131 <td></td>
132 <td></td>
133 <td></td>
134 </tr>
135
136 <tr>
137 <td></td>
138 <td></td>
139 <td></td>
140 </tr>
141
142 <tr>
143 <td></td>
144 <td></td>
145 <td></td>
146 </tr>
147
148 <tr>
149 <td></td>
150 <td></td>
151 <td></td>
152 </tr>
153
154 <tr>
155 <td></td>
156 <td></td>
157 <td></td>
158 </tr>
159
160 <tr>
161 <td></td>
162 <td></td>
163 <td></td>
164 </tr>
165 </table>
166
167 <br>
168 <br>
169 There are a few options to create_bmp_for_rect_in_rect that might be useful.<br><br>
170  One that might be very useful, is the -v option, which prints information about the grid sizes to stderr. 
171
172 <pre>
173 % create_bmp_for_rect_in_rect -v 61.5 20.13 5.1 22.5 0.5 50 15.0 5.0 1.0 2.1  test.bmp
174 User requested: WW=61.500000 HH=20.130000 a=5.100000 b=22.500000 c=0.500000
175 d=50.000000 w=15.000000 h=5.000000Er1=1.000000 Er2=2.100000
176
177 Internally the programme is using the following grid:
178 W=492 H=161 a=41 b=180 c=4 d=400 w=120 h=40. 
179 The  grid size is 0.125000 mm, inches or whatever
180
181 This means we are simulating a transmission line with these dimensions:
182 W=61.500000 H=20.125000 a=5.125000 b=22.500000 c=0.500000 d=50.000000
183 w=15.000000 h=5.000000 (mm, inches or whatever)
184 These may be slightly different to what you indicated on the command line,
185 but they are the best approximation possible, given the grid size
186 parrot /export/home/davek/atlc-2.02/src % 
187
188 </pre>
189
190 <br>
191 <br>
192 Another the -b option, which alters the size of the bitmap produced, and so the accuracy. The default bitmap size is 3, which equates to bitmaps of around 250 kb, which should mean they can be analysed with <code>atlc</code> in a reasonable time. It's possible to reduce the size of the bitmap, so giving lower accuracy, but in less time, by setting b to 1 or 2, as like this.<br>
193 <pre>
194 % create_bmp_for_rect_in_rect  -b 1 61.5 20.13 5.1 22.5 0.5 50 15.0 5.0 1.0 2.1  test2.bmp
195 % atlc test2.bmp
196 </pre>
197
198 or of course accuracy can be improved, by making b larger, as in: 
199
200 <pre>
201 % create_bmp_for_rect_in_rect  -b 6 61.5 20.13 5.1 22.5 0.5 50 15.0 5.0 1.0 2.1  test3.bmp
202 % atlc test3.bmp
203 </pre>
204
205 <p>atlc is written and supported by <a href="jpgs/home-email.jpg">Dr. David Kirkby (G8WRB)</A> It it issued under the <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</A><p>
206 <a href="http://atlc.sourceforge.net">Return to the atlc homepage</a>
207 <a href="http://homepage.ntlworld.com/drkirkby/list1.html"></a>
208 <a href="http://homepage.ntlworld.com/drkirkby/list2.html"></a>
209 <a href="http://homepage.ntlworld.com/drkirkby/list3.html"></a>
210 <a href="http://homepage.ntlworld.com/drkirkby/list4.html"></a>
211 <a href="http://homepage.ntlworld.com/drkirkby/list5.html"></a>
212 <a href="http://homepage.ntlworld.com/drkirkby/list6.html"></a>
213 <a href="http://homepage.ntlworld.com/drkirkby/list7.html"></a>
214 <BR>
215 <BR>
216 <A href="http://sourceforge.net"> <IMG
217 src="http://sourceforge.net/sflogo.php?group_id=25836&amp;type=5"
218 width="210" height="62" border="0" alt="SourceForge.net
219 Logo"></A>
220 </body>
221 </html>