Fluent UDF to calculate the orientation of material