Tech Tip – Fluent Profiles: A Text File as Your UDF

In an advanced software like ANSYS Fluent you often need to specify things in more detail than a constant value. Perhaps you have a radial velocity profile of fully developed flow at an inlet, a time history of mesh motion or an axially varying heat generation. You don’t need to dust off your C++ compiler, though, there is an easier way: profiles.

Say we want to apply the following x displacement over time to a mesh motion:

We can accomplish this with the following text file:

((foil 3 point)
 (time 0 1 5)
 (v_z 0 10 10))

Load it into Fluent with the File -> Read -> Profiles menu item and it can be selected like a UDF in the dropdown menu:



It’s that easy.

There are several ways to specify profiles in Fluent but some of the most common are:

A Radial Profile

((<profile_name> radial <n>)
 (r <r1> <r2> <r3> ... <r_n>)
 (<field name 1> <f1_1> <f1_2> <f1_3> <f1_n>)
 (<field name 2> <f2_1> <f2_2> <f2_3> <f2_n>)
 (<field name m> <fm_1> <fm_2> <fm_3> <fm_n>))

An Axial Profile

((<profile_name> axial <n>)
 (z <z1> <z2> <z3> ... <z_n>)
 (<field name 1> <f1_1> <f1_2> <f1_3> <f1_n>)
 (<field name 2> <f2_1> <f2_2> <f2_3> <f2_n>)
 (<field name m> <fm_1> <fm_2> <fm_3> <fm_n>))

A Transient Profile

((<profile_name> transient <n> <periodic? (1/0)>)
 (time <time1> <time2> <time3> ... <time_n>)
 (<field name 1> <f1_1> <f1_2> <f1_3> <f1_n>)
 (<field name 2> <f2_1> <f2_2> <f2_3> <f2_n>)
 (<field name m> <fm_1> <fm_2> <fm_3> <fm_n>))


The above are extremely convenient ways to specify spatially or time varying boundary conditions from analytical or empirical equations. You can easily generate these models with either a text editor or an Excel spreadsheet similar to the the pictured below (save as a tab separated text file)



If you open the Profiles Manager in Fluent, you can write more complex profiles from your solution data, orient profiles to a certain coordinate system and other such operations.


For more information on profiles in Fluent, check out the documentation section at Fluent -> User’s Guide -> Cell Zone and Boundary Conditions -> Profiles. Good luck on making your simulations more accurate!

If this was useful to you and you’d like to hear other ways to speed up your simulations contact us or subscribe to our newsletter below:


Subscribe to Newsletter

  • This field is for validation purposes and should be left unchanged.