Paul Larsen
Ansys Employee

Hi Bryce,  All methods that I am aware of require either assumptions, estimates, or maybe iterative methods of determining the center reference point (such as your r-position reference).

You can perform the calculation around one axis at a time, so you could calculate m_z for positions with reference to the global Z-axis with the following Field Calculator commands:

  • Function > Scalar: X (global X position)

  • Vec? > VecX

  • Function > Scalar: Y (global Y position)

  • Vec? > VecY

  • + (this is a radial position vector, you can add VecZ position to obtain full position)

  • Quantity > CurrentDensity (J)

  • Cross

  • Scal? > ScalarZ (integral needs to be performed on scalar components separately)

  • Geometry > Volume Object

  • Integral

You can then repeat for X and Z axis.  Apply the 1/2 scaling at any time.