Changeset 353

Show
Ignore:
Timestamp:
02/21/2006 11:38:31 AM (3 years ago)
Author:
CRichter
Message:

added alias functions for setState functions without the X to PartialMedium and PartialTwoPhaseMedium

Files:
1 modified

Legend:

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

    r351 r353  
    38553855      input AbsolutePressure p "Pressure"; 
    38563856      input Temperature T "Temperature"; 
    3857       input MassFraction X[nX] "Mass fractions"; 
     3857      input MassFraction X[:] "Mass fractions"; 
    38583858      output ThermodynamicState state; 
    38593859    end setState_pTX; 
     
    38643864      input AbsolutePressure p "Pressure"; 
    38653865      input SpecificEnthalpy h "Specific enthalpy"; 
    3866       input MassFraction X[nX] "Mass fractions"; 
     3866      input MassFraction X[:] "Mass fractions"; 
    38673867      output ThermodynamicState state; 
    38683868    end setState_phX; 
     
    38733873      input AbsolutePressure p "Pressure"; 
    38743874      input SpecificEntropy s "Specific entropy"; 
    3875       input MassFraction X[nX] "Mass fractions"; 
     3875      input MassFraction X[:] "Mass fractions"; 
    38763876      output ThermodynamicState state; 
    38773877    end setState_psX; 
     
    38823882      input Density d "density"; 
    38833883      input Temperature T "Temperature"; 
    3884       input MassFraction X[nX] "Mass fractions"; 
     3884      input MassFraction X[:] "Mass fractions"; 
    38853885      output ThermodynamicState state; 
    38863886    end setState_dTX; 
     
    40654065      input AbsolutePressure p "Pressure"; 
    40664066      input Temperature T "Temperature"; 
    4067       input MassFraction X[nX] "Mass fractions"; 
     4067      input MassFraction X[:] "Mass fractions"; 
    40684068      output SpecificEnthalpy h "Specific enthalpy at p, T, X"; 
    40694069    algorithm  
     
    40764076      input AbsolutePressure p "Pressure"; 
    40774077      input SpecificEnthalpy h "Specific enthalpy"; 
    4078       input MassFraction X[nX] "Mass fractions"; 
     4078      input MassFraction X[:] "Mass fractions"; 
    40794079      output Temperature T "Temperature"; 
    40804080    algorithm  
     
    40874087      input AbsolutePressure p "Pressure"; 
    40884088      input SpecificEnthalpy h "Specific enthalpy"; 
    4089       input MassFraction X[nX] "Mass fractions"; 
     4089      input MassFraction X[:] "Mass fractions"; 
    40904090      output Density d "density"; 
    40914091    algorithm  
     
    40984098      input AbsolutePressure p "Pressure"; 
    40994099      input SpecificEntropy s "Specific entropy"; 
    4100       input MassFraction X[nX] "Mass fractions"; 
     4100      input MassFraction X[:] "Mass fractions"; 
    41014101      output Temperature T "Temperature"; 
    41024102    algorithm  
     
    41094109      input AbsolutePressure p "Pressure"; 
    41104110      input SpecificEntropy s "Specific entropy"; 
    4111       input MassFraction X[nX] "Mass fractions"; 
     4111      input MassFraction X[:] "Mass fractions"; 
    41124112      output SpecificEnthalpy h "specific enthalpy"; 
    41134113    algorithm  
     
    44304430  end h_dT; 
    44314431*/ 
     4432    replaceable partial function setState_pT  
     4433      "Return thermodynamic state as function of p and T"  
     4434      extends Modelica.Icons.Function; 
     4435      input AbsolutePressure p "Pressure"; 
     4436      input Temperature T "Temperature"; 
     4437      output ThermodynamicState state; 
     4438    algorithm  
     4439      state := setState_pTX(p,T,fill(0,0)); 
     4440    end setState_pT; 
     4441     
     4442    replaceable partial function setState_ph  
     4443      "Return thermodynamic state as function of p and h"  
     4444      extends Modelica.Icons.Function; 
     4445      input AbsolutePressure p "Pressure"; 
     4446      input SpecificEnthalpy h "Specific enthalpy"; 
     4447      output ThermodynamicState state; 
     4448    algorithm  
     4449      state := setState_phX(p,h,fill(0, 0)); 
     4450    end setState_ph; 
     4451     
     4452    replaceable partial function setState_ps  
     4453      "Return thermodynamic state as function of p and s"  
     4454      extends Modelica.Icons.Function; 
     4455      input AbsolutePressure p "Pressure"; 
     4456      input SpecificEntropy s "Specific entropy"; 
     4457      output ThermodynamicState state; 
     4458    algorithm  
     4459      state := setState_psX(p,s,fill(0,0)); 
     4460    end setState_ps; 
     4461     
     4462    replaceable partial function setState_dT  
     4463      "Return thermodynamic state as function of d and T"  
     4464      extends Modelica.Icons.Function; 
     4465      input Density d "density"; 
     4466      input Temperature T "Temperature"; 
     4467      output ThermodynamicState state; 
     4468    algorithm  
     4469      state := setState_dTX(d,T,fill(0,0)); 
     4470    end setState_dT; 
     4471     
    44324472    replaceable function density_ph  
    44334473      "Computes density as a function of pressure and specific enthalpy"  
     
    49594999  // note that there is a Dymola error which does not allow writing 
    49605000  // replaceable function density_ph = density_phX(p,h,fill(0,0)) 
     5001     
     5002    redeclare replaceable partial function setState_pT  
     5003      "Return thermodynamic state as function of p and T"  
     5004      extends Modelica.Icons.Function; 
     5005      input AbsolutePressure p "Pressure"; 
     5006      input Temperature T "Temperature"; 
     5007      input FixedPhase phase=0  
     5008        "2 for two-phase, 1 for one-phase, 0 if not known"; 
     5009      output ThermodynamicState state; 
     5010    algorithm  
     5011      state := setState_pTX(p,T,fill(0,0),phase); 
     5012    end setState_pT; 
     5013     
     5014    redeclare replaceable partial function setState_ph  
     5015      "Return thermodynamic state as function of p and h"  
     5016      extends Modelica.Icons.Function; 
     5017      input AbsolutePressure p "Pressure"; 
     5018      input SpecificEnthalpy h "Specific enthalpy"; 
     5019      input FixedPhase phase=0  
     5020        "2 for two-phase, 1 for one-phase, 0 if not known"; 
     5021      output ThermodynamicState state; 
     5022    algorithm  
     5023      state := setState_phX(p,h,fill(0, 0),phase); 
     5024    end setState_ph; 
     5025     
     5026    redeclare replaceable partial function setState_ps  
     5027      "Return thermodynamic state as function of p and s"  
     5028      extends Modelica.Icons.Function; 
     5029      input AbsolutePressure p "Pressure"; 
     5030      input SpecificEntropy s "Specific entropy"; 
     5031      input FixedPhase phase=0  
     5032        "2 for two-phase, 1 for one-phase, 0 if not known"; 
     5033      output ThermodynamicState state; 
     5034    algorithm  
     5035      state := setState_psX(p,s,fill(0,0),phase); 
     5036    end setState_ps; 
     5037     
     5038    redeclare replaceable partial function setState_dT  
     5039      "Return thermodynamic state as function of d and T"  
     5040      extends Modelica.Icons.Function; 
     5041      input Density d "density"; 
     5042      input Temperature T "Temperature"; 
     5043      input FixedPhase phase=0  
     5044        "2 for two-phase, 1 for one-phase, 0 if not known"; 
     5045      output ThermodynamicState state; 
     5046    algorithm  
     5047      state := setState_dTX(d,T,fill(0,0),phase); 
     5048    end setState_dT; 
    49615049     
    49625050    redeclare replaceable function density_ph