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

C_DUDX segmentation fault

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 16, 2015, 14:39
Default C_DUDX segmentation fault
  #1
Member
 
Join Date: Dec 2014
Posts: 38
Rep Power: 12
Harry321 is on a distinguished road
Dear colleagues!
Here is a UDF which use:

#include "udf.h"
#include "mem.h"

DEFINE_ON_DEMAND(flux)
{
Domain *domain = Get_Domain(1);
int count, massflow_zone;
real At, A[ ND_ND ], cx0[ND_ND];
cell_t c0, c1;
Thread *t, *ct0, *ct1;
face_t f;

massflow_zone = 1; // interior BC
t = Lookup_Thread(domain, massflow_zone);
begin_f_loop(f, t)
{
F_AREA(A, f, t);
At = NV_MAG(A);
c0 = F_C0(f, t);
ct0 = F_C0_THREAD(f, t);
C_CENTROID(cx0, c0, ct0);
Message("C_U(c0, t0): %f \n", C_W(c0, ct0));
Message("C_DUDX(c0, t0): %f \n", C_DUDX(c0, ct0));

}
end_f_loop(f, t);
}

After several iteration I executed this UDF and I got first message and on the second one I got segmentation fault. Any idea why?

Best regards!
Harry321 is offline   Reply With Quote

Old   November 20, 2015, 20:55
Default
  #2
Member
 
Nevada
Join Date: Apr 2014
Posts: 32
Rep Power: 12
razi.me05 is on a distinguished road
Hi, Could you solve the problem? I'd really appreciate if you could share
razi.me05 is offline   Reply With Quote

Reply

Tags
c_dudx, segmentation fault


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
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel francesco OpenFOAM Bugs 4 May 2, 2017 22:59
Segmentation Fault w/ compiled OF 2.2.0 - motorBike example sudo OpenFOAM Running, Solving & CFD 3 April 2, 2013 18:27
segmentation fault when installing OF-2.1.1 on a cluster Rebecca513 OpenFOAM Installation 9 July 31, 2012 16:06
Segmentation Fault Shawn_A OpenFOAM Running, Solving & CFD 6 October 31, 2011 15:38
ParaView segmentation fault only for multiphase gwierink OpenFOAM 9 March 25, 2010 08:23


All times are GMT -4. The time now is 13:41.