blockMesh划分网格,在v2112和v6均测试可以,v8报错
-
请教一下大家,我用 of 的 blockMesh 划分一个带圆形喷孔几何体的六面体网格。blockMesh 在 v2112 和 v6 均测试可以运行,但是 v8 报错。我刚学习 of,自己没排查出错误,请教下大家。
错误提示如下:// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Creating block mesh from "system/blockMeshDict" Using #calcEntry at line 46 in file "/home/users/nus/e0944146/OpenFOAM/e0944146-8/run/JISCF/system/blockMeshDict" Using #codeStream with "/home/users/nus/e0944146/OpenFOAM/e0944146-8/run/JISCF/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_b7af15ef665f94aa93a235a5e34750b6bd3e16a1.so" Invoking "wmake -s libso /home/users/nus/e0944146/OpenFOAM/e0944146-8/run/JISCF/dynamicCode/_b7af15ef665f94aa93a235a5e34750b6bd3e16a1" wmake libso /home/users/nus/e0944146/OpenFOAM/e0944146-8/run/JISCF/dynamicCode/_b7af15ef665f94aa93a235a5e34750b6bd3e16a1 Ctoo: codeStreamTemplate.C /home/users/nus/e0944146/OpenFOAM/e0944146-8/run/JISCF/system/blockMeshDict: In function 'void Foam::codeStream_b7af15ef665f94aa93a235a5e34750b6bd3e16a1(Foam::Ostream&, const Foam::dictionary&)': /home/users/nus/e0944146/OpenFOAM/e0944146-8/run/JISCF/system/blockMeshDict:1:8: error: '$D' was not declared in this scope /*--------------------------------*- C++ -*----------------------------------*\ ^ make: *** [Make/linux64GccDPInt32Opt/codeStreamTemplate.o] Error 1 --> FOAM FATAL IO ERROR: Failed wmake "dynamicCode/_b7af15ef665f94aa93a235a5e34750b6bd3e16a1/platforms/linux64GccDPInt32Opt/lib/libcodeStream_b7af15ef665f94aa93a235a5e34750b6bd3e16a1.so" file: /home/users/nus/e0944146/OpenFOAM/e0944146-8/run/JISCF/system/blockMeshDict from line 17 to line 45. From function static void (* Foam::functionEntries::codeStream::getFunction(const Foam::dictionary&, const Foam::dictionary&))(Foam::Ostream&, const Foam::dictionary&) in file db/dictionary/functionEntries/codeStream/codeStream.C at line 214. FOAM exiting
网格如下:
测试文件 blockMesh.zip -
@尚善若水
我用OpenFOAM-8试了下,提示‘$D’ was not declared
,尝试找到$D,在后面加个空格,如下所示。alpha 45.0; // o-block degree // s #calc "$D/4.0"; // Inner square side half // sc #calc "$D/4.0 + 0.1"; // Inner square side curvature // R #calc "$D/2.0"; // Radius of the jet nozzle s #calc "$D /4.0"; // Inner square side half sc #calc "$D /4.0 + 0.1"; // Inner square side curvature R #calc "$D /2.0"; // Radius of the jet nozzle
接着能运行一会,又出现
error: ‘$lx’ was not declared
,也是类似在后面加个空格,就可继续运行。// round 函数表示四舍五入取整数 // xCells #calc "round($lx/$deltax)"; // 310 // yCells #calc "round($ly/$deltay)"; // 110 // zCells #calc "round($lz/$deltaz)"; // 200 xCells #calc "round($lx /$deltax)"; // 310 yCells #calc "round($ly /$deltay)"; // 110 zCells #calc "round($lz /$deltaz)"; // 200
以此方式后续还有好几个类似的参数都这个问题,当基本改完后,运行还是有如下错误。这块也不清楚什么问题了
ln: ./lnInclude wmkdep: codeStreamTemplate.C Ctoo: codeStreamTemplate.C ld: /home/user1/OpenFOAM/user1-8/run/blockmesh/dynamicCode/_d585a44b91ff1f499e2e3d99401445beaf8aa06c/../platforms/linux64GccDPInt32Opt/lib/libcodeStream_d585a44b91ff1f499e2e3d99401445beaf8aa06c.so Creating block edges No non-planar block faces defined Creating topology blocks --> FOAM FATAL IO ERROR: wrong token type - expected int32_t, found on line 184 the doubleScalar 10 file: /home/user1/OpenFOAM/user1-8/run/blockmesh/system/blockMeshDict/blocks at line 184. From function Foam::Istream& Foam::operator>>(Foam::Istream&, int32_t&) in file primitives/ints/int32/int32IO.C at line 62. FOAM exiting