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
Ansys EmployeeHello
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
Forum ModeratorPlease post in a new thread.
-
-
-
July 14, 2023 at 10:37 am
Rob
Forum ModeratorOne 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
Forum ModeratorDensity & 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
Forum ModeratorThat'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.
-
- The topic ‘Help, Fluent UDF For Linear Motion’ is closed to new replies.
-
3492
-
1057
-
1051
-
965
-
942
© 2025 Copyright ANSYS, Inc. All rights reserved.