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

Using C_YI in define_mass_transfer

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2022, 11:21
Default Using C_YI in define_mass_transfer
  #1
New Member
 
Shaya
Join Date: Feb 2022
Location: USA
Posts: 4
Rep Power: 4
fluentuser10000 is on a distinguished road
Hello,

I want to use a criteria in my UDf for mass transfer so that if the O2 concentration is more than saturation the mass transfer is zero other wise it uses a formula to calculate mass transfer, Can anyone tell me if what I am doing is correct?


real m_lg;

DEFINE_MASS_TRANSFER(kl_my2, cell, thread, from_index, from_species_index, to_index, to_species_index)
{

cell_t c;

Thread *liq= THREAD_SUB_THREAD(thread, to_index);


m_lg = 0.0;

if ( C_YI(c,liq,to_species_index) < 0.00009379)
{
m_lg = ((0.4)*0.0000443846*pow(C_D(c,thread)*C_R(c,liq)/C_MU_EFF(c,liq), 0.25));
}
else
{
m_lg= 0.0;
}
end

C_UDMI(c,thread,0)=m_lg;


return m_lg;
}


I get an error: undeclared variable for the part where I use C_YI, I do not know why?

Thanks,
St
fluentuser10000 is offline   Reply With Quote

Reply

Tags
fluent - udf, masstransfer, multiphase, udf


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 12:25.