| 1 | package frame_model_pack
|
|---|
| 2 | model Frame_Model
|
|---|
| 3 | import Modelica.SIunits.Conversions.*;
|
|---|
| 4 | parameter Real test = 0.1;
|
|---|
| 5 | parameter Real demo = 0.25;
|
|---|
| 6 | parameter Modelica.SIunits.Angle noseAngle = from_deg(118.8) "Nose angle of glider";
|
|---|
| 7 | parameter Modelica.SIunits.Length NosePx = demo - test "Set back of leading edge hinge along keel";
|
|---|
| 8 | inner Modelica.Mechanics.MultiBody.World world(n = {0, 0, -1}) annotation(
|
|---|
| 9 | Placement(visible = true, transformation(origin = {-174, 14}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 10 | Modelica.Mechanics.MultiBody.Joints.Revolute LE_hinge_R(a(fixed = false, start = 0), phi(fixed = true, start = noseAngle / 2), w(fixed = true, start = 0)) annotation(
|
|---|
| 11 | Placement(visible = true, transformation(origin = {-92, 40}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
|
|---|
| 12 | frame_model_pack.Keel keel annotation(
|
|---|
| 13 | Placement(visible = true, transformation(origin = {-56, 10}, extent = {{-50, -10}, {50, 10}}, rotation = 0)));
|
|---|
| 14 | frame_model_pack.Keel keel1 annotation(
|
|---|
| 15 | Placement(visible = true, transformation(origin = {-28, 74}, extent = {{-50, -10}, {50, 10}}, rotation = 0)));
|
|---|
| 16 | Control_Frame control_Frame annotation(
|
|---|
| 17 | Placement(visible = true, transformation(origin = {-34, -48}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
|
|---|
| 18 | equation
|
|---|
| 19 | connect(world.frame_b, keel.frame_a) annotation(
|
|---|
| 20 | Line(points = {{-164, 14}, {-134, 14}, {-134, 10}, {-106, 10}}, color = {95, 95, 95}));
|
|---|
| 21 | connect(keel.LE_hinge_R, LE_hinge_R.frame_a) annotation(
|
|---|
| 22 | Line(points = {{-98, 20}, {-94, 20}, {-94, 30}, {-92, 30}}));
|
|---|
| 23 | connect(keel1.frame_a, LE_hinge_R.frame_b) annotation(
|
|---|
| 24 | Line(points = {{-78, 74}, {-92, 74}, {-92, 50}, {-92, 50}}));
|
|---|
| 25 | connect(keel.TOU_anchor, control_Frame.TOU_conn) annotation(
|
|---|
| 26 | Line(points = {{-48, 10}, {-36, 10}, {-36, -28}, {-34, -28}}, color = {95, 95, 95}));
|
|---|
| 27 | annotation(
|
|---|
| 28 | Icon(coordinateSystem(extent = {{-500, -100}, {500, 100}})),
|
|---|
| 29 | Diagram(coordinateSystem(extent = {{-500, -100}, {500, 100}})));
|
|---|
| 30 | end Frame_Model;
|
|---|
| 31 |
|
|---|
| 32 | model Keel
|
|---|
| 33 | parameter Modelica.SIunits.Length NPx = 0.05795 "Set back of leading edge hinge along keel";
|
|---|
| 34 | parameter Modelica.SIunits.Length NPy = 0.0635 "Distance outboard of leading edge hinge from keel";
|
|---|
| 35 | parameter Modelica.SIunits.Length keelLength = 2.28 "Overall length of keel";
|
|---|
| 36 | Modelica.Mechanics.MultiBody.Parts.BodyCylinder keel_tube(diameter = 0.052, innerDiameter = 0.05, r = {keelLength, 0, 0}) annotation(
|
|---|
| 37 | Placement(visible = true, transformation(origin = {55, 7}, extent = {{-65, -65}, {65, 65}}, rotation = 0)));
|
|---|
| 38 | Modelica.Mechanics.MultiBody.Interfaces.Frame_a frame_a annotation(
|
|---|
| 39 | Placement(visible = true, transformation(origin = {-196, 6}, extent = {{-16, -16}, {16, 16}}, rotation = 0), iconTransformation(origin = {-500, 2}, extent = {{-16, -16}, {16, 16}}, rotation = 0)));
|
|---|
| 40 | Modelica.Mechanics.MultiBody.Parts.FixedTranslation NP_R(r = {NPx, NPy, 0}) annotation(
|
|---|
| 41 | Placement(visible = true, transformation(origin = {-88, 60}, extent = {{-10, -10}, {10, 10}}, rotation = 90)));
|
|---|
| 42 | Modelica.Mechanics.MultiBody.Parts.FixedTranslation NP_L(r = {NPx, -NPy, 0}) annotation(
|
|---|
| 43 | Placement(visible = true, transformation(origin = {-88, -36}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
|
|---|
| 44 | Modelica.Mechanics.MultiBody.Interfaces.Frame_b LE_hinge_L annotation(
|
|---|
| 45 | Placement(visible = true, transformation(origin = {-88, -98}, extent = {{-16, -16}, {16, 16}}, rotation = 90), iconTransformation(origin = {-428, -98}, extent = {{-16, -16}, {16, 16}}, rotation = 90)));
|
|---|
| 46 | Modelica.Mechanics.MultiBody.Interfaces.Frame_b LE_hinge_R annotation(
|
|---|
| 47 | Placement(visible = true, transformation(origin = {-88, 98}, extent = {{-16, -16}, {16, 16}}, rotation = 90), iconTransformation(origin = {-426, 94}, extent = {{-16, -16}, {16, 16}}, rotation = 90)));
|
|---|
| 48 | Modelica.Mechanics.MultiBody.Parts.FixedTranslation TOU_Translation(animation = false, r = {1.68, 0, 0}) annotation(
|
|---|
| 49 | Placement(visible = true, transformation(origin = {32, 76}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 50 | Modelica.Mechanics.MultiBody.Parts.FixedTranslation TS_Translation(animation = false, r = {2.47, 0, 0}) annotation(
|
|---|
| 51 | Placement(visible = true, transformation(origin = {32, -58}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 52 | Modelica.Mechanics.MultiBody.Interfaces.Frame_b TOU_anchor annotation(
|
|---|
| 53 | Placement(visible = true, transformation(origin = {104, 84}, extent = {{-16, -16}, {16, 16}}, rotation = 0), iconTransformation(origin = {76, 4}, extent = {{-16, -16}, {16, 16}}, rotation = 0)));
|
|---|
| 54 | Modelica.Mechanics.MultiBody.Interfaces.Frame_b TS_anchor annotation(
|
|---|
| 55 | Placement(visible = true, transformation(origin = {114, -66}, extent = {{-16, -16}, {16, 16}}, rotation = 0), iconTransformation(origin = {402, 2}, extent = {{-16, -16}, {16, 16}}, rotation = 0)));
|
|---|
| 56 | Modelica.Mechanics.MultiBody.Interfaces.Frame_b keel_end annotation(
|
|---|
| 57 | Placement(visible = true, transformation(origin = {196, 10}, extent = {{-16, -16}, {16, 16}}, rotation = 0), iconTransformation(origin = {498, 2}, extent = {{-16, -16}, {16, 16}}, rotation = 0)));
|
|---|
| 58 | equation
|
|---|
| 59 | connect(frame_a, keel_tube.frame_a) annotation(
|
|---|
| 60 | Line(points = {{-196, 6}, {-10, 6}, {-10, 7}}));
|
|---|
| 61 | connect(keel_tube.frame_a, NP_L.frame_a) annotation(
|
|---|
| 62 | Line(points = {{-10, 7}, {-88, 7}, {-88, -26}}, color = {95, 95, 95}));
|
|---|
| 63 | connect(keel_tube.frame_a, NP_R.frame_a) annotation(
|
|---|
| 64 | Line(points = {{-10, 7}, {-88, 7}, {-88, 50}}, color = {95, 95, 95}));
|
|---|
| 65 | connect(NP_R.frame_b, LE_hinge_R) annotation(
|
|---|
| 66 | Line(points = {{-88, 70}, {-88, 70}, {-88, 98}, {-88, 98}}));
|
|---|
| 67 | connect(NP_L.frame_b, LE_hinge_L) annotation(
|
|---|
| 68 | Line(points = {{-88, -46}, {-88, -46}, {-88, -98}, {-88, -98}}, color = {95, 95, 95}));
|
|---|
| 69 | connect(keel_tube.frame_a, TOU_Translation.frame_a) annotation(
|
|---|
| 70 | Line(points = {{-10, 8}, {-30, 8}, {-30, 76}, {22, 76}, {22, 76}}, color = {95, 95, 95}));
|
|---|
| 71 | connect(keel_tube.frame_a, TS_Translation.frame_a) annotation(
|
|---|
| 72 | Line(points = {{-10, 8}, {-34, 8}, {-34, -58}, {22, -58}, {22, -58}}, color = {95, 95, 95}));
|
|---|
| 73 | connect(TS_Translation.frame_b, TS_anchor) annotation(
|
|---|
| 74 | Line(points = {{42, -58}, {92, -58}, {92, -66}, {114, -66}, {114, -66}}, color = {95, 95, 95}));
|
|---|
| 75 | connect(TOU_Translation.frame_b, TOU_anchor) annotation(
|
|---|
| 76 | Line(points = {{42, 76}, {62, 76}, {62, 84}, {104, 84}, {104, 84}}, color = {95, 95, 95}));
|
|---|
| 77 | connect(keel_tube.frame_b, keel_end) annotation(
|
|---|
| 78 | Line(points = {{120, 8}, {198, 8}, {198, 10}, {196, 10}}, color = {95, 95, 95}));
|
|---|
| 79 | annotation(
|
|---|
| 80 | Icon(coordinateSystem(extent = {{-500, -100}, {500, 100}}, initialScale = 0.1), graphics = {Rectangle(origin = {1, 1}, fillColor = {136, 138, 133}, fillPattern = FillPattern.HorizontalCylinder, extent = {{-499, 45}, {499, -45}}), Polygon(origin = {-430, 0}, fillColor = {136, 138, 133}, fillPattern = FillPattern.Solid, points = {{4, 98}, {-60, 4}, {2, -98}, {58, 10}, {4, 98}})}),
|
|---|
| 81 | Diagram(coordinateSystem(extent = {{-500, -100}, {500, 100}})));
|
|---|
| 82 | end Keel;
|
|---|
| 83 |
|
|---|
| 84 | model Control_Frame
|
|---|
| 85 |
|
|---|
| 86 | import Modelica.SIunits.Conversions.*;
|
|---|
| 87 |
|
|---|
| 88 | parameter Modelica.SIunits.Length width_TOU = 0.082 "Width across Top of Upright pivot points";
|
|---|
| 89 | parameter Modelica.SIunits.Length width_bb = 1.345 "Width across base bar";
|
|---|
| 90 | parameter Modelica.SIunits.Length height = 1.44722 "Total in plane height of control frame";
|
|---|
| 91 | parameter Modelica.SIunits.Length uprightLength = sqrt(height ^ 2 + ((width_bb - width_TOU) / 2) ^ 2);
|
|---|
| 92 | parameter Modelica.SIunits.Angle frameAngle = atan(height / ((width_bb - width_TOU) / 2));
|
|---|
| 93 |
|
|---|
| 94 | Modelica.Mechanics.MultiBody.Interfaces.Frame_a TOU_conn annotation(
|
|---|
| 95 | Placement(visible = true, transformation(origin = {-92, 34}, extent = {{-16, -16}, {16, 16}}, rotation = -90), iconTransformation(origin = {-2, 200}, extent = {{-16, -16}, {16, 16}}, rotation = -90)));
|
|---|
| 96 | Modelica.Mechanics.MultiBody.Parts.FixedTranslation TOU_R(r = {0, width_TOU / 2, 0}, width = 0.01) annotation(
|
|---|
| 97 | Placement(visible = true, transformation(origin = {-50, 14}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 98 | Modelica.Mechanics.MultiBody.Parts.FixedTranslation TOU_L(r = {0, width_TOU / 2, 0}, width = 0.01) annotation(
|
|---|
| 99 | Placement(visible = true, transformation(origin = {-132, 14}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 100 | Modelica.Mechanics.MultiBody.Joints.Revolute TOU_joint_R(n = {1, 0, 0}, phi(fixed = false, start = -frameAngle), w(fixed = false, start = 0)) annotation(
|
|---|
| 101 | Placement(visible = true, transformation(origin = {-30, -6}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
|
|---|
| 102 | Modelica.Mechanics.MultiBody.Parts.BodyCylinder upright_R(density = 2400, diameter = 0.0284, innerDiameter = 0.025, r = {0, uprightLength, 0}) annotation(
|
|---|
| 103 | Placement(visible = true, transformation(origin = {-30, -42}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
|
|---|
| 104 | Modelica.Mechanics.MultiBody.Parts.BodyCylinder upright_L(density = 2400, diameter = 0.0284, innerDiameter = 0.025, r = {0, uprightLength, 0}) annotation(
|
|---|
| 105 | Placement(visible = true, transformation(origin = {-168, -40}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
|
|---|
| 106 | Modelica.Mechanics.MultiBody.Joints.Revolute TOU_joint_L(n = {1, 0, 0}, phi(fixed = true, start = -(from_deg(180) - frameAngle)), w(fixed = true, start = 0)) annotation(
|
|---|
| 107 | Placement(visible = true, transformation(origin = {-166, -6}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
|
|---|
| 108 | Modelica.Mechanics.MultiBody.Joints.Revolute BOU_L(n = {1, 0, 0}, phi(fixed = false, start = from_deg(180) - frameAngle), w(fixed = false)) annotation(
|
|---|
| 109 | Placement(visible = true, transformation(origin = {-168, -70}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
|
|---|
| 110 | Modelica.Mechanics.MultiBody.Parts.BodyCylinder bodyCylinder(density = 2400, diameter = 0.0284, innerDiameter = 0.025, r = {0, width_bb, 0}) annotation(
|
|---|
| 111 | Placement(visible = true, transformation(origin = {-104, -86}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 112 | Modelica.Mechanics.MultiBody.Joints.RevolutePlanarLoopConstraint BOU_R(n = {1, 0, 0}) annotation(
|
|---|
| 113 | Placement(visible = true, transformation(origin = {-30, -72}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
|
|---|
| 114 |
|
|---|
| 115 | equation
|
|---|
| 116 | connect(TOU_conn, TOU_R.frame_a) annotation(
|
|---|
| 117 | Line(points = {{-92, 34}, {-92, 34}, {-92, 12}, {-60, 12}, {-60, 14}}));
|
|---|
| 118 | connect(TOU_L.frame_b, TOU_R.frame_a) annotation(
|
|---|
| 119 | Line(points = {{-122, 14}, {-60, 14}, {-60, 14}, {-60, 14}}));
|
|---|
| 120 | connect(TOU_R.frame_b, TOU_joint_R.frame_a) annotation(
|
|---|
| 121 | Line(points = {{-40, 14}, {-30, 14}, {-30, 4}}, color = {95, 95, 95}));
|
|---|
| 122 | connect(TOU_joint_R.frame_b, upright_R.frame_a) annotation(
|
|---|
| 123 | Line(points = {{-30, -16}, {-30, -32}}, color = {95, 95, 95}));
|
|---|
| 124 | connect(TOU_joint_L.frame_a, TOU_L.frame_a) annotation(
|
|---|
| 125 | Line(points = {{-166, 4}, {-166, 4}, {-166, 14}, {-142, 14}, {-142, 14}}));
|
|---|
| 126 | connect(TOU_joint_L.frame_b, upright_L.frame_a) annotation(
|
|---|
| 127 | Line(points = {{-166, -16}, {-168, -16}, {-168, -30}, {-168, -30}}, color = {95, 95, 95}));
|
|---|
| 128 | connect(upright_L.frame_b, BOU_L.frame_a) annotation(
|
|---|
| 129 | Line(points = {{-168, -50}, {-168, -50}, {-168, -60}, {-168, -60}}));
|
|---|
| 130 | connect(BOU_L.frame_b, bodyCylinder.frame_a) annotation(
|
|---|
| 131 | Line(points = {{-168, -80}, {-168, -86}, {-114, -86}}, color = {95, 95, 95}));
|
|---|
| 132 | connect(upright_R.frame_b, BOU_R.frame_a) annotation(
|
|---|
| 133 | Line(points = {{-30, -52}, {-30, -52}, {-30, -62}, {-30, -62}}));
|
|---|
| 134 | connect(BOU_R.frame_b, bodyCylinder.frame_b) annotation(
|
|---|
| 135 | Line(points = {{-30, -82}, {-30, -82}, {-30, -86}, {-94, -86}, {-94, -86}}));
|
|---|
| 136 | annotation(
|
|---|
| 137 | Icon(coordinateSystem(extent = {{-200, -200}, {200, 200}}), graphics = {Rectangle(origin = {-73, 66}, rotation = -25, lineColor = {52, 101, 164}, fillColor = {114, 159, 207}, fillPattern = FillPattern.VerticalCylinder, extent = {{9, 142}, {-11, -206}}), Rectangle(origin = {69, 68}, rotation = 25, lineColor = {52, 101, 164}, fillColor = {114, 159, 207}, fillPattern = FillPattern.VerticalCylinder, extent = {{9, 142}, {-11, -206}}), Rectangle(origin = {-23, -116}, rotation = 90, lineColor = {52, 101, 164}, fillColor = {114, 159, 207}, fillPattern = FillPattern.VerticalCylinder, extent = {{9, 142}, {-5, -184}})}),
|
|---|
| 138 | Diagram(coordinateSystem(extent = {{-200, -200}, {200, 200}})));
|
|---|
| 139 |
|
|---|
| 140 | end Control_Frame;
|
|---|
| 141 |
|
|---|
| 142 | model new_frame_model
|
|---|
| 143 | Keel keel annotation(
|
|---|
| 144 | Placement(visible = true, transformation(origin = {-122, 6}, extent = {{-50, -10}, {50, 10}}, rotation = 0)));
|
|---|
| 145 | Control_Frame control_Frame annotation(
|
|---|
| 146 | Placement(visible = true, transformation(origin = {-104, -48}, extent = {{-20, -20}, {20, 20}}, rotation = 0)));
|
|---|
| 147 | inner Modelica.Mechanics.MultiBody.World world annotation(
|
|---|
| 148 | Placement(visible = true, transformation(origin = {-272, 2}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
|---|
| 149 | equation
|
|---|
| 150 | connect(world.frame_b, keel.frame_a) annotation(
|
|---|
| 151 | Line(points = {{-262, 2}, {-174, 2}, {-174, 6}, {-172, 6}}, color = {95, 95, 95}));
|
|---|
| 152 | connect(keel.TOU_anchor, control_Frame.TOU_conn) annotation(
|
|---|
| 153 | Line(points = {{-114, 6}, {-104, 6}, {-104, -28}, {-104, -28}}, color = {95, 95, 95}));
|
|---|
| 154 | annotation(
|
|---|
| 155 | Icon(coordinateSystem(extent = {{-500, -100}, {500, 100}})),
|
|---|
| 156 | Diagram(coordinateSystem(extent = {{-500, -100}, {500, 100}})));
|
|---|
| 157 | end new_frame_model;
|
|---|
| 158 | annotation(
|
|---|
| 159 | Icon(coordinateSystem(extent = {{-500, -100}, {500, 100}})),
|
|---|
| 160 | Diagram(coordinateSystem(extent = {{-500, -100}, {500, 100}})),
|
|---|
| 161 | uses(Modelica(version = "3.2.3")));
|
|---|
| 162 | end frame_model_pack;
|
|---|