Skip to content

Commit

Permalink
changes from Hans
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.modelica.org/projects/Modelica/trunk@175 7ce873d0-865f-4ce7-a662-4bb36ea78beb
  • Loading branch information
Hubertus authored and Hubertus committed Apr 21, 2005
1 parent 4414a0e commit 36c7a79
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 34 deletions.
19 changes: 13 additions & 6 deletions Media/Air.mo
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,23 @@ in the allowed range (" + String(T_min) + " K <= T <= " + String(T_max)

package DryAirNasa "Air: Detailed dry air model as ideal gas (200..6000 K)"
extends IdealGases.SingleGases.Air(fluidConstants={IdealGases.Common.FluidData.N2});
import Cv = Modelica.SIunits.Conversions;


redeclare function extends dynamicViscosity "simple polynomial for dry air (moisture influence small), valid from 73.15 K to 373.15 K"
algorithm
eta := Polynomials_Temp.evaluate({(-4.96717436974791E-011), 5.06626785714286E-008, 1.72937731092437E-005}, Cv.to_degC(state.T));
redeclare function dynamicViscosity "simple polynomial for dry air (moisture influence small), valid from 73.15 K to 373.15 K"
extends Modelica.Icons.Function;
input ThermodynamicState state;
output DynamicViscosity eta "Dynamic viscosity";
algorithm
eta := Incompressible.TableBased.Polynomials_Temp.evaluate({(-4.96717436974791E-011), 5.06626785714286E-008, 1.72937731092437E-005}, Cv.to_degC(state.T));
end dynamicViscosity;

redeclare function extends thermalConductivity "simple polynomial for dry air (moisture influence small), valid from 73.15 K to 373.15 K"
redeclare function thermalConductivity "simple polynomial for dry air (moisture influence small), valid from 73.15 K to 373.15 K"
extends Modelica.Icons.Function;
input ThermodynamicState state;
input Integer method=1 "1: Eucken Method, 2: Modified Eucken Method";
output ThermalConductivity lambda "Thermal conductivity";
algorithm
lambda := Polynomials_Temp.evaluate({(-4.8737307422969E-008), 7.67803133753502E-005, 0.0241814385504202},Cv.to_degC(state.T));
lambda := Incompressible.TableBased.Polynomials_Temp.evaluate({(-4.8737307422969E-008), 7.67803133753502E-005, 0.0241814385504202},Cv.to_degC(state.T));
end thermalConductivity;

end DryAirNasa;
Expand Down
28 changes: 0 additions & 28 deletions Media/Incompressible.mo
Original file line number Diff line number Diff line change
Expand Up @@ -510,34 +510,6 @@ function calls can not be used.
[160, 3; 180, 10; 200, 40; 220, 100; 240, 300; 260, 600;
280, 1600; 300, 3e3; 320, 5.5e3]);
end Essotherm650;
/*
package AirOneBar "air properties at 1 bar"
extends TableBased
(mediumName="Air at 1 bar pressure",
T_min = Cv.from_degC(-200), T_max = Cv.from_degC(100),
TinK = false, T0=273.15,
tableConductivity=transpose(cat(1,{{(-200), (-180.0), (-160.0), (-140.0), (-120.0), (-100.0), (-80.0), (-60.0),
(-40.0), (-20.0), 0, 20.0, 40.0, 60.0, 80.0, 100}},
1e-3*{{6.886,8.775,10.64,12.47,14.26,16.02,17.74,19.41,21.04,22.63,
24.18,25.69,27.16,28.60,30.01,31.39}})),
tableHeatCapacity=transpose(cat(1,{{(-200), (-180.0), (-160.0), (-140.0), (-120.0), (-100.0), (-80.0), (-60.0),
(-40.0), (-20.0), 0, 20.0, 40.0, 60.0, 80.0, 100}},
1e-6*{{4.997,6.623,7.994,9.294,10.55,11.77,12.94,14.07,15.16,16.22,
17.24,18.24,19.20,20.14,21.05,21.94}})));
end AirOneBar;
*/
//{(-4.96717436974791E-011), 5.06626785714286E-008, 1.72937731092437E-005} visc
//{(-4.8737307422969E-008), 7.67803133753502E-005, 0.0241814385504202} lambda
model TestAir
extends Modelica.Icons.Example;
package Medium = AirOneBar;
Medium.DynamicViscosity eta=Medium.heatCapacity_cp(state);
Medium.ThermalConductivity lambda=Medium.thermalConductivity(state);
Medium.ThermodynamicState state(T(start = 200.0));
equation
state.p = 1.0e5;
der(state.T) = 300.0;
end TestAir;

model TestGlycol "Test Glycol47 Medium model"
extends Modelica.Icons.Example;
Expand Down

0 comments on commit 36c7a79

Please sign in to comment.