| 873 | | extent={{-22,0},{-2,20}}, rotation=0))); |
| 874 | | equation |
| 875 | | connect(spring.flange_b, stop2.flange_a) annotation (Line(points={{40,10}, |
| 876 | | {60,10}}, color={0,191,0})); |
| | 883 | extent={{-40,-60},{-20,-40}}, |
| | 884 | rotation=0))); |
| | 885 | Translational.Sources.Force force2 |
| | 886 | annotation (Placement(transformation(extent={{-22,0}, |
| | 887 | {-2,20}}, rotation=0))); |
| | 888 | Components.Mass mass( |
| | 889 | m=1, |
| | 890 | L=1, |
| | 891 | s(fixed=true), |
| | 892 | v(fixed=true)) |
| | 893 | annotation (Placement(transformation(extent={{10,0},{30,20}}))); |
| | 894 | Components.SupportFriction supportFriction(f_pos= |
| | 895 | Examples.Utilities.GenerateStribeckFrictionTable( |
| | 896 | F_prop=1, |
| | 897 | F_Coulomb=5, |
| | 898 | F_Stribeck=10, |
| | 899 | fexp=2, |
| | 900 | v_max=12, |
| | 901 | nTable=50)) |
| | 902 | annotation (Placement(transformation(extent={{40,0},{60,20}}))); |
| | 903 | equation |
| | 904 | connect(spring.flange_b, stop2.flange_a) annotation (Line(points={{22,-50}, |
| | 905 | {42,-50}},color={0,191,0})); |
| | 1216 | |
| | 1217 | model Brake "Demonstrate braking of a translational moving mass" |
| | 1218 | extends Modelica.Icons.Example; |
| | 1219 | |
| | 1220 | annotation (Diagram(coordinateSystem( |
| | 1221 | preserveAspectRatio=true, extent={{-100,-100},{100,100}}), graphics), |
| | 1222 | experiment(StopTime=2), |
| | 1223 | Documentation(info="<html> |
| | 1224 | <p> |
| | 1225 | This model consists of a mass with an initial velocity of 1 m/s. |
| | 1226 | After 0.1 s, a brake is activated and it is shown that the mass decelerates until |
| | 1227 | it arrives at rest and remains at rest. Two versions of this system are present, |
| | 1228 | one where the brake is implicitly grounded and one where it is explicitly grounded. |
| | 1229 | </p> |
| | 1230 | |
| | 1231 | </html>")); |
| | 1232 | Modelica.Mechanics.Translational.Components.Brake brake(fn_max=1, useSupport= |
| | 1233 | false) |
| | 1234 | annotation (Placement(transformation(extent={{6,40},{26,20}}))); |
| | 1235 | Modelica.Mechanics.Translational.Components.Mass mass1(m=1, |
| | 1236 | s(fixed=true), |
| | 1237 | v(start=1, fixed=true)) |
| | 1238 | annotation (Placement(transformation(extent={{-34,20},{-14,40}}))); |
| | 1239 | Modelica.Blocks.Sources.Step step(startTime=0.1, height=2) |
| | 1240 | annotation (Placement(transformation(extent={{-10,-10},{10,10}}, |
| | 1241 | rotation=0, |
| | 1242 | origin={-24,-10}))); |
| | 1243 | Modelica.Mechanics.Translational.Components.Brake brake1( |
| | 1244 | fn_max=1, useSupport= |
| | 1245 | true) |
| | 1246 | annotation (Placement(transformation(extent={{6,-60},{26,-40}}))); |
| | 1247 | Modelica.Mechanics.Translational.Components.Mass mass2(m=1, |
| | 1248 | s(fixed=true), |
| | 1249 | v(start=1, fixed=true)) |
| | 1250 | annotation (Placement(transformation(extent={{-34,-60},{-14,-40}}))); |
| | 1251 | Modelica.Mechanics.Translational.Components.Fixed fixed |
| | 1252 | annotation (Placement(transformation(extent={{6,-80},{26,-60}}))); |
| | 1253 | equation |
| | 1254 | connect(mass1.flange_b, brake.flange_a) |
| | 1255 | annotation (Line( |
| | 1256 | points={{-14,30},{6,30}}, |
| | 1257 | color={0,127,0}, |
| | 1258 | smooth=Smooth.None)); |
| | 1259 | connect(step.y, brake.f_normalized) annotation (Line( |
| | 1260 | points={{-13,-10},{16,-10},{16,19}}, |
| | 1261 | color={0,0,127}, |
| | 1262 | smooth=Smooth.None)); |
| | 1263 | connect(mass2.flange_b, brake1.flange_a) |
| | 1264 | annotation (Line( |
| | 1265 | points={{-14,-50},{6,-50}}, |
| | 1266 | color={0,127,0}, |
| | 1267 | smooth=Smooth.None)); |
| | 1268 | connect(step.y, brake1.f_normalized) annotation (Line( |
| | 1269 | points={{-13,-10},{16,-10},{16,-39}}, |
| | 1270 | color={0,0,127}, |
| | 1271 | smooth=Smooth.None)); |
| | 1272 | connect(fixed.flange, brake1.support) annotation (Line( |
| | 1273 | points={{16,-70},{16,-60}}, |
| | 1274 | color={0,127,0}, |
| | 1275 | smooth=Smooth.None)); |
| | 1276 | end Brake; |
| | 1277 | |
| | 1278 | package Utilities "Utility classes used by the Example models" |
| | 1279 | extends Modelica.Icons.Library; |
| | 1280 | function GenerateStribeckFrictionTable |
| | 1281 | "Generate stribeck friction table for example Friction for the SupportFriction" |
| | 1282 | input Real F_prop(final unit="N.s/m", final min=0) |
| | 1283 | "Velocity dependent friction coefficient"; |
| | 1284 | input Modelica.SIunits.Force F_Coulomb |
| | 1285 | "Constant friction: Coulomb force"; |
| | 1286 | input Modelica.SIunits.Force F_Stribeck "Stribeck effect"; |
| | 1287 | input Real fexp(final unit="s/m", final min=0) "Exponential decay"; |
| | 1288 | input Real v_max "Generate table from v=0 ... v_max"; |
| | 1289 | input Integer nTable(min=2)=100 "Number of table points"; |
| | 1290 | output Real table[nTable,2] "Friction table"; |
| | 1291 | algorithm |
| | 1292 | for i in 1:nTable loop |
| | 1293 | table[i,1] :=v_max*(i - 1)/(nTable - 1); |
| | 1294 | table[i,2] :=F_Coulomb + F_prop*table[i, 1] + |
| | 1295 | F_Stribeck*exp(-fexp*table[i, 1]); |
| | 1296 | end for; |
| | 1297 | annotation (Documentation(info="<html> |
| | 1298 | <p> |
| | 1299 | Returns a table with the friction characteristic table[nTable,2] = [0, f1; ....; v_max, fn], where the first |
| | 1300 | column is the velocity v in the range 0..v_max and the second column is the friction force |
| | 1301 | according to the stribeck curve: |
| | 1302 | </p> |
| | 1303 | <pre> |
| | 1304 | F_Coulomb + F_prop*v + F_Stribeck*exp(-fexp*v); |
| | 1305 | </pre> |
| | 1306 | |
| | 1307 | </html>")); |
| | 1308 | end GenerateStribeckFrictionTable; |
| | 1309 | end Utilities; |