文档库

最新最全的文档下载
当前位置:文档库 > fluent计算错误分析

fluent计算错误分析

1. FlUENT

1.1 求解方面

1.1.1 floating point error是什么意思?怎样避免它?

Floating point error已经提过很多次了并且也已经对它讨论了许多。下面是在Fluent论坛上的一些答案:

从数值计算方面看,计算机所执行的运算在计算机内是以浮点数(floating point number)来表示的。那些由于用户的非法数值计算或者所用计算机的限制所引起的错误称为floating point error。

1)非法运算:最简单的例子是使用Newton Raphson方法来求解f(x)=0的根时,如果执行第N次迭代时有,x=x(N),f’(x(N))=0,那么根据公式x(N+1)=x(N)-f(x(N))/ f’(x(N))进行下一次迭代时就会出现被0除的错误。

2)上溢或下溢:这种错误是数据太大或太小造成的,数据太大称为上溢,太小称为下溢。这样的数据在计算机中不能被处理器的算术运算单元进行计算。

3)舍入错误:当对数据进行舍入时,一些重的数字会被丢失并且不可再恢复。例如,如果对0.1进行舍入取整,得到的值为0,如果再对它又进行计算就会导致错误。

避免方法

计算和迭代我认为设一个比较小的时间步长会比较好的。或者改成小的欠松驰因子也会比较好。从我的经验来看,我把欠松驰因子设为默认值的1/3;降低欠松驰因子或使用耦合隐式求解;改变欠松驰因子,如果是非稳态问题可能是时间步长太大;改善solver-control-limits 比例或许会有帮助;你需要降低Courant数;如果仍然有错误,不选择compute from初始化求解域,然后单击init。再选择你想从哪个面初始化并迭代,这样应该会起作用。另外一个原因可能是courant数太大,就样就是说两次迭代之间的时间步太大并且计算结果变化也较大(残差高)。

网格问题当我开始缩放网格时就会发生这个错误。在Gambit中,所有的尺寸都是以mm 为单位,在fluent按scale按钮把它转换成m,然后迭代几百次时就会发生这种错误。但是当我不把网格缩放到m时,让它和在Gambit中一样,迭代就会成功;我认为你应当检查网格,你的网格数太多了,使用较少的网格问题就会解决;网格太多,计算机资源不够用,使使比较粗的网格。

边界条件在我的分析中,我设了一个wall边界条件来代迭axis边界条件,结果fluent拒绝计算并告诉我floating point error。你的边界条件不能代表真实的物理现象;错误的边界条件定义可能会导致floating point error。例如把内边界设成interior;一次我使用对称边界条件模拟2D区间时也遇到这种问题,我把symmetry设为axe symmetric,就发生了floating point error;检查你设的湍流参数,减小湍流强度,先进行50次迭代。

多处理器问题我近来在进行多处理器模拟时也遇到相似的问题。问题的解决方法是在单个处理器上运行,这样就运算得很好。

错误迭代以错误的条件来初始化,在开始迭代时就会发生floating point error。

1.1.2 coupled和segregated求解有什么区别?

Coupled会同时求解所有的方程(质量守恒方程、动量守恒方程和能量守恒方程)而不是单个方程求解(方程互相分离)。当速度和压力高度耦合(高压和高速)时应该使用耦合求解,但这样会需要较长的计算时间。

在耦合求解中,能量方程中总是包含组分扩散(Species Diffusion Term)项。

当使用segregated求解时,fluent允许指定固体材料的各项异性传导性。

求解方法主要根据要求解的模型来选择。Segregated方法是基于压力,而coupled求解是基于密度的。这样就使得segregated求解低速流动较好而coupled求解音速/超音速问题较好。我不推荐使用coupled求解所有低于马赫数4的流动(直到基于压力的coupled求解方法出现在下一个fluent版本中)。我曾经用segregated方法求解直到1.5马赫的问题,并且结果很好。但是速度越高,需要的网格就越多(因为segregated趋向于“平滑”波动),所以必须多加注意划分网格。

Coupled方法使用默认设置时往往是比较稳定的。Segregated方法常常对容许极根很敏感。当使用segregated方法求解时,不要提高turbulent viscosity ration limit(除非你根据过去的经验或者你的物理模型有很好的理由超过这个极限,但我从没有听说这样是比较理想的)。不要给压力和温度极限限定的合理的范围(例如Plimits=Pstatic+/-(2*dynamic pressure))来计算适当的温度。

你要每一个可能的错误都检查到。

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.