Rob
Ansys Employee

OK, next step is to eliminate parts of the UDF. Maybe start by setting the returned value as a constant?  With debugging you've passed the first step in that it compiles. Next is to figure out which part of your maths isn't working as intended.