Fluent UDF Tutorial.
Fluent UDF Tutorial.
Fluent UDF Tutorial.
An airfoil in a free shear layer (a wake, or due to the stratification of the atmosphere).
Design the inlet conditions for this case. Then apply this inlet condition for a computation of an airfoil
(you can use your coursework airfoil, but don’t include today’s work into the coursework report).
U =10m/s, y=0
dU/dy = 1m/s /12.5m
In the Interpreted UDFs panel , select the UDF source file(s) you want to interpret by either
typing the complete path in the Source File Name field or use the browser.
In the Interpreted UDFs panel, specify the C preprocessor to be used in the CPP Command
Name field. You can keep the default cpp or you can select Use Contributed CPP to use the
preprocessor supplied by Fluent Inc.
Keep the default Stack Size setting of 10000, unless the number of local variables in your
function will cause the stack to overflow. In this case, set the Stack Size to a number that is
greater than the number of local variables used.
Keep the Display Assembly Listing option on if you want a listing of assembly language
code to appear in your console window when the function interprets. This option will be saved
in your case file, so that when you read the case in a subsequent FLUENT session, the
assembly code will be automatically displayed.
!! Note that if your compilation is unsuccessful, then FLUENT will report an error and you
will need to debug your program.
Close the Interpreted UDFs panel when the interpreter has finished.
Write the case file if you want the interpreted function(s) (e.g., inlet_x_velocity) to be
saved with the case, and automatically interpreted when the case is subsequently read. If the
Display Assembly Listing option was chosen, then the assembly code will appear in the
console window.
To hook the UDF to FLUENT as the velocity boundary condition for the zone of choice, open the
Velocity Inlet panel .
Run the Fluent solver and compare the results with those imposing constant velocity at inlet.
(OK, for your convenience, this is the final UDF file for defining u & v at the inlet BCs,
http://www.soton.ac.uk/~zxie/SESS6021/Airfoil/UDF/uvinlet_tut2.c)