|
[Sponsors] |
receive a fatal signal after run. please help |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 21, 2016, 02:56 |
receive a fatal signal after run. please help
|
#1 |
Member
amirhossein
Join Date: Jul 2014
Location: Canada
Posts: 81
Rep Power: 12 |
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) ; } }
__________________
amirhosseinfardi94@gmail.com Last edited by AHF; July 21, 2016 at 10:12. Reason: code updated |
|
July 22, 2016, 07:26 |
|
#2 |
Senior Member
Bruno Machado
Join Date: May 2014
Posts: 271
Rep Power: 13 |
try to add intermediate messages to check where the code crash
Message ("1"); . . . . . Message ("2"); etc This will help debugging |
|
Tags |
fleunt, segmentaion fault, udf |
|
|
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 |