请教:第三代涡识别方法Liutex的代码在linux中运行的问题
-
@yhdthu 在 请教:第三代涡识别方法Liutex的代码在linux中运行的问题 中说:
@yfleung jhd上的代码有bug,且效率低,我自己重写可用。
https://cloud.tsinghua.edu.cn/d/05b0149e37904e7ca61c/你好,这个下载地址已经失效了,能否再提供一下吗,非常感谢
-
1、李老师,我用
OpenFOAM-8
编译了这个程序,编译过程提示有一些未使用变量,但能正常编译。Making dependency list for source file Rotex.C g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/install/OpenFOAM/OpenFOAM-8/src/finiteVolume/lnInclude -I/home/install/OpenFOAM/OpenFOAM-8/src/meshTools/lnInclude -IlnInclude -I. -I/home/install/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude -I/home/install/OpenFOAM/OpenFOAM-8/src/OSspecific/POSIX/lnInclude -fPIC -c Rotex.C -o Make/linux64GccDPInt32Opt/Rotex.o Rotex.C: In function \u2018int main(int, char**)\u2019: Rotex.C:153:20: warning: unused variable \u2018eig1c_r\u2019 [-Wunused-variable] 153 | scalar eig1c_r=-0.5*(aaaa+bbbb)-aa/3.0; | ^~~~~~~ Rotex.C:154:20: warning: unused variable \u2018eig1c_i\u2019 [-Wunused-variable] 154 | scalar eig1c_i=0.5*Foam::sqrt(scalar(3.0))*(aaaa-bbbb); | ^~~~~~~ Rotex.C:155:20: warning: unused variable \u2018eig2c_r\u2019 [-Wunused-variable] 155 | scalar eig2c_r=-0.5*(aaaa+bbbb)-aa/3.0; | ^~~~~~~ Rotex.C:156:20: warning: unused variable \u2018eig2c_i\u2019 [-Wunused-variable] 156 | scalar eig2c_i=-0.5*Foam::sqrt(scalar(3.0))*(aaaa-bbbb); | ^~~~~~~ g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/home/install/OpenFOAM/OpenFOAM-8/src/finiteVolume/lnInclude -I/home/install/OpenFOAM/OpenFOAM-8/src/meshTools/lnInclude -IlnInclude -I. -I/home/install/OpenFOAM/OpenFOAM-8/src/OpenFOAM/lnInclude -I/home/install/OpenFOAM/OpenFOAM-8/src/OSspecific/POSIX/lnInclude -fPIC -fuse-ld=bfd -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPInt32Opt/Rotex.o -L/home/install/OpenFOAM/OpenFOAM-8/platforms/linux64GccDPInt32Opt/lib \ -lfiniteVolume -lfvOptions -lmeshTools -lOpenFOAM -ldl \ -lm -o /home/user1/OpenFOAM/user1-8/platforms/linux64GccDPInt32Opt/bin/Rotex
2、提供4个加载CDRFG脉动风的空风洞算例结果下载链接:
(1)3个算例用snappyHexMesh画的六面体网格,数量分别为9.6w,150w,364w。
(2)1个算例用fluentmeshing画的poly网格,网格数量为141w
(3)RotexCase下载链接:
链接:https://pan.baidu.com/s/1HQZkWVg2-ZKUF8SmqwkwOg
提取码:fgzl3、测试结果
(1)9.6w SHM网格算例,Rotex
用单核、并行都能正常计算,单核40 s
,并行20核计算用0.36 s
。但用paraview看后处理结果,虽然可以看到Rotex数据,但由于Rotex输出的结果为矢量,画contour图的时候,选项找不到Rotex,但能选择Lambda2
和Q
画等值面图。
问题是采用Liutex如何画出三维形状的涡?
这是选择Rotex画出来的纵向截面图:
这是选择Q准则画出的涡形状:
(2)150w SHM网格算例。
Rotex
并行20核计算用时127 s
。(3)364w SHM网格算例。
Rotex
并行20核计算用时1855 s
。可以看出运行Rotex随着网格增加,运行时间是非线性增加的。(4)141w poly网格算例。
Rotex
并行20核计算,报错Floating point exception
,但运行Lambda2
和Q
画等值面图,能正常运行。Time = 9 Reading U [4] #0 Foam::error::printStack(Foam::Ostream&) at ??:? [4] #1 Foam::sigFpe::sigHandler(int) at ??:? [4] #2 ? in "/lib64/libc.so.6" [4] #3 ? at ??:? [4] #4 __libc_start_main in "/lib64/libc.so.6" [4] #5 ? at ??:? [hpws14:21072] *** Process received signal *** [hpws14:21072] Signal: Floating point exception (8) [hpws14:21072] Signal code: (-6) [hpws14:21072] Failing at address: 0x3e800005250 [hpws14:21072] [ 0] /lib64/libc.so.6(+0x36400)[0x7fab592fb400] [hpws14:21072] [ 1] /lib64/libc.so.6(gsignal+0x37)[0x7fab592fb387] [hpws14:21072] [ 2] /lib64/libc.so.6(+0x36400)[0x7fab592fb400] [hpws14:21072] [ 3] Rotex[0x4136e0] [hpws14:21072] [ 4] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7fab592e7555] [hpws14:21072] [ 5] Rotex[0x4146f0] [hpws14:21072] *** End of error message *** [9] #0 Foam::error::printStack(Foam::Ostream&) at ??:? [9] #1 Foam::sigFpe::sigHandler(int) at ??:? [9] #2 ? in "/lib64/libc.so.6" [9] #3 ? at ??:? [9] #4 __libc_start_main in "/lib64/libc.so.6" [9] #5 ? at ??:? [hpws14:21077] *** Process received signal *** [hpws14:21077] Signal: Floating point exception (8) [hpws14:21077] Signal code: (-6) [hpws14:21077] Failing at address: 0x3e800005255 [hpws14:21077] [ 0] /lib64/libc.so.6(+0x36400)[0x7f02ac8ea400] [hpws14:21077] [ 1] /lib64/libc.so.6(gsignal+0x37)[0x7f02ac8ea387] [hpws14:21077] [ 2] /lib64/libc.so.6(+0x36400)[0x7f02ac8ea400] [hpws14:21077] [ 3] Rotex[0x4136e0] [hpws14:21077] [ 4] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f02ac8d6555] [hpws14:21077] [ 5] Rotex[0x4146f0] [hpws14:21077] *** End of error message *** -------------------------------------------------------------------------- Primary job terminated normally, but 1 process returned a non-zero exit code. Per user-direction, the job has been aborted. -------------------------------------------------------------------------- [6] #0 Foam::error::printStack(Foam::Ostream&) at ??:? [6] #1 Foam::sigFpe::sigHandler(int) at ??:? [6] #2 ? in "/lib64/libc.so.6" [6] #3 ? at ??:? [6] #4 __libc_start_main-------------------------------------------------------------------------- mpirun noticed that process rank 9 with PID 0 on node hpws14 exited on signal 8 (Floating point exception). --------------------------------------------------------------------------
这是poly网格选择Q准则画出的涡形状:
-
@李东岳 在 请教:第三代涡识别方法Liutex的代码在linux中运行的问题 中说:
你用calculator做一个计算器,计算Liutex的mag,然后做等值面图可以么。
这个可能要看一下liutex的sci的定义,看是不是通过这个方法来进行的。
李老师,我看了刘老师的论文(刘超群, Liutex-涡定义和第三代涡识别方法. 空气动力学学报, 2020. 038(003): 第413-431,478页.),里边提到以下几点:
- Liutex算出的是一个矢量,而Q是标量。
2.文章中提到Liutex为基础的几个涡识别方法,其中之一就是可以用计算mag来画等值面,但这个时候又需要指定阈值:
3.用paraview计算9.6w 网格的算例的
mag(Rotex)
,阈值分别取不同结果如下。Liutex采用幅值等值面因此会存在跟用Q准则一样指定阈值的问题,但根据论文意思是此时画出的等值面和Liutex向量线是大致平行的。
(1)mag(Rotex)=0.1
结果
(2)mag(Rotex)=0.5
结果
(3)mag(Rotex)=2
结果