Changeset 704
- Timestamp:
- 10/15/2007 11:23:57 PM (15 months ago)
- Location:
- Modelica/trunk/Modelica/Media
- Files:
-
- 5 modified
-
Air.mo (modified) (1 diff)
-
IdealGases/Common/package.mo (modified) (5 diffs)
-
IdealGases/MixtureGases.mo (modified) (1 diff)
-
IdealGases/SingleGases.mo (modified) (1 diff)
-
package.mo (modified) (25 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Modelica/trunk/Modelica/Media/Air.mo
r680 r704 100 100 import Modelica.Constants; 101 101 import Modelica.Media.IdealGases.Common.SingleGasNasa; 102 103 redeclare record extends ThermodynamicState 104 "ThermodynamicState record for moist air" 105 end ThermodynamicState; 102 106 103 107 redeclare replaceable model extends BaseProperties( -
Modelica/trunk/Modelica/Media/IdealGases/Common/package.mo
r692 r704 144 144 </p> 145 145 </HTML>"), 146 Icon(graphics), 147 Diagram(graphics)); 146 Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100, 147 100}}), 148 graphics), 149 Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{ 150 100,100}}), 151 graphics)); 148 152 149 153 extends Interfaces.PartialPureSubstance( … … 158 162 AbsolutePressure(start=10e5, nominal=10e5)); 159 163 160 redeclare re placeable record extends ThermodynamicState164 redeclare record extends ThermodynamicState 161 165 "thermodynamic state variables for ideal gases" 162 166 AbsolutePressure p "Absolute pressure of medium"; … … 164 168 end ThermodynamicState; 165 169 166 redeclare replaceable record extends FluidConstants 167 "Extended fluid constants" 170 redeclare record extends FluidConstants "Extended fluid constants" 168 171 Temperature criticalTemperature "critical temperature"; 169 172 AbsolutePressure criticalPressure "critical pressure"; … … 774 777 It has been developed by Hubertus Tummescheit. 775 778 </p> 776 </HTML>"), Icon(graphics)); 779 </HTML>"), Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, 780 {100,100}}), 781 graphics)); 777 782 778 783 import Modelica.Math; … … 789 794 AbsolutePressure(start=10e5, nominal=10e5), 790 795 Temperature(start=500, nominal=500)); 796 797 redeclare record extends ThermodynamicState "thermodynamic state variables" 798 end ThermodynamicState; 799 800 redeclare record extends FluidConstants "fluid constants" 801 end FluidConstants; 791 802 792 803 constant Modelica.Media.IdealGases.Common.DataRecord[:] data -
Modelica/trunk/Modelica/Media/IdealGases/MixtureGases.mo
r550 r704 20 20 extends Common.MixtureGasNasa( 21 21 mediumName="MoistAir", 22 data={Common.SingleGasesData.H2O, 23 Common.SingleGasesData.Air}, 22 data={Common.SingleGasesData.H2O, Common.SingleGasesData.Air}, 23 fluidConstants={Common.FluidData.H2O, 24 Common.FluidData.N2}, 24 25 substanceNames = {"Water","Air"}, 25 26 reference_X={0.0,1.0}); -
Modelica/trunk/Modelica/Media/IdealGases/SingleGases.mo
r592 r704 51 51 package CO "Ideal gas \"CO\" from NASA Glenn coefficients" 52 52 extends Common.SingleGasNasa( 53 mediumName="Carbon Monoxide"); 53 mediumName="Carbon Monoxide", 54 data=Common.SingleGasesData.CO, 55 fluidConstants={Common.FluidData.CO}); 54 56 annotation (preferedView="info", Documentation(info="<HTML> 55 57 <IMG SRC=\"../Images/Media/IdealGases/SingleGases/CO.png\"></HTML>")); -
Modelica/trunk/Modelica/Media/package.mo
r692 r704 2745 2745 annotation (Diagram(graphics={ 2746 2746 Ellipse( 2747 extent={{-100,100},{100,-100}}, 2748 lineColor={0,127,255}, 2749 fillColor={0,127,255}, 2750 fillPattern=FillPattern.Solid), 2747 extent={{-100,100},{100,-100}}, 2748 lineColor={0,127,255}, 2749 fillColor={0,127,255}, 2750 fillPattern=FillPattern.Solid), 2751 2751 Ellipse( 2752 extent={{-100,100},{100,-100}}, 2753 lineColor={0,0,0}, 2754 fillColor={0,127,255}, 2755 fillPattern=FillPattern.Solid), 2756 Text(extent={{-88,206},{112,112}}, textString ="%name")}),2752 extent={{-100,100},{100,-100}}, 2753 lineColor={0,0,0}, 2754 fillColor={0,127,255}, 2755 fillPattern=FillPattern.Solid), 2756 Text(extent={{-88,206},{112,112}}, textString= "%name")}), 2757 2757 Icon(graphics={Ellipse( 2758 extent={{-100,100},{100,-100}}, 2759 lineColor={0,127,255}, 2760 fillColor={0,127,255}, 2758 extent={{-100,100},{100,-100}}, 2759 lineColor={0,127,255}, 2760 fillColor={0,127,255}, 2761 2761 fillPattern=FillPattern.Solid), Ellipse( 2762 extent={{-100,100},{100,-100}}, 2763 lineColor={0,0,0}, 2764 fillColor={0,127,255}, 2762 extent={{-100,100},{100,-100}}, 2763 lineColor={0,0,0}, 2764 fillColor={0,127,255}, 2765 2765 fillPattern=FillPattern.Solid)}), 2766 2766 Documentation(info="<html>Modelica.Media.Examples.Tests.Components.FluidPort_a … … 2772 2772 annotation (Diagram(graphics={ 2773 2773 Ellipse( 2774 extent={{-100,100},{100,-100}}, 2775 lineColor={0,127,255}, 2776 fillColor={0,127,255}, 2777 fillPattern=FillPattern.Solid), 2774 extent={{-100,100},{100,-100}}, 2775 lineColor={0,127,255}, 2776 fillColor={0,127,255}, 2777 fillPattern=FillPattern.Solid), 2778 2778 Ellipse( 2779 extent={{-100,100},{100,-100}}, 2780 lineColor={0,0,0}, 2781 fillColor={0,127,255}, 2782 fillPattern=FillPattern.Solid), 2779 extent={{-100,100},{100,-100}}, 2780 lineColor={0,0,0}, 2781 fillColor={0,127,255}, 2782 fillPattern=FillPattern.Solid), 2783 2783 Ellipse( 2784 extent={{-80,80},{80,-80}}, 2785 lineColor={0,127,255}, 2786 fillColor={255,255,255}, 2787 fillPattern=FillPattern.Solid), 2788 Text(extent={{-88,192},{112,98}}, textString ="%name")}),2784 extent={{-80,80},{80,-80}}, 2785 lineColor={0,127,255}, 2786 fillColor={255,255,255}, 2787 fillPattern=FillPattern.Solid), 2788 Text(extent={{-88,192},{112,98}}, textString= "%name")}), 2789 2789 Icon(graphics={ 2790 2790 Ellipse( 2791 extent={{-100,100},{100,-100}}, 2792 lineColor={0,127,255}, 2793 fillColor={0,127,255}, 2794 fillPattern=FillPattern.Solid), 2791 extent={{-100,100},{100,-100}}, 2792 lineColor={0,127,255}, 2793 fillColor={0,127,255}, 2794 fillPattern=FillPattern.Solid), 2795 2795 Ellipse( 2796 extent={{-100,100},{100,-100}}, 2797 lineColor={0,0,0}, 2798 fillColor={0,127,255}, 2799 fillPattern=FillPattern.Solid), 2796 extent={{-100,100},{100,-100}}, 2797 lineColor={0,0,0}, 2798 fillColor={0,127,255}, 2799 fillPattern=FillPattern.Solid), 2800 2800 Ellipse( 2801 extent={{-80,80},{80,-80}}, 2802 lineColor={0,127,255}, 2803 fillColor={255,255,255}, 2801 extent={{-80,80},{80,-80}}, 2802 lineColor={0,127,255}, 2803 fillColor={255,255,255}, 2804 2804 fillPattern=FillPattern.Solid)}), 2805 2805 Documentation(info="<html> … … 2848 2848 Icon(graphics={ 2849 2849 Ellipse( 2850 extent={{-100,100},{100,-100}}, 2851 lineColor={0,0,0}, 2852 fillPattern=FillPattern.Sphere, 2853 fillColor={170,213,255}), 2850 extent={{-100,100},{100,-100}}, 2851 lineColor={0,0,0}, 2852 fillPattern=FillPattern.Sphere, 2853 fillColor={170,213,255}), 2854 2854 Text(extent={{-144,178},{146,116}}, textString= 2855 "%name"), 2855 "%name"), 2856 2856 Text( 2857 extent={{-130,-108},{144,-150}}, 2858 lineColor={0,0,0}, 2857 extent={{-130,-108},{144,-150}}, 2858 lineColor={0,0,0}, 2859 2859 textString= 2860 2860 "V=%V")}),Documentation(info="<html> … … 2931 2931 "Medium in the source"; 2932 2932 FluidPort_b port(redeclare package Medium = Medium) 2933 annotation (Placement(transformation(extent={{100,-10},{120,10}}, 2933 annotation (Placement(transformation(extent={{100,-10},{120,10}}, 2934 2934 rotation=0))); 2935 2935 annotation ( 2936 2936 Icon(coordinateSystem( 2937 preserveAspectRatio=true, 2938 extent={{-100,-100},{100,100}}, 2937 preserveAspectRatio=true, 2938 extent={{-100,-100},{100,100}}, 2939 2939 grid={2,2}), graphics={ 2940 2940 Rectangle( 2941 extent={{20,60},{100,-60}}, 2942 lineColor={0,0,0}, 2943 fillPattern=FillPattern.HorizontalCylinder, 2944 fillColor={192,192,192}), 2941 extent={{20,60},{100,-60}}, 2942 lineColor={0,0,0}, 2943 fillPattern=FillPattern.HorizontalCylinder, 2944 fillColor={192,192,192}), 2945 2945 Rectangle( 2946 extent={{38,40},{100,-40}}, 2947 lineColor={0,0,0}, 2948 fillPattern=FillPattern.HorizontalCylinder, 2949 fillColor={0,127,255}), 2946 extent={{38,40},{100,-40}}, 2947 lineColor={0,0,0}, 2948 fillPattern=FillPattern.HorizontalCylinder, 2949 fillColor={0,127,255}), 2950 2950 Ellipse( 2951 extent={{-100,80},{60,-80}}, 2952 fillColor={255,255,255}, 2953 fillPattern=FillPattern.Solid), 2951 extent={{-100,80},{60,-80}}, 2952 fillColor={255,255,255}, 2953 fillPattern=FillPattern.Solid), 2954 2954 Polygon( 2955 points={{-60,70},{60,0},{-60,-68},{-60,70}}, 2956 lineColor={0,0,255}, 2957 fillColor={0,0,255}, 2958 fillPattern=FillPattern.Solid), 2955 points={{-60,70},{60,0},{-60,-68},{-60,70}}, 2956 lineColor={0,0,255}, 2957 fillColor={0,0,255}, 2958 fillPattern=FillPattern.Solid), 2959 2959 Text( 2960 extent={{-54,32},{16,-30}}, 2961 lineColor={255,0,0}, 2962 fillColor={255,0,0}, 2963 fillPattern=FillPattern.Solid, 2960 extent={{-54,32},{16,-30}}, 2961 lineColor={255,0,0}, 2962 fillColor={255,0,0}, 2963 fillPattern=FillPattern.Solid, 2964 2964 textString= 2965 "m"), 2965 "m"), 2966 2966 Text(extent={{-142,142},{156,88}}, textString= 2967 "%name"), 2967 "%name"), 2968 2968 Text( 2969 extent={{-154,-88},{150,-132}}, 2970 lineColor={0,0,0}, 2969 extent={{-154,-88},{150,-132}}, 2970 lineColor={0,0,0}, 2971 2971 textString= 2972 "%m_flow"), 2972 "%m_flow"), 2973 2973 Ellipse( 2974 extent={{-26,30},{-18,22}}, 2975 lineColor={255,0,0}, 2976 fillColor={255,0,0}, 2974 extent={{-26,30},{-18,22}}, 2975 lineColor={255,0,0}, 2976 fillColor={255,0,0}, 2977 2977 fillPattern=FillPattern.Solid)}), 2978 2978 Window( … … 2982 2982 height=0.65), 2983 2983 Diagram(coordinateSystem( 2984 preserveAspectRatio=true, 2985 extent={{-100,-100},{100,100}}, 2984 preserveAspectRatio=true, 2985 extent={{-100,-100},{100,100}}, 2986 2986 grid={2,2}), graphics), 2987 2987 Documentation(info="<html> … … 3033 3033 Medium.BaseProperties medium "Medium in the source"; 3034 3034 FluidPort_b port(redeclare package Medium = Medium) 3035 annotation (Placement(transformation(extent={{100,-10},{120,10}}, 3035 annotation (Placement(transformation(extent={{100,-10},{120,10}}, 3036 3036 rotation=0))); 3037 3037 annotation ( 3038 3038 Icon(coordinateSystem( 3039 preserveAspectRatio=true, 3040 extent={{-100,-100},{100,100}}, 3039 preserveAspectRatio=true, 3040 extent={{-100,-100},{100,100}}, 3041 3041 grid={2,2}), graphics={Ellipse( 3042 extent={{-100,80},{100,-80}}, 3043 lineColor={0,0,0}, 3044 fillPattern=FillPattern.Sphere, 3045 fillColor={0,127,255}), Text(extent={{-136,144},{132,82}}, 3046 textString ="%name")}),3042 extent={{-100,80},{100,-80}}, 3043 lineColor={0,0,0}, 3044 fillPattern=FillPattern.Sphere, 3045 fillColor={0,127,255}), Text(extent={{-136,144},{132,82}}, 3046 textString= "%name")}), 3047 3047 Documentation(info="<html> 3048 3048 <p> … … 3094 3094 3095 3095 FluidPort_a port_a(redeclare package Medium = Medium) 3096 annotation (Placement(transformation(extent={{-120,-10},{-100,10}}, 3096 annotation (Placement(transformation(extent={{-120,-10},{-100,10}}, 3097 3097 rotation=0))); 3098 3098 FluidPort_b port_b(redeclare package Medium = Medium) 3099 annotation (Placement(transformation(extent={{120,-10},{100,10}}, 3099 annotation (Placement(transformation(extent={{120,-10},{100,10}}, 3100 3100 rotation=0))); 3101 3101 // Medium.BaseProperties medium_a(p=port_a.p, h=port_a.h, Xi=port_a.Xi) … … 3106 3106 "Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction)"; 3107 3107 Modelica.SIunits.Pressure dp "Pressure drop from port_a to port_b"; 3108 annotation (Icon(graphics 3109 ={3108 annotation (Icon(graphics= 3109 { 3110 3110 Rectangle( 3111 extent={{-100,60},{100,-60}}, 3112 lineColor={0,0,0}, 3113 fillPattern=FillPattern.HorizontalCylinder, 3114 fillColor={192,192,192}), 3111 extent={{-100,60},{100,-60}}, 3112 lineColor={0,0,0}, 3113 fillPattern=FillPattern.HorizontalCylinder, 3114 fillColor={192,192,192}), 3115 3115 Rectangle( 3116 extent={{-100,34},{100,-36}}, 3117 lineColor={0,0,0}, 3118 fillPattern=FillPattern.HorizontalCylinder, 3119 fillColor={0,127,255}), 3116 extent={{-100,34},{100,-36}}, 3117 lineColor={0,0,0}, 3118 fillPattern=FillPattern.HorizontalCylinder, 3119 fillColor={0,127,255}), 3120 3120 Text( 3121 extent={{-150,140},{150,80}}, 3122 lineColor={0,0,0}, 3123 fillPattern=FillPattern.HorizontalCylinder, 3124 fillColor={0,127,255}, 3121 extent={{-150,140},{150,80}}, 3122 lineColor={0,0,0}, 3123 fillPattern=FillPattern.HorizontalCylinder, 3124 fillColor={0,127,255}, 3125 3125 textString= 3126 "%name"), 3126 "%name"), 3127 3127 Text( 3128 extent={{-136,-62},{122,-108}}, 3129 lineColor={0,0,0}, 3128 extent={{-136,-62},{122,-108}}, 3129 lineColor={0,0,0}, 3130 3130 textString= 3131 3131 "k=%m_flow_nominal/%dp_nominal")}), … … 3185 3185 X_start = X_start, 3186 3186 V=0.1) 3187 annotation (Placement(transformation(extent={{-40,0},{-20,20}}, 3187 annotation (Placement(transformation(extent={{-40,0},{-20,20}}, 3188 3188 rotation=0))); 3189 3189 FixedMassFlowRate fixedMassFlowRate(redeclare package Medium = Medium, … … 3208 3208 m_flow_nominal=1, 3209 3209 dp_nominal=0.1e5) 3210 annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation 3211 =0)));3210 annotation (Placement(transformation(extent={{0,0},{20,20}}, rotation= 3211 0))); 3212 3212 equation 3213 3213 connect(fixedMassFlowRate.port, volume.port) annotation (Line(points={{ … … 3239 3239 X_start = X_start, 3240 3240 V=0.1) 3241 annotation (Placement(transformation(extent={{-60,0},{-40,20}}, 3241 annotation (Placement(transformation(extent={{-60,0},{-40,20}}, 3242 3242 rotation=0))); 3243 3243 FixedMassFlowRate fixedMassFlowRate(redeclare package Medium = Medium, … … 3262 3262 m_flow_nominal=1, 3263 3263 dp_nominal=0.1e5) 3264 annotation (Placement(transformation(extent={{-30,0},{-10,20}}, 3264 annotation (Placement(transformation(extent={{-30,0},{-10,20}}, 3265 3265 rotation=0))); 3266 3266 PortVolume volume1( … … 3271 3271 X_start = X_start, 3272 3272 V=0.1) 3273 annotation (Placement(transformation(extent={{0,0},{20,20}}, 3273 annotation (Placement(transformation(extent={{0,0},{20,20}}, 3274 3274 rotation=0))); 3275 3275 ShortPipe shortPipe1( … … 3277 3277 m_flow_nominal=1, 3278 3278 dp_nominal=0.1e5) 3279 annotation (Placement(transformation(extent={{36,0},{56,20}}, 3279 annotation (Placement(transformation(extent={{36,0},{56,20}}, 3280 3280 rotation=0))); 3281 3281 equation … … 3997 3997 Modelica.SIunits.Conversions.to_bar(p) 3998 3998 "Absolute pressure of medium in [bar]"; 3999 annotation (Icon(graphics={Rectangle( 3999 annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{ 4000 -100,-100},{100,100}}), graphics={Rectangle( 4000 4001 extent={{-100,100},{100,-100}}, 4001 4002 fillColor={255,255,255}, 4002 4003 fillPattern=FillPattern.Solid), Text(extent={{-152,164},{152,102}}, 4003 textString ="%name")}));4004 textString="%name")})); 4004 4005 4005 4006 // Local connector definition, used for equation balancing check … … 4750 4751 "if true, entries in thermodynamic Jacobian are constant, taken at reference conditions"; 4751 4752 4752 redeclare re placeable record ThermodynamicState4753 redeclare record ThermodynamicState 4753 4754 "a selction of variables that uniquely defines the thermodynamic state" 4754 4755 AbsolutePressure p "Absolute pressure of medium"; … … 5972 5973 constant Temperature T0= reference_T "Zero enthalpy temperature"; 5973 5974 5974 redeclare re placeable record extends ThermodynamicState5975 redeclare record extends ThermodynamicState 5975 5976 "Thermodynamic state of ideal gas" 5976 5977 AbsolutePressure p "Absolute pressure of medium"; 5977 5978 Temperature T "Temperature of medium"; 5978 5979 end ThermodynamicState; 5980 5981 redeclare record extends FluidConstants "fluid constants" 5982 end FluidConstants; 5979 5983 5980 5984 redeclare replaceable model extends BaseProperties( … … 6055 6059 6056 6060 redeclare function extends pressure "Return pressure of ideal gas" 6061 6057 6062 annotation(Documentation(info="<html></html>")); 6058 6063 algorithm … … 6061 6066 6062 6067 redeclare function extends temperature "Return temperature of ideal gas" 6068 6063 6069 annotation(Documentation(info="<html></html>")); 6064 6070 algorithm … … 6110 6116 6111 6117 redeclare function extends dynamicViscosity "Return dynamic viscosity" 6118 6112 6119 annotation(Documentation(info="<html></html>")); 6113 6120 algorithm … … 6117 6124 redeclare function extends thermalConductivity 6118 6125 "Return thermal conductivity" 6126 6119 6127 annotation(Documentation(info="<html></html>")); 6120 6128 algorithm … … 6124 6132 redeclare function extends specificHeatCapacityCp 6125 6133 "Return specific heat capacity at constant pressure" 6134 6126 6135 annotation(Documentation(info="<html></html>")); 6127 6136 algorithm … … 6131 6140 redeclare function extends specificHeatCapacityCv 6132 6141 "Return specific heat capacity at constant volume" 6142 6133 6143 annotation(Documentation(info="<html></html>")); 6134 6144 algorithm … … 6137 6147 6138 6148 redeclare function extends isentropicExponent "Return isentropic exponent" 6149 6139 6150 annotation(Documentation(info="<html></html>")); 6140 6151 algorithm … … 6143 6154 6144 6155 redeclare function extends velocityOfSound "Return velocity of sound " 6156 6145 6157 annotation(Documentation(info="<html></html>")); 6146 6158 algorithm
