sampleDict keyword patchName not accepted
Dear all:
In sampleDict, I would like to know the pressure on the left wall. I am running a rectangular tank in sloshingTank2D. BlockMesh runs fine: musa@musa-Satellite-M35X:~/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D$ blockMesh /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.0.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.0.1-51f1de99a4bc Exec : blockMesh Date : Dec 08 2011 Time : 16:59:03 Host : musa-Satellite-M35X PID : 2190 Case : /home/musa/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Creating block mesh from "/home/musa/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/constant/polyMesh/blockMeshDict" No non-linear edges defined Creating topology blocks Creating topology patches Creating block mesh topology Check topology Basic statistics Number of internal faces : 0 Number of boundary faces : 6 Number of defined boundary faces : 6 Number of undefined boundary faces : 0 Checking patch -> block consistency Creating block offsets Creating merge list . Creating polyMesh from blockMesh Creating patches Creating cells Creating points with scale 1 There are no merge patch pairs edges Writing polyMesh ---------------- Mesh Information ---------------- boundingBox: (-0.5 -20 -10) (0.5 20 10) nPoints: 3362 nCells: 1600 nFaces: 6480 nInternalFaces: 3120 ---------------- Patches ---------------- patch 0 (start: 3120 size: 40) name: lowerWall patch 1 (start: 3160 size: 40) name: rightWall patch 2 (start: 3200 size: 40) name: atmosphere patch 3 (start: 3240 size: 40) name: leftWall patch 4 (start: 3280 size: 3200) name: frontAndBack End Now my sampleDict file has the following bits of code: FoamFile { version 2.0; format ascii; class dictionary; location "system"; object sampleDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // //setFormat gnuplot; setFormat raw; surfaceFormat raw; interpolationScheme cell; sets ( left { type uniform; axis xyz; start ( 0 -15.0 5.0); end ( 0 -15.0 -5.0); nPoints 10; } middle { type uniform; axis xyz; start ( 0 0 5.0); end ( 0 0 -5.0); nPoints 10; } right { type uniform; axis xyz; start ( 0 15 5.0); end ( 0 15 -5.0); nPoints 10; } ); fields (alpha1); surfaces ( wallPressure { type patch; patchName leftWall; interpolate true; triangulate false; } ); fields (p); I am trying to obtain the pressure at the left wall. patchName is per the users manual. However, when I try to run the sampleDict file, I get the following error: musa@musa-Satellite-M35X:~/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D$ sample /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.0.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.0.1-51f1de99a4bc Exec : sample Date : Dec 08 2011 Time : 17:03:29 Host : musa-Satellite-M35X PID : 2372 Case : /home/musa/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Disallowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading set description: left middle right --> FOAM FATAL IO ERROR: keyword patches is undefined in dictionary "/home/musa/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/sampleDict::surfaces" file: /home/musa/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/sampleDict::surfaces from line 65 to line 68. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 400. FOAM exiting For some reason, OpenFOAM is not recognizing the word patch or patchName though both are valid keywords. So the post processing fails. However, if I change patchName to patches and enclose leftWall in parenthesis such as (leftWall), then sample processes fine. So has the keyword patchName been deprecated in OpenFOAM or is it not being used in the correct context? BTY I am running OpenFOAM build 2.0.1-51f1de99a4bc on Ubuntu 11.10. Any help / guidance on this issue would be greatly appreciated. Thanks!!! |
This is due to the different versions of OF.
In new version, the format is like this ? type patch: patches ("xxxxx"): |
Quote:
yes, the keywords for surface with the type of patch in new version has been changed. But I think it is shown as below which is little different from that you written. type patch; patches (xxxxx); //the name of patch |
Hi Mr Zhou,
Thank you for your reply. I have fixed the problem and moved on. By the way, I saw your address is Shanghai. Could I ask which company are you working with? Is OpenFOAM popular in China? |
I am a Ph. D. candidate and has not a job. I think OpenFoam is popular in China nowadays.
|
哦。 是上海交通大学吗?
|
No, Tongji University
|
All times are GMT -4. The time now is 19:55. |