Atharva Nagarkar
Ansys Employee

Hello,

SIGSEGV error is not a specific error and is generally related to storage and memory issues or when data is received by the solver but is missing/incorrectly specified.

There are 2 things to note here. One is that the vector defined as NV_VEC(A) is defined as (A[0], A[1], A[2]). NVD_DOT function creates a product as A[0]*w[1] + A[1]*-w[0] + A[2]*0 as per your definition in the udf. You might want to check this definition as you are multiplying X face area vector by Y coordinate of centroid for first term and Y face area vector by -X coordinate of centroid for second term.

The second thing and is likely the main issue might be related to the macro C_UDMI. C_UDMI can be used to allocate up to 500 memory locations in order to store and retrieve the values of cell field variables computed by UDFs. The total number of memory locations is limited to 500. For large numbers of memory locations, system memory requirements will increase. It is likely that this is where there is an issue related to memory storage resulting in a SIGSEGV error. 

Here is the link for the C_UDMI macro in the Ansys User Manual: 3.2. Data Access Macros (ansys.com)

If you are not able to access the link, please refer to this forum discussion: Using Help with links (ansys.com)

Thanks!