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. 边界条件tableFile读取错误问题

边界条件tableFile读取错误问题

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

    模拟二维大气边界层流动,入口添加ESDU的对数律剖面时,采用如下方式定义,

    INLET
       {
           type            fixedProfile;
       profile 	tableFile;
    
       profileCoeffs
       {
               nHeaderLine         0;          // Number of header lines
               refColumn           1;          // Reference column index
               componentColumns    (1);    // Component column indices
               separator           " ";        // Optional (defaults to ",")
               mergeSeparators     no;         // Merge multiple separators
               file                "inVelocity.txt";//"inletProfiles/inVelocity.csv";
               outOfBounds         clamp;      // Optional out-of-bounds handling
               interpolationScheme linear;     // Optional interpolation scheme
           }
           direction        (0 1 0);
           origin           0;
        }
    

    运行simpleFoam时,提示如下错误
    7aded185-8189-4194-bfb8-dc1151b16edf-image.png
    inVelocity.txt文件为

    0.899251
    3.78464
    3.88646
    3.96812
    4.03721
    4.09802 
    4.15319
    4.20449
    4.25314
    4.30008 
    4.34601 
    4.39149	 
    4.43702
    4.483
    4.5298
    4.57773
    4.62706
    4.67807 
    4.73099
    4.78608 
    4.84357
    4.90368
    4.96665
    5.03268
    5.10199	 
    5.17476	 
    5.25119	 
    5.33143	 
    5.41563	 
    5.50394	 
    5.59645	 
    5.69327	 
    5.79447	 
    5.90012	 
    6.01023
    

    不知道问题在哪里?还请各位指教

    博士生涯收敛

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

    速度应该给矢量?你这是标量

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

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

    @东岳 李老师,我边界条件代码修改后如下:

        INLET
        {
            type            fixedProfile;
    	profile 	tableFile;
    
    	profileCoeffs
    	{
                nHeaderLine         0;          // Number of header lines
                refColumn           0;          // Reference column index
                componentColumns    (1 2 3);    // Component column indices
                separator           ",";        // Optional (defaults to ",")
                mergeSeparators     no;         // Merge multiple separators
                file                "inVelocity.txt";//"inletProfiles/inVelocity.csv";
                outOfBounds         clamp;      // Optional out-of-bounds handling
                interpolationScheme linear;     // Optional interpolation scheme
            }
            direction        (0 1 0);
            origin           0;
         }
    

    同时inVelocity.txt数据按照下面格式给出,但还是有同样的报错信息

    2.31474,0,0
    3.07832,0,0
    3.44144,0,0
    3.64768,0,0
    3.78464,0,0
    3.88646,0,0
    3.96812,0,0
    4.03721,0,0
    4.09802,0,0
    4.15319,0,0
    4.20449,0,0
    4.25314,0,0
    4.30008,0,0
    4.34601,0,0
    4.39149,0,0
    4.43702,0,0
    4.483,0,0
    4.5298,0,0
    

    博士生涯收敛

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

    文件位置正确么?

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

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

    @东岳 嗯嗯,是在同一个文件夹0/下的

    博士生涯收敛

    1 条回复 最后回复
  • 李东岳李 离线
    李东岳李 离线
    李东岳 管理员
    写于 最后由 编辑
    #6
    inlet
        {
            type            fixedProfile;
    	profile 	tableFile;
    
    	profileCoeffs
    	{
                //nHeaderLine         0;          // Number of header lines
                //refColumn           0;          // Reference column index
                //componentColumns    (1 2 3);    // Component column indices
                //separator           ",";        // Optional (defaults to ",")
                //mergeSeparators     no;         // Merge multiple separators
                file                "0/inVelocity";//"inletProfiles/inVelocity.csv";
                //outOfBounds         clamp;      // Optional out-of-bounds handling
                //interpolationScheme linear;     // Optional interpolation scheme
            }
            direction        (0 1 0);
            origin           0;
        }
    

    inVelocity

    (
                (0.0 (1 2 3))
                (1.0 (4 5 6))
    )
    

    https://github.com/OpenFOAM/OpenFOAM-3.0.x/blob/master/src/OpenFOAM/primitives/functions/DataEntry/TableFile/TableFile.H

    另外写在csvFile更容易些:

    inlet
        {
            type            fixedProfile;
    	profile 	   csvFile;
    ...
          }
    

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

    H 1 条回复 最后回复
  • H 离线
    H 离线
    Hope
    在 中回复了 李东岳 最后由 编辑
    #7

    @东岳 好的,我试一下。谢谢老师~

    博士生涯收敛

    C 1 条回复 最后回复
  • C 离线
    C 离线
    Chase
    在 中回复了 Hope 最后由 编辑
    #8

    @Hope 楼主有没有ESDU的document呀,风剖速度和湍流强度以及风谱,没订阅,也搜索不到

    1 条回复 最后回复

  • 登录

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