Show
Ignore:
Timestamp:
11/16/07 09:10:19 (11 months ago)
Author:
otter
Message:

fixes ticket:1
- Removed SIunits.CelsiusTemperature, replaced references to it by

SIunits.Conversions.NonSIunits.Temperature_degC,
and updated the conversion script correspondingly.

- Changes in Blocks.Continuous seems to be just different

end-of-line characters (not clear what was changed).

- MultiBody: Changes for sensors (not yet finalized)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Modelica/Blocks/Continuous.mo

    r775 r804  
    168168          extent={{-100,-100},{100,100}}, 
    169169          grid={2,2}), graphics={ 
    170           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    171           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
    172           Line(points={{60,0},{100,0}}, color={0,0,255}),  
    173           Text( 
    174             extent={{-36,60},{32,2}},  
    175             lineColor={0,0,0},  
    176             textString="k"),  
    177           Text( 
    178             extent={{-32,0},{36,-58}},  
    179             lineColor={0,0,0},  
    180             textString="s"),  
     170          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     171          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
     172          Line(points={{60,0},{100,0}}, color={0,0,255}), 
     173          Text( 
     174            extent={{-36,60},{32,2}}, 
     175            lineColor={0,0,0}, 
     176            textString="k"), 
     177          Text( 
     178            extent={{-32,0},{36,-58}}, 
     179            lineColor={0,0,0}, 
     180            textString="s"), 
    181181          Line(points={{-46,0},{46,0}}, color={0,0,0})})); 
    182182  initial equation  
     
    267267          extent={{-100,-100},{100,100}}, 
    268268          grid={2,2}), graphics={ 
    269           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    270           Text( 
    271             extent={{-54,46},{-4,-48}},  
    272             lineColor={0,0,0},  
    273             textString="lim"),  
    274           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
    275           Line(points={{60,0},{100,0}}, color={0,0,255}),  
    276           Text( 
    277             extent={{-8,60},{60,2}},  
    278             lineColor={0,0,0},  
    279             textString="k"),  
    280           Text( 
    281             extent={{-8,-2},{60,-60}},  
    282             lineColor={0,0,0},  
    283             textString="s"),  
     269          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     270          Text( 
     271            extent={{-54,46},{-4,-48}}, 
     272            lineColor={0,0,0}, 
     273            textString="lim"), 
     274          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
     275          Line(points={{60,0},{100,0}}, color={0,0,255}), 
     276          Text( 
     277            extent={{-8,60},{60,2}}, 
     278            lineColor={0,0,0}, 
     279            textString="k"), 
     280          Text( 
     281            extent={{-8,-2},{60,-60}}, 
     282            lineColor={0,0,0}, 
     283            textString="s"), 
    284284          Line(points={{4,0},{46,0}}, color={0,0,0})})); 
    285285  initial equation  
     
    378378          grid={2,2}), graphics={ 
    379379          Text( 
    380             extent={{-54,52},{50,10}},  
    381             lineColor={0,0,0},  
    382             textString="k s"),  
    383           Text( 
    384             extent={{-54,-6},{52,-52}},  
    385             lineColor={0,0,0},  
    386             textString="T s + 1"),  
    387           Line(points={{-50,0},{50,0}}, color={0,0,0}),  
    388           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    389           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
     380            extent={{-54,52},{50,10}}, 
     381            lineColor={0,0,0}, 
     382            textString="k s"), 
     383          Text( 
     384            extent={{-54,-6},{52,-52}}, 
     385            lineColor={0,0,0}, 
     386            textString="T s + 1"), 
     387          Line(points={{-50,0},{50,0}}, color={0,0,0}), 
     388          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     389          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
    390390          Line(points={{60,0},{100,0}}, color={0,0,255})}), 
    391391      Window( 
     
    486486          grid={2,2}), graphics={ 
    487487          Text( 
    488             extent={{-48,52},{50,8}},  
    489             lineColor={0,0,0},  
    490             textString="k"),  
    491           Text( 
    492             extent={{-54,-6},{56,-56}},  
    493             lineColor={0,0,0},  
    494             textString="T s + 1"),  
    495           Line(points={{-50,0},{50,0}}, color={0,0,0}),  
    496           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    497           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
     488            extent={{-48,52},{50,8}}, 
     489            lineColor={0,0,0}, 
     490            textString="k"), 
     491          Text( 
     492            extent={{-54,-6},{56,-56}}, 
     493            lineColor={0,0,0}, 
     494            textString="T s + 1"), 
     495          Line(points={{-50,0},{50,0}}, color={0,0,0}), 
     496          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     497          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
    498498          Line(points={{60,0},{100,0}}, color={0,0,255})}), 
    499499      Window( 
     
    595595          extent={{-100,-100},{100,100}}, 
    596596          grid={2,2}), graphics={ 
    597           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    598           Text( 
    599             extent={{-60,60},{60,14}},  
    600             lineColor={0,0,0},  
    601             textString="k"),  
    602           Text( 
    603             extent={{-60,8},{-32,-20}},  
    604             lineColor={0,0,0},  
    605             textString="s"),  
    606           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
    607           Line(points={{60,0},{100,0}}, color={0,0,255}),  
    608           Line(points={{-50,14},{50,14}}, color={0,0,0}),  
    609           Line(points={{-54,-20},{-38,-20}}, color={0,0,0}),  
    610           Text( 
    611             extent={{-52,-26},{-36,-48}},  
    612             lineColor={0,0,0},  
    613             textString="w"),  
    614           Line(points={{-50,2},{-56,-8},{-56,-28},{-52,-46}}, color={0,0,0}),  
    615           Line(points={{-40,2},{-34,-10},{-34,-30},{-38,-46}}, color={0,0,0}),  
    616           Text( 
    617             extent={{-34,8},{-22,-10}},  
    618             lineColor={0,0,0},  
    619             textString="2"),  
    620           Text( 
    621             extent={{-34,-6},{6,-36}},  
    622             lineColor={0,0,0},  
    623             textString="+2D"),  
    624           Text( 
    625             extent={{2,8},{30,-20}},  
    626             lineColor={0,0,0},  
    627             textString="s"),  
    628           Line(points={{8,-20},{24,-20}}, color={0,0,0}),  
    629           Text( 
    630             extent={{10,-26},{26,-48}},  
    631             lineColor={0,0,0},  
    632             textString="w"),  
    633           Line(points={{12,2},{6,-8},{6,-28},{10,-46}}, color={0,0,0}),  
    634           Line(points={{22,2},{28,-10},{28,-30},{24,-46}}, color={0,0,0}),  
    635           Text( 
    636             extent={{30,2},{58,-42}},  
    637             lineColor={0,0,0},  
     597          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     598          Text( 
     599            extent={{-60,60},{60,14}}, 
     600            lineColor={0,0,0}, 
     601            textString="k"), 
     602          Text( 
     603            extent={{-60,8},{-32,-20}}, 
     604            lineColor={0,0,0}, 
     605            textString="s"), 
     606          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
     607          Line(points={{60,0},{100,0}}, color={0,0,255}), 
     608          Line(points={{-50,14},{50,14}}, color={0,0,0}), 
     609          Line(points={{-54,-20},{-38,-20}}, color={0,0,0}), 
     610          Text( 
     611            extent={{-52,-26},{-36,-48}}, 
     612            lineColor={0,0,0}, 
     613            textString="w"), 
     614          Line(points={{-50,2},{-56,-8},{-56,-28},{-52,-46}}, color={0,0,0}), 
     615          Line(points={{-40,2},{-34,-10},{-34,-30},{-38,-46}}, color={0,0,0}), 
     616          Text( 
     617            extent={{-34,8},{-22,-10}}, 
     618            lineColor={0,0,0}, 
     619            textString="2"), 
     620          Text( 
     621            extent={{-34,-6},{6,-36}}, 
     622            lineColor={0,0,0}, 
     623            textString="+2D"), 
     624          Text( 
     625            extent={{2,8},{30,-20}}, 
     626            lineColor={0,0,0}, 
     627            textString="s"), 
     628          Line(points={{8,-20},{24,-20}}, color={0,0,0}), 
     629          Text( 
     630            extent={{10,-26},{26,-48}}, 
     631            lineColor={0,0,0}, 
     632            textString="w"), 
     633          Line(points={{12,2},{6,-8},{6,-28},{10,-46}}, color={0,0,0}), 
     634          Line(points={{22,2},{28,-10},{28,-30},{24,-46}}, color={0,0,0}), 
     635          Text( 
     636            extent={{30,2},{58,-42}}, 
     637            lineColor={0,0,0}, 
    638638            textString="+1")})); 
    639639  initial equation  
     
    742742          extent={{-100,-100},{100,100}}, 
    743743          grid={2,2}), graphics={ 
    744           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    745           Text( 
    746             extent={{-68,24},{-24,-18}},  
    747             lineColor={0,0,0},  
    748             textString="k"),  
    749           Text( 
    750             extent={{-32,48},{60,0}},  
    751             lineColor={0,0,0},  
    752             textString="T s + 1"),  
    753           Text( 
    754             extent={{-30,-8},{52,-40}},  
    755             lineColor={0,0,0},  
    756             textString="T s"),  
    757           Line(points={{-24,0},{54,0}}, color={0,0,0}),  
    758           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
     744          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     745          Text( 
     746            extent={{-68,24},{-24,-18}}, 
     747            lineColor={0,0,0}, 
     748            textString="k"), 
     749          Text( 
     750            extent={{-32,48},{60,0}}, 
     751            lineColor={0,0,0}, 
     752            textString="T s + 1"), 
     753          Text( 
     754            extent={{-30,-8},{52,-40}}, 
     755            lineColor={0,0,0}, 
     756            textString="T s"), 
     757          Line(points={{-24,0},{54,0}}, color={0,0,0}), 
     758          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
    759759          Line(points={{62,0},{100,0}}, color={0,0,255})})); 
    760760  initial equation  
     
    13511351    parameter Real d = bb[1]/a[1]; 
    13521352    parameter Real a_end = if a[end] > 100*Modelica.Constants.eps*Modelica.Math.Vectors.norm(a) then a[end] else 1.0; 
     1353    Real x_scaled[size(x,1)] "Scaled vector x"; 
    13531354    annotation ( 
    13541355      Window( 
     
    14181419  initial equation  
    14191420    if initType == Init.SteadyState then 
    1420       der(x) = zeros(nx); 
     1421      der(x_scaled) = zeros(nx); 
    14211422    elseif initType == Init.InitialState then 
    1422       x = x_start; 
     1423      x_scaled = x_start*a_end; 
    14231424    elseif initType == Init.InitialOutput then 
    14241425      y = y_start; 
    1425       der(x[2:nx]) = zeros(nx-1); 
     1426      der(x_scaled[2:nx]) = zeros(nx-1); 
    14261427    end if; 
    14271428  equation  
     
    14301431       y = d*u; 
    14311432    else 
    1432        der(x[1])    = (-a[2:na]*x + a_end*u)/a[1]; 
    1433        der(x[2:nx]) = x[1:nx-1]; 
    1434        y = ((bb[2:na] - d*a[2:na])*x)/a_end + d*u; 
     1433       der(x_scaled[1])    = (-a[2:na]*x_scaled + a_end*u)/a[1]; 
     1434       der(x_scaled[2:nx]) = x_scaled[1:nx-1]; 
     1435       y = ((bb[2:na] - d*a[2:na])*x_scaled)/a_end + d*u; 
     1436       x = x_scaled/a_end; 
    14351437    end if; 
    14361438  end TransferFunction; 
     
    15281530          extent={{-100,-100},{100,100}}, 
    15291531          grid={2,2}), graphics={ 
    1530           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    1531           Text( 
    1532             extent={{-60,40},{60,0}},  
    1533             lineColor={0,0,0},  
    1534             textString="sx=Ax+Bu"),  
    1535           Text( 
    1536             extent={{-60,0},{60,-40}},  
    1537             lineColor={0,0,0},  
    1538             textString=" y=Cx+Du"),  
    1539           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
     1532          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     1533          Text( 
     1534            extent={{-60,40},{60,0}}, 
     1535            lineColor={0,0,0}, 
     1536            textString="sx=Ax+Bu"), 
     1537          Text( 
     1538            extent={{-60,0},{60,-40}}, 
     1539            lineColor={0,0,0}, 
     1540            textString=" y=Cx+Du"), 
     1541          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
    15401542          Line(points={{60,0},{100,0}}, color={0,0,255})})); 
    15411543  protected  
     
    16461648      Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 
    16471649              100,100}}), graphics={ 
    1648           Line(points={{40,0},{-40,0}}, color={0,0,0}),  
    1649           Text( 
    1650             extent={{-55,55},{55,5}},  
    1651             lineColor={0,0,0},  
    1652             textString="1"),  
    1653           Text( 
    1654             extent={{-55,-5},{55,-55}},  
    1655             lineColor={0,0,0},  
    1656             textString="a(s)"),  
    1657           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    1658           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
     1650          Line(points={{40,0},{-40,0}}, color={0,0,0}), 
     1651          Text( 
     1652            extent={{-55,55},{55,5}}, 
     1653            lineColor={0,0,0}, 
     1654            textString="1"), 
     1655          Text( 
     1656            extent={{-55,-5},{55,-55}}, 
     1657            lineColor={0,0,0}, 
     1658            textString="a(s)"), 
     1659          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     1660          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
    16591661          Line(points={{60,0},{100,0}}, color={0,0,255})}), 
    16601662      Documentation(info="<html> 
     
    18021804      Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 
    18031805              100,100}}), graphics={ 
    1804           Line(points={{40,0},{-40,0}}, color={0,0,0}),  
    1805           Text( 
    1806             extent={{-55,55},{55,5}},  
    1807             lineColor={0,0,0},  
    1808             textString="1"),  
    1809           Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}),  
    1810           Line(points={{-100,0},{-60,0}}, color={0,0,255}),  
    1811           Line(points={{60,0},{100,0}}, color={0,0,255}),  
    1812           Text( 
    1813             extent={{-54,-6},{44,-56}},  
    1814             lineColor={0,0,0},  
    1815             textString="(T s + 1)"),  
    1816           Text( 
    1817             extent={{38,-10},{58,-30}},  
    1818             lineColor={0,0,0},  
     1806          Line(points={{40,0},{-40,0}}, color={0,0,0}), 
     1807          Text( 
     1808            extent={{-55,55},{55,5}}, 
     1809            lineColor={0,0,0}, 
     1810            textString="1"), 
     1811          Rectangle(extent={{-60,60},{60,-60}}, lineColor={0,0,255}), 
     1812          Line(points={{-100,0},{-60,0}}, color={0,0,255}), 
     1813          Line(points={{60,0},{100,0}}, color={0,0,255}), 
     1814          Text( 
     1815            extent={{-54,-6},{44,-56}}, 
     1816            lineColor={0,0,0}, 
     1817            textString="(T s + 1)"), 
     1818          Text( 
     1819            extent={{38,-10},{58,-30}}, 
     1820            lineColor={0,0,0}, 
    18191821            textString="n")}), 
    18201822      Documentation(info="<html>