August 15, 2023 at 2:42 amDing HCSubscriber
Hello everyone, I have a question regarding the usage of a User-Defined Function (UDF) to define the interphase heat transfer coefficient for the Eulerian model (Two-Fluids Model,TFM) within ANSYS FLUENT. I'm wondering whether the UDF should return the heat transfer coefficient 'h' (measured in W/m²K) directly, or if it should return the product of the heat transfer coefficient 'h' and the interface area 'Ai' (measured in 1/m). Additionally, I have a few minor questions to ask:
I've developed a UDF based on the Ranz-Marshall correlation to compute the interphase heat transfer coefficient between the liquid phase and the interface. However, the computed results differ from those obtained using FLUENT's internal Ranz-Marshall correlation. I'm seeking insights into the potential reasons for this disparity.
Concerning the correlation itself, should the 'Pr' value in the correlation refer to the Prandtl number of the gas phase? I came across this information in the FLUENT Theory Guide, but I'm uncertain about its accuracy.
Here is the UDF code I have written:
DEFINE_EXCHANGE_PROPERTY(htc_1, c, mixthread, pi1, pi2)
Thread* liqthread, * vapthread;
real Nu, h, h_eff, Re, Pr, vel,d,k,cp,mu,Ai;
liqthread = THREAD_SUB_THREAD(mixthread, pi1);
vapthread = THREAD_SUB_THREAD(mixthread, pi2);
d = C_PHASE_DIAMETER(c, vapthread);
k = C_K_L(c, vapthread);
cp = C_CP(c, vapthread);
mu = C_MU_L(c, vapthread);
Pr = (cp * mu) / k;
NV_DD(v, =, C_U(c, liqthread), C_V(c, liqthread), C_W(c, liqthread), -, C_U(c, vapthread), C_V(c, vapthread), C_W(c, vapthread));
vel = NV_MAG(v);
Re = (C_R(c, liqthread) * vel * d) / (C_MU_L(c, liqthread));
Nu = 2.0 + 0.6 * pow(Re, 0.5) * pow(Pr, 1. / 3.);
h = C_K_L(c, liqthread) * Nu / d;
Ai = 6.0 * C_VOF(c, vapthread) / d;
h_eff = h * Ai;
August 16, 2023 at 12:01 pmAtharva NagarkarSubscriber
Please refer to the UDF Manual for detailed explanation on the DEFINE_EXCHANGE_PROPERTY macro. I have attached the link below for your reference. Check section 2.4.3 as well as example 3 (section 126.96.36.199) which is related to your topic. As per the manual, the UDF will need to return the real value of the effective heat transfer coefficient to the solver. So, if the quantity being modeled by your UDF depends on the interfacial area, your UDF should return the coefficient multiplied by the interfacial area.
As per the Fluent Theory Guide, for the Ranz-Marshall model, the relative Reynolds number is based on the diameter of one phase which is liquid in your case. The Prandtl number is defined for the other phase which must be gas. Please check the section 188.8.131.52.3 of the Theory guide, the link of which is given below.
If you are not able to access the links, please refer to this forum discussion: Using Help with links (ansys.com)
August 16, 2023 at 12:34 pmDing HCSubscriber
Thank you very much！
Let me confirm once again that the User-Defined Function (UDF) needs to provide the actual volumetric heat transfer coefficient in units of W/m²*K. This coefficient should be calculated using the properties of the gas to define the Prandtl number.
This information is mentioned in both the theoretical manual and the UDF manual. However, I've noticed a discrepancy between this information and the heat transfer coefficient UDF example provided in the UDF manual. So, I would like to verify this once again for clarity.
In the example 184.108.40.206 provided in the UDF manual, the returned heat transfer coefficient is multiplied by the interface area density. However, according to the definitions and descriptions given earlier, the expected return value should be the true, unmodified heat transfer coefficient. Does this mean that there is an error in the provided example? Below is a screenshot of the code from the example.
August 16, 2023 at 12:47 pmAtharva NagarkarSubscriber
Please check my earlier post for clarification. It says that "The UDF will need to return the real value of the effective heat transfer coefficient to the solver. So, if the quantity being modeled by your UDF depends on the interfacial area, your UDF should return the coefficient multiplied by the interfacial area."
This is why in the example, the returned value is multiplied by the interface area.
August 16, 2023 at 1:02 pmDing HCSubscriber
Thank you for your reply！
This means that in the UDF definition for the phase interaction of heat transfer coefficient, what I need to return is the effective heat transfer coefficient, which is the product of the volumetric heat transfer coefficient and the interface area. Instead of the Single volumetric heat transfer coefficient introduced and mentioned in the manual earlier, right?
- 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.
- 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.