@@ -9,19 +9,18 @@ Main = {
99 // Global Reference Frame
1010 AnyFixedRefFrame GlobalRef = {
1111 }; // Global reference frame
12-
12+
1313 // Definition of the thigh segment
1414 AnySeg Thigh = {
1515 r0 = {0.4, 0, 0};
1616 Axes0 = RotMat(pi/2,z);
1717 Mass = 5;
1818 Jii = {0.3, 0.01, 0.3}*0.7;
19-
19+
2020 // This is the center of the nominal knee joint. Notice that
2121 // the actual knee center will vary when we use FDK.
2222 AnyRefNode KneeCenter = {
2323 sRel = {-0.03, -0.4, 0.0};
24- AnyDrawRefFrame drw = {RGB = {0,0,0}; ScaleXYZ = 0.05 * {1,1,1};};
2524
2625 // Define a cylinder representing the femoral condyle. The quadriceps
2726 // will wrap about this cylinder.
@@ -34,26 +33,15 @@ Main = {
3433 RGB = {0, 0, 1};
3534 };
3635 };
37- };
38-
39- // Define a STL file as femoral condyle for the joint geometry. The tibial
40- // condyle will slide along this geometry.
41- AnySurfSTL FemoralHead = {
42- FileName = "simplefemoral.stl";
43- AnyDrawSurf drw = {
44- FileName = .FileName;
45- Opacity = 0.5;
46- };
4736 };
4837 };
49-
5038 AnyRefNode HipCenter = {
5139 sRel = {0.0, 0.4, 0.0};
5240 };
5341
5442 // Origin of the quadriceps muscle.
5543 AnyRefNode Quadriceps = {
56- sRel = {0.06 , 0.0 , 0.0};
44+ sRel = {0.00 , 0.3 , 0.0};
5745 };
5846 AnyDrawSeg drw ={
5947 Opacity = 0.5;
@@ -64,49 +52,20 @@ Main = {
6452 r0 = {0.8, -0.4, 0.0};
6553 Mass = 4;
6654 Jii = {0.4, 0.01, 0.4}*0.4;
67- AnyDrawSeg drw = {
55+ AnyDrawSeg drw ={
6856 Opacity = 0.5;
6957 RGB = {1,0,0};
7058 };
7159
72-
7360 AnyRefNode KneeCenter = {
7461 sRel = {0.0, 0.4, 0.0};
75- AnyDrawRefFrame drw = {RGB = {1,1,1}; ScaleXYZ = 0.05 * {1,1,1};};
76-
77-
78- // Define a STL file as tibial plateau for the joint geometry. The
79- // tibial plateau will slide along the femoral condile during movement.
80- AnyRefNode SurfSTLCenter = {
81- sRel = {0.01,-0.04,0};
82- AnySurfSTL TibialPlateau= {
83- FileName = "simpletibial.stl";
84- AnyDrawSurf drw = {
85- FileName = .FileName;
86- Opacity = 0.5;
87- };
88- };
89- };
9062 };
9163 AnyRefNode Quadriceps = {
92- sRel={0.05 , 0.3, 0.0};
64+ sRel={0.00 , 0.3, 0.0};
9365 };
9466 };
95-
96-
97- // Define a contact force between the STL surfaces of the femoral condyle and
98- // the tibial plateau to make these surfaces to make the surfaces slide along
99- // each other.
100- AnyForceSurfaceContact ContactForce = {
101- AnySurface &surfMaster = .Thigh.KneeCenter.FemoralHead;
102- AnySurface &surfSlave = .Shank.KneeCenter.SurfSTLCenter.TibialPlateau;
103- PressureModule = 5e7;
104- ForceViewOnOff = On;
105- };
106-
107-
108-
109-
67+
68+
11069 // Hip joint between the thigh and ground
11170 AnyRevoluteJoint Hip = {
11271 AnyRefFrame &ref1 = .GlobalRef;
@@ -119,7 +78,7 @@ Main = {
11978 DriverPos = {pi/2};
12079 DriverVel = {0};
12180 };
122-
81+
12382 // Knee joint. Notice that this is only going to be the nominal joint.
12483 // The actual position of the knee joint center will depend on the forces
12584 // acting upon it. Notice that we list the shank before the thigh. This
@@ -136,30 +95,33 @@ Main = {
13695 Constraints = {
13796 CType = {ForceDep, ForceDep, Hard, Hard, Hard};
13897 Reaction.Type={Off,Off,On,On,On};
139-
14098 };
14199 };
142100
101+ // AnyKinLinear lin =
102+ // {
103+ // //Ref = -1;
104+ // AnyRefFrame &Shank = .Shank.KneeCenter;
105+ // AnyRefFrame &Thigh = .Thigh.KneeCenter;
106+ // };
107+
143108
144109 // Define springs in the knee, simulating the effect of cartilage
145110 // and ligaments.
146111 AnyForce KneeStiffness = {
147112 // AnyKinLinear &lin = .lin;
148113 AnyKinLinear &lin = Main.MyModel.KneeJoint.Linear;
149- F = {-1000 *lin.Pos[0], -5000 *lin.Pos[1], 0};
114+ F = {-1e3 *lin.Pos[0], -5e3 *lin.Pos[1], 0};
150115 };
151-
152-
153-
154-
116+
155117 // Knee driver- just a simple knee extension.
156118 AnyKinEqSimpleDriver KneeDriver = {
157119 DriverPos = {pi/2};
158120 DriverVel = {-pi/30};
159121 AnyRevoluteJoint &KneeJoint = .KneeJoint;
160122 Reaction.Type={Off}; // The muscles must carry this movement
161123 };
162-
124+
163125 // Muscle
164126 AnyMuscleShortestPath Quadriceps = {
165127 AnyMuscleModel MuscleModel = {
@@ -191,11 +153,3 @@ Main = {
191153}; // Main
192154
193155
194-
195-
196-
197-
198-
199-
200-
201-
0 commit comments