Tagged: along-particular-direction, loop, udf-fluent
February 4, 2022 at 10:56 pmdatouSubscriber
Hello, I am facing a big challenge when I use DEFINE_ADJUST. I want to use a "if" condition to compare the temperature to find out the maximum temperature for fixed "x" coordinates. Specifically,
for y=y1, the UDF looping along x direction to find out the maximum temperature t1;
for y=y2, the UDF looping along x direction again to find out the maximum temperature t2;
all the domain will be looped, and finally I will get the max. temperature distribution along y axis.
I have thought over this question for a long time. Could you give me some suggestions how to realize this function? Thank you very much. I appreciate your help.February 7, 2022 at 5:04 pmRobAnsys EmployeeWhy do you want to use a UDF? A line (or rake) in Fluent reporting the maximum value will return the number you're after.
February 7, 2022 at 5:23 pmDrAmineAnsys EmployeeYou know you can do that in Fluent and you can even access what you do in UDF. I will always avoid using UDF whenever it is possible.
February 8, 2022 at 9:30 amdatouSubscriberDear Rob and dear DrAmine, thank you very much for your comments. However, as I mentioned above, I want to use the maximum value (for every fixed x) as a condition for every time step. The specific application is shown in the attached figure: there three types of gas interface:
bulk gas-powder interface
enclosed gas-powder interface
enclosed gas-solid wall interface
I want to loop the multiphase zone to find out 1. bulk gas-powder interface, where I give a source there. for the other twos, no source terms will be added. My idea is to loop every fixed coordinate (fixed x, y) of interface coordinate, and then find out the max. fixed x/y , which is the value I really want. Could you give me some suggestions? Thank you again for your kind help. I am looking forward to your reply.
February 8, 2022 at 9:47 amRobAnsys EmployeeWhat are you trying to do? If it's a sintering type process you may want to look at volume fraction and wall adjacent cells. We're very limited in how much advice we can give, especially in the physics sense.
February 8, 2022 at 9:59 amdatouSubscriberDear Rob, thanks for your fast reply.
It is a laser melting process. but it does not matter what the process is.
As referred to the figure, how can I only get the top interface (bulk gas-powder interface), rather than the other twos. I try to use loop inside a DEFINE_SOURCE, but the computational load is really heavy. I don't like that.
I wonder, is there a loop macro which loops only along a fixed direction? Or, do you have some experience for this kind of loop? thank you very much
February 8, 2022 at 11:10 amRobAnsys EmployeeAre you modelling the powder via Eulerian Granular models? IF statements within DEFINE_SOURCE aren't that costly so shouldn't be an issue. As Fluent is an unstructured solver directional loops won't work well as you'd need to tell the loop where the next cell was and that will get expensive.
February 8, 2022 at 11:15 amdatouSubscriberI am working with VOF model. I used c_face_loop embedded in DEFINE_SOURCE, I am not sure if it works ok?
February 8, 2022 at 11:16 amRobAnsys EmployeeHow are you including the gaps between the particles? Or are you patching spheres of VOF into the domain?
February 8, 2022 at 11:18 amdatouSubscriberI used UDF to initialize the particle distribution, yes, patching the vof
February 8, 2022 at 12:11 pmRobAnsys EmployeeOK, and did you use the solidification & melting model?
February 8, 2022 at 12:15 pmdatouSubscriberYes, I used the solidification and melting model, coupled with vof.
February 8, 2022 at 2:41 pmDrAmineAnsys EmployeeDo you want to start from a wall you maximum search along Y-directions so X-directions are something like Ray's parallel to X-axis?
February 10, 2022 at 8:18 amdatouSubscriberHello DrAmine, thanks for your reply. Yes, I want to do such a search, so in the following "if" statement, I can use the results.
February 10, 2022 at 9:37 amDrAmineAnsys EmployeeThen a lot of coding is required.
February 10, 2022 at 9:40 amdatouSubscriberCould you briefly introduce the general idea of coding structure? I appreciate your help.
February 10, 2022 at 9:56 amDrAmineAnsys EmployeeYou can start from the wall loop over its faces, get normal direction from there you start searching along this direction using some steps / distance to verify if you are now in a new cell if yes you get the value you want and then do a line average.
Viewing 16 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
- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
Top Rated Tags
© 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.