mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
sixDoFRigidBodyMotion: Add support to specify the centre for rotation independent of the centre of mass
via the point, line or plane constraints.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -222,7 +222,7 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
|
||||
forcesDict.add("patches", wordList(1, ptPatch.name()));
|
||||
forcesDict.add("rhoInf", rhoInf_);
|
||||
forcesDict.add("rhoName", rhoName_);
|
||||
forcesDict.add("CofR", motion_.centreOfMass());
|
||||
forcesDict.add("CofR", motion_.centreOfRotation());
|
||||
|
||||
forces f("forces", db(), forcesDict);
|
||||
|
||||
@ -243,14 +243,14 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
|
||||
|
||||
motion_.updateAcceleration
|
||||
(
|
||||
ramp*(f.forceEff() + g_*motion_.mass()),
|
||||
ramp*(f.momentEff()),
|
||||
ramp*(f.forceEff() + motion_.mass()*g_),
|
||||
ramp*(f.momentEff() + motion_.mass()*(motion_.momentArm() ^ g_)),
|
||||
t.deltaTValue()
|
||||
);
|
||||
|
||||
Field<vector>::operator=
|
||||
(
|
||||
motion_.currentPosition(initialPoints_) - initialPoints_
|
||||
motion_.transform(initialPoints_) - initialPoints_
|
||||
);
|
||||
|
||||
fixedValuePointPatchField<vector>::updateCoeffs();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -180,7 +180,7 @@ void uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs()
|
||||
|
||||
Field<vector>::operator=
|
||||
(
|
||||
motion_.currentPosition(initialPoints_) - initialPoints_
|
||||
motion_.transform(initialPoints_) - initialPoints_
|
||||
);
|
||||
|
||||
fixedValuePointPatchField<vector>::updateCoeffs();
|
||||
|
||||
@ -50,10 +50,11 @@ namespace sixDoFRigidBodyMotionConstraints
|
||||
Foam::sixDoFRigidBodyMotionConstraints::axis::axis
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
)
|
||||
:
|
||||
sixDoFRigidBodyMotionConstraint(name, sDoFRBMCDict),
|
||||
sixDoFRigidBodyMotionConstraint(name, sDoFRBMCDict, motion),
|
||||
axis_()
|
||||
{
|
||||
read(sDoFRBMCDict);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,8 +25,8 @@ Class
|
||||
Foam::sixDoFRigidBodyMotionConstraints::axis
|
||||
|
||||
Description
|
||||
sixDoFRigidBodyMotionConstraint. Body may only rotate around
|
||||
an axis fixed in global space.
|
||||
Orientation constraint:
|
||||
may only rotate around a fixed axis.
|
||||
|
||||
SourceFiles
|
||||
sixDoFRigidBodyMotionAxisConstraint.C
|
||||
@ -73,7 +73,8 @@ public:
|
||||
axis
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -50,11 +50,11 @@ namespace sixDoFRigidBodyMotionConstraints
|
||||
Foam::sixDoFRigidBodyMotionConstraints::line::line
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
)
|
||||
:
|
||||
sixDoFRigidBodyMotionConstraint(name, sDoFRBMCDict),
|
||||
dir_()
|
||||
sixDoFRigidBodyMotionConstraint(name, sDoFRBMCDict, motion)
|
||||
{
|
||||
read(sDoFRBMCDict);
|
||||
}
|
||||
@ -68,12 +68,21 @@ Foam::sixDoFRigidBodyMotionConstraints::line::~line()
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::sixDoFRigidBodyMotionConstraints::line::setCentreOfRotation
|
||||
(
|
||||
point& CofR
|
||||
) const
|
||||
{
|
||||
CofR = centreOfRotation_;
|
||||
}
|
||||
|
||||
|
||||
void Foam::sixDoFRigidBodyMotionConstraints::line::constrainTranslation
|
||||
(
|
||||
pointConstraint& pc
|
||||
) const
|
||||
{
|
||||
pc.combine(pointConstraint(Tuple2<label, vector>(2, dir_)));
|
||||
pc.combine(pointConstraint(Tuple2<label, vector>(2, direction_)));
|
||||
}
|
||||
|
||||
|
||||
@ -91,13 +100,19 @@ bool Foam::sixDoFRigidBodyMotionConstraints::line::read
|
||||
{
|
||||
sixDoFRigidBodyMotionConstraint::read(sDoFRBMCDict);
|
||||
|
||||
sDoFRBMCCoeffs_.lookup("direction") >> dir_;
|
||||
centreOfRotation_ = sDoFRBMCCoeffs_.lookupOrDefault
|
||||
(
|
||||
"centreOfRotation",
|
||||
motion_.initialCentreOfMass()
|
||||
);
|
||||
|
||||
scalar magDir(mag(dir_));
|
||||
sDoFRBMCCoeffs_.lookup("direction") >> direction_;
|
||||
|
||||
scalar magDir(mag(direction_));
|
||||
|
||||
if (magDir > VSMALL)
|
||||
{
|
||||
dir_ /= magDir;
|
||||
direction_ /= magDir;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -121,8 +136,10 @@ void Foam::sixDoFRigidBodyMotionConstraints::line::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeKeyword("centreOfRotation")
|
||||
<< centreOfRotation_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("direction")
|
||||
<< dir_ << token::END_STATEMENT << nl;
|
||||
<< direction_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,8 +25,11 @@ Class
|
||||
Foam::sixDoFRigidBodyMotionConstraints::line
|
||||
|
||||
Description
|
||||
sixDoFRigidBodyMotionConstraint. Reference point may only move
|
||||
along a line.
|
||||
Translation constraint on the centre of rotation:
|
||||
may only move along a line.
|
||||
|
||||
If 'centreOfRotation' is not provided in the dictionary the centre of mass
|
||||
is used.
|
||||
|
||||
SourceFiles
|
||||
sixDoFRigidBodyMotionLineConstraint.C
|
||||
@ -56,8 +59,11 @@ class line
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Centre of rotation on line
|
||||
point centreOfRotation_;
|
||||
|
||||
//- Direction of the constraining line
|
||||
vector dir_;
|
||||
vector direction_;
|
||||
|
||||
|
||||
public:
|
||||
@ -72,7 +78,8 @@ public:
|
||||
line
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
@ -91,6 +98,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Set the centre of rotation to the projection of the
|
||||
// centre of mass onto the line
|
||||
virtual void setCentreOfRotation(point&) const;
|
||||
|
||||
//- Apply and accumulate translational constraints
|
||||
virtual void constrainTranslation(pointConstraint&) const;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -50,10 +50,11 @@ namespace sixDoFRigidBodyMotionConstraints
|
||||
Foam::sixDoFRigidBodyMotionConstraints::orientation::orientation
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
)
|
||||
:
|
||||
sixDoFRigidBodyMotionConstraint(name, sDoFRBMCDict)
|
||||
sixDoFRigidBodyMotionConstraint(name, sDoFRBMCDict, motion)
|
||||
{
|
||||
read(sDoFRBMCDict);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,7 +25,8 @@ Class
|
||||
Foam::sixDoFRigidBodyMotionConstraints::orientation
|
||||
|
||||
Description
|
||||
Fix orientation of body in global space.
|
||||
Orientation constraint:
|
||||
fixed in global space.
|
||||
|
||||
SourceFiles
|
||||
sixDoFRigidBodyMotionOrientationConstraint.C
|
||||
@ -66,7 +67,8 @@ public:
|
||||
orientation
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -50,11 +50,11 @@ namespace sixDoFRigidBodyMotionConstraints
|
||||
Foam::sixDoFRigidBodyMotionConstraints::plane::plane
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
)
|
||||
:
|
||||
sixDoFRigidBodyMotionConstraint(name, sDoFRBMCDict),
|
||||
normal_(vector::zero)
|
||||
sixDoFRigidBodyMotionConstraint(name, sDoFRBMCDict, motion)
|
||||
{
|
||||
read(sDoFRBMCDict);
|
||||
}
|
||||
@ -68,6 +68,15 @@ Foam::sixDoFRigidBodyMotionConstraints::plane::~plane()
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::sixDoFRigidBodyMotionConstraints::plane::setCentreOfRotation
|
||||
(
|
||||
point& CofR
|
||||
) const
|
||||
{
|
||||
CofR = centreOfRotation_;
|
||||
}
|
||||
|
||||
|
||||
void Foam::sixDoFRigidBodyMotionConstraints::plane::constrainTranslation
|
||||
(
|
||||
pointConstraint& pc
|
||||
@ -91,7 +100,13 @@ bool Foam::sixDoFRigidBodyMotionConstraints::plane::read
|
||||
{
|
||||
sixDoFRigidBodyMotionConstraint::read(sDoFRBMCDict);
|
||||
|
||||
normal_ = sDoFRBMCCoeffs_.lookup("normal");
|
||||
centreOfRotation_ = sDoFRBMCCoeffs_.lookupOrDefault
|
||||
(
|
||||
"centreOfRotation",
|
||||
motion_.initialCentreOfMass()
|
||||
);
|
||||
|
||||
sDoFRBMCCoeffs_.lookup("normal") >> normal_;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -102,6 +117,8 @@ void Foam::sixDoFRigidBodyMotionConstraints::plane::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeKeyword("centreOfRotation")
|
||||
<< centreOfRotation_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("normal")
|
||||
<< normal_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,8 +25,11 @@ Class
|
||||
Foam::sixDoFRigidBodyMotionConstraints::plane
|
||||
|
||||
Description
|
||||
sixDoFRigidBodyMotionConstraint. Reference point may only move
|
||||
along a plane.
|
||||
Translation constraint on the centre of rotation:
|
||||
may only move on a plane.
|
||||
|
||||
If 'centreOfRotation' is not provided in the dictionary the centre of mass
|
||||
is used.
|
||||
|
||||
SourceFiles
|
||||
sixDoFRigidBodyMotionPlaneConstraint.C
|
||||
@ -56,6 +59,9 @@ class plane
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Centre of rotation on plane
|
||||
point centreOfRotation_;
|
||||
|
||||
//- Normal to plane
|
||||
vector normal_;
|
||||
|
||||
@ -72,7 +78,8 @@ public:
|
||||
plane
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
@ -91,6 +98,10 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Set the centre of rotation to the projection of the
|
||||
// centre of mass onto the plane
|
||||
virtual void setCentreOfRotation(point&) const;
|
||||
|
||||
//- Apply and accumulate translational constraints
|
||||
virtual void constrainTranslation(pointConstraint&) const;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -50,11 +50,12 @@ namespace sixDoFRigidBodyMotionConstraints
|
||||
Foam::sixDoFRigidBodyMotionConstraints::point::point
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
)
|
||||
:
|
||||
sixDoFRigidBodyMotionConstraint(name, sDoFRBMCDict),
|
||||
point_()
|
||||
sixDoFRigidBodyMotionConstraint(name, sDoFRBMCDict, motion),
|
||||
centreOfRotation_()
|
||||
{
|
||||
read(sDoFRBMCDict);
|
||||
}
|
||||
@ -68,6 +69,15 @@ Foam::sixDoFRigidBodyMotionConstraints::point::~point()
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::sixDoFRigidBodyMotionConstraints::point::setCentreOfRotation
|
||||
(
|
||||
Foam::point& CofR
|
||||
) const
|
||||
{
|
||||
CofR = centreOfRotation_;
|
||||
}
|
||||
|
||||
|
||||
void Foam::sixDoFRigidBodyMotionConstraints::point::constrainTranslation
|
||||
(
|
||||
pointConstraint& pc
|
||||
@ -91,7 +101,11 @@ bool Foam::sixDoFRigidBodyMotionConstraints::point::read
|
||||
{
|
||||
sixDoFRigidBodyMotionConstraint::read(sDoFRBMCDict);
|
||||
|
||||
sDoFRBMCCoeffs_.lookup("point") >> point_;
|
||||
centreOfRotation_ = sDoFRBMCCoeffs_.lookupOrDefault
|
||||
(
|
||||
"centreOfRotation",
|
||||
motion_.initialCentreOfMass()
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -102,8 +116,8 @@ void Foam::sixDoFRigidBodyMotionConstraints::point::write
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
os.writeKeyword("point")
|
||||
<< point_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("centreOfRotation")
|
||||
<< centreOfRotation_ << token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,7 +25,11 @@ Class
|
||||
Foam::sixDoFRigidBodyMotionConstraints::point
|
||||
|
||||
Description
|
||||
Point fixed in space.
|
||||
Translation constraint on the centre of rotation:
|
||||
fixed in space.
|
||||
|
||||
If 'centreOfRotation' is not provided in the dictionary the centre of mass
|
||||
is used.
|
||||
|
||||
SourceFiles
|
||||
sixDoFRigidBodyMotionPointConstraint.C
|
||||
@ -56,11 +60,8 @@ class point
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Point which is rigidly attached to the body and constrains
|
||||
// it so that this point remains fixed. This serves as the
|
||||
// reference point for displacements as well as the target
|
||||
// position.
|
||||
Foam::point point_;
|
||||
//- Fixed centre of rotation
|
||||
Foam::point centreOfRotation_;
|
||||
|
||||
|
||||
public:
|
||||
@ -75,7 +76,8 @@ public:
|
||||
point
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
@ -94,6 +96,9 @@ public:
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Set the centre of rotation to the point
|
||||
virtual void setCentreOfRotation(Foam::point&) const;
|
||||
|
||||
//- Apply and accumulate translational constraints
|
||||
virtual void constrainTranslation(pointConstraint&) const;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -39,11 +39,13 @@ namespace Foam
|
||||
Foam::sixDoFRigidBodyMotionConstraint::sixDoFRigidBodyMotionConstraint
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
)
|
||||
:
|
||||
name_(name),
|
||||
sDoFRBMCCoeffs_(sDoFRBMCDict)
|
||||
sDoFRBMCCoeffs_(sDoFRBMCDict),
|
||||
motion_(motion)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -46,6 +46,7 @@ SourceFiles
|
||||
#include "Time.H"
|
||||
#include "dictionary.H"
|
||||
#include "autoPtr.H"
|
||||
#include "point.H"
|
||||
#include "pointConstraint.H"
|
||||
#include "runTimeSelectionTables.H"
|
||||
|
||||
@ -75,6 +76,9 @@ protected:
|
||||
//- Constraint model specific coefficient dictionary
|
||||
dictionary sDoFRBMCCoeffs_;
|
||||
|
||||
//- Reference to the body motion
|
||||
const sixDoFRigidBodyMotion& motion_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -89,8 +93,12 @@ public:
|
||||
autoPtr,
|
||||
sixDoFRigidBodyMotionConstraint,
|
||||
dictionary,
|
||||
(const word& name, const dictionary& sDoFRBMCDict),
|
||||
(name, sDoFRBMCDict)
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
),
|
||||
(name, sDoFRBMCDict, motion)
|
||||
);
|
||||
|
||||
|
||||
@ -100,7 +108,8 @@ public:
|
||||
sixDoFRigidBodyMotionConstraint
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
@ -113,7 +122,8 @@ public:
|
||||
static autoPtr<sixDoFRigidBodyMotionConstraint> New
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
);
|
||||
|
||||
|
||||
@ -129,6 +139,10 @@ public:
|
||||
return name_;
|
||||
}
|
||||
|
||||
//- Set the centre of rotation if not the centre of mass
|
||||
virtual void setCentreOfRotation(point&) const
|
||||
{}
|
||||
|
||||
//- Apply and accumulate translational constraints
|
||||
virtual void constrainTranslation(pointConstraint&) const = 0;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -31,7 +31,8 @@ Foam::autoPtr<Foam::sixDoFRigidBodyMotionConstraint>
|
||||
Foam::sixDoFRigidBodyMotionConstraint::New
|
||||
(
|
||||
const word& name,
|
||||
const dictionary& sDoFRBMCDict
|
||||
const dictionary& sDoFRBMCDict,
|
||||
const sixDoFRigidBodyMotion& motion
|
||||
)
|
||||
{
|
||||
const word constraintType
|
||||
@ -48,7 +49,9 @@ Foam::sixDoFRigidBodyMotionConstraint::New
|
||||
(
|
||||
"sixDoFRigidBodyMotionConstraint::New"
|
||||
"("
|
||||
"const word& name,"
|
||||
"const dictionary& sDoFRBMCDict"
|
||||
"const sixDoFRigidBodyMotion& motion"
|
||||
")"
|
||||
) << "Unknown sixDoFRigidBodyMotionConstraint type "
|
||||
<< constraintType << nl << nl
|
||||
@ -59,7 +62,7 @@ Foam::sixDoFRigidBodyMotionConstraint::New
|
||||
|
||||
return autoPtr<sixDoFRigidBodyMotionConstraint>
|
||||
(
|
||||
cstrIter()(name, sDoFRBMCDict)
|
||||
cstrIter()(name, sDoFRBMCDict, motion)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -129,8 +129,8 @@ Foam::sixDoFRigidBodyMotionRestraints::linearAxialAngularSpring::restrain
|
||||
restraintForce = vector::zero;
|
||||
|
||||
// Not needed to be altered as restraintForce is zero, but set to
|
||||
// centreOfMass to be sure of no spurious moment
|
||||
restraintPosition = motion.centreOfMass();
|
||||
// centreOfRotation to be sure of no spurious moment
|
||||
restraintPosition = motion.centreOfRotation();
|
||||
|
||||
if (motion.report())
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -80,14 +80,14 @@ void Foam::sixDoFRigidBodyMotionRestraints::linearSpring::restrain
|
||||
vector& restraintMoment
|
||||
) const
|
||||
{
|
||||
restraintPosition = motion.currentPosition(refAttachmentPt_);
|
||||
restraintPosition = motion.transform(refAttachmentPt_);
|
||||
|
||||
vector r = restraintPosition - anchor_;
|
||||
|
||||
scalar magR = mag(r);
|
||||
r /= (magR + VSMALL);
|
||||
|
||||
vector v = motion.currentVelocity(restraintPosition);
|
||||
vector v = motion.velocity(restraintPosition);
|
||||
|
||||
restraintForce = -stiffness_*(magR - restLength_)*r - damping_*(r & v)*r;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -104,8 +104,8 @@ void Foam::sixDoFRigidBodyMotionRestraints::sphericalAngularSpring::restrain
|
||||
restraintForce = vector::zero;
|
||||
|
||||
// Not needed to be altered as restraintForce is zero, but set to
|
||||
// centreOfMass to be sure of no spurious moment
|
||||
restraintPosition = motion.centreOfMass();
|
||||
// centreOfRotation to be sure of no spurious moment
|
||||
restraintPosition = motion.centreOfRotation();
|
||||
|
||||
if (motion.report())
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -130,8 +130,8 @@ Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::restrain
|
||||
restraintForce = vector::zero;
|
||||
|
||||
// Not needed to be altered as restraintForce is zero, but set to
|
||||
// centreOfMass to be sure of no spurious moment
|
||||
restraintPosition = motion.centreOfMass();
|
||||
// centreOfRotation to be sure of no spurious moment
|
||||
restraintPosition = motion.centreOfRotation();
|
||||
|
||||
if (motion.report())
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -44,22 +44,24 @@ void Foam::sixDoFRigidBodyMotion::applyRestraints()
|
||||
Info<< "Restraint " << restraints_[rI].name() << ": ";
|
||||
}
|
||||
|
||||
// restraint position
|
||||
// Restraint position
|
||||
point rP = vector::zero;
|
||||
|
||||
// restraint force
|
||||
// Restraint force
|
||||
vector rF = vector::zero;
|
||||
|
||||
// restraint moment
|
||||
// Restraint moment
|
||||
vector rM = vector::zero;
|
||||
|
||||
// Accumulate the restraints
|
||||
restraints_[rI].restrain(*this, rP, rF, rM);
|
||||
|
||||
// Update the acceleration
|
||||
a() += rF/mass_;
|
||||
|
||||
// Moments are returned in global axes, transforming to
|
||||
// body local to add to torque.
|
||||
tau() += Q().T() & (rM + ((rP - centreOfMass()) ^ rF));
|
||||
tau() += Q().T() & (rM + ((rP - centreOfRotation()) ^ rF));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -75,57 +77,16 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion()
|
||||
constraints_(),
|
||||
tConstraints_(tensor::I),
|
||||
rConstraints_(tensor::I),
|
||||
initialCentreOfMass_(vector::zero),
|
||||
initialCentreOfRotation_(vector::zero),
|
||||
initialQ_(I),
|
||||
momentOfInertia_(diagTensor::one*VSMALL),
|
||||
mass_(VSMALL),
|
||||
momentOfInertia_(diagTensor::one*VSMALL),
|
||||
aRelax_(1.0),
|
||||
aDamp_(1.0),
|
||||
report_(false)
|
||||
{}
|
||||
|
||||
|
||||
Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
|
||||
(
|
||||
const point& centreOfMass,
|
||||
const tensor& Q,
|
||||
const vector& v,
|
||||
const vector& a,
|
||||
const vector& pi,
|
||||
const vector& tau,
|
||||
scalar mass,
|
||||
const point& initialCentreOfMass,
|
||||
const tensor& initialQ,
|
||||
const diagTensor& momentOfInertia,
|
||||
scalar aRelax,
|
||||
scalar aDamp,
|
||||
bool report
|
||||
)
|
||||
:
|
||||
motionState_
|
||||
(
|
||||
centreOfMass,
|
||||
Q,
|
||||
v,
|
||||
a,
|
||||
pi,
|
||||
tau
|
||||
),
|
||||
motionState0_(motionState_),
|
||||
restraints_(),
|
||||
constraints_(),
|
||||
tConstraints_(tensor::I),
|
||||
rConstraints_(tensor::I),
|
||||
initialCentreOfMass_(initialCentreOfMass),
|
||||
initialQ_(initialQ),
|
||||
momentOfInertia_(momentOfInertia),
|
||||
mass_(mass),
|
||||
aRelax_(aRelax),
|
||||
aDamp_(aDamp),
|
||||
report_(report)
|
||||
{}
|
||||
|
||||
|
||||
Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
|
||||
(
|
||||
const dictionary& dict,
|
||||
@ -133,7 +94,7 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
|
||||
)
|
||||
:
|
||||
motionState_(stateDict),
|
||||
motionState0_(motionState_),
|
||||
motionState0_(),
|
||||
restraints_(),
|
||||
constraints_(),
|
||||
tConstraints_(tensor::I),
|
||||
@ -146,6 +107,7 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
|
||||
vector(dict.lookup("centreOfMass"))
|
||||
)
|
||||
),
|
||||
initialCentreOfRotation_(initialCentreOfMass_),
|
||||
initialQ_
|
||||
(
|
||||
dict.lookupOrDefault
|
||||
@ -154,14 +116,35 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
|
||||
dict.lookupOrDefault("orientation", tensor::I)
|
||||
)
|
||||
),
|
||||
momentOfInertia_(dict.lookup("momentOfInertia")),
|
||||
mass_(readScalar(dict.lookup("mass"))),
|
||||
momentOfInertia_(dict.lookup("momentOfInertia")),
|
||||
aRelax_(dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0)),
|
||||
aDamp_(dict.lookupOrDefault<scalar>("accelerationDamping", 1.0)),
|
||||
report_(dict.lookupOrDefault<Switch>("report", false))
|
||||
{
|
||||
addRestraints(dict);
|
||||
|
||||
// Set constraints and initial centre of rotation
|
||||
// if different to the centre of mass
|
||||
addConstraints(dict);
|
||||
|
||||
// If the centres of mass and rotation are different ...
|
||||
vector R(initialCentreOfMass_ - initialCentreOfRotation_);
|
||||
if (magSqr(R) > VSMALL)
|
||||
{
|
||||
// ... correct the moment of inertia tensor using parallel axes theorem
|
||||
momentOfInertia_ += mass_*diag(I*magSqr(R) - sqr(R));
|
||||
|
||||
// ... and if the centre of rotation is not specified for motion state
|
||||
// update it
|
||||
if (!stateDict.found("centreOfRotation"))
|
||||
{
|
||||
motionState_.centreOfRotation() = initialCentreOfRotation_;
|
||||
}
|
||||
}
|
||||
|
||||
// Save the old-time motion state
|
||||
motionState0_ = motionState_;
|
||||
}
|
||||
|
||||
|
||||
@ -174,22 +157,16 @@ Foam::sixDoFRigidBodyMotion::sixDoFRigidBodyMotion
|
||||
motionState0_(sDoFRBM.motionState0_),
|
||||
restraints_(sDoFRBM.restraints_),
|
||||
constraints_(sDoFRBM.constraints_),
|
||||
initialCentreOfMass_(sDoFRBM.initialCentreOfMass_),
|
||||
initialCentreOfRotation_(sDoFRBM.initialCentreOfRotation_),
|
||||
initialQ_(sDoFRBM.initialQ_),
|
||||
momentOfInertia_(sDoFRBM.momentOfInertia_),
|
||||
mass_(sDoFRBM.mass_),
|
||||
momentOfInertia_(sDoFRBM.momentOfInertia_),
|
||||
aRelax_(sDoFRBM.aRelax_),
|
||||
aDamp_(sDoFRBM.aDamp_),
|
||||
report_(sDoFRBM.report_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::sixDoFRigidBodyMotion::~sixDoFRigidBodyMotion()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::sixDoFRigidBodyMotion::addRestraints
|
||||
@ -252,10 +229,12 @@ void Foam::sixDoFRigidBodyMotion::addConstraints
|
||||
sixDoFRigidBodyMotionConstraint::New
|
||||
(
|
||||
iter().keyword(),
|
||||
iter().dict()
|
||||
iter().dict(),
|
||||
*this
|
||||
)
|
||||
);
|
||||
|
||||
constraints_[i].setCentreOfRotation(initialCentreOfRotation_);
|
||||
constraints_[i].constrainTranslation(pct);
|
||||
constraints_[i].constrainRotation(pcr);
|
||||
|
||||
@ -289,7 +268,7 @@ void Foam::sixDoFRigidBodyMotion::updatePosition
|
||||
pi() = rConstraints_ & aDamp_*(pi0() + 0.5*deltaT0*tau());
|
||||
|
||||
// Leapfrog move part
|
||||
centreOfMass() = centreOfMass0() + deltaT*v();
|
||||
centreOfRotation() = centreOfRotation0() + deltaT*v();
|
||||
|
||||
// Leapfrog orientation adjustment
|
||||
Tuple2<tensor, vector> Qpi = rotate(Q0(), pi(), deltaT);
|
||||
@ -346,112 +325,30 @@ void Foam::sixDoFRigidBodyMotion::updateAcceleration
|
||||
}
|
||||
|
||||
|
||||
void Foam::sixDoFRigidBodyMotion::updateVelocity(scalar deltaT)
|
||||
{
|
||||
// Second leapfrog velocity adjust part, required after motion and
|
||||
// acceleration calculation
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
v() += tConstraints_ & aDamp_*0.5*deltaT*a();
|
||||
pi() += rConstraints_ & aDamp_*0.5*deltaT*tau();
|
||||
|
||||
if (report_)
|
||||
{
|
||||
status();
|
||||
}
|
||||
}
|
||||
|
||||
Pstream::scatter(motionState_);
|
||||
}
|
||||
|
||||
|
||||
void Foam::sixDoFRigidBodyMotion::updateAcceleration
|
||||
(
|
||||
const pointField& positions,
|
||||
const vectorField& forces,
|
||||
scalar deltaT
|
||||
)
|
||||
{
|
||||
vector fGlobal = vector::zero;
|
||||
|
||||
vector tauGlobal = vector::zero;
|
||||
|
||||
if (Pstream::master())
|
||||
{
|
||||
fGlobal = sum(forces);
|
||||
|
||||
forAll(positions, i)
|
||||
{
|
||||
tauGlobal += (positions[i] - centreOfMass()) ^ forces[i];
|
||||
}
|
||||
}
|
||||
|
||||
updateAcceleration(fGlobal, tauGlobal, deltaT);
|
||||
}
|
||||
|
||||
|
||||
Foam::point Foam::sixDoFRigidBodyMotion::predictedPosition
|
||||
(
|
||||
const point& pInitial,
|
||||
const vector& deltaForce,
|
||||
const vector& deltaMoment,
|
||||
scalar deltaT
|
||||
) const
|
||||
{
|
||||
vector vTemp = v() + deltaT*(a() + deltaForce/mass_);
|
||||
vector piTemp = pi() + deltaT*(tau() + (Q().T() & deltaMoment));
|
||||
point centreOfMassTemp = centreOfMass0() + deltaT*vTemp;
|
||||
Tuple2<tensor, vector> QpiTemp = rotate(Q0(), piTemp, deltaT);
|
||||
|
||||
return
|
||||
(
|
||||
centreOfMassTemp
|
||||
+ (QpiTemp.first() & initialQ_.T() & (pInitial - initialCentreOfMass_))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::vector Foam::sixDoFRigidBodyMotion::predictedOrientation
|
||||
(
|
||||
const vector& vInitial,
|
||||
const vector& deltaMoment,
|
||||
scalar deltaT
|
||||
) const
|
||||
{
|
||||
vector piTemp = pi() + deltaT*(tau() + (Q().T() & deltaMoment));
|
||||
Tuple2<tensor, vector> QpiTemp = rotate(Q0(), piTemp, deltaT);
|
||||
|
||||
vector o(QpiTemp.first() & initialQ_.T() & vInitial);
|
||||
o /= mag(o);
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
void Foam::sixDoFRigidBodyMotion::status() const
|
||||
{
|
||||
Info<< "Centre of mass: " << centreOfMass() << nl
|
||||
Info<< "Centre of rotation: " << centreOfRotation() << nl
|
||||
<< "Centre of mass: " << centreOfMass() << nl
|
||||
<< "Linear velocity: " << v() << nl
|
||||
<< "Angular velocity: " << omega()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::pointField> Foam::sixDoFRigidBodyMotion::currentPosition
|
||||
Foam::tmp<Foam::pointField> Foam::sixDoFRigidBodyMotion::transform
|
||||
(
|
||||
const pointField& initialPoints
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
centreOfMass()
|
||||
+ (Q() & initialQ_.T() & (initialPoints - initialCentreOfMass_))
|
||||
centreOfRotation()
|
||||
+ (Q() & initialQ_.T() & (initialPoints - initialCentreOfRotation_))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::pointField> Foam::sixDoFRigidBodyMotion::scaledPosition
|
||||
Foam::tmp<Foam::pointField> Foam::sixDoFRigidBodyMotion::transform
|
||||
(
|
||||
const pointField& initialPoints,
|
||||
const scalarField& scale
|
||||
@ -460,7 +357,7 @@ Foam::tmp<Foam::pointField> Foam::sixDoFRigidBodyMotion::scaledPosition
|
||||
// Calculate the transformation septerion from the initial state
|
||||
septernion s
|
||||
(
|
||||
centreOfMass() - initialCentreOfMass(),
|
||||
centreOfRotation() - initialCentreOfRotation(),
|
||||
quaternion(Q() & initialQ().T())
|
||||
);
|
||||
|
||||
@ -475,7 +372,7 @@ Foam::tmp<Foam::pointField> Foam::sixDoFRigidBodyMotion::scaledPosition
|
||||
// Use solid-body motion where scale = 1
|
||||
if (scale[pointi] > 1 - SMALL)
|
||||
{
|
||||
points[pointi] = currentPosition(initialPoints[pointi]);
|
||||
points[pointi] = transform(initialPoints[pointi]);
|
||||
}
|
||||
// Slerp septernion interpolation
|
||||
else
|
||||
@ -483,8 +380,12 @@ Foam::tmp<Foam::pointField> Foam::sixDoFRigidBodyMotion::scaledPosition
|
||||
septernion ss(slerp(septernion::I, s, scale[pointi]));
|
||||
|
||||
points[pointi] =
|
||||
initialCentreOfMass()
|
||||
+ ss.transform(initialPoints[pointi] - initialCentreOfMass());
|
||||
initialCentreOfRotation()
|
||||
+ ss.transform
|
||||
(
|
||||
initialPoints[pointi]
|
||||
- initialCentreOfRotation()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -493,22 +394,4 @@ Foam::tmp<Foam::pointField> Foam::sixDoFRigidBodyMotion::scaledPosition
|
||||
}
|
||||
|
||||
|
||||
bool Foam::sixDoFRigidBodyMotion::read(const dictionary& dict)
|
||||
{
|
||||
dict.lookup("momentOfInertia") >> momentOfInertia_;
|
||||
dict.lookup("mass") >> mass_;
|
||||
aRelax_ = dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0);
|
||||
aDamp_ = dict.lookupOrDefault<scalar>("accelerationDamping", 1.0);
|
||||
report_ = dict.lookupOrDefault<Switch>("report", false);
|
||||
|
||||
restraints_.clear();
|
||||
addRestraints(dict);
|
||||
|
||||
constraints_.clear();
|
||||
addConstraints(dict);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -42,8 +42,8 @@ Description
|
||||
url = {http://link.aip.org/link/?JCP/107/5840/1},
|
||||
doi = {10.1063/1.474310}
|
||||
|
||||
Can add restraints (i.e. a spring) and constraints (i.e. motion
|
||||
may only be on a plane).
|
||||
Can add restraints (e.g. a spring)
|
||||
and constraints (e.g. motion may only be on a plane).
|
||||
|
||||
SourceFiles
|
||||
sixDoFRigidBodyMotionI.H
|
||||
@ -66,16 +66,6 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class Istream;
|
||||
class Ostream;
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
class sixDoFRigidBodyMotion;
|
||||
Istream& operator>>(Istream&, sixDoFRigidBodyMotion&);
|
||||
Ostream& operator<<(Ostream&, const sixDoFRigidBodyMotion&);
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class sixDoFRigidBodyMotion Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -105,16 +95,19 @@ class sixDoFRigidBodyMotion
|
||||
//- Centre of mass of initial state
|
||||
point initialCentreOfMass_;
|
||||
|
||||
//- Centre of rotation of initial state
|
||||
point initialCentreOfRotation_;
|
||||
|
||||
//- Orientation of initial state
|
||||
tensor initialQ_;
|
||||
|
||||
//- Mass of the body
|
||||
scalar mass_;
|
||||
|
||||
//- Moment of inertia of the body in reference configuration
|
||||
// (Q = I)
|
||||
diagTensor momentOfInertia_;
|
||||
|
||||
//- Mass of the body
|
||||
scalar mass_;
|
||||
|
||||
//- Acceleration relaxation coefficient
|
||||
scalar aRelax_;
|
||||
|
||||
@ -157,54 +150,54 @@ class sixDoFRigidBodyMotion
|
||||
|
||||
// Access
|
||||
|
||||
//- Return access to the restraints
|
||||
//- Return the restraints
|
||||
inline const PtrList<sixDoFRigidBodyMotionRestraint>&
|
||||
restraints() const;
|
||||
|
||||
//- Return access to the constraints
|
||||
//- Return the constraints
|
||||
inline const PtrList<sixDoFRigidBodyMotionConstraint>&
|
||||
constraints() const;
|
||||
|
||||
//- Return access to the initial centre of mass
|
||||
inline const point& initialCentreOfMass() const;
|
||||
//- Return the initial centre of rotation
|
||||
inline const point& initialCentreOfRotation() const;
|
||||
|
||||
//- Return access to the initial orientation
|
||||
//- Return the initial orientation
|
||||
inline const tensor& initialQ() const;
|
||||
|
||||
//- Return access to the orientation
|
||||
//- Return the orientation
|
||||
inline const tensor& Q() const;
|
||||
|
||||
//- Return access to acceleration
|
||||
//- Return the current acceleration
|
||||
inline const vector& a() const;
|
||||
|
||||
//- Return access to angular momentum
|
||||
//- Return the current angular momentum
|
||||
inline const vector& pi() const;
|
||||
|
||||
//- Return access to torque
|
||||
//- Return the current torque
|
||||
inline const vector& tau() const;
|
||||
|
||||
//- Return access to the orientation at previous time-step
|
||||
//- Return the orientation at previous time-step
|
||||
inline const tensor& Q0() const;
|
||||
|
||||
//- Return access to velocity at previous time-step
|
||||
//- Return the velocity at previous time-step
|
||||
inline const vector& v0() const;
|
||||
|
||||
//- Return access to acceleration at previous time-step
|
||||
//- Return the acceleration at previous time-step
|
||||
inline const vector& a0() const;
|
||||
|
||||
//- Return access to angular momentum at previous time-step
|
||||
//- Return the angular momentum at previous time-step
|
||||
inline const vector& pi0() const;
|
||||
|
||||
//- Return access to torque at previous time-step
|
||||
//- Return the torque at previous time-step
|
||||
inline const vector& tau0() const;
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
//- Return access to the centre of mass
|
||||
inline point& initialCentreOfMass();
|
||||
//- Return the centre of rotation
|
||||
inline point& initialCentreOfRotation();
|
||||
|
||||
//- Return access to the centre of mass
|
||||
//- Return initial orientation
|
||||
inline tensor& initialQ();
|
||||
|
||||
//- Return non-const access to the orientation
|
||||
@ -230,24 +223,6 @@ public:
|
||||
//- Construct null
|
||||
sixDoFRigidBodyMotion();
|
||||
|
||||
//- Construct from components
|
||||
sixDoFRigidBodyMotion
|
||||
(
|
||||
const point& centreOfMass,
|
||||
const tensor& Q,
|
||||
const vector& v,
|
||||
const vector& a,
|
||||
const vector& pi,
|
||||
const vector& tau,
|
||||
scalar mass,
|
||||
const point& initialCentreOfMass,
|
||||
const tensor& initialQ,
|
||||
const diagTensor& momentOfInertia,
|
||||
scalar aRelax = 1.0,
|
||||
scalar aDamp = 1.0,
|
||||
bool report = false
|
||||
);
|
||||
|
||||
//- Construct from constant and state dictionaries
|
||||
sixDoFRigidBodyMotion
|
||||
(
|
||||
@ -259,12 +234,59 @@ public:
|
||||
sixDoFRigidBodyMotion(const sixDoFRigidBodyMotion&);
|
||||
|
||||
|
||||
//- Destructor
|
||||
~sixDoFRigidBodyMotion();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the mass
|
||||
inline scalar mass() const;
|
||||
|
||||
//- Return the inertia tensor
|
||||
inline const diagTensor& momentOfInertia() const;
|
||||
|
||||
//- Return the motion state
|
||||
inline const sixDoFRigidBodyMotionState& state() const;
|
||||
|
||||
//- Return the current centre of rotation
|
||||
inline const point& centreOfRotation() const;
|
||||
|
||||
//- Return the centre of rotation at previous time-step
|
||||
inline const point& centreOfRotation0() const;
|
||||
|
||||
//- Return the initial centre of mass
|
||||
inline const point& initialCentreOfMass() const;
|
||||
|
||||
//- Return the current centre of mass
|
||||
inline point centreOfMass() const;
|
||||
|
||||
//- Return the orientation tensor, Q.
|
||||
// globalVector = Q & bodyLocalVector
|
||||
// bodyLocalVector = Q.T() & globalVector
|
||||
inline const tensor& orientation() const;
|
||||
|
||||
//- Return the angular velocity in the global frame
|
||||
inline vector omega() const;
|
||||
|
||||
//- Return the current velocity
|
||||
inline const vector& v() const;
|
||||
|
||||
inline vector momentArm() const;
|
||||
|
||||
//- Return the report Switch
|
||||
inline bool report() const;
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
//- Store the motion state at the beginning of the time-step
|
||||
inline void newTime();
|
||||
|
||||
//- Return non-const access to the centre of rotation
|
||||
inline point& centreOfRotation();
|
||||
|
||||
|
||||
// Constraints and Restraints
|
||||
|
||||
//- Add restraints to the motion, public to allow external
|
||||
// addition of restraints after construction
|
||||
void addRestraints(const dictionary& dict);
|
||||
@ -273,14 +295,13 @@ public:
|
||||
// addition of restraints after construction
|
||||
void addConstraints(const dictionary& dict);
|
||||
|
||||
|
||||
// Update state
|
||||
|
||||
//- First leapfrog velocity adjust and motion part, required
|
||||
// before force calculation. Takes old timestep for variable
|
||||
// timestep cases.
|
||||
void updatePosition
|
||||
(
|
||||
scalar deltaT,
|
||||
scalar deltaT0
|
||||
);
|
||||
void updatePosition(scalar deltaT, scalar deltaT0);
|
||||
|
||||
//- Second leapfrog velocity adjust part
|
||||
// required after motion and force calculation
|
||||
@ -291,127 +312,38 @@ public:
|
||||
scalar deltaT
|
||||
);
|
||||
|
||||
//- Second leapfrog velocity adjust part
|
||||
// required after motion and force calculation
|
||||
void updateVelocity(scalar deltaT);
|
||||
//- Report the status of the motion
|
||||
void status() const;
|
||||
|
||||
//- Global forces supplied at locations, calculating net force
|
||||
// and moment
|
||||
void updateAcceleration
|
||||
(
|
||||
const pointField& positions,
|
||||
const vectorField& forces,
|
||||
scalar deltaT
|
||||
);
|
||||
|
||||
// Transformations
|
||||
|
||||
//- Return the velocity of a position
|
||||
inline point velocity(const point& pt) const;
|
||||
|
||||
//- Transform the given initial state point by the current motion
|
||||
// state
|
||||
inline point transform(const point& initialPoints) const;
|
||||
|
||||
//- Transform the given initial state pointField by the current
|
||||
// motion state
|
||||
tmp<pointField> currentPosition(const pointField& initialPoints) const;
|
||||
tmp<pointField> transform(const pointField& initialPoints) const;
|
||||
|
||||
//- Transform the given initial state pointField by the current
|
||||
// motion state
|
||||
tmp<pointField> scaledPosition
|
||||
// motion state scaled by the given scale
|
||||
tmp<pointField> transform
|
||||
(
|
||||
const pointField& initialPoints,
|
||||
const scalarField& scale
|
||||
) const;
|
||||
|
||||
//- Transform the given initial state point by the current motion
|
||||
// state
|
||||
inline point currentPosition(const point& initialPoints) const;
|
||||
|
||||
//- Transform the given initial state direction by the current
|
||||
// motion state
|
||||
inline vector currentOrientation(const vector& vInitial) const;
|
||||
|
||||
//- Access the orientation tensor, Q.
|
||||
// globalVector = Q & bodyLocalVector
|
||||
// bodyLocalVector = Q.T() & globalVector
|
||||
inline const tensor& orientation() const;
|
||||
|
||||
//- Predict the position of the supplied initial state point
|
||||
// after deltaT given the current motion state and the
|
||||
// additional supplied force and moment
|
||||
point predictedPosition
|
||||
(
|
||||
const point& initialPoints,
|
||||
const vector& deltaForce,
|
||||
const vector& deltaMoment,
|
||||
scalar deltaT
|
||||
) const;
|
||||
|
||||
//- Predict the orientation of the supplied initial state
|
||||
// vector after deltaT given the current motion state and the
|
||||
// additional supplied moment
|
||||
vector predictedOrientation
|
||||
(
|
||||
const vector& vInitial,
|
||||
const vector& deltaMoment,
|
||||
scalar deltaT
|
||||
) const;
|
||||
|
||||
//- Return the angular velocity in the global frame
|
||||
inline vector omega() const;
|
||||
|
||||
//- Return the velocity of a position
|
||||
inline point currentVelocity(const point& pt) const;
|
||||
|
||||
//- Report the status of the motion
|
||||
void status() const;
|
||||
|
||||
|
||||
// Access
|
||||
|
||||
//- Return access to the motion state
|
||||
inline const sixDoFRigidBodyMotionState& state() const;
|
||||
|
||||
//- Return const access to the centre of mass
|
||||
inline const point& centreOfMass() const;
|
||||
|
||||
//- Return const access to the centre of mass at previous time-step
|
||||
inline const point& centreOfMass0() const;
|
||||
|
||||
//- Return access to the inertia tensor
|
||||
inline const diagTensor& momentOfInertia() const;
|
||||
|
||||
//- Return const access to the mass
|
||||
inline scalar mass() const;
|
||||
|
||||
//- Return the report Switch
|
||||
inline bool report() const;
|
||||
|
||||
//- Return access to velocity
|
||||
inline const vector& v() const;
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
//- Store the motion state at the beginning of the time-step
|
||||
inline void newTime();
|
||||
|
||||
//- Return non-const access to the centre of mass
|
||||
inline point& centreOfMass();
|
||||
|
||||
//- Return non-const access to the inertia tensor
|
||||
inline diagTensor& momentOfInertia();
|
||||
|
||||
//- Return non-const access to the mass
|
||||
inline scalar& mass();
|
||||
|
||||
|
||||
//- Write
|
||||
void write(Ostream&) const;
|
||||
|
||||
|
||||
//- Read coefficients dictionary and update system parameters,
|
||||
// constraints and restraints but not the current state
|
||||
bool read(const dictionary& dict);
|
||||
|
||||
|
||||
// IOstream Operators
|
||||
|
||||
friend Istream& operator>>(Istream&, sixDoFRigidBodyMotion&);
|
||||
friend Ostream& operator<<(Ostream&, const sixDoFRigidBodyMotion&);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,8 +25,10 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
inline Foam::tensor
|
||||
Foam::sixDoFRigidBodyMotion::rotationTensorX(scalar phi) const
|
||||
inline Foam::tensor Foam::sixDoFRigidBodyMotion::rotationTensorX
|
||||
(
|
||||
scalar phi
|
||||
) const
|
||||
{
|
||||
return tensor
|
||||
(
|
||||
@ -37,8 +39,10 @@ Foam::sixDoFRigidBodyMotion::rotationTensorX(scalar phi) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::tensor
|
||||
Foam::sixDoFRigidBodyMotion::rotationTensorY(scalar phi) const
|
||||
inline Foam::tensor Foam::sixDoFRigidBodyMotion::rotationTensorY
|
||||
(
|
||||
scalar phi
|
||||
) const
|
||||
{
|
||||
return tensor
|
||||
(
|
||||
@ -49,8 +53,10 @@ Foam::sixDoFRigidBodyMotion::rotationTensorY(scalar phi) const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::tensor
|
||||
Foam::sixDoFRigidBodyMotion::rotationTensorZ(scalar phi) const
|
||||
inline Foam::tensor Foam::sixDoFRigidBodyMotion::rotationTensorZ
|
||||
(
|
||||
scalar phi
|
||||
) const
|
||||
{
|
||||
return tensor
|
||||
(
|
||||
@ -97,13 +103,6 @@ Foam::sixDoFRigidBodyMotion::rotate
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::sixDoFRigidBodyMotionState&
|
||||
Foam::sixDoFRigidBodyMotion::state() const
|
||||
{
|
||||
return motionState_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::PtrList<Foam::sixDoFRigidBodyMotionRestraint>&
|
||||
Foam::sixDoFRigidBodyMotion::restraints() const
|
||||
{
|
||||
@ -119,9 +118,9 @@ Foam::sixDoFRigidBodyMotion::constraints() const
|
||||
|
||||
|
||||
inline const Foam::point&
|
||||
Foam::sixDoFRigidBodyMotion::initialCentreOfMass() const
|
||||
Foam::sixDoFRigidBodyMotion::initialCentreOfRotation() const
|
||||
{
|
||||
return initialCentreOfMass_;
|
||||
return initialCentreOfRotation_;
|
||||
}
|
||||
|
||||
|
||||
@ -192,9 +191,9 @@ inline const Foam::vector& Foam::sixDoFRigidBodyMotion::tau0() const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::point& Foam::sixDoFRigidBodyMotion::initialCentreOfMass()
|
||||
inline Foam::point& Foam::sixDoFRigidBodyMotion::initialCentreOfRotation()
|
||||
{
|
||||
return initialCentreOfMass_;
|
||||
return initialCentreOfRotation_;
|
||||
}
|
||||
|
||||
|
||||
@ -236,25 +235,54 @@ inline Foam::vector& Foam::sixDoFRigidBodyMotion::tau()
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
inline Foam::point Foam::sixDoFRigidBodyMotion::currentPosition
|
||||
(
|
||||
const point& initialPoints
|
||||
) const
|
||||
inline Foam::scalar Foam::sixDoFRigidBodyMotion::mass() const
|
||||
{
|
||||
return
|
||||
(
|
||||
centreOfMass()
|
||||
+ (Q() & initialQ_.T() & (initialPoints - initialCentreOfMass_))
|
||||
);
|
||||
return mass_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::vector Foam::sixDoFRigidBodyMotion::currentOrientation
|
||||
(
|
||||
const vector& vInitial
|
||||
) const
|
||||
inline const Foam::diagTensor&
|
||||
Foam::sixDoFRigidBodyMotion::momentOfInertia() const
|
||||
{
|
||||
return (Q() & initialQ_.T() & vInitial);
|
||||
return momentOfInertia_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::sixDoFRigidBodyMotionState&
|
||||
Foam::sixDoFRigidBodyMotion::state() const
|
||||
{
|
||||
return motionState_;
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::point& Foam::sixDoFRigidBodyMotion::centreOfRotation() const
|
||||
{
|
||||
return motionState_.centreOfRotation();
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::point& Foam::sixDoFRigidBodyMotion::centreOfRotation0() const
|
||||
{
|
||||
return motionState0_.centreOfRotation();
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::point&
|
||||
Foam::sixDoFRigidBodyMotion::initialCentreOfMass() const
|
||||
{
|
||||
return initialCentreOfMass_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::point Foam::sixDoFRigidBodyMotion::centreOfMass() const
|
||||
{
|
||||
return transform(initialCentreOfMass_);
|
||||
}
|
||||
|
||||
|
||||
inline Foam::vector Foam::sixDoFRigidBodyMotion::momentArm() const
|
||||
{
|
||||
return centreOfMass() - motionState_.centreOfRotation();
|
||||
}
|
||||
|
||||
|
||||
@ -271,40 +299,6 @@ inline Foam::vector Foam::sixDoFRigidBodyMotion::omega() const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::point Foam::sixDoFRigidBodyMotion::currentVelocity
|
||||
(
|
||||
const point& pt
|
||||
) const
|
||||
{
|
||||
return (omega() ^ (pt - centreOfMass())) + v();
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::point& Foam::sixDoFRigidBodyMotion::centreOfMass() const
|
||||
{
|
||||
return motionState_.centreOfMass();
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::point& Foam::sixDoFRigidBodyMotion::centreOfMass0() const
|
||||
{
|
||||
return motionState0_.centreOfMass();
|
||||
}
|
||||
|
||||
|
||||
inline const Foam::diagTensor&
|
||||
Foam::sixDoFRigidBodyMotion::momentOfInertia() const
|
||||
{
|
||||
return momentOfInertia_;
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar Foam::sixDoFRigidBodyMotion::mass() const
|
||||
{
|
||||
return mass_;
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::sixDoFRigidBodyMotion::report() const
|
||||
{
|
||||
return report_;
|
||||
@ -317,21 +311,31 @@ inline void Foam::sixDoFRigidBodyMotion::newTime()
|
||||
}
|
||||
|
||||
|
||||
inline Foam::point& Foam::sixDoFRigidBodyMotion::centreOfMass()
|
||||
inline Foam::point& Foam::sixDoFRigidBodyMotion::centreOfRotation()
|
||||
{
|
||||
return motionState_.centreOfMass();
|
||||
return motionState_.centreOfRotation();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::diagTensor& Foam::sixDoFRigidBodyMotion::momentOfInertia()
|
||||
inline Foam::point Foam::sixDoFRigidBodyMotion::velocity
|
||||
(
|
||||
const point& pt
|
||||
) const
|
||||
{
|
||||
return momentOfInertia_;
|
||||
return (omega() ^ (pt - centreOfRotation())) + v();
|
||||
}
|
||||
|
||||
|
||||
inline Foam::scalar& Foam::sixDoFRigidBodyMotion::mass()
|
||||
inline Foam::point Foam::sixDoFRigidBodyMotion::transform
|
||||
(
|
||||
const point& initialPoint
|
||||
) const
|
||||
{
|
||||
return mass_;
|
||||
return
|
||||
(
|
||||
centreOfRotation()
|
||||
+ (Q() & initialQ_.T() & (initialPoint - initialCentreOfRotation_))
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -28,12 +28,30 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
|
||||
|
||||
bool Foam::sixDoFRigidBodyMotion::read(const dictionary& dict)
|
||||
{
|
||||
dict.lookup("momentOfInertia") >> momentOfInertia_;
|
||||
dict.lookup("mass") >> mass_;
|
||||
aRelax_ = dict.lookupOrDefault<scalar>("accelerationRelaxation", 1.0);
|
||||
aDamp_ = dict.lookupOrDefault<scalar>("accelerationDamping", 1.0);
|
||||
report_ = dict.lookupOrDefault<Switch>("report", false);
|
||||
|
||||
restraints_.clear();
|
||||
addRestraints(dict);
|
||||
|
||||
constraints_.clear();
|
||||
addConstraints(dict);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void Foam::sixDoFRigidBodyMotion::write(Ostream& os) const
|
||||
{
|
||||
motionState_.write(os);
|
||||
|
||||
os.writeKeyword("initialCentreOfMass")
|
||||
<< initialCentreOfMass_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("initialCentreOfRotation")
|
||||
<< initialCentreOfRotation_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("initialOrientation")
|
||||
<< initialQ_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("momentOfInertia")
|
||||
@ -95,48 +113,4 @@ void Foam::sixDoFRigidBodyMotion::write(Ostream& os) const
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||
|
||||
Foam::Istream& Foam::operator>>(Istream& is, sixDoFRigidBodyMotion& sDoFRBM)
|
||||
{
|
||||
is >> sDoFRBM.motionState_
|
||||
>> sDoFRBM.initialCentreOfMass_
|
||||
>> sDoFRBM.initialQ_
|
||||
>> sDoFRBM.momentOfInertia_
|
||||
>> sDoFRBM.mass_;
|
||||
|
||||
// Check state of Istream
|
||||
is.check
|
||||
(
|
||||
"Foam::Istream& Foam::operator>>"
|
||||
"(Foam::Istream&, Foam::sixDoFRigidBodyMotion&)"
|
||||
);
|
||||
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
Foam::Ostream& Foam::operator<<
|
||||
(
|
||||
Ostream& os,
|
||||
const sixDoFRigidBodyMotion& sDoFRBM
|
||||
)
|
||||
{
|
||||
os << sDoFRBM.state()
|
||||
<< token::SPACE << sDoFRBM.initialCentreOfMass()
|
||||
<< token::SPACE << sDoFRBM.initialQ()
|
||||
<< token::SPACE << sDoFRBM.momentOfInertia()
|
||||
<< token::SPACE << sDoFRBM.mass();
|
||||
|
||||
// Check state of Ostream
|
||||
os.check
|
||||
(
|
||||
"Foam::Ostream& Foam::operator<<(Foam::Ostream&, "
|
||||
"const Foam::sixDoFRigidBodyMotion&)"
|
||||
);
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -29,7 +29,7 @@ License
|
||||
|
||||
Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState()
|
||||
:
|
||||
centreOfMass_(vector::zero),
|
||||
centreOfRotation_(vector::zero),
|
||||
Q_(I),
|
||||
v_(vector::zero),
|
||||
a_(vector::zero),
|
||||
@ -38,31 +38,19 @@ Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState()
|
||||
{}
|
||||
|
||||
|
||||
Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState
|
||||
(
|
||||
const point& centreOfMass,
|
||||
const tensor& Q,
|
||||
const vector& v,
|
||||
const vector& a,
|
||||
const vector& pi,
|
||||
const vector& tau
|
||||
)
|
||||
:
|
||||
centreOfMass_(centreOfMass),
|
||||
Q_(Q),
|
||||
v_(v),
|
||||
a_(a),
|
||||
pi_(pi),
|
||||
tau_(tau)
|
||||
{}
|
||||
|
||||
|
||||
Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState
|
||||
(
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
centreOfMass_(dict.lookup("centreOfMass")),
|
||||
centreOfRotation_
|
||||
(
|
||||
dict.lookupOrDefault
|
||||
(
|
||||
"centreOfRotation",
|
||||
dict.lookupOrDefault("centreOfMass", vector::zero)
|
||||
)
|
||||
),
|
||||
Q_(dict.lookupOrDefault("orientation", tensor::I)),
|
||||
v_(dict.lookupOrDefault("velocity", vector::zero)),
|
||||
a_(dict.lookupOrDefault("acceleration", vector::zero)),
|
||||
@ -76,7 +64,7 @@ Foam::sixDoFRigidBodyMotionState::sixDoFRigidBodyMotionState
|
||||
const sixDoFRigidBodyMotionState& sDoFRBMS
|
||||
)
|
||||
:
|
||||
centreOfMass_(sDoFRBMS.centreOfMass()),
|
||||
centreOfRotation_(sDoFRBMS.centreOfRotation()),
|
||||
Q_(sDoFRBMS.Q()),
|
||||
v_(sDoFRBMS.v()),
|
||||
a_(sDoFRBMS.a()),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -69,7 +69,7 @@ class sixDoFRigidBodyMotionState
|
||||
// Private data
|
||||
|
||||
//- Current position of the centre of mass of the body
|
||||
point centreOfMass_;
|
||||
point centreOfRotation_;
|
||||
|
||||
//- Orientation, stored as the rotation tensor to transform
|
||||
// from the body to the global reference frame, i.e.:
|
||||
@ -97,17 +97,6 @@ public:
|
||||
//- Construct null
|
||||
sixDoFRigidBodyMotionState();
|
||||
|
||||
//- Construct from components
|
||||
sixDoFRigidBodyMotionState
|
||||
(
|
||||
const point& centreOfMass,
|
||||
const tensor& Q,
|
||||
const vector& v,
|
||||
const vector& a,
|
||||
const vector& pi,
|
||||
const vector& tau
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
sixDoFRigidBodyMotionState(const dictionary& dict);
|
||||
|
||||
@ -124,7 +113,7 @@ public:
|
||||
// Access
|
||||
|
||||
//- Return access to the centre of mass
|
||||
inline const point& centreOfMass() const;
|
||||
inline const point& centreOfRotation() const;
|
||||
|
||||
//- Return access to the orientation
|
||||
inline const tensor& Q() const;
|
||||
@ -145,7 +134,7 @@ public:
|
||||
// Edit
|
||||
|
||||
//- Return non-const access to the centre of mass
|
||||
inline point& centreOfMass();
|
||||
inline point& centreOfRotation();
|
||||
|
||||
//- Return non-const access to the orientation
|
||||
inline tensor& Q();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,9 +25,10 @@ License
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
inline const Foam::point& Foam::sixDoFRigidBodyMotionState::centreOfMass() const
|
||||
inline const Foam::point&
|
||||
Foam::sixDoFRigidBodyMotionState::centreOfRotation() const
|
||||
{
|
||||
return centreOfMass_;
|
||||
return centreOfRotation_;
|
||||
}
|
||||
|
||||
|
||||
@ -61,9 +62,9 @@ inline const Foam::vector& Foam::sixDoFRigidBodyMotionState::tau() const
|
||||
}
|
||||
|
||||
|
||||
inline Foam::point& Foam::sixDoFRigidBodyMotionState::centreOfMass()
|
||||
inline Foam::point& Foam::sixDoFRigidBodyMotionState::centreOfRotation()
|
||||
{
|
||||
return centreOfMass_;
|
||||
return centreOfRotation_;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -30,7 +30,7 @@ License
|
||||
|
||||
void Foam::sixDoFRigidBodyMotionState::write(dictionary& dict) const
|
||||
{
|
||||
dict.add("centreOfMass", centreOfMass_);
|
||||
dict.add("centreOfRotation", centreOfRotation_);
|
||||
dict.add("orientation", Q_);
|
||||
dict.add("velocity", v_);
|
||||
dict.add("acceleration", a_);
|
||||
@ -41,8 +41,8 @@ void Foam::sixDoFRigidBodyMotionState::write(dictionary& dict) const
|
||||
|
||||
void Foam::sixDoFRigidBodyMotionState::write(Ostream& os) const
|
||||
{
|
||||
os.writeKeyword("centreOfMass")
|
||||
<< centreOfMass_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("centreOfRotation")
|
||||
<< centreOfRotation_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("orientation")
|
||||
<< Q_ << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("velocity")
|
||||
@ -63,7 +63,7 @@ Foam::Istream& Foam::operator>>
|
||||
Istream& is, sixDoFRigidBodyMotionState& sDoFRBMS
|
||||
)
|
||||
{
|
||||
is >> sDoFRBMS.centreOfMass_
|
||||
is >> sDoFRBMS.centreOfRotation_
|
||||
>> sDoFRBMS.Q_
|
||||
>> sDoFRBMS.v_
|
||||
>> sDoFRBMS.a_
|
||||
@ -87,7 +87,7 @@ Foam::Ostream& Foam::operator<<
|
||||
const sixDoFRigidBodyMotionState& sDoFRBMS
|
||||
)
|
||||
{
|
||||
os << token::SPACE << sDoFRBMS.centreOfMass()
|
||||
os << token::SPACE << sDoFRBMS.centreOfRotation()
|
||||
<< token::SPACE << sDoFRBMS.Q()
|
||||
<< token::SPACE << sDoFRBMS.v()
|
||||
<< token::SPACE << sDoFRBMS.a()
|
||||
|
||||
@ -198,7 +198,7 @@ void Foam::sixDoFRigidBodyMotionSolver::solve()
|
||||
forcesDict.add("patches", patches_);
|
||||
forcesDict.add("rhoInf", rhoInf_);
|
||||
forcesDict.add("rhoName", rhoName_);
|
||||
forcesDict.add("CofR", motion_.centreOfMass());
|
||||
forcesDict.add("CofR", motion_.centreOfRotation());
|
||||
|
||||
forces f("forces", db(), forcesDict);
|
||||
|
||||
@ -220,14 +220,14 @@ void Foam::sixDoFRigidBodyMotionSolver::solve()
|
||||
|
||||
motion_.updateAcceleration
|
||||
(
|
||||
ramp*(f.forceEff() + g.value()*motion_.mass()),
|
||||
ramp*(f.momentEff()),
|
||||
ramp*(f.forceEff() + motion_.mass()*g.value()),
|
||||
ramp*(f.momentEff() + motion_.mass()*(motion_.momentArm() ^ g.value())),
|
||||
t.deltaTValue()
|
||||
);
|
||||
|
||||
// Update the displacements
|
||||
pointDisplacement_.internalField() =
|
||||
motion_.scaledPosition(points0(), scale_) - points0();
|
||||
motion_.transform(points0(), scale_) - points0();
|
||||
|
||||
// Displacement has changed. Update boundary conditions
|
||||
pointConstraints::New
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -46,6 +46,7 @@ sixDoFRigidBodyMotionCoeffs
|
||||
yLine
|
||||
{
|
||||
sixDoFRigidBodyMotionConstraint line;
|
||||
centreOfRotation (0.25 0.007 0.125);
|
||||
direction (0 1 0);
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -23,13 +23,13 @@ startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.6;
|
||||
endTime 5;
|
||||
|
||||
deltaT 1e-5;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 5e-3;
|
||||
writeInterval 1e-2;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -26,11 +26,62 @@ sixDoFRigidBodyMotionCoeffs
|
||||
innerDistance 0.05;
|
||||
outerDistance 0.35;
|
||||
|
||||
centreOfMass (0.5 0.5 0.5);
|
||||
momentOfInertia (0.08622222 0.08622222 0.144);
|
||||
mass 9.6;
|
||||
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;
|
||||
accelerationRelaxation 0.5;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -30,7 +30,7 @@ vertices
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (40 40 60) simpleGrading (1 1 1)
|
||||
hex (0 1 2 3 4 5 6 7) (20 20 30) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -21,21 +21,21 @@ FoamFile
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 11200;
|
||||
startFace 277808;
|
||||
nFaces 2800;
|
||||
startFace 33146;
|
||||
}
|
||||
atmosphere
|
||||
{
|
||||
type patch;
|
||||
nFaces 1600;
|
||||
startFace 289008;
|
||||
nFaces 400;
|
||||
startFace 35946;
|
||||
}
|
||||
floatingObject
|
||||
{
|
||||
type wall;
|
||||
inGroups 1(wall);
|
||||
nFaces 672;
|
||||
startFace 290608;
|
||||
nFaces 348;
|
||||
startFace 36346;
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -24,7 +24,7 @@ actions
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (0.35 0.35 0.44) (0.65 0.65 0.56);
|
||||
box (0.35 0.35 0.1) (0.65 0.55 0.6);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user