Commit b97b44f1 authored by Henry Weller's avatar Henry Weller
Browse files

tutorials/multiphase/interDyMFoam/ras/floatingObject: Updated to use rigidBodyDynamics

parent 04485798
......@@ -16,75 +16,59 @@ FoamFile
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libsixDoFRigidBodyMotion.so");
motionSolverLibs ("librigidBodyMeshMotion.so");
solver sixDoFRigidBodyMotion;
solver rigidBodyMotion;
sixDoFRigidBodyMotionCoeffs
rigidBodyMotionCoeffs
{
patches (floatingObject);
innerDistance 0.05;
outerDistance 0.35;
centreOfMass (0.5 0.45 0.35);
// Cuboid dimensions
Lx 0.3;
Ly 0.2;
Lz 0.5;
// Density of the solid
rho 500;
// Cuboid mass
mass #calc "$rho*$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.7;
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 1 0);
}
accelerationRelaxation 0.7;
fixedAxis
bodies
{
floatingObject
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 1 0);
type cuboid;
parent root;
// Cuboid dimensions
Lx 0.3;
Ly 0.2;
Lz 0.5;
// Density of the cuboid
rho 500;
// Cuboid mass
mass #calc "$rho*$Lx*$Ly*$Lz";
L ($Lx $Ly $Lz);
centreOfMass (0 0 0.25);
transform (1 0 0 0 1 0 0 0 1) (0.5 0.45 0.1);
joint
{
type composite;
joints
(
{
type Py;
}
{
type Ry;
}
);
}
patches (floatingObject);
innerDistance 0.05;
outerDistance 0.35;
}
}
}
......
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object motionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libsixDoFRigidBodyMotion.so");
solver sixDoFRigidBodyMotion;
sixDoFRigidBodyMotionCoeffs
{
patches (floatingObject);
innerDistance 0.05;
outerDistance 0.35;
centreOfMass (0.5 0.45 0.35);
// Cuboid dimensions
Lx 0.3;
Ly 0.2;
Lz 0.5;
// Density of the solid
rho 500;
// Cuboid mass
mass #calc "$rho*$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.7;
//accelerationDamping 0;
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 1 0);
}
fixedAxis
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 1 0);
}
}
}
// ************************************************************************* //
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment