reciprocalFieldOpCrossDev

reciprocalFieldOpCrossDev

Works with XSimBase license.

MultiField updater for Cross Devices that performs cell-by-cell operations on two regularCrossDev field. Denote the read components by R, and the write components by W. Further let \(f_i(x,y,z,t)\), \(f_f(x,y,z,t)\), and \(f_s(x,y,z,t)\) be STFunc expressions, and \(C_i, C_f\), and \(C_s\) be constants. The reciprocal function \(\Gamma = 1/(C_s f_s(x,y,z,t) + C_f f_f(x,y,z,t) \cdot R\) on a cell-by-cell basis. This updater computes the writeField as \(W = C_i f_i(x,y,z,t)\cdot W + \Gamma\). This updater is very similar to the oneFieldOpCrossDev, but provides the reciprocal term for the read components.

reciprocalFieldOpCrossDev Parameters

The reciprocalFieldOpCrossDev updater takes the lowerBounds, upperBounds, lowerCoords, upperCoords, gridBndry, writeFields, and readFields parameters of Field Slab updaters, as well as the following parameters:

readComponents (required integer vector)

For each readField, a component; references to the jth readField will use the component specified in the jth element of this vector.

writeComponents (required integer vector)

For each writeField, a component; references to the jth writeField will use the component specified in the jth element of this vector.

incrementCoeff (float, required)

The constant \(C_i\).

fieldCoeff (float, required)

The constant \(C_f\).

scalarCoeff (float, required)

The constant \(C_s\).

incrementCoeffMult (expression, optional)

A userFunc expression that multiplies the writeComponent, \(f_i(x,y,z,t)\).

fieldCoeffMult (expression, optional)

A userFunc expression that multiplies the readComponent, \(f_f(x,y,z,t)\).

scalarCoeffMult (expression, optional)

A userFunc expression that does not multiply any field components, \(f_s(x,y,z,t)\).

Notes

If \(C_s f_s(x,y,z,t) + C_f f_f(x,y,z,t)\cdot R = 0\), then \(\Gamma=0.0\).

Example reciprocalFieldOpCrossDev block

<FieldUpdater excUpdater>
  kind = reciprocalFieldOpCrossDev
  lowerBounds = [0 1  0]
  upperBounds = [1 NY NZ]
  writeComponents = [2]
  readFields = [Exc]
  writeFields = [E]
  incrementCoeff = 0.0
  scalarCoeff = 0.0
  fieldCoeff = 1.0
  <Expression fieldCoeffMult>
    expression = exp(-(PULSESTART+LIGHTSPEED*t)^2/$(PULSELEN)**2$)
  </Expression>
</FieldUpdater>

Notes

reciprocalFieldOpCrossDev is only available with text-based setup.

History

reciprocalFieldOpCrossDev was introduced in XSim 1.