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

error on initializ

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2013, 07:58
Default error on initializ
  #1
Member
 
mehdimoradi
Join Date: Jun 2013
Posts: 53
Rep Power: 12
mehdimoradi. is on a distinguished road
Hello;
Recently I have been used below UDF(that exist in UDF manual) for definition of mass transfer in eulerian fram. udf interpreted and hooked successfully but when initializing appear followed error: Why???

/* UDF to define a simple mass transfer based on Saturation

Temperature. The "from" phase is the gas and the "to" phase is the
liquid phase */
#include "udf.h"
DEFINE_MASS_TRANSFER(liq_gas_source,cell,thread,fr om_index,from_species_index, to_index, to_species_index)
{
real m_lg;
real T_SAT = 373.15;
Thread *gas = THREAD_SUB_THREAD(thread, from_index);
Thread *liq = THREAD_SUB_THREAD(thread, to_index);
m_lg = 0.;
if (C_T(cell, liq) >= T_SAT)
{
m_lg = -0.1*C_VOF(cell,liq)*C_R(cell,liq)*
fabs(C_T(cell,liq)-T_SAT)/T_SAT;
}
if ((m_lg == 0. ) && (C_T(cell, gas) <= T_SAT))
{
m_lg = 0.1*C_VOF(cell,gas)*C_R(cell,gas)*
fabs(T_SAT-C_T(cell,gas))/T_SAT;
}
return (m_lg);
}

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
mehdimoradi. is offline   Reply With Quote

Old   December 15, 2013, 02:16
Default Same Problem
  #2
New Member
 
Shankar
Join Date: Dec 2013
Posts: 1
Rep Power: 0
Shankar41189 is on a distinguished road
I am facing the same problem. Were you able to solve that?
Shankar41189 is offline   Reply With Quote

Old   December 15, 2013, 04:47
Default
  #3
Senior Member
 
Join Date: Jan 2010
Location: Germany
Posts: 268
Rep Power: 17
Zaktatir is on a distinguished road
To hook a define mass macro you need to activate it through text user interface since the default one has become define linearzed mass transfer
Zaktatir 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



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