The arbitrary transmission line calculator (atlc) Tutorial
Description: FAQ for atlc
Keywords: atlc tutorial arbitrary transmission line calculator

# `create_bmp_for_rect_in_rect`

create_bmp_for_rect_in_rect is used for generating a bitmap containing a rectangular conductor placed inside another rectangular conductor. There can be two dielectrics and the inner conductor can be placed at any position inside the outer conductor. This makes create_bmp_for_rect_in_rect very powerful. If there is only one dielectric and the two rectangular conductors are coaxial with one another, then create_bmp_for_rect_cen_in_rect is easier to use.

    parrot /export/home/davek/atlc-2.02/src % create_bmp_for_rect_in_rect
    Usage: create_bmp_for_rect_in_rect [-b bmp_size] [-f outfile] [-v] W H a b c d w h Er1 Er2

    where W, H, a, b, c, d, w, and h  are all in mm or all in inches
    (they *must* use the same units. Non-integers allowed for all parameters)
    options are:
      -b bmp_size
         Sets the size of the bitmap, the range 1 to 15 (default 3).
      -f outfile
         Write output to 'outfile' instead of stdout
      -v
         Write diagnostic information to stderr
    -----------------------------------------------------------------------  ^
    |                                                                     |  |
    |               Dielectric, permittivity=Er1                          |  |
    |                                                                     |  |
    |       <----------------d------------------------->                  |  |
    |                                                                     |  |
    |             <----------w----------->                                |  |
    |             ------------------------   ^                            |  |
    |             |                      |   |                            |  |
    |             |  Metallic conductor  |   |                            |  H
    |<-----b----->|  conductor (can be   |   c                            |  |
    |             |  off-centre)         |   |                            |  |
    |             |                      |   |                            |  |
    |       |------------------------------------------- ^                |  |
    |       |..........................................| |                |  |
    |       |.....Dielectric, permittivity=Er2.........| |                |  |
    |<--a-->|.......(can be off centre )...............| h                |  |
    |       |..........................................| |                |  |
    |       |..........................................| |                |  |
    -----------------------------------------------------------------------  v
    <----------------------------------W--------------------------------->

    ***WARNING*** Since the output from create_bmp_for_rect_in_rect is binary data (the bitmap) it
    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'
    parrot /export/home/davek/atlc-2.02/src %

Here's an example of using `create_bmp_for_rect_in_rect`.
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 `atlc` and `create_bmp_for_rect_in_rect`) it is simply put on the command line, as is the vacuum (white region).

    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

The output was redirected to a file `test.bmp`, which would then be read with atlc.

    % atlc test.bmp

That is all that needs to be done.
It should be noted that `create_bmp_for_rect_in_rect` 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, `create_bmp_for_rect_in_rect` 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 `atlc` to analyse. In this case, `create_bmp_for_rect_in_rect` 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.

b | size (kb) | time (min:sec, for single 125 MHz CPU, Er1=Er2)
1 | 35 | 0:10
2 | 74 | 0:38
3 | 74 | 0:38
4 | 195 | 3:59
5 | 278 |

There are a few options to create_bmp_for_rect_in_rect that might be useful.
One that might be very useful, is the -v option, which prints information about the grid sizes to stderr.

    % 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
    User requested: WW=61.500000 HH=20.130000 a=5.100000 b=22.500000 c=0.500000
    d=50.000000 w=15.000000 h=5.000000Er1=1.000000 Er2=2.100000

    Internally the programme is using the following grid:
    W=492 H=161 a=41 b=180 c=4 d=400 w=120 h=40.
    The  grid size is 0.125000 mm, inches or whatever

    This means we are simulating a transmission line with these dimensions:
    W=61.500000 H=20.125000 a=5.125000 b=22.500000 c=0.500000 d=50.000000
    w=15.000000 h=5.000000 (mm, inches or whatever)
    These may be slightly different to what you indicated on the command line,
    but they are the best approximation possible, given the grid size
    parrot /export/home/davek/atlc-2.02/src %

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 `atlc` 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.

    % 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
    % atlc test2.bmp

or of course accuracy can be improved, by making b larger, as in:

    % 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
    % atlc test3.bmp

atlc is written and supported by Dr. David Kirkby (G8WRB) It it issued under the GNU General Public License

Return to the atlc homepage