Multifield-divUpdater

divUpdater

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

MultiField updater that takes the divergence of the of a field, and writes the result into another field.

divUpdater Parameters

The divUpdater kind takes the lowerBounds and upperBounds parameters of FieldUpdater, as well as the following parameters:

readFields (required string vector)

A vector containing a single element, the name of a vector field of which to take the divergence.

writeFields (required string vector)

A vector containing a single element, the name of a scalar field to update.

differencing (optional string, default = backward)

One of forward or backward, specifying the direction in which to take the finite difference. The default, backward, is generally used for taking the divergence of an edge field to update a node field; the forward value is used for the divergence of a face field to update a cell-centered field.

skipFirst (optional integer, default = 0 (false))

Set this flag to 1 (true) to skip the first component of the vector field, i.e. to use components 1–3 in the divergence rather than 0–2. This should be used when taking the divergence of \({\bf J}\) in a SumRhoJ charge-current field. A SumRhoJ field has four components, the first of which is \(\rho\); therefore the first component of this field must be skipped to get to the \({\bf J}\) components.

factor (optional float, default = 1)

A factor that multiplies the end result after taking the divergence.

gridBoundary (optional string)

If provided, only components on the interior of the specified GridBoundary will be updated. The method to define the interior is given in the interiorness parameters. If this parameter is provided, then the field specified in writeFields must have offset = none or offset = center.

interiorness (optional string, default = cellcenter)

If the gridBoundary parameter is specified, this is the method the used to determine whether a component is interior to the boundary. The behavior depends on the offset specified in the updated Field. One of:

  • cellcenter:

    If offset = none, then a cell is considered interior if its node is adjacent to at least one cell with center inside the boundary.

    If offset = center, then a cell is considered interior if its center is inside the boundary.

  • deymittra:

    If offset = none, then a cell is considered interior if all nodes adjacent to (i.e. displaced by a single edge from) its node are inside the boundary.

    This interiorness option cannot be specified with offset = center.

Example divUpdater Block

<FieldUpdater divergence>
  kind        = divUpdater
  lowerBounds = [ 0  0  0]
  upperBounds = [NX NY NZ]
  readFields  = [ElecMultiField]
  writeFields = [divE]
  skipFirst   = false
</FieldUpdater>