Changeset 644 for Modelica/branches/maintenance/2.2.2/Modelica/Mechanics/MultiBody/Examples/Loops/Utilities.mo
- Timestamp:
- 09/21/2007 02:43:46 PM (16 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
Modelica/branches/maintenance/2.2.2/Modelica/Mechanics/MultiBody/Examples/Loops/Utilities.mo
r550 r644 226 226 parameter SI.Length d "diameter of cylinder"; 227 227 parameter Real k0=0.01; 228 parameter Real k1= 1;229 parameter Real k= 1;228 parameter Real k1=0.005; 229 parameter Real k=0.00005; 230 230 constant Real pi=Modelica.Constants.pi; 231 231 constant Real PI=Modelica.Constants.pi; … … 270 270 fillPattern=1)), 271 271 Text(extent=[-100, 120; 100, 60], string="%name"))); 272 272 protected 273 Modelica.SIunits.SpecificHeatCapacity R_air = Modelica.Constants.R/0.0289651159; 273 274 equation 274 275 y = -s_rel/L; … … 282 283 131.707*x^3 + 17.3438*x^2 + 17.9272*x + 2.4); 283 284 284 f = -1.0 E5*press*pi*d^2/4;285 f = -1.0e5*press*pi*d^2/4; 285 286 286 287 V = k0 + k1*(1 - x); 287 dens = 1/V; 288 289 dens = press/(R_air*T); 288 290 press*V = k*T; 291 289 292 end GasForce; 290 293 … … 296 299 parameter SI.Length d "diameter of cylinder"; 297 300 parameter Real k0=0.01; 298 parameter Real k1= 1;299 parameter Real k= 1;301 parameter Real k1=0.005; 302 parameter Real k=0.00005; 300 303 constant Real pi=Modelica.Constants.pi; 301 304 constant Real PI=Modelica.Constants.pi; … … 365 368 </html>")); 366 369 370 protected 371 Modelica.SIunits.SpecificHeatCapacity R_air = Modelica.Constants.R/0.0289651159; 367 372 equation 368 373 x = 1 - s_rel/L; … … 378 383 379 384 V = k0 + k1*(1 - x); 380 dens = 1/V;385 dens = press/(R_air*T); 381 386 press*V = k*T; 382 387 … … 531 536 equation 532 537 533 connect(jointRRP.frame_ia, Rod.frame_a) annotation (points=[20,-4; 49,-4; 538 connect(jointRRP.frame_ia, Rod.frame_a) annotation (points=[20,-4; 49,-4; 534 539 49,-1], style( 535 540 color=10, 536 541 rgbcolor={95,95,95}, 537 542 thickness=2)); 538 connect(Mid.frame_b, jointRRP.frame_a) annotation (points=[-24,-20; 539 1.2246 1e-015,-20; 1.22461e-015,-8], style(543 connect(Mid.frame_b, jointRRP.frame_a) annotation (points=[-24,-20; 544 1.22465e-015,-20; 1.22465e-015,-8], style( 540 545 color=10, 541 546 rgbcolor={95,95,95}, … … 543 548 connect(gasForce.flange_a, jointRRP.axis) 544 549 annotation (points=[9,70; 16,70; 16,32], style(color=58)); 545 connect(jointRRP.bearing, gasForce.flange_b) annotation (points=[8,32; 8,52; 550 connect(jointRRP.bearing, gasForce.flange_b) annotation (points=[8,32; 8,52; 546 551 -20,52; -20,70; -11,70], style(color=58)); 547 552 connect(jointRRP.frame_ib, Piston.frame_b) annotation (points=[20,28; 30,28; … … 551 556 thickness=2)); 552 557 connect(jointRRP.frame_b, CylinderInclination.frame_b) annotation (points=[ 553 -1.2246 1e-015,32; 1,32; 1,40; -24,40], style(558 -1.22465e-015,32; 1,32; 1,40; -24,40], style( 554 559 color=10, 555 560 rgbcolor={95,95,95},
