如图,本人想在root账户下使用mpirun但是ubuntu不建议在root下使用mpirun,在网上找的方法说是要添加--allow-run-as-root进行强制执行,但是发现好像没有解决问题,有没有大神知道该怎么解决这个问题呢
HIT_lly
帖子
-
root账户下不可以并行计算(使用不了mpirun) -
OpenFOAM并行核数出现问题@wangfei9088 谢谢大佬能用了
-
OpenFOAM并行核数出现问题
我的电脑逻辑处理器是32个核数,但在使用并行时,如果使用30个核的时,就会提示核数不够的信息,如图所示。使用24个核数的时候会正常运行。之前在使用fluent的时候使用30个核数进行并行没有问题。有没有大佬知道是什么原因。
-
wsl安装完ubuntu但是文件资源管理器中不显示ubuntu@Prometheus10 谢谢您的回复,我找到原因了,原来我之前没有进入mnt文件夹,所以看不到自已本来的硬盘,进入mnt后就能正常使用了。
-
多相流计算出现局部高压点@李东岳 谢谢东岳老师的回复,我再重新调试调试
-
多相流计算出现局部高压点本文在使用compressibleInterIsoFoam进行过膨胀喷管的水下射流计算。开始计算较为稳定无异常情况发生。但是在换个电脑(从另一个电脑copy算例到其他电脑上)进行计算的时候出现了不正常的现象。在射流出口出现了不正常的局部高压,导致计算不稳定,报错内容是计算出现负温度。
这是报错内容
这是出现局部高压过程的压力云图。
时间分别是21.2ms,21.25ms,21.3ms
该算例的fvScheme文件和fvSolution文件如下。/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2212 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; limited cellLimited Gauss linear 1; grad(U) $limited; grad(k) $limited; grad(omega) $limited; } divSchemes { div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss upwind; div(phi,thermo:rho.water) Gauss upwind; div(phi,thermo:rho.air) Gauss upwind; div(Phirb,alpha) Gauss interfaceCompression; div(rhoPhi,U) Gauss limitedLinearV 1; div(rhoPhi,T) Gauss upwind; div(rhoPhi,K) Gauss upwind; div(phi,p) Gauss upwind; div(phi,k) Gauss upwind; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; default Gauss upwind; div(phi,U) Gauss linearUpwind limited; energy Gauss linearUpwind limited; div(phi,e) $energy; div(phi,K) $energy; div(phi,Ekp) $energy; turbulence Gauss linearUpwind limited; div(phi,k) $turbulence; div(phi,omega) $turbulence; div(rhoPhi,omega) $turbulence; div(rhoPhi,k) $turbulence; div(phiv,p) Gauss upwind; div((phi|interpolate(rho)),p) Gauss upwind; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } wallDist { method meshWave; } // ************************************************************************* //
这是fvSolution文件
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2212 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { "alpha.water.*" { nAlphaCorr 1; nAlphaSubCycles 5; cAlpha 1; reconstructionScheme isoAlpha; vof2IsoTol 1e-8; surfCellTol 1e-8; nAlphaBounds 3; snapTol 1e-12; clip true; minIter 1; } "pcorr.*" { solver GAMG; preconditioner { preconditioner GAMG; tolerance 1e-12; relTol 0.00001; nSweeps 4; smoother DICGaussSeidel; } tolerance 1e-12; relTol 0.00001; nSweeps 2; maxIter 100; smoother GaussSeidel; minIter 1; } ".*(rho|rhoFinal)" { solver diagonal; minIter 1; } p_rgh { solver GAMG; tolerance 1e-14; relTol 0.00000001; nSweeps 4; smoother GaussSeidel; minIter 2; } p_rghFinal { solver GAMG; preconditioner { preconditioner GAMG; tolerance 1e-14; relTol 0.0000001; nSweeps 4; nVcycles 2; smoother DICGaussSeidel; nPreSweeps 2; } tolerance 1e-14; relTol 0.0000001; nSweeps 3; smoother GaussSeidel; maxIter 100; minIter 2; } U { solver smoothSolver; smoother GaussSeidel; tolerance 1e-10; relTol 0.00001; nSweeps 2; minIter 1; } UFinal { solver smoothSolver; smoother GaussSeidel; tolerance 1e-10; relTol 0.00001; nSweeps 2; minIter 1; } "(T|k|B|nuTilda).*" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-12; relTol 0.00001; nsweeps 2; limit 10.0; maxIter 100; minIter 1; } p { solver GAMG; smoother GaussSeidel; tolerance 1e-10; relTol 0.0000001; nsweeps 2; minIter 1; } "(U|e).*" { $p; tolerance 1e-9; } "(k|epsilon).*" { $p; tolerance 1e-10; } pFinal { $p; relTol 0.000001; nSweeps 2; minIter 1; } "(rho|U|k|omega|e)" { solver PBiCGStab; preconditioner DILU; tolerance 1e-10; relTol 0.001; nSweeps 2; minIter 1; } "(rho|U|k|omega|e)Final" { $U; relTol 0.00001; nSweeps 2; minIter 1; } } SIMPLE { residualControl { p 1e-8; U 1e-8; "(k|omega|e)" 1e-8; } nNonOrthogonalCorrectors 1; pMinFactor 0.3; pMaxFactor 1; } PIMPLE { momentumPredictor yes; transonic yes; nOuterCorrectors 10; nCorrectors 6; nNonOrthogonalCorrectors 5; nAlphaCorr 1; nAlphaSubCycles 3; CAlpha 1; pMin 10000; pMax 1000000; } relaxationFactors { equations { ".*" 0.1; } } // ************************************************************************* //
-
wsl安装完ubuntu但是文件资源管理器中不显示ubuntu
如图,ubuntu已经安装在windows上了,并且已经安装完wsl2,但是想要进行文件互相传递的时候,发现文件系统中找不到“linux”项,有没有懂哥知道这是怎么回事呢? -
snappyHexMesh画网格之前snappyHexMesh画的3D网格进行重叠网格计算没有问题。后来为了节省计算成本用的2D网格,用的snappyHexMesh画的网格,然后使用extrudeMesh将3D网格变成2D网格后就出现问题了
-
snappyHexMesh画网格@李东岳 感谢东岳老师的回复,我的fvScheme是这样设置的,这用的是重叠网格技术。开始的isoadvector是我耦合的重叠网格算法,然后后面的compressibleinterFoam是openfoam 中自带的算法。
-
snappyHexMesh画网格/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2312 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default Gauss upwind; div(rhoPhi,U) Gauss upwind; div(U) Gauss linear; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss linear; div(phi,thermo:rho.water) Gauss upwind; div(phi,thermo:rho.air) Gauss upwind; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; div(rhoPhi,T) Gauss upwind; div(rhoPhi,K) Gauss upwind; div(phi,p) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,omega) Gauss upwind; div(phi,U) Gauss linearUpwind limited; energy Gauss linearUpwind limited; div(phi,e) $energy; div(phi,K) $energy; div(phi,Ekp) $energy; turbulence Gauss linearUpwind limited; div(phi,k) $turbulence; div(phi,omega) $turbulence; div(rhoPhi,omega) $turbulence; div(rhoPhi,k) $turbulence; div(phiv,p) Gauss upwind; div((phi|interpolate(rho)),p) Gauss upwind; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; } wallDist { method meshWave; } oversetInterpolation { method inverseDistance; holeLayers 6; useLayer 3; } oversetInterpolationSuppressed { grad(p_rgh); surfaceIntegrate(phiHbyA); } fluxRequired { default no; p_rgh; pcorr; alpha.water; } // ************************************************************************* //
-
snappyHexMesh画网格@李东岳 东岳老师,上面那个报错是因为使用了isoAdvector算法。
使用interFoam进行计算也会进行报错,报错是这样的FOAM Warning : From Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&, bool) const in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 70 No base point for face 7847, 4(5577 25968 25969 5578), produces a valid tet decomposition.
-
snappyHexMesh画网格@李东岳 谢谢东岳老师,这个我用interFoam也会报错,应该是snappyHexMesh切分网格的时候产生的问题。
-
snappyHexMesh画网格使用snappyHexMesh画网格时,画出网格时没有什么问题但是在计算的时候会报错。有没有大佬知道这种情况该怎么解决
FOAM Warning : From void Foam::cutFaceAdvect::cutPoints(Foam::label, Foam::scalar, Foam::DynamicList<Foam::Vector<double> >&) in file cellCuts/cutFace/cutFaceAdvect.C at line 927 cutPoints = 4((0 0.0449362922089 0.385062422146) (0 0.0436853188202 0.385062441697) (0.01 0.0436853188202 0.385062441697) (0.01 0.0449362922089 0.385062422146)) for pts = 4((0 0.0449362922089 0.385062422146) (0 0.0436853188202 0.385062441697) (0.01 0.0436853188202 0.385062441697) (0.01 0.0449362922089 0.385062422146)), f - f0 = 4(23405 23403 38935 38937) and f0 = 2.22618323362e-13
-
snappyHexMeshDict画二维网格出现锯齿状的区域问了一下别人,好像是使用snappyHexMesh命令画2D网格就是会出现面贴合效果不好的情况
-
snappyHexMeshDict画二维网格出现锯齿状的区域这个是所有的文件内容,请各位大佬指导一下
floatingBody.zip -
snappyHexMeshDict画二维网格出现锯齿状的区域@lalalala 我是用的snappyHexMesh -overwrite命令,好像是直接覆盖了
-
snappyHexMeshDict画二维网格出现锯齿状的区域@BBBBBAI 嗯嗯,我刚刚看了好像没有添加边界层,然后我添加完发现还是不行
-
snappyHexMeshDict画二维网格出现锯齿状的区域 -
snappyHexMeshDict画二维网格出现锯齿状的区域使用snappyHexMeshDict画二维网格在某一个壁面上由于贴合效果不好而产生锯齿状网格。
这是snappyHexMeshDict文件/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2312 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // castellatedMesh true; snap true; addLayers false; geometry { mesh1.stl { type triSurfaceMesh; name mesh1; regions { PENGUANINLET { name penguaninlet; } PENGUAN { name penguan; } LIANGBIANWALL { name liangbianwall; } QIANWALL { name qianwall; } HOUWALL { name houwall; } DIBU { name dibu; } DINGBUWALL { name dingbu; } } } refinementBox { type searchableBox; min (0.01 -0.05 -0.05); max (0.05 0.05 0.48); } }; castellatedMeshControls { maxLocalCells 20000000; maxGlobalCells 30000000; minRefinementCells 20; nCellsBetweenLevels 2; maxLoadUnbalance 0.1; allowFreeStandingZoneFaces true; resolveFeatureAngle 30; features ( {file "mesh1.eMesh";level 1;} ); refinementSurfaces { mesh1 { level (0 0); regions { PENGUANINLET { level (3 5); } PENGUAN { level (3 5); } DINGBUWALL { level (2 5); } /*GEOM { level (1 1); }*/ } } } refinementRegions { refinementBox { mode inside; levels ((3 5)); } } locationInMesh (0.001 -0.045 -0.045); } snapControls { tolerance 12; implicitFeatureSnap true; explicitFeatureSnap false; multiRegionFeatureSnap true; detectNearSurfacesSnap true; nSmoothPatch 6; nSolveIter 100; nRelaxIter 8; nFeatureSnapIter 10; nSmoothInternal 7; nFaceSplitInterval 12; } addLayersControls { PENGUAN { nSurfaceLayers 5; } relativeSizes true; expansionRatio 1.2; finalLayerThickness 0.5; minThickness 1e-3; } meshQualityControls { minVol 1e-20; minTetQuality 1e-20; minArea 1e-20; minTwist 0.05; minDeterminant 1e-06; minFaceWeight 0.02; minVolRatio 0.01; minTriangleTwist -1; minFlatness 0.5; maxNonOrtho 70; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; nSmoothScale 4; errorReduction 0.75; relaxed { minVol 1e-30; minTetQuality 1e-30; minArea 1e-30; minTwist 0.001; minDeterminant 1e-06; minFaceWeight 1e-06; minVolRatio 0.01; minTriangleTwist -1; minFlatness 0.5; maxNonOrtho 75; maxBoundarySkewness 20; maxInternalSkewness 8; maxConcave 80; nSmoothScale 4; errorReduction 0.75; } } mergeTolerance 1e-08; debug 0; writeFlags ( scalarLevels ); // ************************************************************************* //
已经在这个壁面附近加密过并且添加了边界层。
感觉在snap文件中各项参数都已经设置到可以的范围内了,但还是贴合不上。
请各位大佬使用snappyHexMeshDict画二维网格会出现这样的问题。 -
compressibleinterfoam报错:从objectRegistry region0获取thermo:psi文件失败三面都是空气的话,那水不就从左右两个面出去了?还是初始场就没有setFields水?