FLUENT_UDF实例应用.ppt_第1页
FLUENT_UDF实例应用.ppt_第2页
FLUENT_UDF实例应用.ppt_第3页
FLUENT_UDF实例应用.ppt_第4页
FLUENT_UDF实例应用.ppt_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

udf的应用 user definedfunction 1 为什么要使用udf 一般来说 任何一种软件都不可能满足每一个人的要求 fluent也一样 其标准界面及功能并不能满足每个用户的需要 udf正是为解决这种问题而来 使用它我们可以编写代码满足不同用户的特殊需要 2 udf的功能 定义边界条件 定义材料属性 定义表面和体积反应率 定义fluent输运方程中的源项 用户自定义标量输运方程 uds 中的源项扩散函数等等 在每次迭代的基础上调节计算值方案的初始化 需要时 udf的异步执行后处理的改善fluent模型的改进 例如离散相模型 多项混合物 离散发射辐射模型 3 举一反三 define profile include udf h define profile pressure profile t i realx nd nd realy face tf begin f loop f t f centroid x f t y x 1 f profile f t i 1 1e5 y y 0745 0745 0 1e5 end f loop f t include udf h definepi4 atan 1 define profile x velocity thread position face tf begin f loop f thread realt rp get real flow time f profile f thread position 1 sin pi t end f loop f t include udf h define profile heatflux t i face tf realx reala 0 01 realg nd nd begin f loop f t f centroid g f t x g 0 f profile f t i a x end f loop f t 根据距离原点远近定义热流率 include udf h define profile heatflux t i face tf realr reala 0 01 realx nd nd y nd nd z nd nd begin f loop f t f centroid x f t y 0 0 0 y 1 0 0 y 2 0 0 nv vv z x y r nv mag z f profile f t i a r end f loop f t 4 综合编程 出口平均温度赋值给进口 include udf h realnv vec a realavg temp realsum t a 0 0 realsum a 0 0 thread thread out face tf domain domain define adjust adjust d domain get domain 1 thread out lookup thread domain 4 begin f loop f thread out f area a f thread out sum a nv mag a sum t a nv mag a f t f thread out end f loop f thread out avg temp sum t a sum a define profile inlet t t i begin f loop f t f profile f t i avg temp end f loop f t 对并行编程的展望 大部分单核可以运行的udf在并行下可以完美运行 不过在一些情况下就不行了 前面的综合编程就是一个很好的例子 readingandwritingfiles global

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论