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 Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 21, 2016, 02: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: 12
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 10:12. Reason: code updated
AHF is offline   Reply With Quote

Old   July 22, 2016, 07:26
Default
  #2
Senior Member
 
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13
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


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
[Salome] Salome import "Cannot find file "points" in directory..." mismichael OpenFOAM Meshing & Mesh Conversion 6 June 24, 2024 04:17
fluentError: received a fatal signal (Segmentation fault). thomaszhangjing Fluent UDF and Scheme Programming 11 January 13, 2021 10:37
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
FLUENT received fatal signal (ACCESS_VIOLATION) osamaghani FLUENT 2 March 31, 2012 17: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 00:18.