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

receive a fatal signal after run. please help

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 21, 2016, 01:56
Exclamation receive a fatal signal after run. please help
  #1
AHF
Member
 
AHF's Avatar
 
amirhossein
Join Date: Jul 2014
Location: iran
Posts: 70
Rep Power: 4
AHF is on a distinguished road
Hi dude
i write the udf to re position the nodes on the wall . it's compile without any errors . but when i run the simulation , the error appear

Error: received a fatal signal (Segmentation fault).

this is my code :
Code:
DEFINE_GRID_MOTION(indown,domain,dt,time,dtime)
{
	face_t f;
	Thread *tf = DT_THREAD(dt);
	Node *m[11] ;
	Node *v;
	real x ;
	real y ;
	real l ;
	int n ;
	int i,j,k ;
	i = 0 ;
   
    /* set deforming flag on adjacent cell zone */
    SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));
	
    /*Message ("no node update check");*/
	begin_f_loop(f, tf) 
	{
	f_node_loop(f, tf, n) 
	{
	    v = F_NODE(f,tf,n);
	    NODE_MARK(v) = 0;
	}
	}
	end_f_loop(f, tf);

	
    begin_f_loop(f,tf)
    {
       f_node_loop(f,tf,n)
       {
			v = F_NODE(f,tf,n);
			if( NODE_MARK(v) == 0 )
			{
				NODE_MARK(v) = 1 ;
				m[i] = F_NODE(f,tf,n);
				i = i + 1 ;
			}
       }
	   
    }
    end_f_loop(f,tf) ;
	
	

	
	for ( j = 10 ;  j >= 0 ; j = j - 1)
	{
		Message (" in down 1 \n");
		
		for ( k = 0 ; k < 11; k = k + 1)
		{
			Message (" in down 2 \n");
			if(NODE_Y(m[k])<NODE_Y(m[k+1]))
			{

				Node *temp = m[k+1];

				m[k+1]=m[k];

				m[k] = temp;

			}
		}
	}
	
	for ( k = 0 ; k < 11; k = k + 1 )
		{
				NODE_POS_UPDATED(m[k]);
				x = NODE_X(m[k]);
				y = 0.005 * sin( ( 100 ) * ( x - (0.02*time) ) ) ;
				l = 0.008 - y ;
			
				NODE_Y(m[k]) = 0.008 - (l/10)*(k) ;

		}
	
 }
any help ?
__________________
amirhosseinfardi94@gmail.com

Last edited by AHF; July 21, 2016 at 09:12. Reason: code updated
AHF is offline   Reply With Quote

Old   July 22, 2016, 06:26
Default
  #2
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 259
Rep Power: 5
Bruno Machado is on a distinguished road
try to add intermediate messages to check where the code crash

Message ("1");
.
.
.
.
.
Message ("2");

etc

This will help debugging
Bruno Machado is offline   Reply With Quote

Reply

Tags
fleunt, segmentaion fault, udf

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fluentError: received a fatal signal (Segmentation fault). thomaszhangjing Fluent UDF and Scheme Programming 2 November 3, 2016 13:12
Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
Salome import "Cannot find file "points" in directory..." mismichael Open Source Meshers: Gmsh, Netgen, CGNS, ... 4 December 16, 2015 12:24
FLUENT received fatal signal (ACCESS_VIOLATION) osamaghani FLUENT 2 March 31, 2012 16:15
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 17:06.