/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . Application Test-rigidBodyDynamics Description Does an RBD simulation and outputs the result as a gnuplot animation \*---------------------------------------------------------------------------*/ #include "rigidBodyMotion.H" #include "IFstream.H" #include "OFstream.H" #include "boundBox.H" #include "argList.H" using namespace Foam; using namespace RBD; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { // Create the input dictionary argList::validArgs.append("dictionary"); argList args(argc, argv); const word dictName(args[1]); Info<< "Reading " << dictName << nl << endl; const dictionary dict = IFstream(dictName)(); // Read the model, time controls and plot outlines from the dictionary rigidBodyMotion motion(dict); const scalar deltaT(readScalar(dict.lookup("deltaT"))); const label nIter(dict.lookupOrDefault