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