找回密码
 注册
查看: 2550|回复: 19

[求助]为什么我用LBM算出来的速度那么小?

[复制链接]
发表于 2005-3-7 10:02:23 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
用LBM计算自然对流,ra=10e3,速度都是很小的,跟前人的结果相比,流场图吻合,但数值相差好大,正确的是3.几,而我的是0.几,为什么会出现这种情况,程序里面求速度用的是
                    u=(f1+f5+f8-f3-f6-f7)/density
                    v=(f2+f5+f6-f4-f7-f8)/density
应该是差一个什么系数之类的,但具体不知道哪里出的问题?如果是除以一个参考速度,在自然对流里面,参考速度是多少,是sqrt(g*bita*delta_T*H)吗?
 楼主| 发表于 2005-3-13 23:04:25 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

这里没有人搞LBM吗?
发表于 2005-9-13 00:19:31 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

The reason that your velocity is too small is that the reference velocity is the speed of sound which is one in terms of lattice units. If Reynolds numbers are same (or other group numbers are same), the flow fields should be same. The absolute values do not have so much meanings since references are different.
发表于 2005-9-21 16:02:12 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

[这个贴子最后由lien在 2005/09/21 04:10pm 第 2 次编辑]

D3Q19,32X32X32网格,unit为1,tao取为20。对了,我用求f^eq的公式来初始化inlet,其中的rho和初值速度分别设为1和0.001,算得的速度值为0.4几,且我改变初值速度到10这个量级,算的速度为1.几。觉得不太对劲。
俺不是搞流体力学的,好多概念都不太明白,汗~~~
发表于 2005-9-24 05:58:43 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

the velocity value should be smaller than 0.1 everywhere in the flow field in terms of the speed of sound which is one. Otherwise the compressible error can be very large.
发表于 2005-9-25 21:34:49 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

侠客didu,你的回帖似乎只有概念非常清楚明白(至少跟你一样明白)的人才能看懂啊。
我这种似乎是:看了还不如不看。唉,真实打击~~~
发表于 2005-9-27 02:01:33 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

I don';t know what level you are on right now. Did you do some fundamental simulations, like channel flow, lid-driven cavity and flow over circular cylinder? if so, you could get the insights of lbe. The error behaviors of lbe is pretty complicated, which includes truncation error, boundary condition error. If you read He and Lou';s papers (1997 on PRE), you would know why the velocities could not be too large.
发表于 2005-9-27 20:36:23 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

[这个贴子最后由lien在 2005/09/27 09:00pm 第 1 次编辑]

我把我的问题写了个文档,请大家看看,也敬请didu看看,谢谢~~~!
可能有好多地方描述的不是很清楚,大家回个帖子给说说,,,
发表于 2005-9-27 20:38:35 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

这是两个视频文件,,
发表于 2005-9-27 23:22:50 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

Your code is not very readable. The steps in the time loop are
1. collision
2. streaming (propagation)
3. update boundary condition
4. calculate velocity and density
发表于 2005-9-28 10:00:38 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

[这个贴子最后由lien在 2005/09/28 10:05am 第 1 次编辑]
下面引用由didu2005/09/27 11:22pm 发表的内容:
Your code is not very readable. The steps in the time loop are
1. collision
2. streaming (propagation)
3. update boundary condition
4. calculate velocity and density
didu,你好,我没有把全部的源代码写入文档,我采用的是c++语言。整个流程的确就是跟你说的步骤一样,我这里只是把各个功能函数描述了一下。
我的collision和steaming写在一个函数里面,就是updateLBE(),相应的代码就是:
m_df1[il][in] = m_df0[il][ilink] - rtao * ( m_df0[il][ilink] - calEq(m_v[0][ilink], m_v[1][ilink], m_v[2][ilink], m_den[ilink], il) );
这句话实现了f(x+ei,t+1) = f(x,t) - 1/tao * [f(x,t)-f^eq],
至于update boundary,我这里对5个固体边界面,采用bounce back方法,
// bounce back the fraction value to the opposite direction
// m_df1[il][in] = m_df0[ill][in]; // ill 为il的反方向
还有calculate velocity and density,就是我这里的updateVelDen(...)函数。
发表于 2005-9-28 10:33:57 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

或许写出我的时间迭代循环更清楚一些:
void simulate()
{
    for (int i=0; i<MAX_STEPS; i++)
    {
        // collision, streaming and update boundary condition
        updateLBE();
        // calculate the velocity field and density field
        updateVelDen(m_df0, m_v, m_den);
        // 输出速度场m_v和密度场m_den,
        ...
    }
}
发表于 2005-9-28 12:02:01 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

再帖个视频的,这个是速度场。每个速度矢量的方向用一个箭头表示,矢量的大小箭头头部的颜色表示,纯黄色过渡到白色,表示速度值从小到大,

发表于 2005-9-29 11:05:44 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

i realized that the tau is 20 which is too large, try tau around 1.
Besides this, you can take a test first, like doing a channel flow or lid-driven cavity flow to exam your code. Otherwise you could not know where could have problems in the code.
I don';t understand c++ since i just use fortune. so could not help u to debug.
发表于 2005-10-2 10:39:28 | 显示全部楼层

[求助]为什么我用LBM算出来的速度那么小?

[这个贴子最后由lien在 2005/10/02 10:41am 第 1 次编辑]

把代码放在这里,不是叫大家来帮我debug,只是觉得lbm本身算法很清晰,就这样贴几个关键的函数,觉得大家应该还是很容易看明白的,即使没有用过c++。语言这东西,很多地方都是相通的~,
tau我取过1左右的值,但是速度场就不稳定了,我想可能是无量纲化之类的问题导致的,但不知道该怎么修改,唉。
不过可以在求解域中放置一个球看看~~流场怎么样
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表