RatioFieldOpCrossDev

RatioFieldOpCrossDev

Works with XSimBase license.

MultiField updater that divides one field by another in the form ::math::C = C*i3 + (c1 * A + s1) / (c2 * B + s2) where A and B are the fields.

RatioFieldOpCrossDev Parameters

The ratioFieldOpCrossDev updater takes the lowerBounds and upperBounds, as well as the following parameters:

writeFields (required string vector)

Field into which the result is written. This is [C] in the above formula.

writeComponents (optional int vector, default=all)

Vector of indices that should be calculated and written to the result.

incrementCoeff (required float)

Coefficient for the write field augmentation. This is ::math::i3 in the above formula.

scalar1Coeff (required float)

Added scalar for the first readField. This is ::math::s1 in the above formula.

scalar2Coeff (required float)

Added scalar for the second readField. This is ::math::s2 in the above formula.

field1Coeff (required float)

Coefficient for the first readField. This is ::math::c1 in the above formula.

field2Coeff (required float)

Coefficient for the second readField. This is ::math::c2 in the above formula.

Expression sub-block (optional sub-block)

All of the above coefficients (i3, s1, s2, c1, and c2) can instead be specified as Expression blocks, if desired. These should be named the same as the above attributes, but with Mult added to the name (e.g. <Expression field2CoeffMult>). This is only necessary if the coefficients vary in space and/or time.

RatioFieldOpCrossDev Usage Notes

Example RatioFieldOpCrossDev block

<FieldUpdater phiTemporal>
  kind = ratioFieldOpCrossDev
  lowerBounds = [-1  0  0]
  upperBounds = [1  100  0]
  writeComponents = [0]
  readFields = [phi  rho]
  writeFields = [phiNew]
  incrementCoeff = 0.0
  scalar1Coeff = 0.0
  scalar2Coeff = 0.0
  field1Coeff = 1.0

  <Expression field2CoeffMult>
    expression = 100.0*sin(6.28*13560000.0*t)
  </Expression>

</FieldUpdater>

Notes

RatioFieldOpCrossDev

History

RatioFieldOpCrossDev was introduced in XSim 1.0