Changeset 644

Show
Ignore:
Timestamp:
09/21/07 14:43:46 (15 months ago)
Author:
otter
Message:

unit error in gas force model in MultiBody engine example corrected. Gas parameters changed so that temperature is in a meaningful range.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Modelica/branches/maintenance/2.2.2/Modelica/Mechanics/MultiBody/Examples/Loops/Utilities.mo

    r550 r644  
    226226    parameter SI.Length d "diameter of cylinder"; 
    227227    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; 
    230230    constant Real pi=Modelica.Constants.pi; 
    231231    constant Real PI=Modelica.Constants.pi; 
     
    270270            fillPattern=1)), 
    271271        Text(extent=[-100, 120; 100, 60], string="%name"))); 
    272      
     272  protected  
     273    Modelica.SIunits.SpecificHeatCapacity R_air = Modelica.Constants.R/0.0289651159; 
    273274  equation  
    274275    y = -s_rel/L; 
     
    282283      131.707*x^3 + 17.3438*x^2 + 17.9272*x + 2.4); 
    283284     
    284     f = -1.0E5*press*pi*d^2/4; 
     285    f = -1.0e5*press*pi*d^2/4; 
    285286     
    286287    V = k0 + k1*(1 - x); 
    287     dens = 1/V; 
     288     
     289    dens = press/(R_air*T); 
    288290    press*V = k*T; 
     291     
    289292  end GasForce; 
    290293   
     
    296299    parameter SI.Length d "diameter of cylinder"; 
    297300    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; 
    300303    constant Real pi=Modelica.Constants.pi; 
    301304    constant Real PI=Modelica.Constants.pi; 
     
    365368</html>")); 
    366369     
     370  protected  
     371    Modelica.SIunits.SpecificHeatCapacity R_air = Modelica.Constants.R/0.0289651159; 
    367372  equation  
    368373    x = 1 - s_rel/L; 
     
    378383     
    379384    V = k0 + k1*(1 - x); 
    380     dens = 1/V; 
     385    dens = press/(R_air*T); 
    381386    press*V = k*T; 
    382387     
     
    531536  equation  
    532537     
    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;  
    534539          49,-1], style( 
    535540        color=10, 
    536541        rgbcolor={95,95,95}, 
    537542        thickness=2)); 
    538     connect(Mid.frame_b, jointRRP.frame_a) annotation (points=[-24,-20; 
    539           1.22461e-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( 
    540545        color=10, 
    541546        rgbcolor={95,95,95}, 
     
    543548    connect(gasForce.flange_a, jointRRP.axis)  
    544549      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;  
    546551          -20,52; -20,70; -11,70],        style(color=58)); 
    547552    connect(jointRRP.frame_ib, Piston.frame_b) annotation (points=[20,28; 30,28; 
     
    551556        thickness=2)); 
    552557    connect(jointRRP.frame_b, CylinderInclination.frame_b) annotation (points=[ 
    553           -1.22461e-015,32; 1,32; 1,40; -24,40], style( 
     558          -1.22465e-015,32; 1,32; 1,40; -24,40], style( 
    554559        color=10, 
    555560        rgbcolor={95,95,95},