Show
Ignore:
Timestamp:
09/24/2007 03:04:45 PM (16 months ago)
Author:
otter
Message:

Error in gas force of MultiBody engine example corrected (error with respect to bar and Pa;
reported by Sven Erik)

Files:
1 modified

Legend:

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

    r644 r645  
    226226    parameter SI.Length d "diameter of cylinder"; 
    227227    parameter Real k0=0.01; 
    228     parameter Real k1=0.005; 
    229     parameter Real k=0.00005; 
     228    parameter Real k1=0.01; 
     229    parameter Real k=7; 
    230230    constant Real pi=Modelica.Constants.pi; 
    231231    constant Real PI=Modelica.Constants.pi; 
     
    234234    Real y "Normalized relative movement (= -s_rel/L)"; 
    235235    SI.Density dens; 
    236     Modelica.SIunits.Conversions.NonSIunits.Pressure_bar press  
    237       "cylinder pressure"; 
     236    Modelica.SIunits.AbsolutePressure press "Cylinder pressure"; 
    238237    SI.Volume V; 
    239238    SI.Temperature T; 
     
    277276    v_rel = der(s_rel); 
    278277     
    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 + 
    280279      151.8252*x^2 - 24.9973*x + 2.4 else 2836360*x^4 - 10569296*x^3 + 14761814 
    281280      *x^2 - 9158505*x + 2129670) else (if x > 0.93 then -3929704*x^4 + 
    282281      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; 
    286285     
    287286    V = k0 + k1*(1 - x); 
     
    299298    parameter SI.Length d "diameter of cylinder"; 
    300299    parameter Real k0=0.01; 
    301     parameter Real k1=0.005; 
    302     parameter Real k=0.00005; 
     300    parameter Real k1=0.01; 
     301    parameter Real k=7; 
    303302    constant Real pi=Modelica.Constants.pi; 
    304303    constant Real PI=Modelica.Constants.pi; 
    305304    Real x "Normalized position of cylinder (= 1 - s_rel/L)"; 
    306305    SI.Density dens; 
    307     SI.Pressure press "cylinder pressure"; 
     306    Modelica.SIunits.AbsolutePressure press "Cylinder pressure"; 
    308307    SI.Volume V; 
    309308    SI.Temperature T; 
     
    374373    v_rel = der(s_rel); 
    375374     
    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 + 
    377376      151.8252*x^2 - 24.9973*x + 2.4 else 2836360*x^4 - 10569296*x^3 + 14761814 
    378377      *x^2 - 9158505*x + 2129670) else (if x > 0.93 then -3929704*x^4 + 
    379378      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; 
    383382     
    384383    V = k0 + k1*(1 - x); 
     
    536535  equation  
    537536     
    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; 
    539538          49,-1], style( 
    540539        color=10, 
    541540        rgbcolor={95,95,95}, 
    542541        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; 
    544543          1.22465e-015,-20; 1.22465e-015,-8], style( 
    545544        color=10, 
     
    548547    connect(gasForce.flange_a, jointRRP.axis)  
    549548      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; 
    551550          -20,52; -20,70; -11,70],        style(color=58)); 
    552551    connect(jointRRP.frame_ib, Piston.frame_b) annotation (points=[20,28; 30,28;