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
11 帖子 6 发布者 7.5k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • 七 离线
    七 离线
    七辆战车
    写于 最后由 编辑
    #1

    请问下有哪位重叠网格大佬知道该如何在dynamicMeshDict中定义双浮体?我用的是v1906版本,一旦指定body1和body2,运行时就会出现cannot find centreOfMass的问题;
    另一个是如何采用linearSpring连接两个浮体?因为在restraints参数中有一个anchor点和一个refAttachmentPt点,如果直接用两个refAttachmentPt点是否可行?相关的body该如何指定?
    恳请大佬帮忙答疑!

    1 条回复 最后回复
  • 七 离线
    七 离线
    七辆战车
    写于 最后由 编辑
    #2

    @wwzhao 老师,您是这方面的专家,能否帮忙解答一下呢?

    1 条回复 最后回复
  • W 离线
    W 离线
    wwzhao 超神
    写于 最后由 编辑
    #3
    1. 找不到centreOfMass肯定是字典文件错了,检查字典文件

    2. linearSpring 没法实现双浮体相连的功能

    七 2 条回复 最后回复
  • 七 离线
    七 离线
    七辆战车
    在 中回复了 wwzhao 最后由 编辑
    #4

    @wwzhao 感谢老师解答,还想问下,我该如何在dynamicMeshDict中实现用弹簧连接双浮体呢,找了找网上的资料,没能够找着相关资料

    1 条回复 最后回复
  • 七 离线
    七 离线
    七辆战车
    在 中回复了 wwzhao 最后由 编辑
    #5

    @wwzhao 关于字典文件的问题,我先是参考算例中的设置方法,弄成这样:

    sixDoFRigidBodyMotionCoeffs
    {
        bodies
        {
        floatingObject1
        {
    
        patches         (floatingObject1);
        innerDistance   100;
        outerDistance   101;
    
    
        centreOfMass    (2.0 0.5 1.0);
    
        // Cuboid dimensions
        radius	    0.25;
    
        // Density of the solid
        rhoSolid        500;
    
        // Cuboid mass
        mass            #calc "$rhoSolid*4/3*3.1415926*$radius*$radius*$radius";
    
        // Cuboid moment of inertia about the centre of mass
        momentOfInertia #codeStream
        {
            codeInclude
            #{
                #include "diagTensor.H"
            #};
    
            code
            #{
                scalar sqrLx = sqr($radius);
                scalar sqrLy = sqr($radius);
                scalar sqrLz = sqr($radius);
                os  <<
                    $mass
                   *diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/5.0;
            #};
        };
         
        }
    
    
    
        floatingObject2
        {
      
        patches         (floatingObject2);
        innerDistance   100;
        outerDistance   101;
    
    
        centreOfMass    (3.5 0.5 1.0);
    
        // Cuboid dimensions
        radius	    0.4;
    
        // Density of the solid
        rhoSolid        400;
    
        // Cuboid mass
        mass            #calc "$rhoSolid*4/3*3.1415926*$radius*$radius*$radius";
    
        // Cuboid moment of inertia about the centre of mass
        momentOfInertia #codeStream
        {
            codeInclude
            #{
                #include "diagTensor.H"
            #};
    
            code
            #{
                scalar sqrLx = sqr($radius);
                scalar sqrLy = sqr($radius);
                scalar sqrLz = sqr($radius);
                os  <<
                    $mass
                   *diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/5.0;
            #};
        };
    
        }
        }
    
        report          on;
        accelerationRelaxation 0.7;
        accelerationDamping    0.9;
    
        solver
        {
            type Newmark;
        }
    
    
        sixDoFRigidBodyMotionRestraint
        {
        linkedspring
        {
         body		floatingObject;
         type		linearSpring;
         anchor	(3.1 0.5 1.0);
         refAttachmentPt	(2.25 0.5 1.0);
         stiffness		100;
         damping		0;
         restLength		0.3;
        }
        }
    
    }
    
    

    之后运行时就提示cannot find centreOfMass,但如果我将上述的bodies、floatingObject1等子目录删掉,像这样:

    sixDoFRigidBodyMotionCoeffs
    {
    
    
        patches         (floatingObject1);
        innerDistance   100;
        outerDistance   101;
    
    
        centreOfMass    (2.0 0.5 1.0);
    
        // Cuboid dimensions
        radius	    0.25;
    
        // Density of the solid
        rhoSolid        500;
    
        // Cuboid mass
        mass            #calc "$rhoSolid*4/3*3.1415926*$radius*$radius*$radius";
    
        // Cuboid moment of inertia about the centre of mass
        momentOfInertia #codeStream
        {
            codeInclude
            #{
                #include "diagTensor.H"
            #};
    
            code
            #{
                scalar sqrLx = sqr($radius);
                scalar sqrLy = sqr($radius);
                scalar sqrLz = sqr($radius);
                os  <<
                    $mass
                   *diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/5.0;
            #};
        };
           
        patches         (floatingObject2);
        innerDistance   100;
        outerDistance   101;
    
    
        centreOfMass    (3.5 0.5 1.0);
    
        // Cuboid dimensions
        radius	    0.4;
    
        // Density of the solid
        rhoSolid        400;
    
        // Cuboid mass
        mass            #calc "$rhoSolid*4/3*3.1415926*$radius*$radius*$radius";
    
        // Cuboid moment of inertia about the centre of mass
        momentOfInertia #codeStream
        {
            codeInclude
            #{
                #include "diagTensor.H"
            #};
    
            code
            #{
                scalar sqrLx = sqr($radius);
                scalar sqrLy = sqr($radius);
                scalar sqrLz = sqr($radius);
                os  <<
                    $mass
                   *diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/5.0;
            #};
        };
    
    
        report          on;
        accelerationRelaxation 0.7;
        accelerationDamping    0.9;
    
        solver
        {
            type Newmark;
        }
    
    
        sixDoFRigidBodyMotionRestraint
        {
        linkedspring
        {
         body		floatingObject1;
         type		linearSpring;
         anchor	(3.1 0.5 1.0);
         refAttachmentPt	(2.25 0.5 1.0);
         stiffness		100;
         damping		0;
         restLength		0.3;
        }
        }
    
    }
    
    

    就能运行了,不过这样一来问题就是只有floatingObject2可以动,floatingObject1不能动,所以对这个问题比较迷惑,也不知道该如何解决

    1 条回复 最后回复
  • W 离线
    W 离线
    wwzhao 超神
    写于 最后由 编辑
    #6

    @七辆战车

    如何在dynamicMeshDict中实现用弹簧连接双浮体呢,找了找网上的资料,没能够找着相关资料

    这个应该没有现成模块,需要自己开发。

    只有floatingObject2可以动,floatingObject1不能动

    sixDoFRigidBodyMotion 不支持多物体运动,你可以试试 rigidBodyMotion。

    七 Y 2 条回复 最后回复
  • 七 离线
    七 离线
    七辆战车
    在 中回复了 wwzhao 最后由 编辑
    #7

    @wwzhao 明白,感谢老师解答!

    是 1 条回复 最后回复
  • Y 离线
    Y 离线
    Yingdong
    在 中回复了 wwzhao 最后由 编辑
    #8

    @wwzhao
    老师您好,我想请问一下关于字典中关键词的含义
    innerDistance 100;
    outerDistance 101;

    再找到的一个介绍中这样解释:innerDistance 内的任何内容直接将网格节点作为刚体移动。在innerDistance 和outerDistance 之间,网格节点变形。在outerDistance 之外,不会发生变形。outerDisatance永远大于innerDistance。

    想请问一下老师,这个数值单位是m(米)吗,如果是,这个距离远大于建立的模型的尺寸,那么这两个关键词的意义是什么。

    期待老师的回复。

    1 条回复 最后回复
  • 是 离线
    是 离线
    是嘿嘿牛啊
    在 中回复了 七辆战车 最后由 编辑
    #9

    @七辆战车
    你好! 请问一下,利用rigidbody求解器,有实现双浮体吗,是直接在dynamicdict文件下给两个浮体的参数吗? 对于外部导入的水平圆柱浮体,刚体类型可以给rigidbody吗? 期待你的回答,不胜感激。

    1 条回复 最后回复
  • Z 离线
    Z 离线
    z597288
    写于 最后由 编辑
    #10

    您好,我也有同样的疑问,请问您解决了吗?

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

    这个数值单位是m(米)吗,如果是,这个距离远大于建立的模型的尺寸,那么这两个关键词的意义是什么。

    是米。如果过大,就没有意义了。

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

    1 条回复 最后回复

  • 登录

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