//This is a small example made to illustrate the reactions whch can be obtained from a revolute joint. // //Please try to run the model and have a look at the following property in a chart: "Main.RevoluteJointStudy.Output.Model.RevJnt.Constraints.Reaction.Fout" // //This property is a vector with five components with the z axis choosen as the rotaion axis these properties are: Fx,Fy,Fz,Mx,My = Fout[0],Fout[1],Fout[2],Fout[3],Fout[4] // //The model consist of one segment with a mass of 10 kg. When looking at the graphs notice that the gravity is applied both in the and z direction to make an interesting loading case. // //If the axis of rotation is shifted to example x the reactions are listed as Fx,Fy,Fz,My,Mz = Fout[0],Fout[1],Fout[2],Fout[3],Fout[4] // //If the axis of rotation is shifted to y the reactions are listed as Fx,Fy,Fz,Mx,Mz = Fout[0],Fout[1],Fout[2],Fout[3],Fout[4] // //All forces and moments are measure wrt to the first mentioned coordinate system in the measure. Main = { // The actual body model goes in this folder AnyFolder MyModel = { // Global Reference Frame AnyFixedRefFrame GlobalRef = { AnyDrawRefFrame drw={ RGB={0,0,1}; ScaleXYZ={1,1,1}*0.5; }; }; // Global reference frame AnySeg Mass={ Mass=10; Jii={0.01,0.01,0.01}; AnyRefNode Node1={ sRel={-1,0,0}; AnyDrawRefFrame drw={ RGB={1,0,0}; ScaleXYZ={1,1,1}*0.5; }; }; AnyDrawSeg drw={}; }; AnyRevoluteJoint RevJnt={ AnyRefNode &ref1=.GlobalRef; AnyRefNode &ref2=.Mass.Node1; Axis=z; }; }; // MyModel //This study shows how the rotvector works //it will rotate the red coordinate system around the green //Try to change the properties: // Axis // Angle AnyBodyStudy RevoluteJointStudy = { AnyVar Angle =90; //size of rotation in deg. AnyVec3 Axis={2,0,0}; //rotation axis AnyVec3 AxisNormalized =Axis/vnorm(Axis,2); //normalized rotation axis AnyFolder &Model = .MyModel; AnyKinEqSimpleDriver drv ={ AnyRevoluteJoint &rev=..MyModel.RevJnt; DriverPos={0}; DriverVel=(1/.tEnd)*{.Angle}*pi/180; }; RecruitmentSolver = MinMaxSimplex; tEnd=1000; Gravity = {0.0, -9.81, -9.81}; nStep=500; }; }; // Main