Fluent中的小技巧.doc_第1页
Fluent中的小技巧.doc_第2页
Fluent中的小技巧.doc_第3页
Fluent中的小技巧.doc_第4页
Fluent中的小技巧.doc_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

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

文档简介

Fluent批量计算/109738967.html对于工程应用来说,计算精度要求不高,但是计算的case比较多,尤其模型优化工作,你可能有几十个case要算。一个case只需要计算个把钟头,对于周末的大好时光来说,两天时间只能算一个,实在是浪费时间。经过一番研究,找到了解决方法。基本原理是使用fluent的journal文件,你要写一个journal文件,命名为1.journal在fluent 的file/write/start journal,选择文件名1.journal后,fluent就还是记录你的操作到1.jouranl中,你操作完成后,file/write/stop journal,用记事本打开看看就知道了。来一个我写好的journal文件,其作用是读取已有的case and data,计算,保存计算结果。内容如下:(cx-gui-do cx-activate-item MenuBar*ReadSubMenu*Case & Data.)(cx-gui-do cx-set-text-entry Select File*Text lzzmn.cas)(cx-gui-do cx-activate-item Select File*OK)(cx-gui-do cx-activate-item MenuBar*SolveMenu*Iterate.)(cx-gui-do cx-set-integer-entryIterate*Table1*Frame2(Iteration)*Table2(Iteration)*IntegerEntry1(Number ofIterations) 2000)(cx-gui-do cx-activate-item MenuBar*SolveMenu*Iterate.)(cx-gui-do cx-activate-item Iterate*PanelButtons*PushButton1(OK)(cx-gui-do cx-activate-item MenuBar*WriteSubMenu*Case & Data.)(cx-gui-do cx-set-text-entry Select File*Text lzzmn.cas )(cx-gui-do cx-activate-item Select File*OK)(cx-gui-do cx-activate-item Warning*OK)为方便使用,注释集中写在下面:打开 read case and data对话框;选择文件“lzzmn.cas”,这个文件改成你的文件;点击选择文件对话框的确定;打开iterate 对话框;设置number of iterations 为2000,在你的case中没有对iterate apply过,这里默认的是1,因此在这个文件中我又设置了一次计算步数;激活iterate 对话框;点击iterate,开始运算,这就开始工作啦,直到运算结束(满足你设置的残差要求或者达到了2000步);打开保存case and data对话框;选择保存的文件名“lzzmn.cas”,换成你自己的;点击确定;由于前后两次使用的文件名一致,会跳出一个对话框警告是否覆盖,点击ok;如果你两次的对话框选择的文件名不一致,就不会警告你要不要覆盖,那么这一行就没有了;至此完成了一个case的读取,计算,保存;把上述过程再重复一次,其中读取、保存的文件换成你的第二个case,那么就进行第二个case的读取计算保存了。你有n个,那么copy n次以上内容,更改读取、保存的文件名字在同一个journal文件中,比如文件名为1.journal。简单方法:如果你case都是2维的,或者都是3维的,那就简单了。首先,你把所有的case都设置好,并进行简单的计算,以确保你的case是收敛的。注意在iterate对话框中 number ofiterations中输入合理的数值后记得Apply一下,否则这个数值不能记录到case中,那么以后你读入的case文件只计算一步,保存好case and data文件。打开对应版本的fluent,可以是单机的,可以是联网的;File/read/journal,选择你journal文件即可。命令行:如果你的case会有维数的变化,那么你写一个bat文件即可。用记事本写如下内容,命名为1.bat, linux可以写shell脚本,对后缀没有要求:fluent 2d -g -i g -i 11.journalfluent 3d -g -i g -i 12.journalfluent 2ddp -g -i g -i 13.journalfluent 3ddp -g -i g -i 14.journal上述是打开了四个不同的fluent,2d 2ddp 3d 3ddp,而journal文件11 12 13 14分别对应读取二维 三维的case data文件。只要你的case 收敛,你的case文件足够多,你就可以让你的电脑周末两天一点也没的休息了等值线图、矢量图、流线图、云图、直方图和XY散点图/youyihaikuo/blog/item/26b8997fbac3991429388a1c.html2011-10-29 9:48等值线是在所指定的表面上通过若干个点的连线,在这条线上的变量(如压力)为定值。在二维或三维空间上,将横坐标取为空间长度或时间历程,将纵坐标取为某一物理量,然后用光滑曲线获取面在坐标系内绘制出某一物理量沿空间或时间的变化情况。等值线图是在物理区域上由同一变量的多条等值线组成的图形,即用不同颜色的线条表示相等物理量。等值线图包含线条图形和云图两种,云图是使用渲染的方式,将流场某个截面上的物理量用连续变化的颜色块表示其分布。用户可以确定要显示哪个变量的等值线,可确定显示哪个面上的值,还可以指定要显示的等值线的取值范围。矢量图:矢量图是直接给出二维或三维空间里矢量(如速度)的方向和大小。速度矢量图是反映速度变化、旋涡、回流等的有效手段,是流场分析最常用的图谱之一。在默认情况下,矢量在每个网格单元的中心绘制,用箭头表示矢量的方向,用箭头的长度和颜色表示矢量的大小。用户可以选择指定要显示哪个表面的速度矢量,可以决定显示哪种速度(绝对速度或相对速度),也可以决定根据什么变量(如温度值、湍动能等)的值来决定颜色。流线图:是用不同颜色线条表示质点运动轨迹,将计算域内无质量粒子的流动情况可视化。用户可指定粒子从哪个表面上释放出来。Fluent允许用户从解的结果、data文件、残差数据中提取数据,来生成直方图与XY散点图。并且允许用户虚拟地定义任何变量或函数。直方图是由数据条所组成的图形。直方图的横坐标是所希望的解的量(如密度),纵坐标是单元总数的百分比。使用Plot/Histogram命令,打开Solution Histogram对话框,设置直方图的内容及坐标轴。XY散点图是由一系列离散的数据构成的线或符号图表。可以根据当前流场的解创建XY散点图,也可以从外部数据文件中取数据来创建XY散点图。如何将fluent计算出的图形导入到tecplot中?/forum-viewthread-tid-41457-extra-ordertype-2.html在fluent菜单中 点击FileExport :在File Type 列表中选中Tecplot; 在surface列表中选中所有部分;Function to Write列表中选中 所需要的然后单击Write 命名 单击OK;数据文件输出了。然后双击Tecplot快捷方式打开。选择File-LOad data file 打开文件导入即可。请问:fluent里面老出现的错误Error:Floating point error: invalid number是什么原因引起的啊?如何通过更改设置解决这一错误啊?/html/200907/1443937.html 我以前也出现过几次这样的error,把网格好好改改就好了。我的模型比较简单,现在可以全都用六面体来划分了。不知道你的模型能适用不。想下面是我以前搜到的一些东西,希望能对你有帮助。What does floating point error mean? How can I avoid it? The floating point error has been reported many times and discussed a lot. Here are some of the answers found in the Fluent Forum: From numerical computation view point , the basic operations performed by computer are represented inside computer in what is called floating point numbers. The errors that are either because of invalid numeric computation initiated by user or limitation of machine that is used are floating point errors. 1)Invalid Operations:- Simplest example is if one uses Newton Raphson root finding method to solve f(x)=0 and for some Nth iteration if we get x = x(N) such that derivative of function f(x), f;(x(N)=0 then formula for calculating next iterate x(N+1) = x(N) - f(x(N)/f;(x(N) requires division by f;(x(N) which is zero. Here you get divide by zero type of floating point error. 2) Over or Underflow:- Another type is having data with either too large or too small magnitude called ;overflow; or ;underflow; respectively.Such data cannot be physically represented on computer for direct processing by arithmetic processing part of Processor. 3) Rounding off errors :- While rounding off a decimal number , some significant digits are lost which cannot be recovered . e.g. if we round off 0.1 to integer (not greater than it called ;floor; of the given no.) then it is zero. If this value if further used for computation then it may lead to several errors. SOLVER AND ITERATION -I think if you set shorter time step, it may be good. Or changing little Under-Relaxiation-Factors, it may be good. In my experience, I set 1/3 Under-Relaxiation-Factors as default.? -?also lower the values of under relaxation factor and use the coupled implicit solver? -?Try to change under-relaxation factors and if it is unsteady problem maybe time step is to large.? -?you can improve the ratio in the solve-control-limits, maybe that can help.? -?you will need to decrease the Courant number? -?If you still get the error, initialize the domain with nothing to ;Compute from.; Then click ;init;. Again select the surface from which you want to compute the initial values & iterate. This should work.? -?Another reason could be a to high courant number - that means, that the steps between two iterations are too large and the change in the results is too large as well (high residuals)? GRID PROBLEMS -?this error comes when I start scaling grid. in gambit, all my dimension is in mm, when in fluent i convert it in meter using buttone SCALE. after it, when i iterate, about hundred iteration, this error appeared. but when i not scale my drawing to m.and let it be as in gambit.then the iteration is success. -?hi I think you should check your mesh grid mesh is very high. your problem solve by selection a low mesh.? -?Your mesh is so heavy that your computers resources are not enough. try to use coarser mesh.? BOUNDARY CONDITIONS -?In my case I had set a wall boundary condition instead of an axis boundary condition and then FLuent refuses to calculate telling me ;floating point error;.? -?Your Boudary Conditions do not represent real physis.? -?wrong boundary condition definition might cause the floating point error. For example setting an internal boundary as interior? -?Once I had the problem, simulating a 2D chamber with a symmetry BC. I set the symmetry somewhere as ?axe symmetric? and the floating point error occur? -?check the turbulence parameter you set. reduce the turbulence intensity to less that one for first, say 50 iterations. MULTI PROCESSOR ISSUES -I;ve had similar problems recently with floating point errors on a multi processor simulation. The solution for my problem seems to be to run on a single processor, where it runs fine.? WRONG INITIATION - Initiating the case with wrong conditions may lead to floating point error when the iterations start. 我试了 还是没有解决其实湍流粘性比受限制这个问题很常见,我分析出现这个原因主要有两个:1:源项或者方程边界设置有错误Error: Floating point error: invalid number Error Object: ()这个问题就是比较通俗的随之而来的错误,其实就是我们常说的溢出,分为上溢出和下溢出,这个不是调整solve-limit-viscosity ratio可以解决的,具体形成原因在FAQ中有比较详细的说明。当边界条件设置不合理,如动量方程源项很大(出现异常的局部速度等等),不合理的边界处理等,或者某些情况下的亚松弛因子过大也会导致出现溢出。之所以谈到溢出这个问题,最后是为了说明在修改solve-limit-viscosity ,不可盲目,默认值一般是最佳值。一些情况下,手动修改湍流方程进行计算的时候,也会导致这一问题。2:湍流边界条件的不合理这个就是最常见的原因,也是FAQ中的解释。边界及初值选择合适的湍流强度和湍流尺度,或者合适和K或者E,对收敛起着非常重要的作用。给定的参数不合理,就会有湍流粘性比受限制的警告,具体怎么设置,可以参见FLUENT的湍流模拟的HELP,有详细的步骤。原因: 数据矩阵求解过程中出现的问题。方法:1、检查网格质量。2、检查边界条件和初始条件。3、对问题进行深入分析,对比模拟情况与真实情况之间的差距。fluent算例中结果数据的读取小技巧/bbs/showtopic-1092.aspx经常我们计算出来的CAS/DAT文件,进行压力场或者速度场显示后,想得到其具体数据大小时候,我们常将鼠标右键点在云图(矢量图)窗口,可以出来对应数据,并且可以在FLUENT文本框中显示数值,但是这个数字是一个区域范围,就是两个数字之间来显示,在图形框中也是显示这个颜色对应的数据范围。后来摸索着将体进行sweep face切一个面,再在iso-surface里面将这个面切下,两个面相交形成一条线,点击线上,在Fluent的文本区会出来一个数值,好像觉得就是具体数值了,后来通过尝试和观察发现,这个数值是按区域的下临界给出的数值,也是不准确的,例如压力(900,1000),这时显示数值就是900,虽然可以通过调整阶段数来增加分辨率,但是颜色区分数最多为100,所以显示其实还是范围。所以在需要比较高的精度读取数据的时候,经常导入到tecplot里面来读取。因为我那个问题主要是考虑轴截面上压力数值,经常采用导入轴截面的DAT文件到Tecplot,然后采用在轴截面上找近似点的方法找出需要点的压力,里面有点的坐标可以看到这个点是不是所要找的点,如果导入线的数据,会出现采用探针查数值时,总是提示你点的位置在区域之外,很难找到对应线上。另外,以前经常采用在Fluent里面画XY压力曲线,显示这条线上的压力分布,现在觉得这个曲线对应的数值可能也是个近似数值,并且Plot出来的线很粗,对应在坐标上找数值点时候误差也比较大,可能在需要一定数值精度的情况下,还是采用

温馨提示

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

评论

0/150

提交评论