1 / 21
文档名称:

udf.ppt

格式:ppt   大小:255KB   页数:21页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

udf.ppt

上传人:wangzhidaol 2017/2/19 文件大小:255 KB

下载得到文件列表

udf.ppt

相关文档

文档介绍

文档介绍:? Fluent Inc. 2017-2-20 G1 Fluent Software Training TRN-99-003 用户自定义函数 User Defined Functions ? Fluent Inc. 2017-2-20 G2 Fluent Software Training TRN-99-003 Introduction ? What is a User Defined Function? ? A UDF is a routine (programmed by the user) written in C which can be dynamically linked with the solver. ? Standard C functions ? ., trigonometric, exponential, control blocks, do-loops, file i/o, etc. ? Pre-Defined Macros ? Allows access to field variable, material property, and cell geometry data. ? Why build UDF ’ s? ? Standard interface cannot be programmed to anticipate all needs. ? Customization of boundary conditions, source terms, reaction rates, material properties, etc. ? Adjust functions (once per iteration) ? Solve for User Defined Scalars ? Solution Initialization ? Fluent Inc. 2017-2-20 G3 Fluent Software Training TRN-99-003 UDF Basics ? UDF ’ s assigns values (., boundary data, source terms) to individual cells and cell faces in boundary and fluid zones. ? In a UDF, zones are referred to as threads . ? A looping macro is used to access individual cells belonging to a thread. ? ., a face-loop macro visits 563 faces on face zone 3 (velocity-inlet). ? Position of each face is available to calculate and assign spatially varying properties. ? Thread and variable references are automatically passed to UDF when assigned to boundary in GUI. ? Values returned to the solver by UDFs must be in SI units. ? Fluent Inc. 2017-2-20 G4 Fluent Software Training TRN-99-003 Using UDFs in the Solvers ? The basic steps for using UDFs in FLUENT are as follows: STEP 1: Create a file containing the UDF source code STEP 2: Start the solver and read in your case/data files STEP 3: Interpret pile the UDF STEP 4: Assign the UDF to the appropriate variable and zone in BC panel. STEP 5: Set the UDF update frequency in the Iterate panel STEP 6: Run the calculation ? Fluent Inc. 2017-2-20 G5 Fluent Software Training TRN-99-003 Exa