|
[Sponsors] |
March 21, 2022, 11:21 |
Using C_YI in define_mass_transfer
|
#1 |
New Member
Shaya
Join Date: Feb 2022
Location: USA
Posts: 4
Rep Power: 4 |
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 |
|
Tags |
fluent - udf, masstransfer, multiphase, udf |
|
|