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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 22, 2011, 09:55
Default FLUENT received fatal signal (ACCESS_VIOLATION)
  #1
Member
 
rose
Join Date: Dec 2010
Posts: 30
Rep Power: 16
rubis is on a distinguished road
Hi all,
I wrote a UDF for calculating surface tension and concentration. UDF is interpreted sucessfully, but after running for1 one iteration it is giving Access_violation error.


best regards

Last edited by rubis; January 11, 2012 at 05:11.
rubis is offline   Reply With Quote

Old   December 29, 2011, 19:51
Default
  #2
Senior Member
 
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16
ComputerGuy is on a distinguished road
Rubis,
Where are you defining the *tp pointer? I don't see anywhere in your code where you're defining it or passing it to the functions. If Rho and Yi are defined based upon it, and it's a null pointer, Fluent will quit with an access violation.

Let me know if I'm missing something!

Regards,
ComputerGuy

Quote:
Originally Posted by rubis View Post
Hi all,
I wrote a UDF for calculating surface tension and concentration. UDF is interpreted sucessfully, but after running for1 one iteration it is giving Access_violation error. Here is my UDF:
#include "udf.h"
/* udf concentration. */
DEFINE_PROPERTY(concentration,cell,ti)

{
double concentration;
Thread *tp; /*thread from phase identified by phase_2_ID*/
real yi; /*mass fraction*/
real rho; /*mass volumique*/

rho = C_R(cell,tp); /*concentration is yi*rho (kg/m^3) */
yi = C_YI(cell,tp,0);
concentration=C_UDMI(cell,tp,0) = yi*rho*1000/456;
return concentration;
}
/* udf tension superficielle */
DEFINE_PROPERTY(surf_tension, cell, thread)
{
double concentration;
double st;
double log (double concentration);
Thread *tp;
st = 0.0728;
if (concentration < 0.094)
{
st = C_UDMI(cell,tp,1) = 68.49-log(concentration)*(6.516-3.353*log(concentration)) ;
}
else
{
st = C_UDMI(cell,tp,2) = -0.25*concentration+39;
}
return st;
}


best regards
ComputerGuy is offline   Reply With Quote

Old   December 31, 2011, 09:35
Default
  #3
Member
 
rose
Join Date: Dec 2010
Posts: 30
Rep Power: 16
rubis is on a distinguished road
hi,
thank you for your reply. can you give me more details.please
it's a big priblem for me

best regards
rubis is offline   Reply With Quote

Old   January 2, 2012, 06:26
Default
  #4
Senior Member
 
duri
Join Date: May 2010
Posts: 245
Rep Power: 17
duri is on a distinguished road
Quote:
Originally Posted by rubis View Post
Hi all,
DEFINE_PROPERTY(concentration,cell,ti)
{
double concentration;
Thread *tp; /*thread from phase identified by phase_2_ID*/
real yi; /*mass fraction*/
real rho; /*mass volumique*/

rho = C_R(cell,tp); /*concentration is yi*rho (kg/m^3) */
yi = C_YI(cell,tp,0);
concentration=C_UDMI(cell,tp,0) = yi*rho*1000/456;
return concentration;
}
ti is a thread pointer so use ti directly instead of tp. e.g., C_R(cell,ti). Or assign tp=ti and continue to use tp.
duri is offline   Reply With Quote

Old   January 2, 2012, 21:26
Default
  #5
Senior Member
 
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16
ComputerGuy is on a distinguished road
Duri,
I agree this change would "fix" the problem with accessing a non-null thread pointer, but it looks like rubis is performing the calculation in a multiphase environment, and that *tp should be pointing to the second (or third?) phase cell thread (note the comment: *thread from phase identified by phase_2_ID*/). It also looks like there's a species mass fraction involved (C_YI)...

Before we lead Rubis astray with things that will fix the error but not the problem, perhaps we should understand *what* Rubis is trying to calculate.

Rubis: Please write down in words, not fluent UDF code, what you're trying to calculate, and what type of system it is. For example:

I have a two-species, two-phase mixture. The calculation for surface tension is:

Mass Fraction of Species 1 * Mixture Density of the Cell * 1000/456.


Please write this as thoroughly as you can, and I'll be able to take what you write and turn it into Fluent code.

ComputerGuy
ComputerGuy is offline   Reply With Quote

Old   February 5, 2013, 02:15
Default hello computer guy
  #6
New Member
 
Join Date: Sep 2012
Posts: 2
Rep Power: 0
rajatca is on a distinguished road
can you see why i get error "Fluent received fatal signal (access voilation). I am trying to run a dynamic mesh..of a body immersed in water.
rajatca is offline   Reply With Quote

Old   April 22, 2014, 16:42
Question Initialize Error
  #7
New Member
 
mehdis
Join Date: Apr 2014
Posts: 5
Rep Power: 12
mehdis is on a distinguished road
hi all
when i initialize the below error occurs
.
,
,
FLUENT received fatal signal (ACCESS_VIOLATION)
1. Note exact events leading to error.
2. Save case/data under new name.
3. Exit program and restart to continue.
4. Report error to your distributor.
Error Object: #f

mehdis 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
Free Surface Ship Flow timfranke OpenFOAM Running, Solving & CFD 322 March 3, 2021 10:04
FLUENT received fatal signal (ACCESS_VIOLATION) CHAKER FLUENT 4 December 11, 2015 04:20
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 16:55.