Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
423ed389
Commit
423ed389
authored
Jul 19, 2018
by
mattijs
Browse files
COMP: rigidBodyDynamics: add Time& argument to make them compile
parent
48332c8f
Changes
4
Hide whitespace changes
Inline
Side-by-side
applications/test/rigidBodyDynamics/pendulum/pendulum
View file @
423ed389
...
...
@@ -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;
}
...
...
applications/test/rigidBodyDynamics/pendulum/pendulum.C
View file @
423ed389
...
...
@@ -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
;
...
...
applications/test/rigidBodyDynamics/pendulumAndSpring/pendulumAndSpring.C
View file @
423ed389
...
...
@@ -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"
)));
...
...
applications/test/rigidBodyDynamics/sphericalJoint/sphericalJoint.C
View file @
423ed389
...
...
@@ -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"
)));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment