|
[Sponsors] |
November 8, 2023, 06:24 |
SIGSEV ERROR for DEFINE_EXECUTE_AT_THE_END
|
#1 |
New Member
Giulio Generini
Join Date: Nov 2021
Posts: 1
Rep Power: 0 |
Hi Everyone! I'm new to UDF programming and I'm finding problems in making this UDF work.
The UDF is a DEFINE_EXECUTE_AT_THE_END for the evaluation of the Oscillatory Shear Index. I receive a SIGSEV error when the UDF is applied: ================================================== ============================ Node 1: Process 22026: Received signal SIGSEGV. ================================================== ============================ ================================================== ============================ Node 0: Process 22022: Received signal SIGSEGV. ================================================== ============================ The fluent process could not be started. I realised that the UDF cannot enter the face loop and the SIGSEV error appears.
Below is the UDF. DEFINE_EXECUTE_AT_END(OSI) { Domain *domain; real area; face_t f; real A[ND_ND]; cell_t c, c0; Thread *t,*t0, *c_thread; real wallshear [ND_ND]; domain = Get_Domain(domain_ID); t = Lookup_Thread(domain,zone_ID); begin_f_loop(f, t) { F_AREA(A,f,t); area = NV_MAG(A); NV_V(wallshear,=,F_STORAGE_R_N3V(f,t, SV_WALL_SHEAR)); c0 = F_C0(f,t); t0 = THREAD_T0(t); C_UDMI(c0,t0,0) += NV_MAG(wallshear)/area; C_UDMI(c0,t0,1) += -wallshear[0]/area; C_UDMI(c0,t0,2) += -wallshear[1]/area; C_UDMI(c0,t0,3) += -wallshear[2]/area; C_UDMI(c0,t0,4) = (1.-sqrt(C_UDMI(c0,t0,1)*C_UDMI(c0,t0,1) + C_UDMI(c0,t0,2)*C_UDMI(c0,t0,2) + C_UDMI(c0,t0,3)*C_UDMI(c0,t0,3))/C_UDMI(c0,t0,0))/2; } end_f_loop(f,t) } Thanks to everyone in advance! |
|
Tags |
begin_f_loop, execute at end, osi, udf, user defined function |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
received signal SIGSEV | flo90000 | Fluent UDF and Scheme Programming | 3 | June 16, 2016 08:43 |