curlUpdaterCoordProd

curlUpdaterCoordProd

Works with VSimPD and VSimMD licenses.

This is a variation of the curlUpdater MultiField updater that should be used whenever non-uniform or non-Cartesian grids are used in the simulation. The FieldUpdater variety does not currently work with grid boundaries, however the FieldMultiUpdater variety does.

curlUpdaterCoordProd Parameters

The curlUpdaterCoordProd takes the lowerBounds and upperBounds parameters of FieldUpdater, as well as the global region modification parameters and local region modification parameters. In addition, curlUpdaterCoordProd takes the following parameters:

readFields (required string vector)

A vector of either one or two strings. The first string is the name of the field to take the curl of, and if provided, the second is the name of the field (multiplied by the specified factors) to add to the result.

writeFields (required string vector)

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

differencing (required string)

Either forward or backward, as described above.

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

If true, the updater will update all three components of the vector field specified in writeFields, beginning with the specified component. The updated field must therefore have at least \({\tt component} + 3\) components.

component (optional integer, default = 0)

The field component to update, or if useVecUpdater is true, the first field component to update.

readFieldCompShifts (optional integer vector, default = [0 0])

This vector must have the same number of elements as readFields. It specifies the amount by which to increment the component indices of the first field and the (optional) second field. It is equal to [\(c_g\) \(c_h\)] in the description above. For example, if a magnetic field is represented by components 3–5 of the field EandB, then to calculate the curl of that magnetic field, one would specify readFields = [EandB] and readFieldCompShifts = [3].

readFieldFactors (optional float vector)

If this is specified, there must be one element for each field specified in readFields. The terms in the update for each field are multiplied by the corresponding factors; they are the coefficients \(A\) and \(B\) in the description above. If not specified, the factors use values of \(1\) for each field.

dtCoefficients (optional float vector, default = [1. 0.])

Two components [\(c_{0}\) \(c_{1}\)] as defined in the equation above. The result of the updater will be multiplied by (\(c_{0}\) + \(c_{1} \Delta t\)), where \(\Delta t\) is the current time step.

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

Set this to true (1) if the cylindrical axis (\(r = 0\)) is included in this update. To obtain the correct behavior at the axis, one needs to specify two separate curlUpdaterCoordProd updaters; one with the axis and one without.

lowerSkinDepth (optional integer vector)

Specifies the number of skin cells, in each direction, on the lower end of the local domain. The cells in the skin are updated before the fields specified as messageFields in the UpdateStep or InitialUpdateStep block are messaged. If not specified, the skin depth will be determined automatically.

upperSkinDepth (optional integer vector)

Specifies the number of skin cells, in each direction, on the upper end of the local domain. If not specified, the skin depth will be determined automatically.

Example curlUpdaterCoordProd Block

<FieldUpdater  yeeFaraday_0>
    kind=curlUpdaterCoordProd
    useVecUpdater=1
    differencing=forward
    lowerBounds=[0 1 0]
    upperBounds=[NZ NR NPHI]
    dtCoefficients=[0.0 1.0]
    readFieldFactors=[-1.0]
    readFields=[elecField]
    writeFields=[magField]
</FieldUpdater>
<FieldUpdater  yeeFaraday_0_cyl>
    kind=curlUpdaterCoordProd
    useVecUpdater=1
    differencing=forward
    includeCylAxis=1
    lowerBounds=[0 0 0]
    upperBounds=[NZ 1 NPHI]
    dtCoefficients=[0.0 1.0]
    readFieldFactors=[-1.0]
    readFields=[elecField]
    writeFields=[magField]
 </FieldUpdater>