|
[Sponsors] |
error fatal signal(segmentation fault) when loop over faces on the wall |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 10, 2016, 00:56 |
error fatal signal(segmentation fault) when loop over faces on the wall
|
#1 |
New Member
Jing
Join Date: Feb 2013
Posts: 25
Rep Power: 13 |
Hi, all, I'm trying to calculate a parameter that needs to loop over faces on the wall. but there's always an error:
received a fatal signal (Segmentation fault) appears when I interpret my UDF file. Here's a simplified version of my code: DEFINE_EXECUTE_AT_END(h_zt) { real M1_integ=0; /*integration*/ real A=0.001; Domain *d; face_t f; int ID=8; Thread *t; Thread *t0; cell_t c; cell_t c0; d = Get_Domain(1); t = Lookup_Thread(d,ID); /* Loop over all faces on wall */ begin_f_loop(f,t) { c0 = F_C0(f, t); t0 = THREAD_T0(t); F_CENTROID(x,f,t); y=x[1]; if (y>0 && y<0.02) { M1_integ+=A*C_T_G(c0,t0)[0]; } } end_f_loop(f,t) Here's what I did after I have this error: I blocked all the codes after begin_f_loop till the end, and then run the program, the error is still there. Only after I blocked the codes after d=Get_Domain(1), the error disappeared. I'm really confused is there anything wrong with d=Get_Domain(1)? Any help would be appreciated. Thanks in advance. |
|
November 10, 2016, 04:36 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Is the boundary ID of 8 correct? The other thing to check is directly adding in the boundary ID:
Code:
Lookup_Thread(d,8) |
|
November 10, 2016, 11:55 |
|
#3 |
Member
Joshua
Join Date: Aug 2014
Posts: 49
Rep Power: 12 |
Try compiling instead of interpreting. See these posts.
http://www.cfd-online.com/Forums/flu...ion-fault.html http://www.cfd-online.com/Forums/fluent-udf/179767-segmentation_fault_udf.html |
|
November 16, 2016, 22:46 |
|
#4 | |
New Member
Jing
Join Date: Feb 2013
Posts: 25
Rep Power: 13 |
Quote:
Thank you so much for providing these posts for me. I was trying to compiling my UDF instead of Interpreting after reading these posts. But I have some problem on compiling my UDF. The error is: UNC paths are not supported. Defaulting to windows directory. Access is denied. I've tried searching more information about this error. But I still haven't get it solved. I'm doing serial not parallel. The Fluent Root path is C:\Program Files\ANSYS Inc\v171\fluent, which I think should be correct. I'm using PC in the lab of my school, which has Microsoft Visual Studio 2012 installed. I really have no idea what else I could do to compile my UDF successfully. Thank you so much if you could help me one more time. |
||
November 18, 2016, 12:38 |
|
#5 |
Member
Joshua
Join Date: Aug 2014
Posts: 49
Rep Power: 12 |
It sounds like you might need admin rights, but I'm not sure.
I would try and talk to your computer lab admin/software focal since this is at your school or if you know any professors or grad students who use UDFs with school computers. |
|
Tags |
domain, fatal signal, integration, loop over face |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] sHM layer process keeps getting killed | MBttR | OpenFOAM Meshing & Mesh Conversion | 4 | August 15, 2016 03:21 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 18:57 |
Cluster ID's not contiguous in compute-nodes domain. ??? | Shogan | FLUENT | 1 | May 28, 2014 15:03 |
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 12 | May 2, 2013 10:52 |
Problem in running ICEM grid in Openfoam | Tarak | OpenFOAM | 6 | September 9, 2011 17:51 |