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

Udf segmentation violation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 23, 2013, 03:32
Default Udf segmentation violation
  #1
New Member
 
Join Date: Jul 2013
Posts: 3
Rep Power: 12
dany_@ is on a distinguished road
Hello everybody, I'm a new student of CFD code. I'm trying to solve a simple equation such as dx/dt=-10 in a porous zone. I succeed in compiling the UDF and hooking it in the cell zone conditions of the porous zone as source term, but when I try to lauch the simulation, it give me "Error: fluent.13.0.0 received a fatal signal (SEGMENTATION VIOLATION). Error object: #f."
I don't understand why...
Can anybody help me?

Here my UDF:

#include "udf.h"



DEFINE_SOURCE(uds_source,c,t,ds,eqn)
{
real source;
{
source = -10;
ds[eqn] = 0;

C_UDMI(c,t,1) = source;

return source;
}
}
dany_@ is offline   Reply With Quote

Old   July 23, 2013, 04:40
Default
  #2
Senior Member
 
Join Date: Aug 2011
Posts: 421
Blog Entries: 1
Rep Power: 21
blackmask will become famous soon enough
So you do not allocate memory for UDM in the FLUENT GUI? It should be in
Define -> User-Defined -> Memory...

It is a good idea to test whether the storage has been allocated before accessing them by
Code:
if (NNULLP(THREAD_STORAGE(t,SV_UDM_I))) {

}
blackmask is offline   Reply With Quote

Old   July 23, 2013, 05:00
Default
  #3
New Member
 
Join Date: Jul 2013
Posts: 3
Rep Power: 12
dany_@ is on a distinguished road
Quote:
Originally Posted by blackmask View Post
So you do not allocate memory for UDM in the FLUENT GUI? It should be in
Define -> User-Defined -> Memory...

It is a good idea to test whether the storage has been allocated before accessing them by
Code:
if (NNULLP(THREAD_STORAGE(t,SV_UDM_I))) {

}

I tried..but it still doesn't work..
dany_@ is offline   Reply With Quote

Reply


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
udf wall distance segmentation violation gento FLUENT 1 April 15, 2016 15:59
UDF segmentation violation error be89 Fluent UDF and Scheme Programming 1 December 21, 2012 03:07
DPM UDF - Segmentation Violation & Stack Backtrace Prashanth Fluent UDF and Scheme Programming 4 July 10, 2012 10:39
udf segmentation violation when hooked jjchristophe Fluent UDF and Scheme Programming 9 June 25, 2012 05:46
Segmentation Violation Corentin FLUENT 1 February 13, 2011 01:07


All times are GMT -4. The time now is 06:56.