March 21, 2022 at 3:46 pmmajamSubscriber
I want to use a conditional statement in my UDF for mass transfer so that if the O2 concentration is more than saturation the mass transfer is zero otherwise it uses a formula to calculate mass transfer, Can anyone tell me what I am doing is correct or not?
DEFINE_MASS_TRANSFER(kl_my2, cell, thread, from_index, from_species_index, to_index, to_species_index)
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));
I get an error: undeclared variable for the part where I use C_YI, I do not know why?
Thanks,March 22, 2022 at 12:14 pmMurari IyengarAnsys EmployeeHi Majam The syntax is incorrect for C_YI. It should be of the form C_YI (c,t,i) where i is the species mass fraction.
You can find more information on Cell Macros below.
3.2.3. Cell Macros (ansys.com)
March 22, 2022 at 12:31 pmDrAmineAnsys EmployeeI think it is best if you rather show what you want to do and which formula you want to use. Mass Fraction macro seems to be Okay (cc) but you are using the wrong cell index:
DEFINE_MASS_TRANSFER(kl_my2, cell, thread, from_index, from_species_index, to_index, to_species_index): cell index is cell. Moreover check if the to_phase is a multicomponent phase.
Moreover how are you "estimating" the saturation mass fraction?
March 23, 2022 at 7:58 ammajamSubscriber-hi
yes, thank you answers. I think the macro is fine now. But the results are still troubling.
Both from and two phases are multi-component. The from phase consists of O2,N2 and to phase is O2(liquid), glucose, biomass, and water.
I use henry's law and use this UDF for the overall mass transfer rate. Henry's law is supposed to take care of equilibrium but without this limiting condition that I mentioned in my first comment the dissolved O2 concentration increases to a very high amount (200 mg O2 !!!) so I need to define that mass transfer is allowed if the cell concentration is less than 8mg/l
-(or maybe I should define it for the overall concentration of O2 instead of cell???)
ThanksMarch 23, 2022 at 12:43 pmDrAmineAnsys EmployeeI cannot comment on results issuing from a UDF.
Viewing 4 reply threads
Ansys Innovation Space
- You must be logged in to reply to this topic.
Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.Trending discussions
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Difference between K-epsilon and K-omega Turbulence Model
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Suppress Fluent to open with GUI while performing in journal file
- Mesh Interfaces in ANSYS FLUENT
- Time Step Size and Courant Number
- error: Received signal SIGSEGV
© 2023 Copyright ANSYS, Inc. All rights reserved.Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.