WaBis

walter.bislins.ch

Datei: compr corr chart.dem

Inhalt der Datei: media/compr corr chart.dem
# Daten und Formeln für die Berechnung des Compressibility Correction Chart mit gnuplot
# 13.10.2007 (C) Walter Bislin

reset
set parametric
set style function lines
set size 1.0, 1.0
set origin 0.0, 0.0
set multiplot
set grid
unset key
set angles radians
set samples 250

# constants
k  = 1.4
RS = 287
g  = 9.81

# standard atm 0-11000 m
hRefL   = 0.0
TrefL   = 288.15
rhoRefL = 1.225
pRefL   = 101325.0
L0      = 0.0065
# standard atm 11000-20000 m
hRefH   = 11000.0
TrefH   = 216.65
rhoRefH = 0.364
pRefH   = 22632.0
L1      = 0.0

# convert functions
aL(h) = 20.046 * sqrt(TrefL - L0*h)
aH(h) = 20.046 * sqrt(TrefH - L1*(h-hRefH))
MaL(vTAS,h) = vTAS / aL(h) 
MaH(vTAS,h) = vTAS / aH(h) 
MachToMSL(vMa,h) = aL(h) * vMa
MachToMSH(vMa,h) = aH(h) * vMa
FeetToMeter(h) = h * 0.3048
KnotToMS(v) = v * 0.51444 
MSToKnot(v) = v / 0.51444

# barometric functions
rhoL(h) = rhoRefL * (((TrefL-L0*h)/TrefL) ** ((g/L0/RS)-1.0))
rhoH(h) = rhoRefH * exp(-g*(h-hRefH)/RS/TrefH)
pL(h) = pRefL * (((TrefL-L0*h)/TrefL) ** (g/L0/RS))
pH(h) = pRefH * exp(-g*(h-hRefH)/RS/TrefH)

#Bernoullis
VQL(v,h) = 0.5*rhoL(h)*v*v
VQH(v,h) = 0.5*rhoH(h)*v*v
QVL(q,h) = sqrt(2*q/rhoL(h))
QVH(q,h) = sqrt(2*q/rhoH(h))
VQCL(v,h) = pL(h)*((((k-1.0)*rhoL(h))/(2*k*pL(h))*v*v+1.0)**(k/(k-1.0))-1.0)
VQCH(v,h) = pH(h)*((((k-1.0)*rhoH(h))/(2*k*pH(h))*v*v+1.0)**(k/(k-1.0))-1.0)
QCVL(q,h) = sqrt((2*k*pL(h))/((k-1.0)*rhoL(h))*((q/pL(h)+1.0)**((k-1.0)/k)-1.0))
QCVH(q,h) = sqrt((2*k*pH(h))/((k-1.0)*rhoH(h))*((q/pH(h)+1.0)**((k-1.0)/k)-1.0))

# speed functions
CASL(v,h) = QCVL(VQCL(v,h),0.0)
CASH(v,h) = QCVL(VQCH(v,h),0.0)
EASL(v,h) = QVL(VQL(v,h),0.0)
EASH(v,h) = QVL(VQH(v,h),0.0)
VCL(v,h) = EASL(v,h)-CASL(v,h)
VCH(v,h) = EASH(v,h)-CASH(v,h)

CASktL(vMa,hft) = MSToKnot(CASL(MachToMSL(vMa,FeetToMeter(hft)),FeetToMeter(hft)))
CASktH(vMa,hft) = MSToKnot(CASH(MachToMSH(vMa,FeetToMeter(hft)),FeetToMeter(hft)))
VCktL(vMa,hft) = MSToKnot(VCL(MachToMSL(vMa,FeetToMeter(hft)),FeetToMeter(hft)))
VCktH(vMa,hft) = MSToKnot(VCH(MachToMSH(vMa,FeetToMeter(hft)),FeetToMeter(hft)))

#  Plot Magnitude Response
set title "Compressibility Correction Chart"
set xlabel "CAS [kt]"
set ylabel "Correction Vc = EAS - CAS [kt]" 1,0

set xrange [100.0:650.0]
set yrange [0.0:-35.0]

set dummy h
set trange [2000.0:33000.0]
plot CASktL(1.0,h),VCktL(1.0,h), CASktL(0.8,h),VCktL(0.8,h)
set trange [33000.0:62000.0]
plot CASktH(1.0,h),VCktH(1.0,h), CASktH(0.8,h),VCktH(0.8,h)

set dummy t
set trange [0.0:1.01]
plot \
  CASktL(t, 5000.0),VCktL(t, 5000.0), \
  CASktL(t,10000.0),VCktL(t,10000.0), \
  CASktL(t,15000.0),VCktL(t,15000.0), \
  CASktL(t,20000.0),VCktL(t,20000.0), \
  CASktL(t,25000.0),VCktL(t,25000.0), \
  CASktL(t,30000.0),VCktL(t,30000.0), \
  CASktH(t,35000.0),VCktH(t,35000.0), \
  CASktH(t,40000.0),VCktH(t,40000.0), \
  CASktH(t,45000.0),VCktH(t,45000.0), \
  CASktH(t,50000.0),VCktH(t,50000.0), \
  CASktH(t,55000.0),VCktH(t,55000.0), \
  CASktH(t,60000.0),VCktH(t,60000.0)

More Page Infos / Sitemap
Created Freitag, 22. Januar 2010
Scroll to Top of Page
Changed Donnerstag, 25. April 2013