From 36c7a79f308b5d8463aea298cc8bd7d64c6a660e Mon Sep 17 00:00:00 2001 From: Hubertus Date: Thu, 21 Apr 2005 22:23:47 +0000 Subject: [PATCH] changes from Hans git-svn-id: https://svn.modelica.org/projects/Modelica/trunk@175 7ce873d0-865f-4ce7-a662-4bb36ea78beb --- Media/Air.mo | 19 +++++++++++++------ Media/Incompressible.mo | 28 ---------------------------- 2 files changed, 13 insertions(+), 34 deletions(-) diff --git a/Media/Air.mo b/Media/Air.mo index bec545f8d3..0fcda9c2e7 100644 --- a/Media/Air.mo +++ b/Media/Air.mo @@ -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; diff --git a/Media/Incompressible.mo b/Media/Incompressible.mo index 2a60c3d9bc..f70d39576f 100644 --- a/Media/Incompressible.mo +++ b/Media/Incompressible.mo @@ -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;