Permalink
Browse files

rigidBodyMeshMotion: displacementMotionSolver for the mesh-motion of …

…multiple articulated rigid-bodies

The motion of the bodies is integrated using the rigidBodyDynamics
library with joints, restraints and external forces.

The mesh-motion is interpolated using septernion averaging.

This development is sponsored by Carnegie Wave Energy Ltd.
  • Loading branch information...
1 parent 831e429 commit 04e4e1a7bb162cdce58718d7c30deb4a88b2fceb Henry Weller committed Apr 16, 2016
Showing with 780 additions and 114 deletions.
  1. +3 −0 src/dynamicMesh/Make/files
  2. +1 −1 ...igidBodyMotion/sixDoFRigidBodyMotionSolver → dynamicMesh/pointPatchDist}/externalPointEdgePoint.C
  3. +1 −1 ...igidBodyMotion/sixDoFRigidBodyMotionSolver → dynamicMesh/pointPatchDist}/externalPointEdgePoint.H
  4. +1 −1 ...gidBodyMotion/sixDoFRigidBodyMotionSolver → dynamicMesh/pointPatchDist}/externalPointEdgePointI.H
  5. +1 −1 ...{sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver → dynamicMesh/pointPatchDist}/pointPatchDist.C
  6. +1 −1 ...{sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver → dynamicMesh/pointPatchDist}/pointPatchDist.H
  7. +4 −2 src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelState.C
  8. +9 −0 src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelState.H
  9. +12 −0 src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateI.H
  10. +6 −2 src/rigidBodyDynamics/rigidBodyModelState/rigidBodyModelStateIO.C
  11. +125 −40 src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.C
  12. +32 −20 src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotion.H
  13. +0 −16 src/rigidBodyDynamics/rigidBodyMotion/rigidBodyMotionI.H
  14. +9 −9 src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/rigidBodySolver.H
  15. +17 −18 src/rigidBodyDynamics/rigidBodySolvers/rigidBodySolver/rigidBodySolverI.H
  16. +3 −0 src/rigidBodyMeshMotion/Make/files
  17. +14 −0 src/rigidBodyMeshMotion/Make/options
  18. +357 −0 src/rigidBodyMeshMotion/rigidBodyMeshMotion.C
  19. +184 −0 src/rigidBodyMeshMotion/rigidBodyMeshMotion.H
  20. +0 −2 src/sixDoFRigidBodyMotion/Make/files
@@ -104,4 +104,7 @@ extrudePatchMesh/extrudePatchMesh.C
polyMeshFilter/polyMeshFilterSettings.C
polyMeshFilter/polyMeshFilter.C
+pointPatchDist/externalPointEdgePoint.C
+pointPatchDist/pointPatchDist.C
+
LIB = $(FOAM_LIBBIN)/libdynamicMesh
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
- \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
+ \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -34,7 +34,8 @@ Foam::RBD::rigidBodyModelState::rigidBodyModelState
:
q_(model.nDoF(), Zero),
qDot_(model.nDoF(), Zero),
- qDdot_(model.nDoF(), Zero)
+ qDdot_(model.nDoF(), Zero),
+ deltaT_(0)
{}
@@ -46,7 +47,8 @@ Foam::RBD::rigidBodyModelState::rigidBodyModelState
:
q_(dict.lookupOrDefault("q", scalarField(model.nDoF(), Zero))),
qDot_(dict.lookupOrDefault("qDot", scalarField(model.nDoF(), Zero))),
- qDdot_(dict.lookupOrDefault("qDdot", scalarField(model.nDoF(), Zero)))
+ qDdot_(dict.lookupOrDefault("qDdot", scalarField(model.nDoF(), Zero))),
+ deltaT_(dict.lookupOrDefault<scalar>("deltaT", 0))
{}
@@ -76,6 +76,9 @@ class rigidBodyModelState
//- Joint acceleration
scalarField qDdot_;
+ //- The time-step used to integrate to this state
+ scalar deltaT_;
+
public:
@@ -107,6 +110,9 @@ public:
//- Return access to the joint acceleration
inline const scalarField& qDdot() const;
+ //- Return access to the time-step
+ inline scalar deltaT() const;
+
// Edit
@@ -121,6 +127,9 @@ public:
//- Return access to the joint acceleration
inline scalarField& qDdot();
+ //- Return access to the time-step
+ inline scalar& deltaT();
+
//- Write to dictionary
void write(dictionary& dict) const;
@@ -43,6 +43,12 @@ inline const Foam::scalarField& Foam::RBD::rigidBodyModelState::qDdot() const
}
+inline Foam::scalar Foam::RBD::rigidBodyModelState::deltaT() const
+{
+ return deltaT_;
+}
+
+
inline Foam::scalarField& Foam::RBD::rigidBodyModelState::q()
{
return q_;
@@ -61,4 +67,10 @@ inline Foam::scalarField& Foam::RBD::rigidBodyModelState::qDdot()
}
+inline Foam::scalar& Foam::RBD::rigidBodyModelState::deltaT()
+{
+ return deltaT_;
+}
+
+
// ************************************************************************* //
@@ -33,6 +33,7 @@ void Foam::RBD::rigidBodyModelState::write(dictionary& dict) const
dict.add("q", q_);
dict.add("qDot", qDot_);
dict.add("qDdot", qDdot_);
+ dict.add("deltaT", deltaT_);
}
@@ -41,6 +42,7 @@ void Foam::RBD::rigidBodyModelState::write(Ostream& os) const
os.writeKeyword("q") << q_ << token::END_STATEMENT << nl;
os.writeKeyword("qDot") << qDot_ << token::END_STATEMENT << nl;
os.writeKeyword("qDdot") << qDdot_ << token::END_STATEMENT << nl;
+ os.writeKeyword("deltaT") << deltaT_ << token::END_STATEMENT << nl;
}
@@ -54,7 +56,8 @@ Foam::Istream& Foam::RBD::operator>>
{
is >> state.q_
>> state.qDot_
- >> state.qDdot_;
+ >> state.qDdot_
+ >> state.deltaT_;
// Check state of Istream
is.check
@@ -75,7 +78,8 @@ Foam::Ostream& Foam::RBD::operator<<
{
os << token::SPACE << state.q_
<< token::SPACE << state.qDot_
- << token::SPACE << state.qDdot_;
+ << token::SPACE << state.qDdot_
+ << token::SPACE << state.deltaT_;
// Check state of Ostream
os.check
Oops, something went wrong.

0 comments on commit 04e4e1a

Please sign in to comment.