2011年12月3日星期六

UDF in fluent

http://www.youtube.com/watch?v=D-16riuSmrA

UDF in fluent
http://202.118.250.111:8080/fluent/Fluent60_help/html/udf/node15.htm
1.7 A Step-by-Step UDF Example

There are seven basic steps you should follow to code a UDF and use it effectively in your FLUENT model:

1.
Define your problem.
2.
Create a C source code file.
3.
Start FLUENT and read in or set up the case file.
4.
Compile or interpret the C source code.
5.
Activate the UDF in FLUENT.
6.
Run the calculation.
7.
Analyze the numerical solution and compare to expected results.
To begin the process, you'll need to define the problem you wish to solve using a UDF (Step 1). For example, suppose you want to use a UDF to define a customized boundary profile for your problem. You will first need to define the set of mathematical equation(s) that describe the profile.

Next you will need to translate the mathematical equations (conceptual design) into a function written in C (Step 2). You can do this using any text editor. Save the file with a .c suffix (e.g., velocity_profile.c) in your working directory.

Once you have written your C function, you are ready to start FLUENT and read in or set up your case file (Step 3). You will then need to interpret, compile, and debug your C source code (Step 4), and then activate your function in FLUENT (Step 5). Finally you'll run the calculation (Step 6), analyze the results from your simulation, and compare them to expected results (Step 7). You may loop through this entire process more than once, depending on the results of your analysis. Follow the step-by-step process in the sections below to see how this is done.

Step 1: Defining Your Problem

The first step in generating and using a UDF in your FLUENT model involves defining your model equations.

Consider the turbine vane illustrated in Figure 1.7.1. An unstructured grid is used to model the flow field surrounding the vane. The domain extends from a periodic boundary on the bottom to an identical one on the top, a velocity inlet on the left, and a pressure outlet on the right.

没有评论: