twoFieldOpCrossDev

twoFieldOpCrossDev

Works with VSimBase license.

MultiField updater for Cross Devices that performs cell-by-cell operations on two regularCrossDev fields. Denote the read components by R_1 and R_2 for the two fields, 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, C_s\), and \(C_p\) be constants. This updater computes the writeField as \(W = C_i f_i(x,y,z,t) W + C_f1 f_f1(x,y,z,t) R_1 + C_f2 f_f2(x,y,z,t) R_2 + C_s f_s(x,y,z,t) + C_p f_p(x,y,z,t) R_1 R_2\).

twoFieldOpCrossDev Parameters

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

readField1Components (required integer vector)

For the first readField, a vector of components on which to operate.

readField2Components (required integer vector)

For the second readField, a vector of components on which to operate.

writeComponents (required integer vector)

For each writeField, a vector of components to which to write.

incrementCoeff (float, required)

The constant \(C_i\).

field1Coeff (float, required)

The constant \(C_f1\).

field2Coeff (float, required)

The constant \(C_f2\).

scalarCoeff (float, required)

The constant \(C_s\).

productCoeff (float, required)

The constant \(C_p\).

incrementCoeffMult (expression, optional)

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

field1CoeffMult (expression, optional)

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

field2CoeffMult (expression, optional)

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

scalarCoeffMult (expression, optional)

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

productCoeffMult (expression, optional)

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

Example twoFieldOpCrossDev block

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

Notes

twoFieldOpCrossDev is only available with text-based setup.

History

oneFieldOpCrossDev was introduced in VSim 12.