我正试图跟踪本教程关于如何实现解决程序的问题,但是我在设置这个案例时遇到了麻烦。
最初的案例可以找到这里。一开始,当运行blockMesh时,我的OpenFOAM版本在blockMeshDict中不识别#eval(),所以我将它改为#calc
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scale 1e-4;
mergeType points; //Or: blockMesh -merge-points
wedgeAngle 2.5;
rodRadius 9.9;
airRadius 999;
tanAlpha #calc"tan(0.5*degToRad($wedgeAngle))";
posRodZ #calc"$rodRadius*$tanAlpha";
negRodZ #calc"-$posRodZ";
posAirZ #calc"$airRadius*$tanAlpha";
negAirZ #calc"-$posAirZ";
vertices
(
(0 0 0) // vertex #0
(100 0 0) // vertex #1
(100 $rodRadius $posRodZ) // vertex #2
(0 $rodRadius $posRodZ) // vertex #3
(0 $rodRadius $negRodZ) // vertex #4
(100 $rodRadius $negRodZ) // vertex #5
(0 $airRadius $posAirZ) // vertex #6
(100 $airRadius $posAirZ) // vertex #7
(100 $airRadius $negAirZ) // vertex #8
(0 $airRadius $negAirZ) // vertex #9
);
blocks
(
hex (0 1 5 4 0 1 2 3) (30 6 1) simpleGrading (1 1 1) // block #0
hex (4 5 8 9 3 2 7 6) (30 599 1) simpleGrading (1 1 1) // block #1
);
edges
(
);
boundary
(
leftWall
{
type patch;
faces
(
(3 4 0 0)
);
}
rightWall
{
type patch;
faces
(
(1 5 2 1)
);
}
atmosphereTop
{
type patch;
faces
(
(9 6 7 8)
);
}
atmosphereRight
{
type patch;
faces
(
(3 6 9 4)
);
}
atmosphereLeft
{
type patch;
faces
(
(5 8 7 2)
);
}
axis
{
type empty;
faces
(
(0 1 1 0)
);
}
rodBack
{
type wedge;
faces
(
(0 4 5 1)
);
}
rodFront
{
type wedge;
faces
(
(0 1 2 3)
);
}
airBack
{
type wedge;
faces
(
(4 9 8 5)
);
}
airFront
{
type wedge;
faces
(
(3 2 7 6)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //现在,当运行blockMesh时,我得到以下错误:
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 9
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
Build : 9-c8374a4890ad
Exec : blockMesh
Date : Dec 16 2021
Time : 12:59:36
Host : "endeavouros"
PID : 346839
I/O : uncollated
Case : /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Reading "blockMeshDict"
Creating block mesh from
"system/blockMeshDict"
Using #calcEntry at line 26 in file "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict"
Using #codeStream with "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_28b21b5898ba159392899d5ac4d05a7158e0c6d6.so"
Creating new library in "dynamicCode/_28b21b5898ba159392899d5ac4d05a7158e0c6d6/platforms/linux64GccDPInt32Opt/lib/libcodeStream_28b21b5898ba159392899d5ac4d05a7158e0c6d6.so"
"/opt/OpenFOAM/OpenFOAM-9/etc/codeTemplates/dynamicCode/codeStreamTemplate.C" "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_28b21b5898ba159392899d5ac4d05a7158e0c6d6/codeStreamTemplate.C"
Invoking "wmake -s libso /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_28b21b5898ba159392899d5ac4d05a7158e0c6d6"
wmake libso /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_28b21b5898ba159392899d5ac4d05a7158e0c6d6
ln: ./lnInclude
wmkdep: codeStreamTemplate.C
Ctoo: codeStreamTemplate.C
ld: /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_28b21b5898ba159392899d5ac4d05a7158e0c6d6/../platforms/linux64GccDPInt32Opt/lib/libcodeStream_28b21b5898ba159392899d5ac4d05a7158e0c6d6.so
codeStream : dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict" master-only-reading:1
Opening cached dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_28b21b5898ba159392899d5ac4d05a7158e0c6d6.so"
codeStream : dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict" master-only-reading:1
Using #calcEntry at line 27 in file "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict"
Using #codeStream with "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_efc80fd5ffbc4db1928cd9ff3362f686671433be.so"
Creating new library in "dynamicCode/_efc80fd5ffbc4db1928cd9ff3362f686671433be/platforms/linux64GccDPInt32Opt/lib/libcodeStream_efc80fd5ffbc4db1928cd9ff3362f686671433be.so"
"/opt/OpenFOAM/OpenFOAM-9/etc/codeTemplates/dynamicCode/codeStreamTemplate.C" "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_efc80fd5ffbc4db1928cd9ff3362f686671433be/codeStreamTemplate.C"
Invoking "wmake -s libso /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_efc80fd5ffbc4db1928cd9ff3362f686671433be"
wmake libso /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_efc80fd5ffbc4db1928cd9ff3362f686671433be
ln: ./lnInclude
wmkdep: codeStreamTemplate.C
Ctoo: codeStreamTemplate.C
ld: /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_efc80fd5ffbc4db1928cd9ff3362f686671433be/../platforms/linux64GccDPInt32Opt/lib/libcodeStream_efc80fd5ffbc4db1928cd9ff3362f686671433be.so
codeStream : dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict" master-only-reading:1
Opening cached dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_efc80fd5ffbc4db1928cd9ff3362f686671433be.so"
codeStream : dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict" master-only-reading:1
Using #calcEntry at line 28 in file "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict"
Using #codeStream with "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_dc962d55c61555e401d9aa57fd57792f105fea79.so"
Creating new library in "dynamicCode/_dc962d55c61555e401d9aa57fd57792f105fea79/platforms/linux64GccDPInt32Opt/lib/libcodeStream_dc962d55c61555e401d9aa57fd57792f105fea79.so"
"/opt/OpenFOAM/OpenFOAM-9/etc/codeTemplates/dynamicCode/codeStreamTemplate.C" "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_dc962d55c61555e401d9aa57fd57792f105fea79/codeStreamTemplate.C"
Invoking "wmake -s libso /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_dc962d55c61555e401d9aa57fd57792f105fea79"
wmake libso /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_dc962d55c61555e401d9aa57fd57792f105fea79
ln: ./lnInclude
wmkdep: codeStreamTemplate.C
Ctoo: codeStreamTemplate.C
ld: /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_dc962d55c61555e401d9aa57fd57792f105fea79/../platforms/linux64GccDPInt32Opt/lib/libcodeStream_dc962d55c61555e401d9aa57fd57792f105fea79.so
codeStream : dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict" master-only-reading:1
Opening cached dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_dc962d55c61555e401d9aa57fd57792f105fea79.so"
codeStream : dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict" master-only-reading:1
Using #calcEntry at line 29 in file "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict"
Using #codeStream with "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_4510c2296fa7a962a6a70dda03e9219ebc01dac4.so"
Creating new library in "dynamicCode/_4510c2296fa7a962a6a70dda03e9219ebc01dac4/platforms/linux64GccDPInt32Opt/lib/libcodeStream_4510c2296fa7a962a6a70dda03e9219ebc01dac4.so"
"/opt/OpenFOAM/OpenFOAM-9/etc/codeTemplates/dynamicCode/codeStreamTemplate.C" "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_4510c2296fa7a962a6a70dda03e9219ebc01dac4/codeStreamTemplate.C"
Invoking "wmake -s libso /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_4510c2296fa7a962a6a70dda03e9219ebc01dac4"
wmake libso /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_4510c2296fa7a962a6a70dda03e9219ebc01dac4
ln: ./lnInclude
wmkdep: codeStreamTemplate.C
Ctoo: codeStreamTemplate.C
ld: /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_4510c2296fa7a962a6a70dda03e9219ebc01dac4/../platforms/linux64GccDPInt32Opt/lib/libcodeStream_4510c2296fa7a962a6a70dda03e9219ebc01dac4.so
codeStream : dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict" master-only-reading:1
Opening cached dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_4510c2296fa7a962a6a70dda03e9219ebc01dac4.so"
codeStream : dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict" master-only-reading:1
Using #calcEntry at line 30 in file "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict"
Using #codeStream with "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_0af64279ad3a68c6091e4927dfe1317848075c64.so"
Creating new library in "dynamicCode/_0af64279ad3a68c6091e4927dfe1317848075c64/platforms/linux64GccDPInt32Opt/lib/libcodeStream_0af64279ad3a68c6091e4927dfe1317848075c64.so"
"/opt/OpenFOAM/OpenFOAM-9/etc/codeTemplates/dynamicCode/codeStreamTemplate.C" "/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_0af64279ad3a68c6091e4927dfe1317848075c64/codeStreamTemplate.C"
Invoking "wmake -s libso /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_0af64279ad3a68c6091e4927dfe1317848075c64"
wmake libso /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_0af64279ad3a68c6091e4927dfe1317848075c64
ln: ./lnInclude
wmkdep: codeStreamTemplate.C
Ctoo: codeStreamTemplate.C
ld: /home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/_0af64279ad3a68c6091e4927dfe1317848075c64/../platforms/linux64GccDPInt32Opt/lib/libcodeStream_0af64279ad3a68c6091e4927dfe1317848075c64.so
codeStream : dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict" master-only-reading:1
Opening cached dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libcodeStream_0af64279ad3a68c6091e4927dfe1317848075c64.so"
codeStream : dictionary:"/home/ariedinger/uni/gimap/openfoam/03emf/01huang/0rodFoam/rodFoamCase/system/blockMeshDict" master-only-reading:1
Creating block edges
No non-planar block faces defined
Creating topology blocks
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/usr/lib/libc.so.6"
#3 Foam::face::centre(Foam::Field<Foam::Vector<double> > const&) const at ??:?
#4 Foam::blockDescriptor::check(Foam::Istream const&) at ??:?
#5 Foam::blockDescriptor::blockDescriptor(Foam::dictionary const&, int, Foam::Field<Foam::Vector<double> > const&, Foam::PtrList<Foam::blockEdge> const&, Foam::PtrList<Foam::blockFace> const&, Foam::Istream&) at ??:?
#6 Foam::block::block(Foam::dictionary const&, int, Foam::Field<Foam::Vector<double> > const&, Foam::PtrList<Foam::blockEdge> const&, Foam::PtrList<Foam::blockFace> const&, Foam::Istream&) at ??:?
#7 Foam::block::New(Foam::dictionary const&, int, Foam::Field<Foam::Vector<double> > const&, Foam::PtrList<Foam::blockEdge> const&, Foam::PtrList<Foam::blockFace> const&, Foam::Istream&) at ??:?
#8 void Foam::PtrList<Foam::block>::read<Foam::block::iNew>(Foam::Istream&, Foam::block::iNew const&) at ??:?
#9 Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&) at ??:?
#10 Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&) at ??:?
#11 ? in "/opt/OpenFOAM/OpenFOAM-9/platforms/linux64GccDPInt32Opt/bin/blockMesh"
#12 __libc_start_main in "/usr/lib/libc.so.6"
#13 ? in "/opt/OpenFOAM/OpenFOAM-9/platforms/linux64GccDPInt32Opt/bin/blockMesh"
fish: Job 2, 'blockMesh' terminated by signal SIGFPE (Floating point exception)所以,我有点不知所措,我希望有一些提示,试图解决错误。
除了在#eval()中将#calc更改为#calc之外,其他一切都与最初的情况(除了这是我剩下的文件 )几乎相同。
给定的情况似乎是为OpenFOAM v2构建的,我试图在OpenFOAM v9 (从AUR中的包openfoam-org安装)上运行它。所以,也许这会是个问题?尽管如此,在课程中,这个案例是在2020年提出的(看看2020年议事录中的Implement electromagnetic solver Case: rodFoamCase.tgz )。
提前谢谢。
发布于 2021-12-16 18:28:04
这将是值得测试的“开放泡沫-com”,以及看看是否有差异。可以使用AUR配方或者(可能更快)使用docker实例和openfom.com进行测试。
https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/docker
https://stackoverflow.com/questions/70382355
复制相似问题