toposet之后出现空集。。。
-
toposet之后polymesh下set文件夹的文件内全部显示是空集,终端显示识别了你的范围是XXX但是这个范围内狗der没有,我是真不到哪里出问题了。
toposetdric代码是这样的:/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( { name porous; type cellSet; action new; source boxToCell; sourceInfo { box (0 0 10) (2000 500 15); } } /* { name porousZone; type cellZoneSet; action new; source setToCellZone; sourceInfo { set porous; } } */ { name inletA; type cellSet; action new; source boxToCell; sourceInfo { box (0 0 15) (0.1 500 25); } } { name inletB; type faceSet; action new; source cellToFace; sourceInfo { set inletA; option all; } } { name inletB; type faceSet; action subset; source patchToFace; sourceInfo { name walls; } } { name outletA; type cellSet; action new; source boxToCell; sourceInfo { box (1999.9 0 15) (2000 500 50); } } { name outletB; type faceSet; action new; source cellToFace; sourceInfo { set outletA; option all; } } { name outletB; type faceSet; action subset; source patchToFace; sourceInfo { name walls; } } ); // ************************************************************************* //
终端是这样说的:
openfoam@openfoam-virtual-machine:~/OpenFOAM/openfoam-5.x/run/1$ topoSet /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 5.x-7f7d351b741b Exec : topoSet Date : Nov 25 2024 Time : 09:45:57 Host : "openfoam-virtual-machine" PID : 181025 I/O : uncollated Case : /home/openfoam/OpenFOAM/openfoam-5.x/run/1 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 Create polyMesh for time = 0 Reading topoSetDict Time = 0 mesh not changed. Created cellZoneSet porous Applying source boxToCell Adding cells with center within boxes 1((0 0 10) (2000 500 15)) cellZoneSet porous now size 0 Created cellSet inletA Applying source boxToCell Adding cells with center within boxes 1((0 0 15) (0.1 500 25)) cellSet inletA now size 0 Created faceSet inletB Applying source cellToFace Adding faces according to cellSet inletA ... faceSet inletB now size 0 Read set faceSet inletB with size 0 Applying source patchToFace Adding all faces of patch walls ... Found matching patch walls with 31250 faces. faceSet inletB now size 0 Created cellSet outletA Applying source boxToCell Adding cells with center within boxes 1((1999.9 0 15) (2000 500 50)) cellSet outletA now size 0 Created faceSet outletB Applying source cellToFace Adding faces according to cellSet outletA ... faceSet outletB now size 0 Read set faceSet outletB with size 0 Applying source patchToFace Adding all faces of patch walls ... Found matching patch walls with 31250 faces. faceSet outletB now size 0 End
blockMesh是这样的:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } convertToMeters 0.001; vertices ( (0 0 0) // 0 (2000 0 0) // 1 (2000 500 0) // 2 (0 500 0) // 3 /* (0 0 15) // 4 (2000 0 15) // 5 (2000 500 15) // 6 (0 500 15) // 7 */ (0 0 50) // 4 (2000 0 50) // 5 (2000 500 50) // 6 (0 500 50) // 7 // (0 0 25) // 12 // (0 500 25) // 13 ); blocks ( hex (0 1 2 3 4 5 6 7) (500 125 25) simpleGrading (1 1 1) // hex (4 5 6 7 8 9 10 11) (500 125 35) simpleGrading (1 1 1) ); edges ( ); boundary ( walls { type wall; faces ( (0 1 5 4) (2 3 7 6) (0 4 7 3) (1 2 6 5) ); } atmosphere { type patch; faces ( (4 5 6 7) (0 1 2 3) ); } mergePatchPairs ( );
我搞这个破玩意好几天了,一点头绪没有,还得求着各位大佬帮帮忙瞅一眼。。。。
-
@学流体的小明 在 toposet之后出现空集。。。 中说:
你blockMesh文件convertToMeters 0.001;
实际就是把下面的坐标乘以0.001画网格,画出来的计算域是(0,0,0)到(2,0.5,0.05)。
而你toposet直接从(0,0,10)开始画box,当然找不到了。大哥 按你说的改了topoSetDric , box的坐标和网格尺寸我也确定了是能对应上的,但是createPatch并ParaFoam之后出现了inlet这个面变成了豁牙子。。。
改之后的topoSet是这样的:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( { name porous; type cellSet; action new; source boxToCell; sourceInfo { box (0 0 10e-3) (2000e-3 500e-3 12e-3); } } { name porousZone; type cellZoneSet; action new; source setToCellZone; sourceInfo { set porous; } } { name inletA; type cellSet; action new; source boxToCell; sourceInfo { box (0 0 12e-3) (4e-3 500e-3 22e-3); } } { name inletB; type faceSet; action new; source cellToFace; sourceInfo { set inletA; option all; } } { name inletB; type faceSet; action subset; source patchToFace; sourceInfo { name walls; } } { name outletA; type cellSet; action new; source boxToCell; sourceInfo { box (1.996 0 12e-3) (2 500e-3 50e-3); } } { name outletB; type faceSet; action new; source cellToFace; sourceInfo { set outletA; option all; } } { name outletB; type faceSet; action subset; source patchToFace; sourceInfo { name walls; } } ); // ************************************************************************* //
createPatch是这样的:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object createPatchDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Do a synchronisation of coupled points after creation of any patches. // Note: this does not work with points that are on multiple coupled patches // with transformations (i.e. cyclics). pointSync false; // writeCyclicMatch false; // Patches to create. patches ( { name inlet; patchInfo { type patch; } constructFrom set; set inletB; } { name outlet; patchInfo { type patch; } constructFrom set; set outletB; } ); // ************************************************************************* //
这个豁牙子问题我之前跟着阿B上田东的视频做案例的时候也出现了 不知道是什么玩意 而且case跑完之后他明显是个实际存在的数值上的豁牙子,不是paraview显示问题
-
@学流体的小明 在 toposet之后出现空集。。。 中说:
感觉是topoSet选择网格,提取各种面的时候有些问题了,我没用过这方面的功能,不太了解。
你如果只是想把边界面提取出来的话,在blockMesh当中就可以设置吧。@李东岳 在 toposet之后出现空集。。。 中说:
豁牙子注意一下toposet点位置的精度。
感谢两位大佬提点,豁牙子问题解决了...