Changeset 645
- Timestamp:
- 09/24/07 15:04:45 (15 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
Modelica/branches/maintenance/2.2.2/Modelica/Mechanics/MultiBody/Examples/Loops/Utilities.mo
r644 r645 226 226 parameter SI.Length d "diameter of cylinder"; 227 227 parameter Real k0=0.01; 228 parameter Real k1=0.0 05;229 parameter Real k= 0.00005;228 parameter Real k1=0.01; 229 parameter Real k=7; 230 230 constant Real pi=Modelica.Constants.pi; 231 231 constant Real PI=Modelica.Constants.pi; … … 234 234 Real y "Normalized relative movement (= -s_rel/L)"; 235 235 SI.Density dens; 236 Modelica.SIunits.Conversions.NonSIunits.Pressure_bar press 237 "cylinder pressure"; 236 Modelica.SIunits.AbsolutePressure press "Cylinder pressure"; 238 237 SI.Volume V; 239 238 SI.Temperature T; … … 277 276 v_rel = der(s_rel); 278 277 279 press = if v_rel < 0 then (if x < 0.987 then 177.4132*x^4 - 287.2189*x^3 +278 press = 1e5*(if v_rel < 0 then (if x < 0.987 then 177.4132*x^4 - 287.2189*x^3 + 280 279 151.8252*x^2 - 24.9973*x + 2.4 else 2836360*x^4 - 10569296*x^3 + 14761814 281 280 *x^2 - 9158505*x + 2129670) else (if x > 0.93 then -3929704*x^4 + 282 281 14748765*x^3 - 20747000*x^2 + 12964477*x - 3036495 else 145.930*x^4 - 283 131.707*x^3 + 17.3438*x^2 + 17.9272*x + 2.4) ;284 285 f = - 1.0e5*press*pi*d^2/4;282 131.707*x^3 + 17.3438*x^2 + 17.9272*x + 2.4)); 283 284 f = -press*pi*d^2/4; 286 285 287 286 V = k0 + k1*(1 - x); … … 299 298 parameter SI.Length d "diameter of cylinder"; 300 299 parameter Real k0=0.01; 301 parameter Real k1=0.0 05;302 parameter Real k= 0.00005;300 parameter Real k1=0.01; 301 parameter Real k=7; 303 302 constant Real pi=Modelica.Constants.pi; 304 303 constant Real PI=Modelica.Constants.pi; 305 304 Real x "Normalized position of cylinder (= 1 - s_rel/L)"; 306 305 SI.Density dens; 307 SI.Pressure press "cylinder pressure";306 Modelica.SIunits.AbsolutePressure press "Cylinder pressure"; 308 307 SI.Volume V; 309 308 SI.Temperature T; … … 374 373 v_rel = der(s_rel); 375 374 376 press = if v_rel < 0 then (if x < 0.987 then 177.4132*x^4 - 287.2189*x^3 +375 press = 1.0E5*(if v_rel < 0 then (if x < 0.987 then 177.4132*x^4 - 287.2189*x^3 + 377 376 151.8252*x^2 - 24.9973*x + 2.4 else 2836360*x^4 - 10569296*x^3 + 14761814 378 377 *x^2 - 9158505*x + 2129670) else (if x > 0.93 then -3929704*x^4 + 379 378 14748765*x^3 - 20747000*x^2 + 12964477*x - 3036495 else 145.930*x^4 - 380 131.707*x^3 + 17.3438*x^2 + 17.9272*x + 2.4) ;381 382 f = - 1.0E5*press*pi*d^2/4;379 131.707*x^3 + 17.3438*x^2 + 17.9272*x + 2.4)); 380 381 f = -press*pi*d^2/4; 383 382 384 383 V = k0 + k1*(1 - x); … … 536 535 equation 537 536 538 connect(jointRRP.frame_ia, Rod.frame_a) annotation (points=[20,-4; 49,-4; 537 connect(jointRRP.frame_ia, Rod.frame_a) annotation (points=[20,-4; 49,-4; 539 538 49,-1], style( 540 539 color=10, 541 540 rgbcolor={95,95,95}, 542 541 thickness=2)); 543 connect(Mid.frame_b, jointRRP.frame_a) annotation (points=[-24,-20; 542 connect(Mid.frame_b, jointRRP.frame_a) annotation (points=[-24,-20; 544 543 1.22465e-015,-20; 1.22465e-015,-8], style( 545 544 color=10, … … 548 547 connect(gasForce.flange_a, jointRRP.axis) 549 548 annotation (points=[9,70; 16,70; 16,32], style(color=58)); 550 connect(jointRRP.bearing, gasForce.flange_b) annotation (points=[8,32; 8,52; 549 connect(jointRRP.bearing, gasForce.flange_b) annotation (points=[8,32; 8,52; 551 550 -20,52; -20,70; -11,70], style(color=58)); 552 551 connect(jointRRP.frame_ib, Piston.frame_b) annotation (points=[20,28; 30,28;
