An error occurs after initialized FLuent loaded UDF.
1, When I compiled my UDFs, it didn't show any error. But after initialized Fluent, an error occurs.
2, Error: received a fatal signal (segmentation fault). 3, /*My UDF is about the fluid properties depending on temperatures.*/ /* my_density */ #include "udf.h" double Tm1[2] = { 293.15 , 294.15 }; double D[2] = { 0.16632 , 0.03831 }; DEFINE_PROPERTY(my_density,c,t) { int i; double density; double temp = C_T(c,t); if(temp <= Tm1[0]) density = D[0]; else if(temp > Tm1[1]) density = D[1]; else { for(i = 0;i <1;i++) { if(temp > Tm1[i] && temp <= Tm1[i+1]) density = D[i] + (temp - Tm1[i]) * (D[i+1] - D[i]) / (Tm1[i+1] - Tm1[i]); } } return density; } 4, Help me, Please! I really want to solve this problem quickly. |
First initialize, then load the UDF.
|
initialize first?
Quote:
My UDF is the properties of the fluid. If initialize first, how to define the properties? |
That does not really matter, but if possible do something close to your expected result. Define it for example with a uniform density based on a typical temperature in your problem.
|
Thanks!
Quote:
Really really thank you! I tried the method you told, the fluent can running! |
I am also facing the same error
I am getting the "received a fatal signal (segmentation fault)" error. Is it because the function is not able to access the previous timestep values using F_U_M1 and C_U_M1?
Code:
#include"udf.h" Quote:
Any help would be appreciated. |
Don't worry about the error!
Quote:
I don't know your UDFs, maybe you can check carefully by yourself. But if you cannot running the Fluent, you can try the method, which using a constant velocity to initialize the Fluent and then load your UDFs to running the Fluent. Maybe your problems can be solved. If cannot, you can ask for help to others. |
All times are GMT -4. The time now is 19:42. |