-
-
May 21, 2024 at 2:25 pmsumeet94Subscriber
I want to calculate the liquid fraction for a specific domain using UDF at the end of each time step. So, I wrote a UDF, which is shown below.
To confirm whether it is providing the correct result or not, I also display the liquid fraction value of this domain using Fluent report definition. But, the above UDF gives me a very high value in return as shown below.Â
Can anyone please suggest what is wrong with the UDF?
Thank youÂ
-
May 21, 2024 at 2:55 pmRobForum Moderator
If you sum the liquid fraction in each cell why would you get the volume fraction or volume of liquid in the domain?Â
-
May 21, 2024 at 3:12 pm
-
May 22, 2024 at 11:25 amsumeet94Subscriber
I calculated the liquid fraction value for the PCM domain as the volume-weighted average liquid fraction, and it seems as if the results obtained from the UDF are almost correct. However, there is a difference between the liquid fraction value obtained from UDF and the Fluent Report definition, as can be observed from the data shown below.
Any idea why this difference is occurring? The modified UDF is given below.
-
May 22, 2024 at 12:56 pmRobForum Moderator
If you want the total volume of liquid, why are you working out volume fraction * cell volume then summing it and dividing that by the zone volume? Think carefully what you're doing.Â
-
May 22, 2024 at 2:03 pm
-
May 22, 2024 at 2:19 pmRobForum Moderator
Do you want the liquid fraction or liquid mass? Consider that Fluent will use the cell values, and not all cell volumes are equal.Â
-
May 22, 2024 at 3:11 pmsumeet94Subscriber
Sir, I want the value of the liquid fraction.Â
-
May 22, 2024 at 3:50 pmRobForum Moderator
Liquid fraction against domain volume total? Or against a specific zone? You may be better off finding the liquid volume (or mass) and calculating the fraction based on whatever volume you wish to define.Â
-
- You must be logged in to reply to this topic.
-
421
-
192
-
178
-
162
-
140
© 2024 Copyright ANSYS, Inc. All rights reserved.