-
-
December 19, 2019 at 5:54 pm
ansysuser
SubscriberHello,
I am running a simulation in Fluent and I need to use DEFINE_GRID_MOTION in my UDF. I want to be able to access some variables that are stored in an external file. I was able to make Fluent read the external file from within a UDF, but this is slow because Fluent passes the same nodes to the UDF many times during each time step and so all this IO is time-consuming. Is there a way to run one UDF to load some variables that are stored in an external file once at the beginning of the solution so that they are available when the UDF is called during the simulation?
So to be clear, I want to be able to load some variables (vectors) from an external file at initialization or during the first time step only, then have these variables available to the solver and the DEFINE_GRID_MOTION during all subsequent time steps so I am not constantly loading the variables for each time the solver calls the UDF. How can I accomplish this?
Thanks!
-
December 20, 2019 at 9:42 am
Rob
Ansys EmployeeYou may be able to use a DEFINE_ON_DEMAND or DEFINE_ADJUST and User Defined Memory. Not sure how that will work with the moving mesh though; won't the vectors change?
-
December 20, 2019 at 5:23 pm
ansysuser
SubscriberI was able to make it work by using the former. I tried to post solution yesterday but the site was down.
Thanks for confirming!
-
- 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.

Ansys Blog
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.
- 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
- Difference between K-epsilon and K-omega Turbulence Model
- The solver failed with a non-zero exit code of : 2
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error: Received signal SIGSEGV
-
5414
-
3389
-
2471
-
1310
-
1022
© 2023 Copyright ANSYS, Inc. All rights reserved.