CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Ansys crashes when using C_UDSI and C_UDMI (https://www.cfd-online.com/Forums/fluent/253321-ansys-crashes-when-using-c_udsi-c_udmi.html)

nofugz December 6, 2023 15:55

Ansys crashes when using C_UDSI and C_UDMI
 
As the title suggests, I have been experiencing ansys setup shutting off and exiting whenever I run the following code. The aim is to calculate the laplacian of a scalar that is calculated using UDS equation. (I have assigned UDM locations and selected the desired number of scalar equations (just 3 in my case).)

#include "udf.h"
DEFINE_EXECUTE_AT_END(calculate_laplacian)
{
cell_t c;
Thread *t;
Domain *d;
d = Get_Domain(4);


/* Loop through all cells in the current thread */
thread_loop_c(t,d)
{
begin_c_loop(c,t)
{
C_UDSI(c,t,2) = C_UDSI_G(c,t,0)[0];
C_UDSI(c,t,3) = C_UDSI_G(c,t,0)[1];
C_UDMI(c,t,2) = C_UDSI_G(c,t,2)[0] + C_UDSI_G(c,t,3)[1];
}
end_c_loop(c, t)
}
}

AlexanderZ December 7, 2023 02:05

did you allocate memory for 4 scalars and 3 udms in fluent GUI?

nofugz December 7, 2023 05:43

Quote:

Originally Posted by AlexanderZ (Post 861195)
did you allocate memory for 4 scalars and 3 udms in fluent GUI?

I have set the number of UDS to 4 and number of UDM to 3 using Define -> User-Defined ->. Is that what you are talking about?


All times are GMT -4. The time now is 06:36.