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

FLUENT received fatal signal (ACCESS_VIOLATION)

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By natantyt

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 5, 2010, 14:17
Default FLUENT received fatal signal (ACCESS_VIOLATION)
  #1
Member
 
Nathan
Join Date: Aug 2010
Posts: 62
Rep Power: 16
natantyt is on a distinguished road
Hi

I've written a UDF for a reacting flow in a channel,I have species sources for different components as they react through the channel. I receive this message "FLUENT received fatal signal (ACCESS_VIOLATION)" while enable my Define_Adjust function in thef unction hook. These functions update the reaction rate in the memory and also define a species balance.

the function :

DEFINE_ADJUST(update_memory, domain)
{
/* Stores relevant reaction rates into user-defined memory (UDM). */
/* Enable through the Function Hooks --> Adjust in the FLUENT GUI. */
face_t f;
Thread *t;
cell_t c;
thread_loop_c(t,domain)
{
begin_c_loop(c,t)
{

/* Mass Fractions */
mCO=C_YI(c,t,iCO);
mCO2=C_YI(c,t,iCO2);
mH2O=C_YI(c,t,iH2O);
mH2=C_YI(c,t,iH2);
mC3H8=C_YI(c,t,iC3H8);

/* Mass Fraction Check */
/* If the reaction rate ever causes a component to locally vanish, a divide-by-zero error will result
These conditional statements place a lower limit on the concentrations. B. Peppley claims this error
can occur if the grid is too coarse. It can also occur if inlet and backflow concentrations are set
to zero. */
if (mCO==0) {
mCO = 0.000000001;
}
if (mCO2==0) {
mCO2 = 0.000000001;
}
if (mH2O==0) {
mH2O = 0.000000001;
}
if (mH2==0) {
mH2 = 0.000000001;
}
if (mC3H8==0) {
mC3H8 = 0.000000001;
}
/* Reaction Constants */
KR = reack(kRinf,ER,C_T(c,t));
KW = reack(kWinf,EW,C_T(c,t));
Kd = reack(kden,Ed,C_T(c,t));
/* Equilibrium Constants */
K1R= equiK(C_T(c,t));


/* Reaction Rates */

/* Simultaneous Reaction Rates */
rR= KR*mC3H8/mwC3H8*mH2O/mwH2O/(1+Kd); /* [kgmol/m^3.s]*/
rW= KW*(mCO/mwCO*mH2O/mwH2O-mH2/mwH2*mCO2/mwCO2/K1R);
zone_ID = catalyst;
currentzone = THREAD_ID(t);
if (currentzone==zone_ID){
C_UDMI(c,t,0)= rR;
C_UDMI(c,t,1)= rW;
}
}
end_c_loop(c,t)
}
}
DEFINE_ADJUST(Species_Balance, domain)
{
Thread *ft;
face_t f;
Thread *ct;
cell_t c;
real balance[NUM_SPECIES];
int n,i;
thread_loop_c(ct,domain)
{
begin_c_loop(c,ct)
{
for (i=0; i<NUM_SPECIES;i++)
{
c_face_loop(c, ct, n) /* loops over all faces of a cell */
{
f = C_FACE(c,ct,n);
ft = C_FACE_THREAD(c,ct,n);
balance[i] = F_FLUX(f,ft)*F_YI(f,ft,i);
}
C_UDMI(c,ct,2+i) = balance[i]; /* Hard-coded "2" because I have used the first 2 spots already */
}
} end_c_loop(c,ct)
}

}


Thanks

Natan
natantyt is offline   Reply With Quote

Old   November 6, 2010, 02:46
Default
  #2
New Member
 
lebay
Join Date: Oct 2010
Posts: 6
Rep Power: 16
rayoflight153 is on a distinguished road
help me, I have the same problem, please
rayoflight153 is offline   Reply With Quote

Old   November 4, 2011, 00:39
Default
  #3
New Member
 
davidyin
Join Date: Nov 2011
Posts: 4
Rep Power: 15
davidyin is on a distinguished road
Help, so do I.
davidyin is offline   Reply With Quote

Old   November 4, 2011, 01:52
Default Access Violation
  #4
Member
 
Nathan
Join Date: Aug 2010
Posts: 62
Rep Power: 16
natantyt is on a distinguished road
Hi

This is a general error I encountered , it could be very irritating . What I can say is that you're using a wrong command that does not exist anymore in the syntax in t or you're using a function that can not obtain the required value for a variable. You need to simplify the code, run it then make it bigger.
davidyin likes this.
natantyt is offline   Reply With Quote

Old   November 4, 2011, 13:54
Default
  #5
New Member
 
davidyin
Join Date: Nov 2011
Posts: 4
Rep Power: 15
davidyin is on a distinguished road
Quote:
Originally Posted by natantyt View Post
Hi

This is a general error I encountered , it could be very irritating . What I can say is that you're using a wrong command that does not exist anymore in the syntax in t or you're using a function that can not obtain the required value for a variable. You need to simplify the code, run it then make it bigger.

Thanks a lot. i will try according to your suggestion.
davidyin is offline   Reply With Quote

Old   November 20, 2011, 20:42
Default
  #6
New Member
 
Join Date: Aug 2011
Posts: 8
Rep Power: 15
Shayan is on a distinguished road
Hi
I had this error, for my case,I should first define the number of user defined memory, and then in TUI I should write solve/set/expert command,and for this question "Keep temporary solver memory from being freed? [yes] " answer yes, this error is sometimes related to memory shortage
Shayan is offline   Reply With Quote

Old   February 8, 2014, 04:58
Default
  #7
New Member
 
Join Date: Sep 2013
Posts: 4
Rep Power: 13
aleni32 is on a distinguished road
I am runing a simulation for steel melt with VOF model with UDF (11 sources).
1- I used 21 UDMI so I defined 21 Memory for it,
2- I defined EXECUTE_AT_END for the UDF
but when i run it there is an error after 1 iteration:
in serial solver: fatal error, segmentation fault
in parallel solver: MPI application rank1 exited before MPI finalize() with status -1073741819
I even use parallel setting for auto partition with METIS method but still didnt worked.
when i run this UDF with water model it works very good but in steel model(different model) it doesnt worked.
If you have some experience about this i would be ppreciated if you inform me. thanks in advance
aleni32 is offline   Reply With Quote

Old   February 8, 2014, 15:07
Default
  #8
Member
 
Nathan
Join Date: Aug 2010
Posts: 62
Rep Power: 16
natantyt is on a distinguished road
Hi

I can give general answers here. 11 sources made it a bit complex, it might be because of the memory problem. You may need to use another machine with higher RAM specifically for VOF. The other thing check if the variables that you need to run your source terms or whatever; is available and thesyntax you're using is uptodate with FLUENT syntax.
natantyt 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
FLUENT received fatal signal (ACCESS_VIOLATION) CHAKER FLUENT 4 December 11, 2015 04:20
On Bug of Fluent 12.0 lzgwhy FLUENT 0 August 26, 2009 07:41
Problems in lauching FLUENT Lourival FLUENT 3 January 16, 2008 17:48
fatal signal (ACCESS_VIOLATION) manu FLUENT 0 December 10, 2007 07:10
FLUENT received fatal signal (ACCESS_VIOLATION) samy FLUENT 0 November 10, 2007 14:09


All times are GMT -4. The time now is 08:24.