Newer
Older
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
motionSolverLibs (sixDoFRigidBodyMotion);
dynamicFvMesh dynamicOversetFvMesh;
solver sixDoFRigidBodyMotion;
sixDoFRigidBodyMotionCoeffs
{
patches (floatingObject);
innerDistance 100.0;
outerDistance 101.0;
centreOfMass (0.5 0.5 0.3);
// Cuboid dimensions
Lx 0.24;
Ly 0.24;
Lz 0.4;
// Density of the solid
rhoSolid 700;
// Cuboid mass
mass #eval{ $rhoSolid*$Lx*$Ly*$Lz };
// Cuboid moment of inertia about the centre of mass
momentOfInertia #codeStream
{
codeInclude
#{
#include "diagTensor.H"
#};
code
#{
scalar sqrLx = sqr($Lx);
scalar sqrLy = sqr($Ly);
scalar sqrLz = sqr($Lz);
os <<
$mass
*diagTensor(sqrLy + sqrLz, sqrLx + sqrLz, sqrLx + sqrLy)/12.0;
#};
};
report on;
accelerationRelaxation 0.6;
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
solver
{
type Newmark;
}
constraints
{
/*
fixedPoint
{
sixDoFRigidBodyMotionConstraint point;
centreOfRotation (0.5 0.45 0.1);
}
*/
fixedLine
{
sixDoFRigidBodyMotionConstraint line;
//centreOfRotation (0.5 0.45 0.1);
direction (0 0 1);
}
/*
fixedAxis
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 1 0);
}
*/
}
}
// ************************************************************************* //