ENH: surfaceInertia: print info for use in RBD. See also #1014.

This commit is contained in:
mattijs
2018-09-19 14:07:42 +01:00
parent 0b95bb008c
commit df3a560d6d

View File

@ -3,7 +3,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-2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -384,6 +384,26 @@ int main(int argc, char *argv[])
<< " momentOfInertia " << eVal << token::END_STATEMENT << nl << " momentOfInertia " << eVal << token::END_STATEMENT << nl
<< " orientation " << eVec.T() << token::END_STATEMENT << " orientation " << eVec.T() << token::END_STATEMENT
<< endl; << endl;
// Get inertia as a symmetric tensor
const symmTensor st
(
eVal.xx(),
eVal.xy(),
eVal.xz(),
eVal.yy(),
eVal.yz(),
eVal.zz()
);
Info<< nl
<< "Entries for rigidBodyDynamics dynamicMeshDict:"
<< nl
<< " mass " << m << token::END_STATEMENT << nl
<< " centreOfMass " << cM << token::END_STATEMENT << nl
<< " inertia " << st << token::END_STATEMENT << nl
<< endl;
} }
if (calcAroundRefPt) if (calcAroundRefPt)