-
-
October 21, 2020 at 7:55 pm
steppenwolf
SubscriberHi,nWhile I run a UDF in serial, I get an error like:nError: received a fatal signal (Segmentation fault) ...nThe UDF I try to execute looks like:n#include udf.hn#include mem.hn#define VAR_NAME SOME_VALUE;nenumn{npar1,npar2,n...n};nDEFINE_ON_DEMAND(SOME_NAME);nDomain *domain=Get_Domain(ROOT_DOMAIN_ID);ncell_t c;nThread *t;nthread_loop_c(t,domain)n{nbegin_c_loop(c,t)n{nC_UDSI(c,t,par1)=C_SOME_VARIABLE(c,t)+...;nC_UDSI(c,t,par2)=C_UDSI(c,t,par2)+C_SOME_VARIABLE(c,t)+...;nMessage(.....,C_UDSI(c,t,par2);n}nend_c_loop(c,t)n}n}nSo, does this error imply that I should UDM or I cannot reach the related variables or something else?nIf I should use UDM, can you give some tips as the starting point?nIf it is a matter of reaching the variable, can it be due to the spatial discretization scheme I use (Green Gauss Node based)?nThanksnn -
October 21, 2020 at 8:31 pm
Amine Ben Hadj Ali
Ansys EmployeeMight be access violation. Have you defined in Fluent the UDS's and UDM's?n -
October 22, 2020 at 1:37 pm
steppenwolf
SubscriberNo, I did not defined any UDM's and UDS's are defined as seen from the UDF I provided above. Is something missing for a proper definition of UDS?nThanksn -
October 23, 2020 at 2:45 pm
-
Viewing 3 reply threads
- The topic ‘Segmentation Fault while Executing an UDF’ is closed to new replies.
Innovation Space
Trending discussions
Top Contributors
-
5069
-
1771
-
1387
-
1248
-
1021
Top Rated Tags
© 2026 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.

