CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

SIGSEV ERROR for DEFINE_EXECUTE_AT_THE_END

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2023, 06:24
Default SIGSEV ERROR for DEFINE_EXECUTE_AT_THE_END
  #1
New Member
 
Giulio Generini
Join Date: Nov 2021
Posts: 1
Rep Power: 0
giuliogen is on a distinguished road
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.
  • The domain ID and zone ID are defined outside the UDF through #define.
  • The UDMs are initialised through another UDF, DEFINE_INIT.
  • I'm running on ANSYS Fluent v19.3, parallel.

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!
giuliogen is offline   Reply With Quote

Reply

Tags
begin_f_loop, execute at end, osi, udf, user defined function


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
received signal SIGSEV flo90000 Fluent UDF and Scheme Programming 3 June 16, 2016 08:43


All times are GMT -4. The time now is 00:54.