|
[Sponsors] |
access violation error in vof,please help me ?! |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 25, 2006, 04:57 |
access violation error in vof,please help me ?!
|
#1 |
Guest
Posts: n/a
|
I use from following udf for definition heat and mass source terms in vof model. then i hook this source terms to fluent .
But as soon as i start run,i face with access violation error in relation with hooking macro of energy source define in mixture level phase. /********Defining mass source term for secondary phase*****/ DEFINE_SOURCE(source_mass,cell,cell_thread,ds,eqn) { real T_SAT= a value; real Source ; Thread *tm=THREAD_SUPER_THREAD(cell_thread); Thread **pt=THREAD_SUB_THREADS(tm); Source=0.0; if(C_T(cell,pt[1])>=T_SAT) { Source=-0.1*C_VOF(cell,pt[1])*C_R(cell,pt[1])*fabs(C_T(cell,pt[1]-T_SAT)/T_SAT); } if((Source=0.0)&&(C_T(cell,pt[1])<=T_SAT)) { Source=0.1*C_VOF(cell,pt[0])*C_R(cell,pt[0])*fabs(C_T(cell,pt[0]-T_SAT)/T_SAT); } ds[eqn]=0.0; return Source; } ERROR HAPPENED IN FOLLOWING DEFINE_SOURCE MACRO for energy source!!! /********Defining enthalpy source term for mixture*****/ DEFINE_SOURCE(source_mass,cell,cell_thread,ds,eqn) { real T_SAT= a value; real Source ; Thread *tm=THREAD_SUPER_THREAD(cell_thread); Thread **pt=THREAD_SUB_THREADS(tm); Source=0.0; if(C_T(cell,pt[1])>=T_SAT) { Source=-0.1*C_VOF(cell,pt[1])*C_R(cell,pt[1])*fabs(C_T(cell,pt[1]-T_SAT)/T_SAT); } if((Source=0.0)&&(C_T(cell,pt[1])<=T_SAT)) { Source=0.1*C_VOF(cell,pt[0])*C_R(cell,pt[0])*fabs(C_T(cell,pt[0]-T_SAT)/T_SAT); } ds[eqn]=0.0; SOURCE_ENERGY=Source*2443000 return SOURCE_ENERGY; } Can everybody explain why this access violation error happen in hooking energy define_source in mixture phase? Best regards; |
|
August 28, 2006, 07:52 |
Re: access violation error in vof,please help me ?
|
#2 |
Guest
Posts: n/a
|
If you hook the energy source to the mixture then cell_thread will be the mixture thread.
Thread *tm=THREAD_SUPER_THREAD(cell_thread); will probably cause the crash because cell_thread already refers to the mixture. Delete this line and change the following Thread **pt=THREAD_SUB_THREADS(tm); to Thread **pt=THREAD_SUB_THREADS(cell_thread); RoM |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
specified shear at wall - temperature gradient - UDF - access violation error | senD | Fluent UDF and Scheme Programming | 9 | September 18, 2014 08:29 |
UDF Access violation | therandomestname | FLUENT | 0 | April 15, 2011 18:31 |
"Fluent received fatal signal" (access violation) | kluni | FLUENT | 0 | April 29, 2010 14:16 |
Access violation - Help please | AlwaysLearning | FLUENT | 3 | August 22, 2006 13:21 |
Urgent! Access violation of UDF using VOF | Rucy | FLUENT | 0 | January 9, 2006 05:01 |