Udf segmentation violation
Hello everybody, I'm a new student of CFD code. I'm trying to solve a simple equation such as dx/dt=-10 in a porous zone. I succeed in compiling the UDF and hooking it in the cell zone conditions of the porous zone as source term, but when I try to lauch the simulation, it give me "Error: fluent.13.0.0 received a fatal signal (SEGMENTATION VIOLATION). Error object: #f."
I don't understand why... Can anybody help me? Here my UDF: #include "udf.h" DEFINE_SOURCE(uds_source,c,t,ds,eqn) { real source; { source = -10; ds[eqn] = 0; C_UDMI(c,t,1) = source; return source; } } |
So you do not allocate memory for UDM in the FLUENT GUI? It should be in
Define -> User-Defined -> Memory... It is a good idea to test whether the storage has been allocated before accessing them by Code:
if (NNULLP(THREAD_STORAGE(t,SV_UDM_I))) { |
Quote:
I tried..but it still doesn't work.. |
All times are GMT -4. The time now is 12:56. |