看到了 GitHub 给每个用户生成了基于 2020 提交历史的 stl 文件,然后就试了试自己的。
我的阻力系数是 4.633370e-01。
计算 case 在这里:https://github.com/randomwangran/randomwangran/tree/main/my-skyline
你的阻力系数是多少?
看到了 GitHub 给每个用户生成了基于 2020 提交历史的 stl 文件,然后就试了试自己的。
我的阻力系数是 4.633370e-01。
计算 case 在这里:https://github.com/randomwangran/randomwangran/tree/main/my-skyline
你的阻力系数是多少?
跑了一个虹吸的模拟,挺有意思的,能模拟一些生活中的流体现象。
https://github.com/randomwangran/capillary-will-rise
以把重力翻过来的话,就和楼主的模拟比较接近了。
Sorry I had hard time to type Chinese.
Thanks for sharing this. Your finding is consistent with what I've
read this in Wilcox's book (P98).
In free shear flow, k-epsilon model is unaffected by the numerical
value of $k$ and $\epsilon$, but k-omega is very sensitive to the
choice of $\omega$.
But the book does not provide any suggestions on how to achieve mesh
independence on k-omega model.
Speaking to mesh independence study. The idea is simple: refining the
mesh at the region with high gradient. In reality, it depends on
researchers to define where are these regions. Even in the simple
context like flow over a circular cylinder. Different people choose
different types of the computational domain, different strategies to
generate the mesh, different parameters to build the block.
There are something I would investigate:
Wilcox, D. C., & others, (1998). Turbulence modeling for cfd. : DCW
industries La Canada, CA.
@波流力 非常感谢,我放在了这个仓库中,会做进一步步的研究,有值得分享的我会回来盖楼的.
求 St 的方法有很多,比如对阻力或者升力系数 fft,或者在wake区域对某个参考点速度检测,然后在垂直于来流方向做fft。需要注意的是对Cd做fft所得的St应该是对Cl的两倍才对.
还在,:).
时间离散对结果影响大吗,还有Crank-Nicolson后面的系数应该怎么取?
Please see: https://cfd-china.com/topic/3834/分享-openfoam不同离散格式的简单研究
感谢楼主分享,这些数据会让大家少走很多弯路.
我有一个想法,不知楼主能否分享这个工做中 OpenFOAM 的一个算例文件?
后来的人可以基于楼主研究,进一步研究相关问题.比如,在网格质量比较差情的况下,会有怎么样的影响.或者计算效率之类的.
可以先用谷歌代替:
site:https://cfd-china.com/ pisoFoam
深感这三年的付出如同泡沫一般付诸东流,自己无论怎么折腾都只是在瞎蹦跶。
可是,写过的每一行代码,读过的每一本书,推过的每个一个公式,都是你的啊。
国外的世界诚然宽阔,可是不及你心中的世界。
胡思乱想的时候,跑跑步吧,刷 500 圈 400 米跑道;游 500圈 25 米的泳池;骑 500 公里的山路,之后,
我发现,哪怕平平淡淡的生活,都是无比幸福的。
上次算到step2的中心差分的50.5s处,说可能会阻力又下降。
建议楼主定一个准则.比如计算了 N 个 Vortex Shedding 周.之后又计算了 2N 个周期,然后比较一下所感兴趣的物理量.
那之后我把它继续算到了59.5s,然后速度对流项的linear换到了
limitedLinear。把结果贴上来一下。
不清楚楼主研究的重点是?层主个人来说,是很好奇, linear -> limitedLinear 的区别.
整体看起来的话,三个阶段的定量CdCl差距不是很大。和文献也对的比较上。
初 步认定是速度对流项选择了迎风格式造成的。跟之前的猜想有关,在55s处残
差的Uy震荡明显,造成了Cd上升,Cl振幅也增大. 换成limitedLinear 0.5 之后,
可以发现残差有明显的下降。
不知楼主有没有对这些格式的比较?
UDS 对网格要求更高.
"Peaks or rapid variations in the variables will be smeared out and,
because the rate of error reduction is only first order,
very fine grids are required to obtain accurate solutions."
楼主还可以探索一下这些:
@random_ran 是否可以回答前面的问题,虽然P的量级并没有发生变化。但是Uz
的曲线震荡明显(相比中心差分),猜想可能是由于TVD 里头那个0.5造成的,
混入了一部分迎风格式,造成耗散?
我没法准确回答你,因为我自己没有太多探索过.
我这样中途切换差分格式是否ok?
为什么不可以?如果是研究格式的问题,我可能也会这么做,省很多时间.但是如果是分析流体机理,最好从头开始用一种固定格式.
今天才把case文件整理了一下,下一步找合适的网格.
@东岳 岳兄过奖了.
@hoversoar 今天才整理了一下你的 case.
乃有新发现的话留言在这,大家都能看到,或者帮助你,我只能尽力,还是要靠氖自己的.
@hoversoar 台兄过奖了。我只是好奇罢了。自己玩的很杂,可是遇到能一起玩的,实在不易,所以慢慢来。我在找 of 的脚本,自动生成。最好简单可控,小 mesh 大家可以互相交流,大 mesh 大家自己留着做研究就好。
楼主 mesh 太大了,我把设置文件拷贝下来,打算用很小的脚本来生成圆柱网格.
这样的话,别人可以更方便地帮助你.
我们就可以一起讨论了.
Uz太抢眼了。
不知道坐标系是如何定义?
我看了下之前算的几个例子,发现p的残差几乎都在0.001这个量级。
非常有意思的问题,我之前没怎么考虑过 压力 残差的取值问题。我也好好思考一下。
不知道怎么才能继续降下去?
减小时间步长?提高收敛准则?或者优化网格形态?...
我一开始尝试增加到10个nOuterCorrectors, 发现第4~5个外循环开始残差下降不明显甚至开始上升,No Iteration也几乎为0。 为了节省时间所以设定到5。
我之前也一直在用 piso, 不过是默认值,没有动,我得好好看看 piso 算法再来回答你的问题。
现在这边的例子是光滑圆柱,如果要算看看很高兴分享。(how)
我记得论坛里有人分享过 *.zip 包含算例和运行脚本,简单点的办法就是做相同的事情
稍微难一点的是可以把楼主的 case 文件,在层主的 compute 仓库下 caseIdoNotUnderstand
然后我们一起来 hack.
前排小板凳,
附上现在1w雷诺数的光滑圆柱绕流的例子的某个时间步的截图,用of里头的monitor监控的residual,我也一直很困惑Uz的曲线不像稳定的样子。
为什么关注点再 U_z 不在 残差最大的 p 上投入精力?
我现在把2个nOuterCorrectors由2提高到5(从31秒开始),算个十秒左右看看结果。
这样做的原因是? 为什么是从2到5?而不是其他的数字,比如7?
目前的时间步库朗数是控制在1.5以下。
这个十秒计算过之后,我会把速度对流格式换成中心差分继续跑看看结果是否有改善,到时候再过来更新!
这个是 case 是机密么?如果能简单运行,我也想试试你的 case.
Re 估算是 10,不知道高雷诺数效果怎么样。
一篇文章,一直对 Deep Learning 很好奇,这篇文章讨论了一些实现办法:https://arxiv.org/pdf/2002.10558.pdf
欢迎大家交流。
The dynamic viscosity is µ = 5×10−3kg/(m · s) and the density is ρ = 1kg/m
U_max equals to 0.5 m
Diameter = 0.1 m
看到有人讨论圆柱绕流就很激动。
可是我已经挖了太多坑还没填。关注中,加油。
为什么应力张量有9个分量,张量是对一点来说的还是面?对流体微元或控制体而言,不同面上的张量一样吗?
这种问题,或许会让人不开心.我很感兴趣,记录在了我的笔记本上,愿意与你讨论: https://github.com/randomwangran/computing/blob/master/m/talk.org
A video to show flow around circular cylinder in real life:
https://youtu.be/0ThQ_nD97hY?t=306
If you will the whole paper itself would be served as a validation
purpose.
@article{MALIZIA2019103988,
title = "CFD simulations of spoked wheel aerodynamics in cycling: Impact of computational parameters",
journal = "Journal of Wind Engineering and Industrial Aerodynamics",
volume = "194",
pages = "103988",
year = "2019",
issn = "0167-6105",
doi = "https://doi.org/10.1016/j.jweia.2019.103988",
url = "http://www.sciencedirect.com/science/article/pii/S0167610519305884",
author = "F. Malizia and H. Montazeri and B. Blocken",
keywords = "Cycling aerodynamics, Cycling spoked wheel, CFD analysis, Computational grid, Rotation modeling, Turbulence modeling",
abstract = "Spoked wheels are commonly used in cycling races and their aerodynamic performance is a critical factor in the overall cycling performance, as the wheels can be responsible for about 10% of the total cyclist-bicycle drag. Although several computational fluid dynamics (CFD) simulations have been carried out for wheel aerodynamics in the past decades, it is still not clear to which extent the outcome of such simulations is sensitive to the computational parameters set by the user. The present paper aims at defining a framework for CFD simulations of an isolated spoked wheel by a systematic sensitivity analysis focused on the computational grid, wheel rotation modeling and turbulence modeling. The results show: (i) a high sensitivity to the wheel surface grid, y+ (<4) and far-field growth rate (≤1.15); (ii) the wheel rotational approaches with moving reference frame (MRF) and hybrid MRF-RW (RW = rotating wall approach) can provide a satisfactory agreement with wind tunnel data available in the literature (+9.7% and −2.1% deviations, respectively); (iii) k-ω SST, γ-SST or realizable k-ε are suitable as turbulence models. This work is intended to stimulate the accurate and reliable application of CFD for the assessment and optimization of wheel aerodynamics."
}
(Sorry, I don't have chinese input right now)
I once had the exactly same issue!
Check my thesis Chapter 6.3 :
https://scholar.uwindsor.ca/cgi/viewcontent.cgi?article=8585&context=etd
I wrote a paper in this: https://ascelibrary.org/doi/pdf/10.1061/9780784415153.ch06
Figure 2 is the original plate. (Sorry due to copy-right reason, I cannot put it here.)
In my thesis, I had to open the plate with some holes in ICEM. So, I maual dig out the block out of the computation domain.
It's really a painful process.
But it works!
This is the original plate:
This is after the "dig":
@cfd20
我看到一个比较关键的地方:
我觉得,墙函数是非常关键的边界条件。 特别是在 RANS 中。
我看到你对 alphat, epsilon 都用了墙函数,速度为什么不用,没有理由?
有确定边界层节点足够覆盖边界层了么?
我这有个参考资料:
ansys 17 手册:
The thickness of the prism
layer should be designed to ensure that around 15 or more nodes are actually covering the boundary
layer. This can be checked after a solution is obtained, by looking at the turbulent viscosity, which has
a maximum in the middle of the boundary layer – this maximum gives an indication of the thickness
of the boundary layer
我对 OF 理解也不是特别深。特别是你这里还有多相流的问题,求解器我也是从来没用过的。
我只能从非常有限的角度去解读,或许能帮助到你,但不能保证你能解决问题。最终还是要靠你自己的。
今天晚上,我来好好研究一下。
Sorry, I don't have chinese input this moment.
总感觉openFOAM里面的cyclic边界有问题?
Can you provide your test case?
I did not see any report (cyclic precision issue) in OpenFOAM bug report website.
I create a new case to study it if you interested in.
Comment anything as you will.
初步看了一下,很多地方我不太明白,都记录在了 comments 里面. FYI.
楼主回答了 nut 能不能进一步再讨论一下 nuTilda 的设置呢?
为什么摩托车算例里的 nuTilda 在 inlet, outlet, 以及 internalField 的初
始条件设置是 0.05?这样的设置是来源于:nuTilda < nut/10 么 (参考资料1)?
那么 nut 的估计既然是 0, 为何 nuTilda 的估计却是, 0.05, 这样一个非零的
估计? 如果 nuTilda 的取值是为了保持数值计算的稳定,为什么不取 0.04 或
者其他的很小的数? 0.05 只是单纯的一个比较小的数么?
另外 nuTilda 初值在 outlet 的设置也稍有不一样: 为什么用 inletOutlet
这个条件?而不是 fixedValue,calculated, 或者是 zeroGradient?
参考资料
术语来源:
有很多模形来简化 NS 方程。 比如 RANS 和 LES。
楼主 Eq 1.7 计算 nut 是基于 k–ε (RANS 中的一个)。
问题是楼主对 nuTilda 的计算依赖了 k–ε 中对 nut 的定义。 而 RANS 问题的核心是寻找 nut 的方程,让时均 NS 方程组封闭。
SA 模形中有自己对 nut 的猜想。
楼主怎样解释这样混用的合理性呢?
一般介绍简谐振动的书上都会有这部分的介绍。
最理想的情况,弹簧振子做无外力无阻尼运动,就只和弹簧刚度 k 和物体质量有关。
稍微接近现实一点的考虑:也就是把摩擦力考虑到控制方程中,就会出现阻尼系数这一项。
一般情况下,大家发现物体受力是和速度呈正比的。所以就引入了 c 这个概念。
升力系数 0.4-0.6
Re 10000 圆柱绕流的流场特征应该还在亚临界区域内。时均 Cl 应该是0才对。我觉得楼主说得是升力系数的波动值 fluctuating lift force(Cl'), 你看实验中的数据都有很大的不确定性。用3D网格,正交网格,效果会好很多。
M. M. Zdravkovich, “Flow around circular cylinders vol. 1: Fundamentals,” (Oxford University Press, New York, 1997).
@白礼耕 “”应该只是报警不是报错。
时间好久了,当时好像用到的命令:
mpiexec --mca mpi_warn_on_fork 0 -n 288 pisoFoam -parallel > 0-pisoFoam_LES_288_${PBS_JOBID}.out
最明显的区别是 kEqn 的 Ck 是 0.094 而 dynamicKEqn 则是速度场做了过滤。
+ //-kEqn Ck_
+ //-kEqn (
+ //-kEqn dimensioned<scalar>::lookupOrAddToDict
+ //-kEqn (
+ //-kEqn "Ck",
+ //-kEqn this->coeffDict_,
+ //-kEqn 0.094
+ //-kEqn )
+ //-kEqn )
+
+
+ //-dynamicKEqn const volScalarField Ck
+ //-dynamicKEqn (
+ //-dynamicKEqn simpleFilter_(0.5*(LL && MM))
+ //-dynamicKEqn /(
+ //-dynamicKEqn simpleFilter_(magSqr(MM))
+ //-dynamicKEqn + dimensionedScalar("small", sqr(MM.dimensions()), vSmall)
+ //-dynamicKEqn )
+ //-dynamicKEqn );
turbulentInlet
,考虑到 Re 的数量及;我有做过类似敏感性的测试,发现均值参数受影响不大。 我用的应该是 one equation eddy-viscosity model
不是 dynmaic kEqn
,我曾尝试过用 dynamic k-eqn 子网格,也出现了负 Cd 的情况。
我是把计算域从方形改成了圆形之后,Cd 就再也没出现过了。 相对于矩形计算域,圆形计算域的控制参量要少很多。本来临界雷诺数下,流场性质就非常受微小波动的影响,所以要尽可能减少无关因素的影响。
如果你的计算资源不够, 可以试试 DES 家族 (DDES,IDDES)。
参考资料: Cheng W, Pullin DI, Samtaney R, Zhang W, Gao W. 2017. Large-eddy simulation of flow over a cylinder with from to : a skin-friction perspective. J. Fluid Mech. 820:121–58
是不是我审题不对?有什么不一样的地方么?
图 2 3 很赞!
祝 CFD-china 越来越好。
@东岳 谢谢东岳老师的分享。
我想补充一点:
开源软件虽然是大多数人都听过的,但实际上更准确的说法是自由软件(FOSS )。这是 OF 官网的自我介绍:
OpenFOAM is the leading free, open source software for computational fluid dynamics (CFD), owned by the OpenFOAM Foundation and distributed exclusively under the General Public Licence (GPL).
两个术语:"开源"和"自由"的区别:wiki 上有这样的解释。
@quotation
People sometimes ask me if it is a sin in the Church of Emacs to use
vi. Using a free version of vi is not a sin; it is a penance. So happy
hacking.
@author Richard Stallman
@end quotation
fvScalarMatrix TEqn
(
fvm::ddt(T)
+ fvm::div(phi, T)
- fvm::laplacian(alphaEff, T)
==
radiation->ST(rhoCpRef, T)
+ fvOptions ( t)
);
去掉这个
==
radiation->ST(rhoCpRef, T)
+ fvOptions ( t)
个人觉得,楼主提供的数值算例是对这个修改过方程的解, 但是这样的修改,能否在一定精度内代表真实的物理现象呢?
太棒了! 我运行了楼主写的 hotWater 求解器。
我从运行结果上看,似乎是温度和期望值不同? 时间点为 50 的时候, 我发现温度的 contour 比较合理,热水上升。
但是下边界层温度的梯度是不是太大了?即便在 300 秒后,从 温度的 contour 上看,依旧是非常明显的分层。 个人觉得温度应该从下自上缓慢过度才对?
到模拟结束的时候,我发现全场的温度都稳定在了 27 (温度是 K?),确实是和想象中不一样。
楼主有没有试过用原来的求解器做相同的算列?结果怎么样呢?
w3 创立之初就是本着:
Tim Berners-Lee, w3 发起者之一,入是说:
@timberners_lee
30 Nov 2018
More
The open web is #ForEveryone to exercise their freedom of expression. It is a creator’s ally. Let's make sure it stays that way.
诸如像 Facebook ( Wechat 只是更进一步) 作为对 w3 精神的一种独特解释,RMS 对其一直炮轰不止。
越来越多的人,发现了这个问题。
比如像: 谢益辉的技术吐c*:
微信最可恶的地方在于它倾向于把人锁在手机上,我看不出有任何技术性的理由(硬件?软件?)要把人硬锁在手机上,只能揣测手机端是微信的招财猫,只有在手机端才有暴利可图。不然为什么那么多功能在电脑端都没有?历史消息不同步,查找也麻烦得要死,给公众号文章留个言,非得在手机上戳戳戳戳半天(当然,可以在电脑键盘上打好了复制到手机,再从手机复制过去,就问你香不香菇)。
再比如像 : Cal Newport 的观点:
My commentary on social media has traditionally deployed a narrow focus on the individual: this is how social media is harming you, and here is what you can do to avoid these harms.
好的,我再仔细研究研究 这个 LABEL_SIZE 的东西。有新的进展我再贴在这里。
(话说你的博客好赞啊!超喜欢这种风格。不知道是否接受 OF 热心读者的问题呢?直接留言在 Disqus 好还是在这里发帖,博主会看见呢?)
恩,我觉得最便宜的组合就是买个 树莓派 (200块人民币?),然后 build OF,写算例文件,然后用
"华为云12核24g三块八一小时。同配置用了阿里云的张家口服务器,算一个半小时总共花了一毛七"
超级便宜哈。
因为我几次遇到过在网络上由于这种潜在规则的问题的不明了导致的一些不必要的麻烦,所以谨慎点应该的。看来之后的交流会更加便捷 :)
The reason why I checked polyModifyFace
was that I wanted to study
the piece of code in:
//Line 82
//~OpenFOAM-dev/src/dynamicMesh/polyTopoChange/polyTopoChange/modifyObject/polyModifyPoint.H [wrong!]
///OpenFOAM-dev/applications/utilities/mesh/manipulation/createPatch/createPatch.C [correct]
meshMod.setAction
(
polyModifyFace
(
mesh.faces()[faceID], // face
faceID, // face ID
mesh.faceOwner()[faceID], // owner
-1, // neighbour
false, // flip flux
patchID, // patch ID
false, // remove from zone
zoneID, // zone ID
zoneFlip // zone flip
)
);
I don't know the reason why it crash, that's why I am asking.
return autoPtr<topoAction>(new polyModifyFace(*this));
Do you know how this function could trigger the following exception:
terminate called after throwing an instance of 'std::bad_array_new_length'
what(): std::bad_array_new_length
I don't know.
thanks for helping. This test case was built Jul 06 2018
,
so I am not sure the exactly envirmental varibles that I was playing with.
I've double checked the:
echo $WM_LABEL_SIZE
32
It looks like a right direction to further study this stuff. But, it
needs more time, since I need to rebuid OF. Which Version would you
like to suggest me to run? dev or v4.1?
Also, if the default
$WM_LABEL_SIZE</sub> is indeed 32
what is its theoretical upper bond, i.e. running pisoFoam (motobike tutorial?).
Can I change to any number (2^{5,6,7,8})?