next up previous contents
Next: Computing quality factors Q Up: Computing normalized shunt impedances Previous: -lintegral: computes a line   Contents

-energy: computes stored energy in electric or magnetic field

The menu of the section -energy is:
 ##############################################################################
 # Flags: nomenu, prompt, message,                                            #
 ##############################################################################
 # section: -energy                                                           #
 ##############################################################################
 # symbol   = e_1                                                             #
 # quantity = e                                                               #
 # solution = 1                                                               #
 #                                                                            #
 #                                                                            #
 # @henergy : undefined                 (symbol: undefined, m: 1)             #
 # @eenergy : undefined                 (symbol: undefined, m: 1)             #
 ##############################################################################
 # doit, ?, return, end, help                                                 #
 ##############################################################################
We have to know both the energy in the electric field and in the magnetic field. But since the fields are resonant fields, the energies are the same for both types of fields. So it suffices to compute only the energy in the electric field:
 -energy
     quantity= e
     solution= 1
     doit
The result of the energy computation is now available in the menu, as well as the value of the symbolic variable @eenergy.
 ##############################################################################
 # Flags: nomenu, prompt, message,                                            #
 ##############################################################################
 # section: -energy                                                           #
 ##############################################################################
 # symbol   = e_1                                                             #
 # quantity = e                                                               #
 # solution = 1                                                               #
 #                                                                            #
 #                                                                            #
 # @henergy : undefined                 (symbol: undefined, m: 1)             #
 # @eenergy : 98.21061e-12              (symbol: e_1, m: 2)                   #
 ##############################################################################
 # doit, ?, return, end, help                                                 #
 ##############################################################################
Since we have modelled only the eighth part of the structure (we did use all three symmetry planes), the stored energy in the electric field of the whole structure is 8 times as high as @eenergy=98.21061e-12 Ws.

We now have all the necessary numbers to compute the normalized shunt impedance of this first mode:

We can now take our pocket calculator and perform the remaining calculations, or we can use gd1.pp for it:
  echo shuntimpedance is \
   eval((2*@vreal)*(2*@vreal) / (2*@pi*@frequency * 8*2*@eenergy) ) Ohms

The full input for the postprocessor:

 -general
    infile= @last
 -energy
    symbol= e_1
    doit
 -lintegral
    component= z, direction= z
    startpoint= (0,0,@zmin)
    doit

  echo frequency is: eval(@frequency/1e6) MHz
  echo shuntimpedance is \
   eval((2*@vreal)*(2*@vreal) / (2*@pi*@frequency * 8*2*@eenergy) ) Ohms

gd1.pp tells us then:

 frequency is: 503.4601030 MHz
 shuntimpedance is  155.11998650323 Volts

next up previous contents
Next: Computing quality factors Q Up: Computing normalized shunt impedances Previous: -lintegral: computes a line   Contents