CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Problem about DPM_UDF(how to remove or stop tracking one partile by UDF?) (https://www.cfd-online.com/Forums/fluent/179581-problem-about-dpm_udf-how-remove-stop-tracking-one-partile-udf.html)

2592183371 November 2, 2016 20:48

Problem about DPM_UDF(how to remove or stop tracking one partile by UDF?)
 
Help!
Here is my question:
I want to achieve the following function by UDF.
About 1000 particle were tracked in transient and the flow field is also in transient. If some condition about particle is reliazed, the particle was removed and the tracking for this particle was stopped.
However, I found that the steam_index is member of struct of "p(pointer to tracked particle)" in DPM_types.h and some discussion showed that p->steam_index can achieve this function.
But if I use this like follows:

# include "udf.h"
# include "dpm.h"
DEFINE_DPM_SCALAR_UPDATE(index,c,t,in,p)
{

if(.....)
{p->stream_index=-1;}

}


The UDF can be compiled and loaded but the following information appeared
Error: received a fatal signal(SEGMENTATION VIOLATION)


How to resolve this problem??

Thanks!!


All times are GMT -4. The time now is 20:51.