没有合适的资源?快使用搜索试试~ 我知道了~
首页ANSYS Fluent UDF 用户手册
ANSYS Fluent UDF 用户手册
需积分: 44 67 下载量 199 浏览量
更新于2023-03-16
评论 4
收藏 13.33MB PDF 举报
用户定义的功能允许您自定义ANSYS流体,并可以大大增强其能力。ANSYS FLUENT定制手册的第一部分详细介绍了如何在ANSYS FLUENT中编写、编译和使用udfs。如果有的话,也列举了一些例子。关于c编程基础的一般信息包含在附录中。
资源详情
资源评论
资源推荐
ANSYS Fluent Customization Manual
Release 17.0ANSYS, Inc.
January 2016Southpointe
2600 ANSYS Drive
Canonsburg, PA 15317
ANSYS, Inc. is
certified to ISO
9001:2008.
ansysinfo@ansys.com
http://www.ansys.com
(T) 724-746-3304
(F) 724-514-9494
Copyright and Trademark Information
© 2015 SAS IP, Inc. All rights reserved. Unauthorized use, distribution or duplication is prohibited.
ANSYS, ANSYS Workbench, Ansoft, AUTODYN, EKM, Engineering Knowledge Manager, CFX, FLUENT, HFSS, AIM
and any and all ANSYS, Inc. brand, product, service and feature names, logos and slogans are registered trademarks
or trademarks of ANSYS, Inc. or its subsidiaries in the United States or other countries. ICEM CFD is a trademark
used by ANSYS, Inc. under license. CFX is a trademark of Sony Corporation in Japan. All other brand, product,
service and feature names or trademarks are the property of their respective owners.
Disclaimer Notice
THIS ANSYS SOFTWARE PRODUCT AND PROGRAM DOCUMENTATION INCLUDE TRADE SECRETS AND ARE CONFID-
ENTIAL AND PROPRIETARY PRODUCTS OF ANSYS, INC., ITS SUBSIDIARIES, OR LICENSORS. The software products
and documentation are furnished by ANSYS, Inc., its subsidiaries, or affiliates under a software license agreement
that contains provisions concerning non-disclosure, copying, length and nature of use, compliance with exporting
laws, warranties, disclaimers, limitations of liability, and remedies, and other provisions. The software products
and documentation may be used, disclosed, transferred, or copied only in accordance with the terms and conditions
of that software license agreement.
ANSYS, Inc. is certified to ISO 9001:2008.
U.S. Government Rights
For U.S. Government users, except as specifically granted by the ANSYS, Inc. software license agreement, the use,
duplication, or disclosure by the United States Government is subject to restrictions stated in the ANSYS, Inc.
software license agreement and FAR 12.212 (for non-DOD licenses).
Third-Party Software
See the legal information in the product help files for the complete Legal Notice for ANSYS proprietary software
and third-party software. If you are unable to access the Legal Notice, Contact ANSYS, Inc.
Published in the U.S.A.
Table of Contents
Using This Manual ..................................................................................................................................... xxv
1.The Contents of This Manual ............................................................................................................. xxv
2.The Contents of the Fluent Manuals ................................................................................................ xxvii
3. Typographical Conventions ........................................................................................................... xxviii
4. Mathematical Conventions .............................................................................................................. xxxi
5.Technical Support ........................................................................................................................... xxxii
I. Creating and Using User Defined Functions ............................................................................................ 1
1. Overview of User-Defined Functions (UDFs) .................................................................................... 3
1.1. What is a User-Defined Function? ................................................................................................ 3
1.2. Limitations ................................................................................................................................. 4
1.3. Defining Your UDF Using DEFINE Macros ................................................................................... 4
1.3.1. Including the udf.h Header File in Your Source File ........................................................... 5
1.4. Interpreting and Compiling UDFs ................................................................................................ 6
1.4.1. Compiled UDFs .................................................................................................................. 6
1.4.2. Interpreted UDFs ............................................................................................................... 6
1.4.3. Differences Between Interpreted and Compiled UDFs ......................................................... 6
1.5. Hooking UDFs to Your ANSYS Fluent Model ................................................................................. 7
1.6. Mesh Terminology ...................................................................................................................... 8
1.7. Data Types in ANSYS Fluent ......................................................................................................... 9
1.8. UDF Calling Sequence in the Solution Process ........................................................................... 11
1.8.1. Pressure-Based Segregated Solver .................................................................................... 11
1.8.2. Pressure-Based Coupled Solver ......................................................................................... 12
1.8.3. Density-Based Solver ........................................................................................................ 13
1.9. Special Considerations for Multiphase UDFs .............................................................................. 14
1.9.1. Multiphase-specific Data Types ......................................................................................... 14
2. DEFINE Macros ............................................................................................................................... 17
2.1. Introduction ............................................................................................................................. 17
2.2. General Purpose DEFINE Macros ............................................................................................. 17
2.2.1. DEFINE_ADJUST ........................................................................................................... 18
2.2.1.1. Description ............................................................................................................. 18
2.2.1.2. Usage ...................................................................................................................... 19
2.2.1.3. Example 1 ............................................................................................................... 19
2.2.1.4. Example 2 ............................................................................................................... 20
2.2.1.5. Hooking an Adjust UDF to ANSYS Fluent .................................................................. 20
2.2.2. DEFINE_DELTAT ........................................................................................................... 20
2.2.2.1. Description ............................................................................................................. 20
2.2.2.2. Usage ...................................................................................................................... 20
2.2.2.3. Example .................................................................................................................. 21
2.2.2.4. Hooking an Adaptive Time Step UDF to ANSYS Fluent .............................................. 21
2.2.3. DEFINE_EXECUTE_AT_END .......................................................................................... 21
2.2.3.1. Description ............................................................................................................. 21
2.2.3.2. Usage ...................................................................................................................... 22
2.2.3.3. Example .................................................................................................................. 22
2.2.3.4. Hooking an Execute-at-End UDF to ANSYS Fluent ..................................................... 22
2.2.4. DEFINE_EXECUTE_AT_EXIT ....................................................................................... 23
2.2.4.1. Description ............................................................................................................. 23
2.2.4.2. Usage ...................................................................................................................... 23
2.2.4.3. Hooking an Execute-at-Exit UDF to ANSYS Fluent ..................................................... 23
2.2.5. DEFINE_EXECUTE_FROM_GUI ..................................................................................... 23
2.2.5.1. Description ............................................................................................................. 23
iii
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
2.2.5.2. Usage ...................................................................................................................... 23
2.2.5.3. Example .................................................................................................................. 24
2.2.5.4. Hooking an Execute From GUI UDF to ANSYS Fluent ................................................. 25
2.2.6. DEFINE_EXECUTE_ON_LOADING ................................................................................. 25
2.2.6.1. Description ............................................................................................................. 25
2.2.6.2. Usage ...................................................................................................................... 25
2.2.6.3. Example 1 ............................................................................................................... 25
2.2.6.4. Example 2 ............................................................................................................... 26
2.2.6.5. Hooking an Execute On Loading UDF to ANSYS Fluent ............................................. 27
2.2.7. DEFINE_EXECUTE_AFTER_CASE/DATA ...................................................................... 27
2.2.7.1. Description ............................................................................................................. 27
2.2.7.2. Usage ...................................................................................................................... 27
2.2.7.3. Example .................................................................................................................. 28
2.2.7.4. Hooking an Execute After Reading Case and Data File UDF to ANSYS Fluent .............. 28
2.2.8. DEFINE_INIT ................................................................................................................ 28
2.2.8.1. Description ............................................................................................................. 28
2.2.8.2. Usage ...................................................................................................................... 28
2.2.8.3. Example .................................................................................................................. 29
2.2.8.4. Hooking an Initialization UDF to ANSYS Fluent ......................................................... 29
2.2.9. DEFINE_ON_DEMAND ..................................................................................................... 29
2.2.9.1. Description ............................................................................................................. 29
2.2.9.2. Usage ...................................................................................................................... 30
2.2.9.3. Example .................................................................................................................. 30
2.2.9.4. Hooking an On-Demand UDF to ANSYS Fluent ......................................................... 31
2.2.10. DEFINE_OUTPUT_PARAMETER ................................................................................... 31
2.2.10.1. Description ............................................................................................................ 31
2.2.10.2. Usage .................................................................................................................... 31
2.2.10.3. Example ................................................................................................................ 32
2.2.10.4. Hooking an Output Parameter UDF to ANSYS Fluent .............................................. 32
2.2.11. DEFINE_RW_FILE ....................................................................................................... 33
2.2.11.1. Description ............................................................................................................ 33
2.2.11.2. Usage .................................................................................................................... 33
2.2.11.3. Example ................................................................................................................ 33
2.2.11.4. Hooking a Read/Write Case or Data File UDF to ANSYS Fluent ................................. 34
2.2.12. DEFINE_RW_HDF_FILE .............................................................................................. 34
2.2.12.1. Description ............................................................................................................ 34
2.2.12.2. Usage .................................................................................................................... 34
2.2.12.3. Helper Functions ................................................................................................... 34
2.2.12.4. Examples ............................................................................................................... 39
2.2.12.5. Hooking a Read/Write HDF Case or Data File UDF to ANSYS Fluent .......................... 40
2.3. Model-Specific DEFINE Macros ................................................................................................ 40
2.3.1. DEFINE_ANISOTROPIC_CONDUCTIVITY .................................................................... 47
2.3.1.1. Description ............................................................................................................. 47
2.3.1.2. Usage ...................................................................................................................... 47
2.3.1.3. Example .................................................................................................................. 48
2.3.1.4. Hooking an Anisotropic Conductivity UDF to ANSYS Fluent ...................................... 49
2.3.2. DEFINE_CHEM_STEP ..................................................................................................... 49
2.3.2.1. Description ............................................................................................................. 49
2.3.2.2. Usage ...................................................................................................................... 49
2.3.2.3. Example .................................................................................................................. 50
2.3.2.4. Hooking a Chemistry Step UDF to ANSYS Fluent ....................................................... 50
2.3.3. DEFINE_CPHI ................................................................................................................ 50
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.iv
Customization Manual
2.3.3.1. Description ............................................................................................................. 50
2.3.3.2. Usage ...................................................................................................................... 51
2.3.3.3. Hooking a Mixing Constant UDF to ANSYS Fluent ..................................................... 51
2.3.4. DEFINE_DIFFUSIVITY ................................................................................................ 51
2.3.4.1. Description ............................................................................................................. 51
2.3.4.2. Usage ...................................................................................................................... 51
2.3.4.3. Example .................................................................................................................. 52
2.3.4.4. Hooking a Diffusivity UDF to ANSYS Fluent .............................................................. 52
2.3.5. DEFINE_DOM_DIFFUSE_REFLECTIVITY .................................................................... 52
2.3.5.1. Description ............................................................................................................. 52
2.3.5.2. Usage ...................................................................................................................... 53
2.3.5.3. Example .................................................................................................................. 53
2.3.5.4. Hooking a Discrete Ordinates Model (DOM) Diffuse Reflectivity UDF to ANSYS Flu-
ent ..................................................................................................................................... 54
2.3.6. DEFINE_DOM_SOURCE .................................................................................................. 54
2.3.6.1. Description ............................................................................................................. 54
2.3.6.2. Usage ...................................................................................................................... 54
2.3.6.3. Example .................................................................................................................. 55
2.3.6.4. Hooking a DOM Source UDF to ANSYS Fluent ........................................................... 55
2.3.7. DEFINE_DOM_SPECULAR_REFLECTIVITY ................................................................. 55
2.3.7.1. Description ............................................................................................................. 55
2.3.7.2. Usage ...................................................................................................................... 56
2.3.7.3. Example .................................................................................................................. 57
2.3.7.4. Hooking a Discrete Ordinates Model (DOM) Specular Reflectivity UDF to ANSYS Flu-
ent ..................................................................................................................................... 57
2.3.8. DEFINE_ECFM_SOURCE ................................................................................................ 57
2.3.8.1. Description ............................................................................................................. 57
2.3.8.2. Usage ...................................................................................................................... 57
2.3.8.3. Example .................................................................................................................. 58
2.3.8.4. Hooking an ECFM Flame Density Area Source UDF to ANSYS Fluent .......................... 58
2.3.9. DEFINE_ECFM_SPARK_SOURCE ................................................................................... 59
2.3.9.1. Description ............................................................................................................. 59
2.3.9.2. Usage ...................................................................................................................... 59
2.3.9.3. Example .................................................................................................................. 59
2.3.9.4. Hooking an ECFM Spark Source UDF to ANSYS Fluent ............................................... 60
2.3.10. DEFINE_EC_RATE ....................................................................................................... 60
2.3.10.1. Description ............................................................................................................ 60
2.3.10.2. Usage .................................................................................................................... 60
2.3.10.3. Example - Electrochemical Reaction Rate Using UDF .............................................. 61
2.3.10.4. Hooking an Electrochemical Reaction Rate UDF to ANSYS Fluent ............................ 61
2.3.11. DEFINE_EMISSIVITY_WEIGHTING_FACTOR ........................................................... 62
2.3.11.1. Description ............................................................................................................ 62
2.3.11.2. Usage .................................................................................................................... 62
2.3.11.3. Example ................................................................................................................ 62
2.3.11.4. Hooking an Emissivity Weighting Factor UDF to ANSYS Fluent ................................ 63
2.3.12. DEFINE_FLAMELET_PARAMETERS ............................................................................. 63
2.3.12.1. Description ............................................................................................................ 63
2.3.12.2. Usage .................................................................................................................... 63
2.3.12.3. Example ................................................................................................................ 64
2.3.12.4. Hooking a Flamelet Parameters UDF to ANSYS Fluent ............................................. 64
2.3.13. DEFINE_ZONE_MOTION .............................................................................................. 65
2.3.13.1. Description ............................................................................................................ 65
v
Release 17.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Customization Manual
剩余695页未读,继续阅读
唐宋元明清2586
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 2022年中国足球球迷营销价值报告.pdf
- 房地产培训 -营销总每天在干嘛.pptx
- 黄色简约实用介绍_汇报PPT模板.pptx
- 嵌入式系统原理及应用:第三章 ARM编程简介_3.pdf
- 多媒体应用系统.pptx
- 黄灰配色简约设计精美大气商务汇报PPT模板.pptx
- 用matlab绘制差分方程Z变换-反变换-zplane-residuez-tf2zp-zp2tf-tf2sos-sos2tf-幅相频谱等等.docx
- 网络营销策略-网络营销团队的建立.docx
- 电子商务示范企业申请报告.doc
- 淡雅灰低面风背景完整框架创业商业计划书PPT模板.pptx
- 计算模型与算法技术:10-Iterative Improvement.ppt
- 计算模型与算法技术:9-Greedy Technique.ppt
- 计算模型与算法技术:6-Transform-and-Conquer.ppt
- 云服务安全风险分析研究.pdf
- 软件工程笔记(完整版).doc
- 电子商务网项目实例规划书.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0