Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. OpenFOAM三维计算结果映射到二维平面

OpenFOAM三维计算结果映射到二维平面

已定时 已固定 已锁定 已移动 OpenFOAM
3 帖子 2 发布者 2.5k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • 香柏树香 离线
    香柏树香 离线
    香柏树
    写于 最后由 编辑
    #1

    请问大家知道如何在OpenFOAM中将计算完成的三维结果映射到其内部的一个二维平面么?比如图1中三维线图的流场信息(754万多面体网格)如何映射到正方形平面上,这样就能通过代码单独分析该平面上的数据了。目前代码难以在三维计算域执行,而且仅适用于OF默认格式的文件,所以sample方法在此处也难以应用。
    我现在尝试了方法是这样的:
    1)针对正方形平面画完二维网格(厚度方向为1个网格,总网格数量8160,所有平面均建立一个part内)后,单独建立个被映射算例目录,里面包含0时刻和最新时刻的文件,system中也包含mapFieldsDict文件,文件信息如图2所示。
    2)将system中controlDict中startTime 改为要映射的时刻。
    3)在被映射算例目下,建立映射时刻文件夹,里面建立个组分C2H2的文件进行尝试,文件内容如图3所示。
    4)输入命令:mapField <源文件目录>,运行记录和错误如下所示。
    d867cb13-766a-4b93-8318-7cd6447b87fb-图片.png

    log文件/*---------------------------------------------------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  8
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    Build  : 8
    Exec   : mapFields /scratch/users/nus/e0920926/OF6/MS-TDAC
    Date   : Apr 19 2022
    Time   : 11:06:22
    Host   : "std0120"
    PID    : 13053
    I/O    : uncollated
    Case   : /scratch/users/nus/e0920926/OF5/CE
    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
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Source: "/scratch/users/nus/e0920926/OF6" "MS-TDAC"
    Target: "/scratch/users/nus/e0920926/OF5" "CE"
    
    Create databases as time
    --> FOAM Warning : 
        From function virtual void Foam::Time::readDict()
        in file db/Time/TimeIO.C at line 408
        Reading "/scratch/users/nus/e0920926/OF6/MS-TDAC/system/controlDict" from line 18 to line 169
        Selecting compressed binary is inefficient and ineffective, resetting to uncompressed binary
    --> FOAM Warning : 
        From function virtual void Foam::Time::readDict()
        in file db/Time/TimeIO.C at line 408
        Reading "/scratch/users/nus/e0920926/OF5/CEMA/system/controlDict" from line 18 to line 155
        Selecting compressed binary is inefficient and ineffective, resetting to uncompressed binary
    
    Source time: 0.110675
    Target time: 0.110675
    Create meshes
    
    Source mesh size: 7547729	Target mesh size: 8160
    
    --> FOAM Warning : 
        From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const
        in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76
        No base point for face 41258162, 6(32185316 32185317 31764850 30956255 31547018 30861795), produces a valid tet decomposition.
    --> FOAM Warning : 
        From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const
        in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76
        No base point for face 41258164, 4(30956255 31764850 31416084 31554407), produces a valid tet decomposition.
    --> FOAM Warning : 
        From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const
        in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76
        No base point for face 41258167, 4(32569102 32165258 31326296 31085982), produces a valid tet decomposition.
    --> FOAM Warning : 
        From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const
        in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76
        No base point for face 41258168, 6(30957345 31326296 32165258 32289540 31184503 31851659), produces a valid tet decomposition.
    --> FOAM Warning : 
        From function Foam::triFace Foam::tetIndices::faceTriIs(const Foam::polyMesh&) const
        in file meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H at line 76
        No base point for face 5862791, 4(9594118 11818146 4123357 11818190), produces a valid tet decomposition.
    
    Mapping fields for time 0.110675
    
        interpolating C2H2
    
    
    err文件
    
    --> FOAM FATAL IO ERROR: 
    wrong token type - expected Scalar, found on line 24 the punctuation token ')'
    
    file: /scratch/users/nus/e0920926/OF5/CEMA/0.110675/C2H2 at line 24.
    
        From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::doubleScalar&)
        in file lnInclude/Scalar.C at line 101.
    
    FOAM exiting
    
    
    

    针对报错信息,修改了图3中内容好多次,依然无法消除这个错误。请问大家有什么好的解决方法么?

    1 条回复 最后回复
  • 香柏树香 离线
    香柏树香 离线
    香柏树
    写于 最后由 编辑
    #2

    三维网格结构很复杂,有12个part。目前二维网格只有一个part,和这个不完全对应有关系么?

    Z 1 条回复 最后回复
  • Z 离线
    Z 离线
    zhouxu
    在 中回复了 香柏树 最后由 编辑
    #3

    @香柏树 后处理软件的切片功能可以实现吧

    1 条回复 最后回复

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]