Hi Alec
I have added some extra lines in the model below it should run now.
When loading your model it gave a warning saying that the model was
kinematically indeterminate. This is because there was too few
constraints in the model.
You have two segments, thus you need 2x6 constraints.
You have the following constraints in the model
- prismatic joint (5 constraints)
- driver for prismatic joint (1 constraints)
- AnyKinEq on y coordinate of linear measure (1 constraint)
These driver and constraints meant that the following dof in the
model was free and undeterminate:
Linear x and z motion of plate1 segment
Rotations x,y, and z of plate1 segment
Adding these constraints to the model makes it run…
Best regards
Søren
// Todo: Write a small description of your model here
Main = {
//#include “DrawSettings.any”
AnyFolder MyModel = {
// Global Reference Frame
AnyFixedRefFrame GlobalRef = {
AnyDrawRefFrame DrwGlobalRef = { RGB={0,0,1};};
AnyRefNode Pa={
sRel={0,0,0};
};
};
// Global reference frame
//---------1--------------
AnySeg Plate1 =
{
r0 = {0, 0, 0};
Mass = 2;
Jii = {0, 0, 0};
AnyVec3 Color= {0.6,0.6,0.0}; //box color
AnyVar Transparency=1; //box transparency
AnyVec3 Size={1,0.02,0.5};
#include "../../../BRep/Aalborg/ToolBox/DrawObjects/Box.any"
AnyRefNode P1={
sRel={0,0,0};
};
};
AnySeg Block1 =
{
r0 = {0, 0.05, 0.1};
//rDot0 = {0, 0, 0};
//Axes0 = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
//omega0 = {0, 0, 0};
Mass = 1;
Jii = {0, 0, 0};
AnyVec3 Color= {0.6,0.0,0.6}; //box color
AnyVar Transparency=1; //box transparency
AnyVec3 Size={0.1,0.1,0.1};
#include "../../../BRep/Aalborg/ToolBox/DrawObjects/Box.any"
AnyRefNode P2={
sRel={0,0,0};
};
};
//-------------2-----------------------------
AnyPrismaticJoint Ground_plate={
Axis =y;
Ref=1;
AnyFixedRefFrame &Ground=Main.MyModel.GlobalRef.Pa;
AnyRefNode &Plate1 =Main.MyModel.Plate1.P1;
};
//--------------3------------------------------
AnyKinEq Block1_Plate=
{
AnyKinLinear BkPlt1={
AnyRefFrame &plt1=Main.MyModel.Plate1;
AnyRefFrame &pp1=Main.MyModel.Block1;
};
//ADDED A ROTATIONAL MEASURE OTHERWISE THE ROTATIONS WAS FREE!
AnyKinRotational BkPlt1Rot={
AnyRefFrame &plt1=Main.MyModel.Plate1;
AnyRefFrame &pp1=Main.MyModel.Block1;
Type=RotAxesAngles;
};
// MeasureOrganizer={1}; //REMOVED THIS MEASUREORGANIZE
OTHERWISE ONLY THE Y COORIDNATE WILL BE LOCKED…
};
AnyKinEqInterPolDriver Move_Plate= {
Type=Bspline;
BsplineOrder=4;
T ={0,1,2,3,4,5,6,7,8};
Data ={{0,0.1,0.2,0.1,0,-0.1,-0.2,-0.1,0}};
AnyKinMeasure &ref=.Ground_plate;
};
}; // MyModel
//-------------4---------------
AnyBodyStudy MyStudy = {
AnyFolder &Model = .MyModel;
RecruitmentSolver =MinMaxNRSimplex;
nStep=50;
tEnd=10.01;
tStart=0.01;
Gravity = {0.0, -9.81, 0.0};
};
}; // Main
— In anyscript@yahoogroups.com, “yueningma” <yueningma@…> wrote:
>
> I am learing the anybody script.
> now I want to do an simple example. That is, aplate is moving with
a
> block. when I loaded the program ,the system showed it is
successful.
> But when I saw kinematicanalysis, it couldn’t be run. what should
I
> do?
> here is the program:
> // Todo: Write a small description of your model here
>
> Main = {
> #include “DrawSettings.any”
> AnyFolder MyModel = {
>
> // Global Reference Frame
> AnyFixedRefFrame GlobalRef = {
> AnyDrawRefFrame DrwGlobalRef = { RGB={0,0,1};};
> AnyRefNode Pa={
> sRel={0,0,0};
> };
> };
> // Global reference frame
> //---------1--------------
> AnySeg Plate1 =
> {
> r0 = {0, 0, 0};
> Mass = 2;
> Jii = {0, 0, 0};
> AnyVec3 Color= {0.6,0.6,0.0}; //box color
> AnyVar Transparency=1; //box transparency
> AnyVec3 Size={1,0.02,0.5};
> #include “…/BRep/Aalborg/ToolBox/DrawObjects/Box.any”
> AnyRefNode P1={
> sRel={0,0,0};
> };
> };
> AnySeg Block1 =
> {
> r0 = {0, 0.05, 0.1};
> //rDot0 = {0, 0, 0};
> //Axes0 = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
> //omega0 = {0, 0, 0};
> Mass = 1;
> Jii = {0, 0, 0};
> AnyVec3 Color= {0.6,0.0,0.6}; //box color
> AnyVar Transparency=1; //box transparency
> AnyVec3 Size={0.1,0.1,0.1};
> #include “…/BRep/Aalborg/ToolBox/DrawObjects/Box.any”
> AnyRefNode P2={
> sRel={0,0,0};
> };
>
> };
>
> //-------------2-----------------------------
> AnyPrismaticJoint Ground_plate={
> Axis =y;
> Ref=1;
> AnyFixedRefFrame &Ground=Main.MyModel.GlobalRef.Pa;
> AnyRefNode &Plate1 =Main.MyModel.Plate1.P1;
>
> };
> //--------------3------------------------------
>
> AnyKinEq Block1_Plate=
> {
> AnyKinLinear BkPlt1={
> AnyRefFrame &plt1=Main.MyModel.Plate1;
> AnyRefFrame &pp1=Main.MyModel.Block1;
> };
> MeasureOrganizer={1};
> };
> AnyKinEqInterPolDriver Move_Plate= {
> Type=Bspline;
> BsplineOrder=4;
> T ={0,1,2,3,4,5,6,7,8};
> Data ={{0,0.1,0.2,0.1,0,-0.1,-0.2,-0.1,0}};
> AnyKinMeasure &ref=.Ground_plate;
> };
>
> }; // MyModel
> //-------------4---------------
> AnyBodyStudy MyStudy = {
> AnyFolder &Model = .MyModel;
> RecruitmentSolver =MinMaxNRSimplex;
> nStep=50;
> tEnd=10.01;
> tStart=0.01;
> Gravity = {0.0, -9.81, 0.0};
> };
>
> }; // Main
>