| 1 | within Project1;
|
|---|
| 2 | model SpringDamperARB_4
|
|---|
| 3 | "Rocker arrangement w spring damper per side and anti roll bar4"
|
|---|
| 4 | extends
|
|---|
| 5 | VDLMotorsports.Chassis.Suspensions.Linkages.Templates.RockerArrangement;
|
|---|
| 6 |
|
|---|
| 7 | import SI = Modelica.SIunits;
|
|---|
| 8 | parameter SI.Position r0CS_1[3] = {0.3, 0.08, 0.13}
|
|---|
| 9 | "Position of the left spring end connected to the chassis resolved in vehicleFrame"
|
|---|
| 10 | annotation(Dialog(tab=Geometry));
|
|---|
| 11 | parameter SI.Position r0RS_1[3] = {0.06, 0.04, 0.13}
|
|---|
| 12 | "Position of the left spring end connected to the rocker resolved in vehicleFrame"
|
|---|
| 13 | annotation(Dialog(tab="Geometry"));
|
|---|
| 14 |
|
|---|
| 15 | parameter SI.Position r0CD_1[3] = {0.3, 0.08, 0.13}
|
|---|
| 16 | "Position of the left damper end connected to the chassis resolved in vehicleFrame"
|
|---|
| 17 | annotation(Dialog(tab=Geometry));
|
|---|
| 18 | parameter SI.Position r0RD_1[3] = {0.06, 0.04, 0.13}
|
|---|
| 19 | "Position of the left damper end connected to the rocker resolved in vehicleFrame"
|
|---|
| 20 | annotation(Dialog(tab="Geometry"));
|
|---|
| 21 |
|
|---|
| 22 | parameter SI.Position r0CS_2[3] = {0.3, 0.08, 0.13}
|
|---|
| 23 | "Position of the right spring end connected to the chassis resolved in vehicleFrame"
|
|---|
| 24 | annotation(Dialog(tab=Geometry));
|
|---|
| 25 | parameter SI.Position r0RS_2[3] = {0.06, 0.04, 0.13}
|
|---|
| 26 | "Position of the right spring end connected to the rocker resolved in vehicleFrame"
|
|---|
| 27 | annotation(Dialog(tab="Geometry"));
|
|---|
| 28 |
|
|---|
| 29 | parameter SI.Position r0CD_2[3] = {0.3, 0.08, 0.13}
|
|---|
| 30 | "Position of the right damper end connected to the chassis resolved in vehicleFrame"
|
|---|
| 31 | annotation(Dialog(tab=Geometry));
|
|---|
| 32 | parameter SI.Position r0RD_2[3] = {0.06, 0.04, 0.13}
|
|---|
| 33 | "Position of the right damper end connected to the rocker resolved in vehicleFrame"
|
|---|
| 34 | annotation(Dialog(tab="Geometry"));
|
|---|
| 35 |
|
|---|
| 36 | protected
|
|---|
| 37 | parameter SI.Position r0CS_1_scaled[3] = r0CS_1 .* scale_factor + offset;
|
|---|
| 38 | parameter SI.Position r0RS_1_scaled[3] = r0RS_1 .* scale_factor + offset;
|
|---|
| 39 |
|
|---|
| 40 | parameter SI.Position r0CD_1_scaled[3] = r0CD_1 .* scale_factor + offset;
|
|---|
| 41 | parameter SI.Position r0RD_1_scaled[3] = r0RD_1 .* scale_factor + offset;
|
|---|
| 42 |
|
|---|
| 43 | parameter SI.Position r0CS_2_scaled[3] = r0CS_2 .* scale_factor + offset;
|
|---|
| 44 | parameter SI.Position r0RS_2_scaled[3] = r0RS_2 .* scale_factor + offset;
|
|---|
| 45 |
|
|---|
| 46 | parameter SI.Position r0CD_2_scaled[3] = r0CD_2 .* scale_factor + offset;
|
|---|
| 47 | parameter SI.Position r0RD_2_scaled[3] = r0RD_2 .* scale_factor + offset;
|
|---|
| 48 | VehicleDynamics.Vehicles.Chassis.Suspensions.Linkages.Struts.UnconstrainedTranslational
|
|---|
| 49 | leftSpring(
|
|---|
| 50 | r0J1=r0CS_1_scaled,
|
|---|
| 51 | r0J2=r0RS_1_scaled,
|
|---|
| 52 | r0B=r0CR_1_scaled)
|
|---|
| 53 | annotation (Placement(transformation(
|
|---|
| 54 | extent={{-10,4},{10,-4}},
|
|---|
| 55 | rotation=-90,
|
|---|
| 56 | origin={-100,50})));
|
|---|
| 57 | VehicleDynamics.Vehicles.Chassis.Suspensions.Linkages.Struts.UnconstrainedTranslational
|
|---|
| 58 | leftDamper(
|
|---|
| 59 | r0J1=r0CD_1_scaled,
|
|---|
| 60 | r0J2=r0RD_1_scaled,
|
|---|
| 61 | r0B=r0CR_1_scaled)
|
|---|
| 62 | annotation (Placement(transformation(
|
|---|
| 63 | extent={{-10,-4},{10,4}},
|
|---|
| 64 | rotation=-90,
|
|---|
| 65 | origin={-80,50})));
|
|---|
| 66 | VehicleDynamics.Vehicles.Chassis.Suspensions.Linkages.Struts.UnconstrainedTranslational
|
|---|
| 67 | rightDamper(
|
|---|
| 68 | r0B=r0CR_2_scaled,
|
|---|
| 69 | r0J1=r0CD_2_scaled,
|
|---|
| 70 | r0J2=r0RD_2_scaled)
|
|---|
| 71 | annotation (Placement(transformation(
|
|---|
| 72 | extent={{10,-4},{-10,4}},
|
|---|
| 73 | rotation=90,
|
|---|
| 74 | origin={80,50})));
|
|---|
| 75 | VehicleDynamics.Vehicles.Chassis.Suspensions.Linkages.Struts.UnconstrainedTranslational
|
|---|
| 76 | rightSpring(
|
|---|
| 77 | r0B=r0CR_2_scaled,
|
|---|
| 78 | r0J1=r0CS_2_scaled,
|
|---|
| 79 | r0J2=r0RS_2_scaled,
|
|---|
| 80 | lineForce(m=1))
|
|---|
| 81 | annotation (Placement(transformation(
|
|---|
| 82 | extent={{-10,-4},{10,4}},
|
|---|
| 83 | rotation=-90,
|
|---|
| 84 | origin={100,50})));
|
|---|
| 85 | VDLMotorsports.Chassis.Suspensions.Linkages.Mechanisms.AntiRoll1 antiRoll(
|
|---|
| 86 | r0CR_1=r0CR_1_scaled,
|
|---|
| 87 | r0RP_1=r0RP_1 .* scale_factor + offset,
|
|---|
| 88 | r0LP_1=r0LP_1 .* scale_factor + offset,
|
|---|
| 89 | r0ARB_1=r0ARB_1 .* scale_factor + offset,
|
|---|
| 90 | r0CR_2=r0CR_2_scaled,
|
|---|
| 91 | r0RP_2=r0RP_2 .* scale_factor + offset,
|
|---|
| 92 | r0LP_2=r0LP_2 .* scale_factor + offset,
|
|---|
| 93 | r0ARB_2=r0ARB_2 .* scale_factor + offset,
|
|---|
| 94 | fAntiRoll_1=fAntiRoll_1,
|
|---|
| 95 | manualOverride=manualOverride,
|
|---|
| 96 | manualBranchSelection=manualBranchSelection)
|
|---|
| 97 | annotation (Placement(transformation(extent={{-10,-48},{10,-68}})));
|
|---|
| 98 | public
|
|---|
| 99 | parameter SI.Position r0RP_1[3]={0,0.3,0.3}
|
|---|
| 100 | "Position of left pivot point on rocker resolved in vehicleFrame"
|
|---|
| 101 | annotation (Dialog(tab="Geometry"));
|
|---|
| 102 | parameter SI.Position r0LP_1[3]={0,0.3,0.3}
|
|---|
| 103 | "Position of left lever pivot point resolved in vehicleFrame"
|
|---|
| 104 | annotation (Dialog(tab="Geometry"));
|
|---|
| 105 | parameter SI.Position r0ARB_1[3]={0,0.3,0.3}
|
|---|
| 106 | "Position of left end of anti-roll bar resolved in vehicleFrame"
|
|---|
| 107 | annotation (Dialog(tab="Geometry"));
|
|---|
| 108 | parameter SI.Position r0RP_2[3]=antiRoll.r0RP_1 .* {1,-1,1}
|
|---|
| 109 | "Position of right pivot point on rocker resolved in vehicleFrame"
|
|---|
| 110 | annotation (Dialog(tab="Geometry"));
|
|---|
| 111 | parameter SI.Position r0LP_2[3]=antiRoll.r0LP_1 .* {1,-1,1}
|
|---|
| 112 | "Position of right lever pivot point resolved in vehicleFrame"
|
|---|
| 113 | annotation (Dialog(tab="Geometry"));
|
|---|
| 114 | parameter SI.Position r0ARB_2[3]=antiRoll.r0ARB_1 .* {1,-1,1}
|
|---|
| 115 | "Position of right end of anti-roll bar resolved in vehicleFrame"
|
|---|
| 116 | annotation (Dialog(tab="Geometry"));
|
|---|
| 117 | parameter SI.Force fAntiRoll_1=0
|
|---|
| 118 | "Initial estimate of the force in the left anti-roll bar arm"
|
|---|
| 119 | annotation (Dialog(tab="Initialization"));
|
|---|
| 120 | Modelon.Mechanics.Translational.Interfaces.FlangeU axis2
|
|---|
| 121 | annotation (Placement(transformation(extent={{-160,16},{-140,36}})));
|
|---|
| 122 | Modelon.Mechanics.Translational.Interfaces.FlangeC bearing2
|
|---|
| 123 | annotation (Placement(transformation(extent={{-160,54},{-140,74}})));
|
|---|
| 124 | Modelon.Mechanics.Translational.Interfaces.FlangeC bearing1
|
|---|
| 125 | annotation (Placement(transformation(extent={{-86,90},{-66,110}})));
|
|---|
| 126 | Modelon.Mechanics.Translational.Interfaces.FlangeU axis1
|
|---|
| 127 | annotation (Placement(transformation(extent={{-56,90},{-36,110}})));
|
|---|
| 128 | Modelon.Mechanics.Translational.Interfaces.FlangeU axis3
|
|---|
| 129 | annotation (Placement(transformation(extent={{40,90},{60,110}})));
|
|---|
| 130 | Modelon.Mechanics.Translational.Interfaces.FlangeC bearing3
|
|---|
| 131 | annotation (Placement(transformation(extent={{68,90},{88,110}})));
|
|---|
| 132 | Modelon.Mechanics.Translational.Interfaces.FlangeC bearing4
|
|---|
| 133 | annotation (Placement(transformation(extent={{140,58},{160,78}})));
|
|---|
| 134 | Modelon.Mechanics.Translational.Interfaces.FlangeU axis4
|
|---|
| 135 | annotation (Placement(transformation(extent={{140,20},{160,40}})));
|
|---|
| 136 | Modelon.Mechanics.Rotational.Interfaces.FlangeU axis5
|
|---|
| 137 | annotation (Placement(transformation(extent={{-34,-110},{-14,-90}})));
|
|---|
| 138 | Modelon.Mechanics.Rotational.Interfaces.FlangeC bearing5
|
|---|
| 139 | annotation (Placement(transformation(extent={{-82,-110},{-62,-90}})));
|
|---|
| 140 | parameter Boolean manualBranchSelection=false
|
|---|
| 141 | "Select positive (true) or negative (false) solution branch for inital angle of revolute in the anti-roll bar arms"
|
|---|
| 142 | annotation (Dialog(tab="Solution Selection"));
|
|---|
| 143 | parameter SI.Mass m=0
|
|---|
| 144 | "Mass of point mass on the connetion line between the origin of frame_a and the origin of frame_b"
|
|---|
| 145 | annotation (Dialog(tab="Geometry"));
|
|---|
| 146 | equation
|
|---|
| 147 | connect(leftSpring.frame_a, vehicleFrame) annotation (Line(
|
|---|
| 148 | points={{-100,60},{-100,80},{0,80},{0,100}},
|
|---|
| 149 | color={95,95,95},
|
|---|
| 150 | thickness=0.5,
|
|---|
| 151 | smooth=Smooth.None));
|
|---|
| 152 | connect(leftDamper.frame_a, vehicleFrame) annotation (Line(
|
|---|
| 153 | points={{-80,60},{-80,80},{0,80},{0,100}},
|
|---|
| 154 | color={95,95,95},
|
|---|
| 155 | thickness=0.5,
|
|---|
| 156 | smooth=Smooth.None));
|
|---|
| 157 | connect(rightDamper.frame_a, vehicleFrame) annotation (Line(
|
|---|
| 158 | points={{80,60},{80,80},{0,80},{0,100}},
|
|---|
| 159 | color={95,95,95},
|
|---|
| 160 | thickness=0.5,
|
|---|
| 161 | smooth=Smooth.None));
|
|---|
| 162 | connect(rightSpring.frame_a, vehicleFrame) annotation (Line(
|
|---|
| 163 | points={{100,60},{100,80},{0,80},{0,100}},
|
|---|
| 164 | color={95,95,95},
|
|---|
| 165 | thickness=0.5,
|
|---|
| 166 | smooth=Smooth.None));
|
|---|
| 167 | connect(leftRockerFrame, antiRoll.leftRockerFrame) annotation (Line(
|
|---|
| 168 | points={{-150,-60},{-80,-60},{-80,-64},{-10,-64}},
|
|---|
| 169 | color={95,95,95},
|
|---|
| 170 | thickness=0.5,
|
|---|
| 171 | smooth=Smooth.None));
|
|---|
| 172 | connect(leftSpring.frame_b, antiRoll.leftRockerFrame) annotation (Line(
|
|---|
| 173 | points={{-100,40},{-100,-60},{-80,-60},{-80,-64},{-10,-64}},
|
|---|
| 174 | color={95,95,95},
|
|---|
| 175 | thickness=0.5,
|
|---|
| 176 | smooth=Smooth.None));
|
|---|
| 177 | connect(leftDamper.frame_b, antiRoll.leftRockerFrame) annotation (Line(
|
|---|
| 178 | points={{-80,40},{-80,-64},{-10,-64}},
|
|---|
| 179 | color={95,95,95},
|
|---|
| 180 | thickness=0.5,
|
|---|
| 181 | smooth=Smooth.None));
|
|---|
| 182 | connect(antiRoll.rightRockerFrame, rightRockerFrame) annotation (Line(
|
|---|
| 183 | points={{10,-64},{80,-64},{80,-60},{150,-60}},
|
|---|
| 184 | color={95,95,95},
|
|---|
| 185 | thickness=0.5,
|
|---|
| 186 | smooth=Smooth.None));
|
|---|
| 187 | connect(antiRoll.vehicleFrame, vehicleFrame) annotation (Line(
|
|---|
| 188 | points={{0,-48},{0,100}},
|
|---|
| 189 | color={95,95,95},
|
|---|
| 190 | thickness=0.5,
|
|---|
| 191 | smooth=Smooth.None));
|
|---|
| 192 | connect(leftSpring.axis, axis2) annotation (Line(
|
|---|
| 193 | points={{-104,47},{-150,47},{-150,26}},
|
|---|
| 194 | color={0,127,0},
|
|---|
| 195 | smooth=Smooth.None));
|
|---|
| 196 | connect(leftSpring.bearing, bearing2) annotation (Line(
|
|---|
| 197 | points={{-104,53},{-128,53},{-128,56},{-150,56},{-150,64}},
|
|---|
| 198 | color={0,127,0},
|
|---|
| 199 | smooth=Smooth.None));
|
|---|
| 200 | connect(leftDamper.bearing, bearing1) annotation (Line(
|
|---|
| 201 | points={{-76,53},{-70,53},{-70,100},{-76,100}},
|
|---|
| 202 | color={0,127,0},
|
|---|
| 203 | smooth=Smooth.None));
|
|---|
| 204 | connect(leftDamper.axis, axis1) annotation (Line(
|
|---|
| 205 | points={{-76,47},{-52,47},{-52,100},{-46,100}},
|
|---|
| 206 | color={0,127,0},
|
|---|
| 207 | smooth=Smooth.None));
|
|---|
| 208 | connect(rightDamper.axis, axis3) annotation (Line(
|
|---|
| 209 | points={{76,47},{42,47},{42,100},{50,100}},
|
|---|
| 210 | color={0,127,0},
|
|---|
| 211 | smooth=Smooth.None));
|
|---|
| 212 | connect(rightDamper.bearing, bearing3) annotation (Line(
|
|---|
| 213 | points={{76,53},{74,53},{74,54},{72,54},{72,100},{78,100}},
|
|---|
| 214 | color={0,127,0},
|
|---|
| 215 | smooth=Smooth.None));
|
|---|
| 216 | connect(rightSpring.bearing, bearing4) annotation (Line(
|
|---|
| 217 | points={{104,53},{150,53},{150,68}},
|
|---|
| 218 | color={0,127,0},
|
|---|
| 219 | smooth=Smooth.None));
|
|---|
| 220 | connect(rightSpring.axis, axis4) annotation (Line(
|
|---|
| 221 | points={{104,47},{150,47},{150,30}},
|
|---|
| 222 | color={0,127,0},
|
|---|
| 223 | smooth=Smooth.None));
|
|---|
| 224 | connect(antiRoll.axis2, axis5) annotation (Line(
|
|---|
| 225 | points={{-10,-58},{-20,-58},{-20,-100},{-24,-100}},
|
|---|
| 226 | color={0,0,0},
|
|---|
| 227 | smooth=Smooth.None));
|
|---|
| 228 | connect(antiRoll.bearing2, bearing5) annotation (Line(
|
|---|
| 229 | points={{-10,-50},{-34,-50},{-34,-52},{-58,-52},{-58,-100},{-72,-100}},
|
|---|
| 230 | color={0,0,0},
|
|---|
| 231 | smooth=Smooth.None));
|
|---|
| 232 | annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-150,
|
|---|
| 233 | -100},{150,100}}), graphics));
|
|---|
| 234 | end SpringDamperARB_4;
|
|---|