加载中…
个人资料
天乐树
天乐树
  • 博客等级:
  • 博客积分:0
  • 博客访问:1,201,923
  • 关注人气:1,064
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
相关博文
推荐博文
谁看过这篇博文
加载中…
正文 字体大小:

OpenFOAM后处理转为Tecplot的方法

(2012-04-11 15:13:00)
标签:

openfoam

tecplot

后处理

杂谈

分类: OpenFoam

实际上蛮简单的,群里有人问,就做出来给大家分享下。

计算结束后,进入上层目录,以多相流damBreak为例:

cd $FOAM RUN\multiphase\interFoam\laminar\damBreak

blockMesh

interFoam

cd ..

foamToTecplot360 -case damBreak

 

以Windows下的输出为例(去掉了一些时间,这样能看下输出):

C:\Program Files (x86)\blueCFD-SingleCore-2.1\OpenFOAM-2.1\tutorials\multiphase\
interFoam\laminar>foamToTecplot360 -case damBreak


Build  : 2.1-c62f134541ee
Exec   : foamToTecplot360 -case damBreak
Date   : Apr 11 2012
Time   : 15:17:39
Host   : "MXIO-PC"
PID    : 2876
Case   : ./damBreak
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMas
ter
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Time: 0
    volScalarFields            : alpha1 p_rgh alpha1.org
    volVectorFields            : U

 

Name:damBreak varNames:"X Y Z" to file:"./damBreak/Tecplot360/damBreak_grid_0.pl
t" of type:1
zoneName:region0 solTime:0
writeEnd


Name:damBreak varNames:"alpha1 p_rgh alpha1.org U_x U_y U_z" to file:"./damBreak
/Tecplot360/damBreak_0.plt" of type:2
zoneName:region0 solTime:0
writeEnd
Combining patches:
    patch 0 leftWall
    patch 1 rightWall
    patch 2 lowerWall
    patch 3 atmosphere
    discarding empty/processor patch 4 defaultFaces
    Combined patches     : "./damBreak/Tecplot360/boundaryMesh/boundaryMesh_0.pl
t"


Name:damBreak varNames:"X Y Z alpha1 p_rgh alpha1.org U_x U_y U_z" to file:"./da
mBreak/Tecplot360/boundaryMesh/boundaryMesh_0.plt" of type:0
    Writing patch 0     leftWall        strand:2

zoneName:leftWall strandID:2 solTime:0
    Writing patch 1     rightWall       strand:3

zoneName:rightWall strandID:3 solTime:0
    Writing patch 2     lowerWall       strand:4

zoneName:lowerWall strandID:4 solTime:0
    Writing patch 3     atmosphere      strand:5

zoneName:atmosphere strandID:5 solTime:0
writeEnd

Time: 1
    volScalarFields            : p alpha1 p_rgh
    volVectorFields            : U

 

Name:damBreak varNames:"p alpha1 p_rgh U_x U_y U_z" to file:"./damBreak/Tecplot3
60/damBreak_1.plt" of type:2
zoneName:region0 solTime:1
writeEnd
Combining patches:
    patch 0 leftWall
    patch 1 rightWall
    patch 2 lowerWall
    patch 3 atmosphere
    discarding empty/processor patch 4 defaultFaces
    Combined patches     : "./damBreak/Tecplot360/boundaryMesh/boundaryMesh_1.pl
t"


Name:damBreak varNames:"X Y Z p alpha1 p_rgh U_x U_y U_z" to file:"./damBreak/Te
cplot360/boundaryMesh/boundaryMesh_1.plt" of type:0
    Writing patch 0     leftWall        strand:2

zoneName:leftWall strandID:2 solTime:1
    Writing patch 1     rightWall       strand:3

zoneName:rightWall strandID:3 solTime:1
    Writing patch 2     lowerWall       strand:4

zoneName:lowerWall strandID:4 solTime:1
    Writing patch 3     atmosphere      strand:5

zoneName:atmosphere strandID:5 solTime:1
writeEnd

End

 

转换完成后出现Tecplot360文件夹:

OpenFOAM后处理转为Tecplot的方法

里面最重要的一个是网格信息,一个是随时间跑的数据

OpenFOAM后处理转为Tecplot的方法

这样就可以进入Tecplot进行后处理了:

1. File > Load Data File(s)

OpenFOAM后处理转为Tecplot的方法

2. 选择Tecplot data loader

OpenFOAM后处理转为Tecplot的方法

3. 使用Multiple Files方法打开结果文件,首先选择网格文件,再选择数据文件(务必!)

OpenFOAM后处理转为Tecplot的方法

 


4. 后处理效果:
OpenFOAM后处理转为Tecplot的方法

 

其他的参数补充:

foamToTecplot360 -help

Usage: foamToTecplot360 [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -cellSet <name>   restrict conversion to the specified cellSet
  -constant         include the 'constant/' dir in the times list
  -excludePatches <patches (wildcards) to exclude>
  -faceSet <name>   restrict conversion to the specified cellSet
  -fields <names>   convert selected fields only. eg, '(p T U)'
  -latestTime       select the latest time
  -nearCellValue    output cell value on patches instead of patch value itself
  -noFaceZones      no faceZones
  -noFunctionObjects
                    do not execute functionObjects
  -noInternal       do not generate file for mesh, only for patches
  -noPointValues    no pointFields
  -noZero           exclude the '0/' dir from the times list, has precedence
                    over the -zeroTime option
  -parallel         run in parallel
  -region <name>    specify alternative mesh region
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -time <ranges>    comma-separated time ranges - eg, ':10,20,40-70,1000:'
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

Tecplot binary file format writer

Using: OpenFOAM-2.1 (see www.OpenFOAM.org)
Build: 2.1-c62f134541ee


 

mxio

2012.4.11

0

阅读 评论 收藏 转载 喜欢 打印举报/Report
  • 评论加载中,请稍候...
发评论

    发评论

    以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

      

    新浪BLOG意见反馈留言板 电话:4000520066 提示音后按1键(按当地市话标准计费) 欢迎批评指正

    新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

    新浪公司 版权所有