TAGGED: #multiphase_models, 2D, fluent, udf
-
-
July 14, 2023 at 3:46 am
Eliah Cameron
Subscriber -
July 14, 2023 at 8:51 am
Atharva Nagarkar
SubscriberHello
I would suggest you to go through the different macros (such as DEFINE_) which are available in the Ansys Fluent UDF Manual. You will also be able to understand how to write the code for defining the UDFs, the appropriate structure and various available functions. The DEFINE_CG_MOTION could be a good fit for your application as it is used to specify the motion of a particular dynamic zone (object in your case) in Ansys Fluent by providing the linear and angular velocities at every time step. I have also shared a link of a similar discussion on the Ansys Forum related to implementation of UDF for an overset mesh case. Hope that helps!
Ansys UDF Manual: Part I: Creating and Using User Defined Functions (ansys.com)
DEFINE_CG_MOTION: 2.6. Dynamic Mesh DEFINE Macros (ansys.com) -> Check 2.6.1
Ansys Forum Post: UDF Implementation for overset mesh case (ansys.com)
If you are not able to access these links, please refer to this forum discussion: Using Help with links (ansys.com)
-
July 19, 2023 at 12:53 am
Eliah Cameron
Subscriber*Removed*
-
July 19, 2023 at 7:41 am
Rob
Ansys EmployeePlease post in a new thread.
-
-
-
July 14, 2023 at 10:37 am
Rob
Ansys EmployeeOne comment (other than to echo reading the books) is that you've written a 3d UDF - have a look at what the vel[3] bit means, I think you'll find vel[2] to be sufficient and remember C counts from 0 not 1.
-
July 20, 2023 at 12:04 am
Eliah Cameron
SubscriberThankyou, *New Thread*
I have some follow up questions/interests.
My workflow is based of the tutorial below (URL link) below,
http://oss.jishulink.com/caenet/forums/upload/2013/06/10/388/171655710203531.pdf
This tutorial comes with a UDF shown in the image below, From my understanding the ‘density’ and ‘speed of sound’ section of this UDF is used to track and update their changes due to the abrupt impact (This isn’t built in to fluent?), if this wasn’t implemented the density would retain the predefined value throughout the entirety of the impact.
The last section defines the motion of the object by defining its mass, I’m wanting to change this to linear motion.
I believe this should be simple but can’t get it working, I have tried mimicking the UDF in Ansys video below, (time 2:20). https://www.youtube.com/watch?v=BO2e9_njh5g
Below is the fluent console, don’t fully grasp the prompts.
-
July 20, 2023 at 8:02 am
Rob
Ansys EmployeeDensity & speed of sound. Former looks to be trying to make water density pressure dependent: never a good idea - read the Properties section in the manual. Speed of sound isn't computed by default, it's only needed for compressible flows.
The UDF warnings. Use the built in compiler, and see what happens.
-
-
July 22, 2023 at 12:11 am
Eliah Cameron
SubscriberThanks Rob, will look into it.
No luck with the built in compiler -
July 31, 2023 at 1:17 am
Eliah Cameron
SubscriberHaven’t had any luck, have moved on to expression/parameter input in the wall boundary conditions. You can apply a constant velocity here for the wall condition, is there a way to define an initial velocity and then gravity dictate the rest?
-
July 31, 2023 at 8:31 am
Rob
Ansys EmployeeThat's what the 6DOF functions are for - you can probably code that into Expressions based on the various laws & equations but you'd need to account for everything and I suspect Expressions will struggle.
-
- 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.
- 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
-
7658
-
4476
-
2957
-
1433
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.