CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > 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 Search this Thread 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: Canada
Posts: 81
Rep Power: 11
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: 271
Rep Power: 12
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 Search this Thread
Search this Thread:

Advanced Search
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 Off
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 11 January 13, 2021 09:37
[Salome] Salome import "Cannot find file "points" in directory..." mismichael OpenFOAM Meshing & Mesh Conversion 5 June 22, 2019 02:56
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
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 15:16


All times are GMT -4. The time now is 19:42.