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. 在controlDict文件中添加function报错[添加东岳流体中的也会报这个错]

在controlDict文件中添加function报错[添加东岳流体中的也会报这个错]

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

    我想在controlDict添加function,来输出边界压力,再看看残差,但是只要添加function就会报这个错,是啥可能的原因???
    在controlDict中添加是想要输出每个时间步的压力数据,因为我保存整个场的间隔比较大,不适合通过postProcess对结果进行提取

    [15]error in IOstream "OSHA1stream.sinkFile_" for operation Ostream& operator<<(Ostream&, const word&)
    [15] 
    [15] file: OSHA1stream.sinkFile_ at line 0.
    [15] 
    [15]     From function virtual bool Foam::IOstream::check(const char*) const
    [15]     in file db/IOstreams/IOstreams/IOstream.C at line 96.
    
    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  9
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        format      ascii;
        class       dictionary;
        location    "system";
        object      controlDict;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    application     compressibleInterFoam;
    
    startFrom       latestTime;
    
    startTime       0;
    
    stopAt          endTime;
    
    endTime         0.000005;
    
    deltaT          0.00000000005;
    
    writeControl    timeStep;
    
    writeInterval   20;
    
    purgeWrite      0;
    
    writeFormat     binary;
    
    writePrecision  8;
    
    writeCompression off;
    
    timeFormat      general;
    
    timePrecision   10;
    
    runTimeModifiable yes;
    
    //adjustTimeStep  no;
    
    maxCo           3;
    maxAlphaCo      3;
    maxDeltaT       1;
    
    /*functions
    {
       volFieldValue1
       {
           type            volFieldValue;
           libs            ("libfieldFunctionObjects.so");
    
           log             true;
           writeControl    writeTime;
           writeFields     no;
    
           regionType      patch;
           name            walls;
           operation       volIntegrate;
    
           //A single weight field can be specified as before:
           //weightField     alpha1;
           //or a list specified by:
           //weightFields (alpha.water rho.water);
    
           fields
           (
               p
               
           );
       }
    }
    */
    functions
    {
        forces
        {
            type            forces;
            libs            ("libforces.so");
            patches         (walls);
            rhoInf          998.8;
            log             on;
            writeControl    timeStep;
            writeInterval   1;
            CofR            (0 0 0);
        }
    }
    
    
    1 条回复 最后回复
  • 李东岳李 离线
    李东岳李 离线
    李东岳 管理员
    写于 最后由 编辑
    #2
    [15]error in IOstream "OSHA1stream.sinkFile_" for operation Ostream& operator<<(Ostream&, const word&)
    [15] 
    [15] file: OSHA1stream.sinkFile_ at line 0.
    [15] 
    [15]     From function virtual bool Foam::IOstream::check(const char*) const
    [15]     in file db/IOstreams/IOstreams/IOstream.C at line 96.
    

    这个报错么,这个看起来好像你硬盘满了

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

    打 1 条回复 最后回复
  • 打 离线
    打 离线
    打倒小怪兽
    在 中回复了 李东岳 最后由 编辑
    #3

    @李东岳 固态和机械都有比较大容量,足够计算一个算例了。只要在controlDict文件中添加function词条,就会报错。
    在网上查了一下,可能是gcc高版本和OpenFOAM-9中间存在问题。但是我安装了低版本后问题也没有解决:zoule:

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

    在icofoam那个cavity算例上面加functions,不行的话上传到论坛我看看

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

    1 条回复 最后回复

  • 登录

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