前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >外部数据插值到fluent变量中

外部数据插值到fluent变量中

作者头像
周星星9527
发布2020-11-19 14:58:01
1.8K0
发布2020-11-19 14:58:01
举报

根据fluent的官方文档,插值文件格式说明:

3.19.2. Format of the Interpolation File

An example of an interpolation file is shown below:

代码语言:javascript
复制
 3 
 2
 34800 
 3
 x-velocity 
 pressure 
 y-velocity
 (-0.068062
 -0.0680413
 ... 

The format of the interpolation file is as follows:

  • The first line is the interpolation file version. It is 2 for files generated using ANSYS Fluent 12.0 through 14.0, 3 for text files generated using ANSYS Fluent 14.5, 4 for binary files generated using single precision ANSYS Fluent 14.5, and 5 for files generated using double precision ANSYS Fluent 14.5.
  • The second line is the dimension (2 or 3).
  • The third line is the total number of points.
  • The fourth line is the total number of fields (temperature, pressure, and so on) included.
  • Starting at the fifth line is a list of field names. To see a complete list of the field names used by ANSYS Fluent, enter the display/contour text command and view the available choices by pressing Enter at the contours of> prompt. The list depends on the models turned on.
  • After the field names is a section for each list of , , and (in 3D) coordinates for all the data points.
  • At the end is a section for each list of the field values at all the points in the same order as their names. The number of coordinate and field points should match the number given in line 3.
  • For version 3 interpolation files, the sections are bounded by “(” and “)”.
  • For version 4 and 5 interpolation files, the sections are bounded by “(” and “\nEnd of Binary Section 0)”.
  • The delimiters help skip a section if the associated model is not enabled. With version 2 interpolation files (where the delimiters do not exist), sections may not be skipped properly if the size of the field cannot be determined without enabling the associated model. This may result in incorrect interpolation of the subsequent field variables.

Important: An interpolation file written with ANSYS Fluent 14.5 and above is not readable in prior versions of ANSYS Fluent.

例如要将外部数据(速度和压力)插值导入到fluent中

根据文档说明,3D的数据格式如下,如速度和压力分布,则:

代码语言:javascript
复制
3
3
1990000
4
pressure
x-velocity
y-velocity
z-velocity
(
)
(
)
(
)
(
)
(
)
(
)
(
)

每对括号内放置数据,每行一个数据点,数据填充满后如下:

此时导入数据:

插值瞬间就搞定了,如果搞不定那是因为数据格式有误,一顿操作后,绘图如下:

这个格式和我十几年前用的fluent6.3格式好像不一样,那时候不需要括号的。

先不说了,广告时间又到了,现在植入广告:几个《传热学》相关的小程序总结如下,可在微信中点击体验:

  1. 有限元三角单元网格自动剖分
  2. Delaunay三角化初体验 (理论戳这)
  3. Contour等值线绘制 (理论戳这)
  4. 2D非稳态温度场有限元分析
  5. 1D稳态导热温度场求解 (源码戳这)
  6. 1D非稳态导热温度场求解程序 (源码戳这)
  7. 2D稳态导热温度场求解 (源码戳这)
  8. 普朗克黑体单色辐射力

《传热学》相关小程序演示动画如下(其中下图1D非稳态导热计算发散,调小时间步长后重新计算,结果收敛!):

黑体单色辐射力如下图,可见温度越高,同频率辐射力越大:

《(计算)流体力学》中的几个小程序,可在微信中点击体验:

  1. Blasius偏微分方程求解速度边界层理论这里
  2. 理想流体在管道中的有势流动源码戳这
  3. 涡量-流函数法求解顶驱方腔流动源码戳这
  4. SIMPLE算法求解顶驱方腔流动源码戳这
  5. Lattice Boltzmann Method计算绕流演示参考源码
  6. 流体力学实验在线演示进行演示

关于《(计算)流体力学》相关的几个小程序演示动画如下:

LBM(=Lattice Boltzmann Method)计算得到的圆柱绕流“卡门涡街”演示(由于网格较少,分辨率低,圆柱近乎正方形):

顺便,《(热工过程)自动控制》中关于PID控制器的仿真可点击此处体验:PID控制演示小程序,(PID控制相关视频见:基础/整定/重要补充)。动画如下:

(正文完!)

现将往期内容制成目录,内容如下:

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2020-11-13,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 传输过程数值模拟学习笔记 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云开发 CloudBase
云开发(Tencent CloudBase,TCB)是腾讯云提供的云原生一体化开发环境和工具平台,为200万+企业和开发者提供高可用、自动弹性扩缩的后端云服务,可用于云端一体化开发多种端应用(小程序、公众号、Web 应用等),避免了应用开发过程中繁琐的服务器搭建及运维,开发者可以专注于业务逻辑的实现,开发门槛更低,效率更高。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档