It suffices to compute the voltage at different paths, the stored energy
of course is independent of the position (x,y).
We compute the voltages at all positions (xi,0) and (0,yi) that are available
in the grid. These positions of the grid planes are available in gd1.pp
as the symbolic functions @x(i), @y(i), @z(i)
.
The total number of grid planes are available as @nx, @ny, @nz
.
These symbols are only available after a database has been specified in
-general
.
So, to compute the voltages at all possible positions (xi,0) we may say:
-lintegral symbol= e_1 direction= z, component= z do ix= 1, @nx startpoint= ( @x(ix), 0, @zmin ) doit echo voltage along ( @x0 , @y0 , z=z ) is @vreal @vimag @vabs enddoIf we do this, we get a lot of messages on the screen. In order to have a nice graphic of the dependence of the voltage on x, we better redirect the output to a file and process the result slightly. We write a small shell script:
#!/bin/sh # # feed the postprocessor with a 'here'-document, # 'tee' the output of the postprocessor to the file "pp.out" # (gd1.pp | tee pp.out) << EOF nomenu, noprompt, nomessage # no unneccessary output -general, infile= @last -lintegral symbol= e_1 direction= z, component= z do ix= 1, @nx startpoint= ( @x(ix), 0, @zmin ) doit echo @x0 @vreal @vimag # <= x, vreal, vimag enddo end EOF # # Write a PlotMtv-header to "x-voltages.mtv". # # Process the file "pp.out": # 'grep' the lines with the pattern "vreal" # echo \$ DATA= COLUMN > x-voltages.mtv echo x vreal vimag >> x-voltages.mtv grep vreal pp.out >> x-voltages.mtv # # now start "mymtv2" to display the data: # mymtv2 -mult -landscape x-voltages.mtv3.4 This shell-script can be found as "/usr/local/gd1/Tutorial-SRRC/x-voltages.x". The resulting plot is shown in figure 3.4. We see that the real part of the integrated voltage is almost constant in the range
![]() |