COMP: rigidBodyDynamics: add Time& argument to make them compile

This commit is contained in:
mattijs
2018-07-19 18:03:10 +01:00
parent 48332c8f16
commit 423ed38986
4 changed files with 18 additions and 5 deletions

View File

@ -4,7 +4,7 @@ bodies0
{
type rigidBody;
mass 1;
centreOfMass (0 -1 0);
//centreOfMass (0 -1 0);
inertia (0.001 0 0 0.001 0 0.001);
parent root;
transform (1 0 0 0 1 0 0 0 1) (0 0 0);
@ -32,7 +32,7 @@ bodies
type sphere;
mass 1;
radius 0.05;
centreOfMass (0 10 0);
centreOfMass (0 10 0); // used with mass+radius to set intertia
transform (1 0 0 0 1 0 0 0 1) (0 -1 0);
mergeWith hinge;
}

View File

@ -36,6 +36,8 @@ Description
#include "sphere.H"
#include "joints.H"
#include "IFstream.H"
#include "argList.H"
#include "Time.H"
using namespace Foam;
using namespace RBD;
@ -44,6 +46,8 @@ using namespace RBD;
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
/*
bool testMerge = true;
@ -82,7 +86,7 @@ int main(int argc, char *argv[])
*/
// Create the pendulum model from dictionary
rigidBodyModel pendulum(dictionary(IFstream("pendulum")()));
rigidBodyModel pendulum(runTime, dictionary(IFstream("pendulum")()));
Info<< pendulum << endl;

View File

@ -37,6 +37,8 @@ Description
#include "rigidBodyModelState.H"
#include "Fstream.H"
#include "constants.H"
#include "argList.H"
#include "Time.H"
using namespace Foam;
using namespace RBD;
@ -46,10 +48,12 @@ using namespace Foam::constant::mathematical;
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
dictionary pendulumAndSpringDict(IFstream("pendulumAndSpring")());
// Create the pendulumAndSpring model from dictionary
rigidBodyMotion pendulumAndSpring(pendulumAndSpringDict);
rigidBodyMotion pendulumAndSpring(runTime, pendulumAndSpringDict);
label nIter(readLabel(pendulumAndSpringDict.lookup("nIter")));

View File

@ -36,6 +36,8 @@ Description
#include "rigidBodyRestraint.H"
#include "rigidBodyModelState.H"
#include "Fstream.H"
#include "argList.H"
#include "Time.H"
using namespace Foam;
using namespace RBD;
@ -44,10 +46,13 @@ using namespace RBD;
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
dictionary sphericalJointDict(IFstream("sphericalJoint")());
// Create the sphericalJoint model from dictionary
rigidBodyMotion sphericalJoint(sphericalJointDict);
rigidBodyMotion sphericalJoint(runTime, sphericalJointDict);
label nIter(readLabel(sphericalJointDict.lookup("nIter")));