fieldSqrDiagUpdater

fieldSqrDiagUpdater

Works with VSimBase, VSimEM, VSimPD, VSimPA, and VSimVE licenses.

FieldMultiUpdater that computes an integral over the sum of the squares of the specified fields, for each specified component; i.e., for each component \(i\),

\[F_i = a \int \left[f_i^{(1)}(\mathbf{x})^2 + f_i^{(2)}(\mathbf{x})^2 + f_i^{(3)}(\mathbf{x})^2 + \ldots + f_i^{(n)}(\mathbf{x})^2 \right] d\mathbf{x}.\]

The fields \(\mathbf{f}^{(1)}, \mathbf{f}^{(2)}, \mathbf{f}^{(3)},\ldots, \mathbf{f}^{(n)}\) used in the integral are given by the readFields parameter. The calculation is written to the standard output of the run. fieldSqrDiagUpdater is useful for measuring field energy and reflected components.

fieldSqrDiagUpdater Parameters

The fieldSqrDiagUpdater takes the lowerBounds and upperBounds parameters of FieldUpdater and the .components parameter of FieldMultiUpdater, as well as the following parameters:

readFields (required string vector)

The names of the fields for which to compute the integral.

factor (optional float, default = 1.0)

Factor a by which to multiply the integral.

writePeriod (optional integer, default = 0)

Frequency which to write out the calculation. A writePeriod of 1 will write out the calculation at each time step.

Example fieldSqrDiagUpdater Block

<FieldMultiUpdater E_energy>
  kind = fieldSqrDiagUpdater
  writePeriod = 20
  factor = E_ENERGY_FACTOR
  components = [0 1 2]
  contractFromBottomInNonComponentDir = 1
  lowerBounds = [0 0 0]
  upperBounds = [NX_TOT NY_TOT NZ_TOT]
  readFields = [elecField]
</FieldMultiUpdater>