最近在做 FSI,有没有哪位前辈能够对 sixDoFRigidBodyDisplacement 边界的各参数,以及 sixDoFRigidBodyMotionConstraint 的限制参数做个解释啊?
sixDoFRigidBodyDisplacement 是动网格里面比较复杂的栗子,参数比较多,sixDoFRigidBodyDisplacement 主要用于在 0/pointDisplacement 文件里指定某一边界的运动方式及限制情况。
实际上,对于力的模型还是根据
来的。
tutorials 里面的 wingMotion2D_pimpleDyMFoam 可以参考。
其主要参数有以下一些:
变量名 | 说明 | 单位 |
---|---|---|
mass | 刚 (固) 体质量 | kg |
momentOfInertia | 刚体的惯性矩 | kg m^2 |
initialCentreOfMass | 初始质量中心 (点) 的位置 | m |
initialOrentation | 初始方向 cos 矩阵 (张量) | N/A |
accelerationDampingCoeff | 标量 | N/A |
accelerationLimit | 标量 | m s^(-2) |
centreOfMass | 刚体质量中心 | m |
orientation | 刚体方向的余弦矩阵 (张量) | |
velocity | 刚体的运动速度,根据反力情况计算得出 | |
acceleration | 刚体加速度,根据反力情况计算得出 | |
angularMomentum | 刚体的角惯性矩,根据反力情况计算得出 | |
torque | 受到的力矩,根据反力情况计算得出 | |
report | 是否将结果输出到终端 | |
reportToFile | 是否将输出到文件 |
特别值得说明的是这些量的单位在没有说明的情况下都是国际标准单位。
对于该边界的限制条件有
变量名 | 说明 |
---|---|
tolerance | 容许误差 |
relaxationFactor | 松弛因子 |
maxIterations | 最大循环次数 |
sixDoFRigidBodyMotionConstraint 的类型有以下几种:
变量 | 说明 | 参数 |
---|---|---|
fixedAxis | 仅绕该(全局)轴转动 | axis |
fixedLine | 仅沿该线平动 | refPoint 和 direction |
fixedOrientation | 刚体的朝向固定(全局). 仅当偏离小于 90 度有效. | |
fixedPlane | 仅在该平面平动 | refPoint 和 normal |
fixedPoint | 固定在某点 |
sixDoFRigidBodyMotionRestraints 是 restraints 的模型。restraints
子字典提供了固体的反力因子。
这些参数说明如下
变量名 | 说明 |
---|---|
constantForce | F_0, 指定一个附加于刚体的常力 (Ensys 版本) |
linearDamper | 根据速度而形成的一个反作用力 |
sphericalAngularDamper | 根据角速度而形成的一个反作用力 |
linearSpring | 提供一个综合的反力模型,参数包括 stiffness (刚度k,与位移成比例),damping (与速度成比例),attachmentPoint (从 refAttachmentPt 与 刚体质量中心距离的力矩计算),restLength (最初弹簧长度。实际伸长或压缩量为 mag(refAtt-anchor)-restLength) |
linearAxialAngularSpring | 类似于 linearSpring,提供全面的旋转运动的反力系数 |
示例 wingMotion2D_pimpleDyMFoam 中 wing 的pointDisplacement 边界设置 (tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/0/pointDisplacement):
wing
{
type sixDoFRigidBodyDisplacement;
mass 22.9;
centreOfMass (0.4974612746 -0.01671895744 0.125);
momentOfInertia (1.958864357 3.920839234 2.057121362);
orientation
(
0.9953705935 0.09611129781 0
-0.09611129781 0.9953705935 0
0 0 1
);
velocity (0 0 0);
acceleration (0 0 0);
angularMomentum (0 0 -0.5);
torque (0 0 0);
rhoName rhoInf;
rhoInf 1;
g (0 -9.81 0);
report on;
constraints // 运动参数设置
{
maxIterations 500;
fixedLine1
{
sixDoFRigidBodyMotionConstraint fixedLine; // 平动限制,仅沿该线运动
tolerance 1e-9;
relaxationFactor 0.7;
fixedLineCoeffs
{
refPoint (0.25 0.007 0.125); // 参考点
direction (0 1 0); // 方向
}
}
fixedAxis1
{
sixDoFRigidBodyMotionConstraint fixedAxis; // 转动限制,仅绕该轴转动
tolerance 1e-06;
relaxationFactor 0.7;
fixedAxisCoeffs
{
axis ( 0 0 1 );
}
}
}
restraints // 反作用力参数设置
{
verticalSpring
{
sixDoFRigidBodyMotionRestraint linearSpring; // 力的设置
linearSpringCoeffs // 参数设置
{
anchor (0.25 0.007 0.125); // 弹簧的一端,在整个仿真中,此点不变
refAttachmentPt (0.25 0.007 0.125); // 弹簧的另一端,与刚体一起
stiffness 4000; // 刚度
damping 2; // 粘滞
restLength 0; // 初始长度
}
}
axialSpring
{
sixDoFRigidBodyMotionRestraint linearAxialAngularSpring; // 转矩设置
linearAxialAngularSpringCoeffs // 参数设置
{
axis (0 0 1);
stiffness 700;
damping 0.5;
referenceOrientation $orientation;
}
}
}
value uniform (0 0 0);
}
在该边界的 U 的设置为
wing
{
type movingWallVelocity;
value uniform (0 0 0);
}
对于 constant/dynamicMeshDict 设置,
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolver.so");
solver displacementLaplacian;
diffusivity inverseDistance (wing); // 动网格计算方式,不涉及网格拓扑结构变化
以上的文件设置主要针对 foam-extend-3.1 或 foam-extend-4.0,其他版本
OpenFOAM-5.0 或 OpenFOAM-v1812 等则将 constraints 和 restraints 设置于 dynamicMeshDict 文件,同时指定将其应用的 patches 就可。
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libsixDoFRigidBodyMotion.so");
motionSolver sixDoFRigidBodyMotion;
patches (wing);
...
在 0/pointDisplacement 中的 wing 边界设置为 calculated 就好了。
参考
- Parameter Definitions - dynamicMotionSolverFvMesh - OpenFOAMWiki
- A tutorial of the sixDofRigidBodyMotion library with
multiple bodies. http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2015/MagnusUrquhart/slides.pdf - pimpleDyMFoam: 気流中でバネに懸架された翼型の6自由度剛体運動 - Onion Salad - OpenFOAMチュートリアルドキュメント作成プロジェクト
约束的设置为:
滑块是否给出了重力方向?
给了,问题找到了,因为水深太浅了,导致计算的时候都后面才体现流固耦合的作用
您好,我目前在物体入水,和你这个差不多,但是现在算出的结果有问题,感觉是dynamicMeshDict字典设置出错了,能否看一下你dynamicMeshDict字典的设置,谢谢了