Changeset 1016

Show
Ignore:
Timestamp:
01/29/2008 10:17:56 AM (12 months ago)
Author:
hubertus
Message:

Fixed all flags and X = reference_X equations such that the symbolic size check in Dymola reports no errors (except one that is no error)

Location:
Modelica/trunk/Modelica/Media
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • Modelica/trunk/Modelica/Media/IdealGases/Common/package.mo

    r914 r1016  
    154154     mediumName=data.name, 
    155155     substanceNames={data.name}, 
    156      final reducedX=true, 
    157156     singleState=false, 
    158157     Temperature(min=200, max=6000, start=500, nominal=500), 
     
    230229200 K <= T <= 6000 K required from medium model \"" + mediumName + "\". 
    231230"); 
    232     X = reference_X; 
    233231    MM = data.MM; 
    234232    R = data.R; 
  • Modelica/trunk/Modelica/Media/Incompressible.mo

    r887 r1016  
    3939    extends Modelica.Media.Interfaces.PartialMedium( 
    4040       final reducedX=true, 
     41       final fixedX = true, 
    4142       mediumName="tableMedium", 
    4243       redeclare record ThermodynamicState=Common.BaseProps_Tpoly, 
     
    130131 
    131132    redeclare model extends BaseProperties( 
     133      final standardOrderComponents=true, 
    132134      p_bar=Cv.to_bar(p), 
    133135      T_degC(start = T_start-273.15)=Cv.to_degC(T), 
     
    184186      state.p = p; 
    185187      MM = MM_const; 
    186       X = reference_X; 
    187188    end BaseProperties; 
    188189 
  • Modelica/trunk/Modelica/Media/Water/package.mo

    r998 r1016  
    255255     fluidConstants = simpleWaterConstants); 
    256256 
    257   annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100, 
     257  annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, 
    258258            -100},{100,100}}), graphics={Text( 
    259259          extent={{-90,88},{90,18}}, 
     
    267267          fillPattern=FillPattern.Solid, 
    268268          textString="water")}), 
    269                             Diagram(coordinateSystem(preserveAspectRatio=true, 
     269                            Diagram(coordinateSystem(preserveAspectRatio=false, 
    270270          extent={{-100,-100},{100,100}}), 
    271271                                    graphics), 
     
    333333  "Water: Steam properties as defined by IAPWS/IF97 standard" 
    334334 
    335   annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100, 
     335  annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, 
    336336            -100},{100,100}}), graphics={Text( 
    337337          extent={{-94,84},{94,40}}, 
     
    393393     mediumName="WaterIF97", 
    394394     substanceNames={"water"}, 
    395      final reducedX=true, 
    396395     singleState=false, 
    397396     SpecificEnthalpy(start=1.0e5, nominal=5.0e5), 
     
    426425      "saturation temperature and pressure"; 
    427426  equation 
    428     X = reference_X; 
    429427    MM = fluidConstants[1].molarMass; 
    430428    if smoothModel then 
     
    904902  "Water: Steam properties as defined by IAPWS/IF97 standard" 
    905903 
    906   annotation (Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100, 
     904  annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, 
    907905            -100},{100,100}}), graphics={Text( 
    908906          extent={{-94,84},{94,40}}, 
     
    966964     substanceNames={"water"}, 
    967965     singleState=false, 
    968      final reducedX=true, 
    969966     SpecificEnthalpy(start=1.0e5, nominal=5.0e5), 
    970967     Density(start=150, nominal=500), 
     
    999996      "saturation temperature and pressure"; 
    1000997  equation 
    1001     X = reference_X; 
    1002998    MM = fluidConstants[1].molarMass; 
    1003999    if smoothModel then 
  • Modelica/trunk/Modelica/Media/package.mo

    r998 r1016  
    32713271                                annotation (Placement(transformation(extent={{ 
    32723272                  -80,0},{-60,20}}, rotation=0))); 
    3273         annotation (Diagram(coordinateSystem(preserveAspectRatio=true, extent= 
    3274                   {{-100,-100},{100,100}}), 
     3273        annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, 
     3274                  -100},{100,100}}), 
    32753275                            graphics), 
    32763276                             Documentation(info="<html> 
     
    38473847      final singleState=false, 
    38483848      final reducedX =  true, 
     3849      final fixedX = true, 
    38493850      Temperature(min=273, max=450, start=323)); 
    38503851 
     
    38593860         on a thermal variable (temperature or enthalpy). Otherwise, set it 
    38603861         to false. 
    3861          For a single-substance medium, just set reducedX to true, and there's 
     3862         For a single-substance medium, just set reducedX and fixedX to true, and there's 
    38623863         no need to bother about medium compositions at all. Otherwise, set 
    38633864         final reducedX = true if the medium model has nS-1 independent mass 
    38643865         fraction, or reducedX = false if the medium model has nS independent 
    38653866         mass fractions (nS = number of substances). 
     3867         If a mixture has a fixed composition set fixedX=true, otherwise false. 
     3868         The modifiers for reducedX and fixedX should normally be final  
     3869         since the other equations are based on these values. 
     3870 
    38663871         It is also possible to redeclare the min, max, and start attributes of 
    38673872         Medium types, defined in the base class Interfaces.PartialMedium 
     
    38893894  */ 
    38903895 
    3891     redeclare model extends BaseProperties "Base properties of medium" 
     3896    redeclare model extends BaseProperties(final standardOrderComponents=true) 
     3897      "Base properties of medium" 
    38923898 
    38933899      annotation (Documentation(info="<html></html>")); 
     
    39003906      state.p = p; 
    39013907      state.T = T; 
    3902       X = reference_X; 
    39033908      annotation (Documentation(revisions="<html> 
    39043909  
     
    40304035    constant Integer nX = nS "Number of mass fractions"  
    40314036                                 annotation(Evaluate=true); 
    4032     constant Integer nXi=if fixedX then 0 else if reducedX or nS == 1 then nS - 1 else nS 
     4037    constant Integer nXi=if fixedX then 0 else if reducedX then nS - 1 else nS 
    40334038      "Number of structurally independent mass fractions (see docu for details)" 
    40344039      annotation(Evaluate=true); 
     
    41044109      if standardOrderComponents then 
    41054110        Xi = X[1:nXi]; 
    4106         if nX > 1 then 
     4111 
    41074112          if fixedX then 
    41084113            X = reference_X; 
     
    41164121                   + substanceNames[i] + "\nof medium " + mediumName + " is not in the range 0..1"); 
    41174122          end for; 
    4118         end if; 
     4123 
    41194124      end if; 
    41204125 
     
    46974702  partial package PartialPureSubstance 
    46984703    "base class for pure substances of one chemical substance" 
    4699     extends PartialMedium; 
    4700  
    4701     replaceable function setState_pT "Return thermodynamic state from p and T" 
     4704    extends PartialMedium(final reducedX = true, final fixedX=true); 
     4705 
     4706   replaceable function setState_pT "Return thermodynamic state from p and T" 
    47024707      extends Modelica.Icons.Function; 
    47034708      input AbsolutePressure p "Pressure"; 
    47044709      input Temperature T "Temperature"; 
    47054710      output ThermodynamicState state "thermodynamic state record"; 
    4706     algorithm 
     4711   algorithm 
    47074712      state := setState_pTX(p,T,fill(0,0)); 
    4708     end setState_pT; 
     4713   end setState_pT; 
    47094714 
    47104715    replaceable function setState_ph "Return thermodynamic state from p and h" 
     
    48184823      d := density(setState_pTX(p, T, fill(0,0))); 
    48194824    end density_pT; 
     4825 
     4826    redeclare replaceable partial model extends BaseProperties( 
     4827      final standardOrderComponents=true) 
     4828    end BaseProperties; 
    48204829  end PartialPureSubstance; 
    48214830 
     
    48644873        MM = MM_const; 
    48654874        R  = 8.3144/MM; 
    4866         X = reference_X; 
    48674875      end BaseProperties; 
    48684876 
     
    58695877    "Medium model with linear dependency of u, h from temperature. All other quantities, especially density, are constant." 
    58705878 
    5871     extends Interfaces.PartialPureSubstance(final singleState=true,final 
    5872         reducedX =                                                                  true); 
     5879    extends Interfaces.PartialPureSubstance(final singleState=true); 
    58735880 
    58745881    import SI = Modelica.SIunits; 
     
    59115918      state.T = T; 
    59125919      state.p = p; 
    5913       X = reference_X; 
    59145920          annotation (Documentation(info="<HTML> 
    59155921<p> 
     
    59725978 
    59735979    redeclare function extends dynamicViscosity "Return dynamic viscosity" 
     5980 
    59745981    annotation(Documentation(info="<html></html>")); 
    59755982    algorithm 
     
    59795986    redeclare function extends thermalConductivity 
    59805987      "Return thermal conductivity" 
     5988 
    59815989      annotation (Documentation(info="<html></html>")); 
    59825990    algorithm 
     
    59865994    redeclare function extends specificHeatCapacityCp 
    59875995      "Return specific heat capacity at constant pressure" 
     5996 
    59885997      annotation(Documentation(info="<html></html>")); 
    59895998    algorithm 
     
    59936002    redeclare function extends specificHeatCapacityCv 
    59946003      "Return specific heat capacity at constant volume" 
     6004 
    59956005      annotation(Documentation(info="<html></html>")); 
    59966006    algorithm 
     
    59996009 
    60006010    redeclare function extends isentropicExponent "Return isentropic exponent" 
     6011 
    60016012      annotation(Documentation(info="<html></html>")); 
    60026013    algorithm 
     
    60056016 
    60066017    redeclare function extends velocityOfSound "Return velocity of sound " 
     6018 
    60076019      annotation(Documentation(info="<html></html>")); 
    60086020    algorithm 
     
    60506062    "Medium model of Ideal gas with constant cp and cv. All other quantities, e.g. transport properties, are constant." 
    60516063 
    6052     extends Interfaces.PartialPureSubstance(final singleState=false,final 
    6053         reducedX =                                                                 true); 
     6064    extends Interfaces.PartialPureSubstance(final singleState=false); 
    60546065 
    60556066    import SI = Modelica.SIunits; 
     
    60916102      state.T = T; 
    60926103      state.p = p; 
    6093       X = reference_X; 
    60946104          annotation (Documentation(info="<HTML> 
    60956105<p>