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 10 中,使用后处理forceCoeffs 的命令

OpenFOAM 10 中,使用后处理forceCoeffs 的命令

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

    请教各位前辈,在OpenFOAM 10中,想要输出圆柱绕流模型中最后一步的曳力系数,命令怎么写,使用命令“pimpleFoam -postProcess -func forceCoeffs1 -latestTime” 一直报错,forceCoeffs文件:
    forceCoeffs.PNG

    Error:
    Error.PNG

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #2
    functions
    {
        forces
        {
            type            forceCoeffs;
            libs            ("libforces.so");
            writeControl    timeStep;
            writeInterval   1;
        
            patches         ("motorBike.*");
            rho             rhoInf;      // Indicates incompressible
            log             true;
            rhoInf          1;           // Redundant for incompressible
            liftDir         (0 0 1);
            dragDir         (1 0 0);
            CofR            (0.72 0 0);  // Axle midpoint on ground
            pitchAxis       (0 1 0);
            magUInf         20;
            lRef            1.42;        // Wheelbase length
            Aref            0.75;        // Estimated
        }
    }
    

    http://dyfluid.com/code.html#id37

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    W 1 条回复 最后回复
  • W 离线
    W 离线
    wr_z
    在 中回复了 李东岳 最后由 编辑
    #3

    @李东岳 感谢东岳老师的回复,请问这个forceCoeffs是要写在controlDict里么,我把forceCoeffs里的内容复制到了controlDict,然后修改了运行命令为:pimpleFoam -postProcess -func forces -latestTime,还是报错。

    controlDict:
    controlDict

    error:
    Error1.PNG

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 李东岳 编辑
    #4

    估计你的不是openfoam10

    另外,type已经有了

    functions
    {
        forces
        {
            type            forceCoeffs;///////////////////////////////////
            libs            ("libforces.so");
            writeControl    timeStep;
            writeInterval   1;
        
            patches         ("motorBike.*");
            rho             rhoInf;      // Indicates incompressible
            log             true;
            rhoInf          1;           // Redundant for incompressible
            liftDir         (0 0 1);
            dragDir         (1 0 0);
            CofR            (0.72 0 0);  // Axle midpoint on ground
            pitchAxis       (0 1 0);
            magUInf         20;
            lRef            1.42;        // Wheelbase length
            Aref            0.75;        // Estimated
        }
    }
    
    

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    W 1 条回复 最后回复
  • W 离线
    W 离线
    wr_z
    在 中回复了 李东岳 最后由 编辑
    #5

    @李东岳 感谢东岳老师的回复。已解决。需要在system里有一个单独的forceCoeffs文件,然后在controlDict里的添加functions{#include "forceCoeffs"},这样会在输出文件里输出每一步的Cd等相关信息。感谢老师!

    1 条回复 最后回复

  • 登录

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