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

About The fatal error ACCEss violation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2010, 03:31
Default About The fatal error ACCEss violation
  #1
Member
 
Hongjin Wang
Join Date: Mar 2010
Posts: 37
Rep Power: 16
sosososo1114 is on a distinguished road
Dear all, would u help me about this fatal error. When I use the mixture model to simulate the condensation process of the moisture air, I compile this UDF program and set up the species transfer model to set the fraction of water vapor in air. UDF seems ok while compiling. Yet when I try to initialize the case , the fluent message me that:
Error:
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: ()


what's wrong with my case? thx u!

And here is my UDF program:

#include "udf.h" /*include general macros*/
#include "sg_mphase.h" /*include volume macros*/
#include "mem.h"
#define LAT_HT 2260 /*define the latent heat of water vapor*/
#define pi 3.1415
#define R 8.314 /*gas constant 8.314j/mol.K*/
#define moleweight 0.018 /*SI unit water mole weight 0.018kg/mol */
#define A 7.19621
#define B 1730.63
#define C 233.426
#define Ra 287
#define Rhon2 1.138
#define Rhoo2 0.649961
real p_t;
real p_v(real temp,real p_t)/*calculate the pressure of water vapor in the air */
{ real p_v;
p_v=p_t-(Rhon2+Rhoo2)*Ra*temp;
return p_v;
}
DEFINE_SOURCE(liq_src, cell, pri_th, dS, eqn) /*define the source term of water liquid*/
{
Thread *mix_th, *sec_th; /* pionter to the mixture and that to the second phase, air */
real m_dot_l; /*define the evaportation rate*/
real P_SAT, p_t ;
mix_th = THREAD_SUPER_THREAD(pri_th); /*the pointor to the mixture*/
sec_th = THREAD_SUB_THREAD(mix_th, 1); /* the pointor to air*/
P_SAT=exp(A-B/(C_T(cell,pri_th)+C-273.15))*1e3; /*define the satured pressure of water vapor,antoine Equation*/
p_t=C_P(cell,mix_th)+101325;/*define the absolute pressure of mixture in a cell*/
if(p_v(C_T(cell,mix_th),p_t)< P_SAT) /*whether the pressure of water vapor is greater than the saturation pressure*/
{if(C_YI(cell,mix_th,0)) /*find whether there are liquids*/
{m_dot_l = -(P_SAT-p_v(C_T(cell,mix_th),p_t))*sqrt(moleweight)*(2*pi* R*C_T(cell,pri_th)); /* if there is liquids, mass transfer from condensation to air */
dS[eqn]= sqrt(moleweight)*(2*pi*R*C_T(cell,pri_th));
}
else /* if there is no liquid, no mass transfer occurs*/
{
m_dot_l=0;
}
}
else
{m_dot_l = (P_SAT-p_v(C_T(cell,mix_th),p_t))*sqrt(moleweight)*(2*pi* R*C_T(cell,pri_th));
dS[eqn] = 0;
}
return m_dot_l;
}
DEFINE_SOURCE(vap_src, cell, sec_th, dS, eqn)
{
Thread *mix_th, *pri_th;
real m_dot_v;
real P_SAT ;
real p_t;
mix_th = THREAD_SUPER_THREAD(sec_th);
pri_th = THREAD_SUB_THREAD(mix_th, 0);
P_SAT=exp(A-B/(C_T(cell,pri_th)+C-273.15))*1e3;
p_t=C_P(cell,mix_th)+101325;
if(p_v(C_T(cell,mix_th),p_t)< P_SAT)
{if(C_YI(cell,mix_th,0)) /*find whether there are liquids*/
{
m_dot_v = (P_SAT-p_v(C_T(cell,mix_th),p_t))*sqrt(moleweight)*(2*pi* R*C_T(cell,pri_th));
dS[eqn] =0;
}
else
m_dot_v=0; /* if there is no liquid, no mass transfer occurs*/
}
else
{m_dot_v = -(P_SAT-p_v(C_T(cell,mix_th),p_t))*sqrt(moleweight)*(2*pi* R*C_T(cell,pri_th)); /*mass transfer from vapor to water*/
dS[eqn]=sqrt(moleweight)*(2*pi*R*C_T(cell,pri_th));
}
return m_dot_v;
}
DEFINE_SOURCE(enrg_src, cell, mix_th, dS, eqn)
{
Thread *pri_th,*sec_th;
real m_dot;
real P_SAT;
real p_t;
pri_th=THREAD_SUB_THREAD(mix_th,0);
sec_th=THREAD_SUB_THREAD(mix_th,1);
P_SAT=exp(A-B/(C_T(cell,pri_th)+C-273.15))*1e3;
p_t=C_P(cell,mix_th)+101325;
if(p_v(C_T(cell,mix_th),p_t)< P_SAT)
{
if(C_YI(cell,mix_th,0))
{
m_dot =- (P_SAT-p_v(C_T(cell,mix_th),p_t))*sqrt(moleweight)*(2*pi* R*C_T(cell,pri_th));
dS[eqn]=sqrt(moleweight)*(2*pi*R*C_T(cell,pri_th));
}
else
m_dot=0;
}
else
{
m_dot = (P_SAT-p_v(C_T(cell,mix_th),p_t))*sqrt(moleweight)*(2*pi* R*C_T(cell,pri_th));
dS[eqn]=-sqrt(moleweight)*(2*pi*R*C_T(cell,pri_th));
}
return LAT_HT*m_dot;
}

thank u

Last edited by sosososo1114; April 6, 2010 at 22:54.
sosososo1114 is offline   Reply With Quote

Old   April 6, 2010, 23:00
Default
  #2
Member
 
Hongjin Wang
Join Date: Mar 2010
Posts: 37
Rep Power: 16
sosososo1114 is on a distinguished road
Hi, dear all, , I have cacthed some light with the problems above. THe fatal error is caused by the specieces mass fraction macro C_YI in the UDF. When I delete the macro, the case can be initialized.

But I do need this macro in my program to make sure mass transfer occures only when water liquid exists, scince at the beginning of the process there is no liquid water.

So how should I cite this macro correctly in my UDF? If u know, please tell me. THX!
sosososo1114 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
How to remove the error:FLUENT received a fatal signal (SEGMENTATION VIOLATION). Conan FLUENT 9 December 20, 2019 13:31
Segmentation violation louiza FLUENT 16 June 27, 2017 16:41
Which is the fatal error when foamInstallationTest eddy OpenFOAM Installation 2 March 30, 2008 22:13
Fatal error error writing to tmp No space left on device maka OpenFOAM Installation 2 April 3, 2006 09:48
error while compiling the USER Sub routine CFD user CFX 3 November 25, 2002 16:16


All times are GMT -4. The time now is 14:15.