TAGGED: ansys-fluent, dynamic-mesh, profiles, udf-fluent
-
-
March 3, 2021 at 6:55 am
Lee
Subscriber Hi everyone,
 I encountered a problem when I was coding UDF.
Here is the background:
 Figure 1 presents the model I put in Fluent, inlet was set as pressure inlet and corresponding value, shown in Figure 2, was input by a profile document(because of inlet pressure consists of discrete points). I want to exert an external force F on the bottom surface to push the surface to move along axis y, and the force F can be calculated by inlet pressure, for example,
F=2*Pi*Ab ... (1)
Where Pi is inlet pressure, Ab is area of bottom surface.
 In UDF, we can use function to specify external force, such as external force command in macro DEFINE_SDOF_PROPERTIES(), or expected boundary condition, however, in my case, the load I want to exert on surface cannot be expressed by function, actually, it consists of numerous points.
My questions:
 1. how to collect the inlet pressure as my data source?
There are two ways, I guess, can realize this goal, but I don’t know how to do and I am not sure if my suppose is right.
 First method, reading the profile by UDF.
 Second method, getting the pressure directly from inlet by UDF, do not need to reading the profile once more.
 2. How to put the obtained data in function?
If both of these two methods can get the data, is it possible to set the obtained data as input(i.e. Pi) of equation (1) in UDF?
P.S. is there any relevant cases or references to be recommended, so I can educate myself?
Regards,
Excited
March 3, 2021 at 9:19 amAmine Ben Hadj Ali
Ansys EmployeeA transient table or profile can be used directly without UDF for the pressure input.nMarch 3, 2021 at 11:17 amYasserSelima
SubscriberThe example provided in the UDF manual for DEFINE_CG_MOTION , integrates the pressure on a body to calculate the pressure force. You can use the same , inside SDOF_PROPERTIES to calculate the pressure force nMarch 3, 2021 at 2:13 pmLee
SubscriberHi, thanks for your reply, I knew the profile can be used for pressure input for inlet boundary, but I am not sure if it can be used to exert a load force on the bottom surface to push it to move along y axis. In my case, I selected the bottom surface as the dynamic mesh zones, according to my understanding of your comment, I can use the profile to specify the load on bottom surface, and directly create the dynamic mesh zones, then, in simulation the bottom surface will be forced to move along y axis? am I right?nmy settings about dynamic mesh is shown in Figure 3nnFigure 3
March 3, 2021 at 2:29 pmLee
SubscriberHello,thanks for your suggestion, the thing is that I knew how to calculte force(the equation(1) in my post can help obtain force), but I do not know how to get the pressure(discrete points) in UDF, or in other words, how to use UDF to read profile containing pressure data or directly get pressure value in inlet boundary simutaneously? and then put the obtained data into function in UDF?nMarch 3, 2021 at 5:44 pmYasserSelima
SubscriberThe UDF does that. it gets the pressure in every cell around the body and multiply it by the area .... nMarch 3, 2021 at 5:46 pmYasserSelima
Subscriberplease note, the udf in the example needs to be parallelised. nMarch 3, 2021 at 6:21 pmAmine Ben Hadj Ali
Ansys EmployeePlease go with the cg motion udf in the manual. You need however to read the file with C and add an Interpolation routine. If you can translate the pressure directly into velocity again go with profile. nViewing 7 reply threads- The topic ‘UDF problem——How to get parameters of boundary condition in UDF?’ is closed to new replies.
Ansys Innovation SpaceTrending discussionsTop Contributors-
2878
-
970
-
852
-
599
-
591
Top Rated Tags© 2025 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.
-