Firstly, in this Article we will look at how to create a Moment Field Function around the Laboratory Coordinate System then show an example around a secondary axis.
Create a Vector Field Function for the Pressure Force with Definition $Pressure * $$Area
Create a Vector Field Function for the Shear Force with Definition $${WallShearStress}*mag($${Area})
Create a Scalar Field Function for the Moment_Lab around Lab Y axis with definition: dot(cross($$Position, ($$Fpressure + $$Fshear)) , [0, 1, 0] )
To check the validity of your field function create a Sum Report of the Field Function
This should be comparable to the build in Moment Report Function of the same surface and Coordinate System.
The values of both reports are equivalent.
You can visualize the Field Function in a Scalar Scene
To create the equivalent Scalar Scene referencing a secondary axis an extra Field Function is required.
Create a Scalar Field Function for the Moment_SecondayAxis around Laboratory.Cartesian 1 Y axis with definition: dot(cross($$Position(@CoordinateSystem("Laboratory.Cartesian 1")), ($$Fpressure(@CoordinateSystem("Laboratory.Cartesian 1")) + $$Fshear(@CoordinateSystem("Laboratory.Cartesian 1")))) , [0, 1, 0] )
Repeat the Report Steps to validate the field function.
Again, note that the values are equivalent.
You can now visualize the Moment Field Function in a Scalar Scene