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

error fatal signal(segmentation fault) when loop over faces on the wall

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 10, 2016, 01:56
Default 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
serene6390 is on a distinguished road
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.
serene6390 is offline   Reply With Quote

Old   November 10, 2016, 05:36
Default
  #2
`e`
Senior Member
 
Join Date: Mar 2015
Posts: 892
Rep Power: 18
`e` is on a distinguished road
Is the boundary ID of 8 correct? The other thing to check is directly adding in the boundary ID:

Code:
Lookup_Thread(d,8)
`e` is offline   Reply With Quote

Old   November 10, 2016, 12:55
Default
  #3
Member
 
Joshua
Join Date: Aug 2014
Posts: 49
Rep Power: 12
jbo214 is on a distinguished road
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
jbo214 is offline   Reply With Quote

Old   November 16, 2016, 23:46
Default
  #4
New Member
 
Jing
Join Date: Feb 2013
Posts: 25
Rep Power: 13
serene6390 is on a distinguished road
Quote:
Originally Posted by jbo214 View Post
Hi, joshua,

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.
serene6390 is offline   Reply With Quote

Old   November 18, 2016, 13:38
Default
  #5
Member
 
Joshua
Join Date: Aug 2014
Posts: 49
Rep Power: 12
jbo214 is on a distinguished road
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.
jbo214 is offline   Reply With Quote

Reply

Tags
domain, fatal signal, integration, loop over face


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
[snappyHexMesh] sHM layer process keeps getting killed MBttR OpenFOAM Meshing & Mesh Conversion 4 August 15, 2016 04:21
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 19:57
Cluster ID's not contiguous in compute-nodes domain. ??? Shogan FLUENT 1 May 28, 2014 16:03
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 11:52
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 18:51


All times are GMT -4. The time now is 09:27.