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

Segmentation fault while using udf

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 25, 2019, 14:45
Default Segmentation fault while using udf
  #1
Member
 
Durgesh
Join Date: Oct 2018
Posts: 34
Rep Power: 7
durg is on a distinguished road
Hello!!

I am solving 3D solidification problem. In my geometry, there is mold which is open to the atmosphere in which liquid is solidifying and in center of the mold there is a solid copper rod. There is heat transfer radially outwards and heat transfer takes from all mold surfaces. In this problem, I am attaching udf with define execute at end macros which is shown below :

In boundary conditions: interior fluid zone id is 2

DEFINE_EXECUTE_AT_END(time)
{
cell_t c;
Thread *t;
Thread **pt;
Domain *dd;
dd=Get_Domain(1);
t=Lookup_Thread(dd,2);
// pt=THREAD_SUB_THREADS(t);
thread_loop_c (t,dd)
{
/* loop over all cells */

begin_c_loop_all(c,t)
{
// if(C_LIQF(c,t)<1)
// {
// C_UDMI(c,t,0)=C_UDMI(c,t,0)+RP_Get_Real("physical-time-step");
// if(C_LIQF(c,t)==0)
// {
// flag++;
// if(flag==1)
// C_UDMI(c,t,1)=C_UDMI(c,t,0);
// else
//
// }
// else
// C_UDMI(c,t,0)=0;

if((0<C_LIQF(c,t))&&(C_LIQF(c,t)<1))
{

C_UDMI(c,t,0)=C_UDMI(c,t,0)+RP_Get_Real("physical-time-step");
}
}
end_c_loop_all(c,t)
}
}

I am getting a segmentation fault in if condition line. Please help me with this.

Regards
durg 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
UDM segmentation fault. Tushar_Telmasre Fluent UDF and Scheme Programming 1 March 24, 2017 05:45
Segmentation fault in SU2 V5.0 ygd SU2 2 March 1, 2017 04:38
fatal signal segmentation fault in a UDF hares FLUENT 6 January 21, 2017 03:26
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 07:04.