openfoam运行报错
-
我使用的codedfixedvalue对非均匀速度场进行编程,但是用simpleFoam运算时候,出现了无法运行的错误。有人遇到过这种情况吗?
[15] [14] #0 Foam::error::printStack(Foam::Ostream&)#0 Foam::error::printStack(Foam::Ostream&) at ??:? [14] #1 Foam::sigFpe::sigHandler(int) at ??:? [15] #1 Foam::sigFpe::sigHandler(int) at ??:? [14] #2 ? at ??:? [15] #2 ? in /lib64/libpthread.so.0 [14] #3 ? in /lib64/libm.so.6 [14] #4 Foam::uinletFixedValueFvPatchVectorField::updateCoeffs() in /lib64/libpthread.so.0 [15] #3 ? in /lib64/libm.so.6 [15] #4 Foam::uinletFixedValueFvPatchVectorField::updateCoeffs() at ~/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/UListI.H:251 [14] #5 Foam::codedFixedValueFvPatchField<Foam::Vector<double> >::updateCoeffs() at ~/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/UListI.H:251 [15] #5 Foam::codedFixedValueFvPatchField<Foam::Vector<double> >::updateCoeffs() at ??:? [14] #6 Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:? [14] #7 at ??:? [15] #6 ?Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:? [14] #8 at ??:? [15] #7 ?? at ??:? [15] #8 at ??:? [14] #9 __libc_start_main? in /lib64/libc.so.6 [14] #10 at ??:? [15] #9 __libc_start_main? in /lib64/libc.so.6 [15] #10 at ??:? [hpws15:115156] *** Process received signal *** [hpws15:115156] Signal: Floating point exception (8) [hpws15:115156] Signal code: (-6) [hpws15:115156] Failing at address: 0x3ea0001c1d4 [hpws15:115156] [ 0] /lib64/libpthread.so.0(+0xf630)[0x7f4ef7e2d630] [hpws15:115156] [ 1] /lib64/libpthread.so.0(raise+0x2b)[0x7f4ef7e2d4fb] [hpws15:115156] [ 2] /lib64/libpthread.so.0(+0xf630)[0x7f4ef7e2d630] [hpws15:115156] [ 3] /lib64/libm.so.6(+0x7750)[0x7f4ef8258750] [hpws15:115156] [ 4] /home/user3/LFK/RANS/321/dynamicCode/platforms/linux64Gcc72DPInt32Opt/lib/libuinlet_054614152f293d9b8c67805883eace4adb3f1d70.so(_ZN4Foam34uinletFixedValueFvPatchVectorField12updateCoeffsEv+0x5b)[0x7f4ed4cae64b] [hpws15:115156] [ 5] /home/user3/OpenFOAM/OpenFOAM-v2012/platforms/linux64Gcc72DPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam27codedFixedValueFvPatchFieldINS_6VectorIdEEE12updateCoeffsEv+0x3d)[0x7f4efca8cafd] [hpws15:115156] [ 6] simpleFoam(_ZN4Foam8fvMatrixINS_6VectorIdEEEC1ERKNS_14GeometricFieldIS2_NS_12fvPatchFieldENS_7volMeshEEERKNS_12dimensionSetE+0x33c)[0x4478ac] [hpws15:115156] [ 7] simpleFoam[0x447a0a] [hpws15:115156] [ 8] simpleFoam[0x4260ca] [hpws15:115156] [ 9] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f4ef7a72555] [hpws15:115156] [10] simpleFoam[0x42868a] [hpws15:115156] *** End of error message *** ? at ??:? [hpws15:115157] *** Process received signal *** [hpws15:115157] Signal: Floating point exception (8) [hpws15:115157] Signal code: (-6) [hpws15:115157] Failing at address: 0x3ea0001c1d5 [hpws15:115157] [ 0] /lib64/libpthread.so.0(+0xf630)[0x7ff13139c630] [hpws15:115157] [ 1] /lib64/libpthread.so.0(raise+0x2b)[0x7ff13139c4fb] [hpws15:115157] [ 2] /lib64/libpthread.so.0(+0xf630)[0x7ff13139c630] [hpws15:115157] [ 3] /lib64/libm.so.6(+0x7750)[0x7ff1317c7750] [hpws15:115157] [ 4] /home/user3/LFK/RANS/321/dynamicCode/platforms/linux64Gcc72DPInt32Opt/lib/libuinlet_054614152f293d9b8c67805883eace4adb3f1d70.so(_ZN4Foam34uinletFixedValueFvPatchVectorField12updateCoeffsEv+0x5b)[0x7ff10e03364b] [hpws15:115157] [ 5] /home/user3/OpenFOAM/OpenFOAM-v2012/platforms/linux64Gcc72DPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam27codedFixedValueFvPatchFieldINS_6VectorIdEEE12updateCoeffsEv+0x3d)[0x7ff135ffbafd] [hpws15:115157] [ 6] simpleFoam(_ZN4Foam8fvMatrixINS_6VectorIdEEEC1ERKNS_14GeometricFieldIS2_NS_12fvPatchFieldENS_7volMeshEEERKNS_12dimensionSetE+0x33c)[0x4478ac] [hpws15:115157] [ 7] simpleFoam[0x447a0a] [hpws15:115157] [ 8] simpleFoam[0x4260ca] [hpws15:115157] [ 9] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7ff130fe1555] [hpws15:115157] [10] simpleFoam[0x42868a] [hpws15:115157] *** 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. -------------------------------------------------------------------------- -------------------------------------------------------------------------- mpirun noticed that process rank 15 with PID 0 on node hpws15 exited on signal 8 (Floating point exception).
-
@李东岳李东岳老师,我看编写应该是没有问题的
ktype codedFixedValue; value uniform 0.375; //default value name kinlet; //name of new BC type code #{ const fvPatch& boundaryPatch = this->patch(); scalarField& vf = *this; forAll(vf, i) { scalar z = boundaryPatch.Cf()[i].y(); scalar D1 = -1.061; scalar D2 = 5.744; scalar alpha = 0.25; vf[i] = sqrt(D1*pow(z*400, alpha) + D2);
omega
type codedFixedValue; value uniform 0.1; //default value name omegainlet; //name of new BC type code #{ const fvPatch& boundaryPatch = this->patch(); scalarField& vf = *this; forAll(vf, i) { scalar z = boundaryPatch.Cf()[i].y(); scalar ur = 11.0; scalar alpha = 0.25; scalar Cmu = 0.06; scalar zr = 160; scalar u = ur*pow(z*400/zr, alpha); vf[i] = (alpha/sqrt(Cmu))*u/z;
u
type codedFixedValue; value uniform (0 0 0); //default value name uinlet; //name of new BC type code #{ const fvPatch& boundaryPatch = this->patch(); vectorField& vf = *this; forAll(vf, i) { scalar z = boundaryPatch.Cf()[i].y(); //scalar uStar = 0.511; //scalar z0 = 2.25e-4; //scalar kappa = 0.42; //vf[i].x() = uStar/kappa*log((z + z0)/z0); //vf[i].y() = 0.0; //vf[i].z() = 0.0; scalar ur = 11.0; scalar alpha = 0.25; scalar zr = 160; vf[i].x() = ur*pow(z*400/zr, alpha); vf[i].y() = 0.0; vf[i].z() = 0.0;