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

DPM-UDF-Segmentation fault

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By pakk

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 7, 2017, 16:11
Default DPM-UDF-Segmentation fault
  #1
Member
 
yun
Join Date: Jul 2015
Posts: 37
Rep Power: 10
gush is on a distinguished road
hi everyone!

i receive an error while trying to execute a udf, the error message is:
"Error: received a fatal signal (Segmentation fault).
Error Object: #f"

my case is very simple, i would like to get the volume of the cells and flow rate of the particles for now. if i can accomplish it i will change it with more complex problems.

i can compile the udf and load it without any problem. in the problem, i do not interact the continuos phase with the discrete phase(one way coupling) because discrete phase has no affect on the continuous phase. so i can display the particle tracks via Results>Graphics and animations>Particle Tracks>Set up.

i am not experienced on UDF issue and coding. maybe it is very simple but i could not get any proper answer from the forum or from other code examples.

here is the code:
#include "udf.h"
#include "dpm.h"

DEFINE_ON_DEMAND(PSIC)
{
Domain *d;
Thread *t;
cell_t c;
Tracked_Particle *p;

real flowrate;
real volume;

d = Get_Domain(1);
thread_loop_c(t,d)
{
begin_c_loop(c,t)
{
volume = C_VOLUME(c,t); /* get cell volume */
flowrate = P_FLOW_RATE(p); /* get flow rate */
C_UDMI(c,t,0) = flowrate/volume;
}
end_c_loop(c,t)
}
}
gush is offline   Reply With Quote

 


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
fatal signal segmentation fault in a UDF hares FLUENT 6 January 21, 2017 03:26
Parallel UDF Segmentation fault error KevinZ09 Fluent UDF and Scheme Programming 1 January 9, 2017 05:30
UDF with UDM Error: segmentation fault dj1210 Fluent UDF and Scheme Programming 4 November 24, 2016 09:44
segmentation fault when installing OF-2.1.1 on a cluster Rebecca513 OpenFOAM Installation 9 July 31, 2012 15:06
Segmentation Fault Shawn_A OpenFOAM Running, Solving & CFD 6 October 31, 2011 14:38


All times are GMT -4. The time now is 15:44.