- •Выполнения заданий в программе dymola. Задание: Для заданных преподавателем: схемы, переменного сопротивления, определенного при помощи функции r(I) от тока, источника питания и параметров:
- •Выполнение:
- •Построение математической модели маятника Задание на вариант №3
- •Выполнения заданий в программе Mathcad. Вариант №1
Построение математической модели маятника Задание на вариант №3
Решение:
model Geometry1
parameter SI.Length R1 = 0.3;
parameter SI.Length R2 = 1;
parameter SI.Length R3 = 0.8;
parameter SI.Length R4 = 1;
parameter SI.Length R5 = 0.5;
parameter SI.Angle phi10 = 0;
parameter SI.Angle phi20 = 2.1;
parameter SI.Angle phi30 = 0.7;
parameter SI.Angle phi40 = 5.2;
parameter SI.Position xE0 = R1*cos(phi10) + R2*cos(phi20) + R3*cos(phi30);
parameter SI.Position yE0 = R1*sin(phi10) + R2*sin(phi20) + R3*sin(phi30);
parameter SI.Position xC0 = R1*sin(phi10) + R2*sin(phi20) + (R3 + R3/2)*sin(phi30) + R4*sin(phi40);
parameter SI.Position yC0 = R1*sin(phi10) + R2*sin(phi20) + (R3 + R3/2)*sin(phi30) + R4*sin(phi40);
SI.Angle phi1;
SI.Angle phi2(start = phi20);
SI.Angle phi3(start = phi30);
SI.Angle phi4(start = phi40);
SI.Angle phi5;
VisualShape Beam1(
r0 = {0, 0, 0.15},
Shape = "beam",
Length = R1,
Width = 0.05,
Height = 0.05,
LengthDirection = {1, 0, 0},
WidthDirection = {0, 1, 0},
Material = {1, 0, 0, 0.3});
VisualShape Beam2(
r0 = {0, 0, 0.20},
Shape = "beam",
Length = R2,
Width = 0.05,
Height = 0.05,
LengthDirection = {1, 0, 0},
WidthDirection = {0, 1, 0},
Material = {0, 1, 0, 0.3});
VisualShape Beam3(
r0 = {0, 0, 0.15},
Shape = "beam",
Length = R3 + R3/2,
Width = 0.05,
Height = 0.05,
LengthDirection = {1, 0, 0},
WidthDirection = {0, 1, 0},
Material = {0, 0, 1, 0.3});
VisualShape Beam4(
r0 = {0, 0, 0.20},
Shape = "beam",
Length = R4,
Width = 0.05,
Height = 0.05,
LengthDirection = {1, 0, 0},
WidthDirection = {0, 1, 0},
Material = {1, 1, 0, 0.3});
VisualShape Wheel(
r0 = {0, 0, 0},
Shape = "cylinder",
Length = 0.05,
Width = 2*R5,
Height = 2*R5,
LengthDirection = {0, 0, 1},
WidthDirection = {0, 1, 0},
Material = {1, 0, 1, 0.3});
VisualShape Joint1(
r0 = {0, 0, -0.05},
Shape = "cylinder",
Length = 0.25,
Width = 0.05,
Height = 0.05,
LengthDirection = {0, 0, 1},
WidthDirection = {0, 1, 0},
Material = {0, 0.1, 1, 0});
VisualShape Cone1(
r0 = {0, -0.1, 0},
Shape = "cone",
Length = 0.1,
Width = 0.1,
Height = 0.1,
LengthDirection = {0, 1, 0},
WidthDirection = {1, 0, 0},
Material = {0, 0.1, 1, 0});
VisualShape Box1(
r0 = {0, -0.15, 0},
Shape = "box",
Length = 0.05,
Width = 0.2,
Height = 0.2,
LengthDirection = {0, 1, 0},
WidthDirection = {1, 0, 0},
Material = {0, 0.1, 1, 0});
VisualShape Joint2(
r0 = {0, 0, -0.05},
Shape = "cylinder",
Length = 0.25,
Width = 0.05,
Height = 0.05,
LengthDirection = {0, 0, 1},
WidthDirection = {0, 1, 0},
Material = {0, 1, 1, 0});
VisualShape Cone2(
r0 = {0, -0.1, 0},
Shape = "cone",
Length = 0.1,
Width = 0.1,
Height = 0.1,
LengthDirection = {0, 1, 0},
WidthDirection = {1, 0, 0},
Material = {0, 1, 1, 0});
VisualShape Box2(
r0 = {0, -0.15, 0},
Shape = "box",
Length = 0.05,
Width = 0.2,
Height = 0.2,
LengthDirection = {0, 1, 0},
WidthDirection = {1, 0, 0},
Material = {0, 1, 1, 0});
VisualShape Box3(
r0 = {xC0 - R5, yC0, 0},
Shape = "box",
Length = 0.05,
Width = 1.5,
Height = 0.3,
LengthDirection = {-1, 0, 0},
WidthDirection = {0, 1, 0},
Material = {0, 1, 1, 0});
VisualShape Joint3(
r0 = {0, 0, -0.05},
Shape = "cylinder",
Length = 0.3,
Width = 0.05,
Height = 0.05,
LengthDirection = {0, 0, 1},
WidthDirection = {0, 1, 0},
Material = {0, 1, 1, 0});
SI.Position[3] rE;
SI.Position[3] rC;
equation
phi1 = time;
Beam1.r = {0, 0, 0};
Beam1.S = [cos(phi1), -sin(phi1), 0;
sin(phi1), cos(phi1), 0;
0, 0, 1];
Beam2.r = Beam1.r + Beam1.S*{R1, 0, 0};
Beam2.S = [cos(phi2), -sin(phi2), 0;
sin(phi2), cos(phi2), 0;
0, 0, 1];
Beam3.r = Beam2.r + Beam2.S*{R2, 0, 0};
Beam3.S = [cos(phi3), -sin(phi3), 0;
sin(phi3), cos(phi3), 0;
0, 0, 1];
rE = Beam3.r + Beam3.S*{R3, 0, 0};
rE[1] = xE0;
rE[2] = yE0;
Beam4.r = Beam3.r + Beam3.S*{R3 + R3/2, 0, 0};
Beam4.S = [cos(phi4), -sin(phi4), 0;
sin(phi4), cos(phi4), 0;
0, 0, 1];
rC = Beam4.r + Beam4.S*{R4, 0, 0};
rC[1] = xC0;
Wheel.r = rC;
Wheel.S = [cos(phi5), -sin(phi5), 0;
sin(phi5), cos(phi5), 0;
0, 0, 1];
rC[2] - yC0 = R5*phi5;
Joint1.r = {0, 0, 0};
Joint1.S = [1, 0, 0;
0, 1, 0;
0, 0, 1];
Cone1.r = {0, 0, 0};
Cone1.S = [1, 0, 0;
0, 1, 0;
0, 0, 1];
Box1.r = {0, 0, 0};
Box1.S = [1, 0, 0;
0, 1, 0;
0, 0, 1];
Joint2.r = rE;
Joint2.S = [1, 0, 0;
0, 1, 0;
0, 0, 1];
Cone2.r = rE;
Cone2.S = [1, 0, 0;
0, 1, 0;
0, 0, 1];
Box2.r = rE;
Box2.S = [1, 0, 0;
0, 1, 0;
0, 0, 1];
Box3.r = zeros(3);
Box3.S = [1, 0, 0;
0, 1, 0;
0, 0, 1];
Joint3.r = rC;
Joint3.S = [1, 0, 0;
0, 1, 0;
0, 0, 1];
annotation (experiment(
StopTime=50,
NumberOfIntervals=5000,
Tolerance=1e-006), __Dymola_experimentSetupOutput);
end Geometry1;