-
-
December 29, 2020 at 1:07 pm
Abbasraza20000220
SubscriberHello to all.
I have been uploading UDF for defining hot stream in the fluid which is air. I am trying to compile the UDF. UDF is compiled without any error. On running the simulation, its giving error as attached in the screenshot. Seniors please help me. Why this error comes?
Regards,
Abbas Raza
December 29, 2020 at 7:25 pmKonstantin
Ansys EmployeeSIGSEGV is invalid memory access, i. e attempt to accessing memory that is not been initialized or attempting to accessing out of array bounds. have you tried debugging the UDF e. g. by commenting out lines to pinpoint which syntax construct leads to SIGSEGV? I also see you are interpreting the UDF, however not all UDF macros are compatible with interpreter option. nDecember 30, 2020 at 7:50 amAbbasraza20000220
SubscriberSorry I could not get about SIGSEGV. I interpreted and checked it by compiling separately but the result is same. How I can debug my UDF? I checked on internet they are saying different reasons. when when udf could not access variable. nPlease have a look in my udf.n#include udf.hn#include prop.hn#include sg.hn#include mem.hnDEFINE_PROFILE(mfm_h, thread, position)n{n double mh, mc, fh, fc;n real x[ND_ND];n face_t f;n Thread *t0, *t1;n cell_t c0, c1;n begin_f_loop(f, thread)n {n c0 = F_C0(f, thread);n t0 = THREAD_T0(thread);n c1 = F_C1(f, thread);n t1 = THREAD_T1(thread);n  fh = C_YI(c0, t0, 0);n  fc = C_YI(c1, t1, 0);n  mh = fh*0.95;n  mc = fc+fh-mh;n F_PROFILE(f, thread, position)= mh;n }n end_f_loop(f, thread)n}Regards,nAbbas nDecember 30, 2020 at 4:07 pmKonstantin
Ansys Employeestart commenting out the lines, compiling again and running to see which one leads to the error. Are you hooking the UDF to a two-sided boundary where t1 and c1 can be accessed?nDecember 31, 2020 at 2:35 amAbbasraza20000220
Subscriberyes, when I removed C1 and T1, its working. its mean this macro is not for c1 & t1?nRegards,nAbbasnDecember 31, 2020 at 3:03 pmKonstantin
Ansys EmployeePlease refer to Sec. 3.2.5. Connectivity Macros of Fluent customization manual which discussed F_C0 and F_C1. It'll clarify for you that c0 always exists for a face, but c1 may or may not exist. For example for an exterior face, e. g. a face on an external boundary like inlet, c1 doesn't exist. nJanuary 1, 2021 at 3:18 amAbbasraza20000220
SubscriberI am thankful from the depth of heat for your support.nRegards,nAbbas RazanViewing 6 reply threads- The topic ‘Segmentation Fault error object #f’ is closed to new replies.
Innovation SpaceTrending discussionsTop Contributors-
6104
-
1906
-
1436
-
1308
-
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.
-
The Ansys Learning Forum is a public forum. You are prohibited from providing (i) information that is confidential to You, your employer, or any third party, (ii) Personal Data or individually identifiable health information, (iii) any information that is U.S. Government Classified, Controlled Unclassified Information, International Traffic in Arms Regulators (ITAR) or Export Administration Regulators (EAR) controlled or otherwise have been determined by the United States Government or by a foreign government to require protection against unauthorized disclosure for reasons of national security, or (iv) topics or information restricted by the People's Republic of China data protection and privacy laws.
