关于使用重叠网格模拟双浮体及其连接问题
-
@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不能动,所以对这个问题比较迷惑,也不知道该如何解决
-
@wwzhao
老师您好,我想请问一下关于字典中关键词的含义
innerDistance 100;
outerDistance 101;再找到的一个介绍中这样解释:innerDistance 内的任何内容直接将网格节点作为刚体移动。在innerDistance 和outerDistance 之间,网格节点变形。在outerDistance 之外,不会发生变形。outerDisatance永远大于innerDistance。
想请问一下老师,这个数值单位是m(米)吗,如果是,这个距离远大于建立的模型的尺寸,那么这两个关键词的意义是什么。
期待老师的回复。