📄 standardatmosphere.m
字号:
(* :Title: StandardAtmosphere *)
(* :Author: Barbara Ercolano *)
(* :Summary:
This package provides functions giving the values of atmospheric
quantities for given altitudes and plots of these quantities versus the
geometric altitude *)
(* :Context: Miscellaneous`StandardAtmosphere` *)
(* :Copyright: Copyright 1997-2005, Wolfram Research, Inc. *)
(* :Source: The Handbook of Chemistry and Physics, 73rd edition, 1992-1993 *)
(* :Mathematica Version: 3.0 *)
(* :History:
Version 1.0 by Barbara Ercolano, 1997
Version 1.1 changes by ECM, 1998
*)
(* :Package Version: 1.1 *)
BeginPackage["Miscellaneous`StandardAtmosphere`",
{"Miscellaneous`SIUnits`", "Miscellaneous`Units`"}];
CollisionFrequency::usage=
"CollisionFrequency[altitude] gives the collision frequency at the \
specified altitude.";
DynamicViscosity::usage=
"DynamicViscosity[altitude] gives the coefficient of dynamic viscosity at \
the specified altitude.";
GravityAcceleration::usage=
"GravityAcceleration[altitude] gives the 45 degree latitude acceleration of \
gravity at the specified altitude.";
KinematicViscosity::usage=
"KinematicViscosity[altitude] gives the kinematic viscosity at the \
specified altitude.";
KineticTemperature::usage=
"KineticTemperature[altitude] gives the kinetic temperature at the \
specified altitude.";
MeanDensity::usage=
"MeanDensity[altitude] gives the mean density of air at the specified \
altitude.";
MeanFreePath::usage=
"MeanFreePath[altitude] gives the mean free path at the specified
altitude.";
MeanMolecularWeight::usage=
"MeanMolecularWeight[altitude] gives the mean molecular weight at the \
specified altitude.";
MeanParticleSpeed::usage=
"MeanParticleSpeed[altitude] gives the mean particle speed at the specified \
altitude.";
NumberDensity::usage=
"NumberDensity[altitude] gives the total number density of the mixture of \
neutral atmospheric gas particles at the specified altitude.";
Pressure::usage=
"Pressure[altitude] gives the total atmospheric pressure at the
specified altitude.";
PressureScaleHeight::usage=
"PressureScaleHeight[altitude] gives the local pressure scale height of the \
mixture of gases comprising the atmosphere at the specified altitude.";
SoundSpeed::usage=
"SoundSpeed[altitude] gives the speed of sound at the specified altitude.";
ThermalConductivityCoefficient::usage=
"ThermalConductivityCoefficient[altitude] gives the coefficient of thermal \
conductivity at the specified altitude.";
AtmosphericPlot::usage=
"AtmosphericPlot[property, options] plots the specified property as a
function of geometric altitude. Properties are
CollisionFrequency, DynamicViscosity, GravityAcceleration,
KinematicViscosity, KineticTemperature, MeanDensity, MeanFreePath,
MeanMolecularWeight, MeanParticleSpeed, NumberDensity, Pressure,
PressureScaleHeight, SoundSpeed, and ThermalConductivityCoefficient."
Begin["`Private`"];
Pressure[alt_] :=
Module[{p},
(
p
) /; ((p = atmosphericDataInterpolation[$Pressure, alt, Milli Bar,
Pressure]) =!= $Failed)
]
CollisionFrequency[alt_] :=
Module[{cf},
(
cf
) /; ((cf = atmosphericDataInterpolation[$CollisionFrequency, alt,
1/Second, CollisionFrequency]) =!= $Failed)
]
DynamicViscosity[alt_] :=
Module[{dv},
(
dv
) /; ((dv = atmosphericDataInterpolation[$DynamicViscosity, alt,
Newton Second/ Meter^2, DynamicViscosity]) =!= $Failed)
]
GravityAcceleration[alt_] :=
Module[{ga},
(
ga
) /; ((ga = atmosphericDataInterpolation[$GravityAcceleration, alt,
(Meter/Second^2), GravityAcceleration]) =!= $Failed)
]
KinematicViscosity[alt_] :=
Module[{kv},
(
kv
) /; ((kv = atmosphericDataInterpolation[$KinematicViscosity, alt,
Meter^2/Second, KinematicViscosity]) =!= $Failed)
]
KineticTemperature[alt_] :=
Module[{kt},
(
kt
) /; ((kt = atmosphericDataInterpolation[$Temperature, alt, Kelvin,
KineticTemperature]) =!= $Failed)
]
MeanDensity[alt_] :=
Module[{md},
(
md
) /; ((md = atmosphericDataInterpolation[$Density, alt,
Kilogram/Meter^3, MeanDensity]) =!= $Failed)
]
MeanFreePath[alt_] :=
Module[{mfp},
(
mfp
) /; ((mfp = atmosphericDataInterpolation[$MeanFreePath, alt, Meter,
MeanFreePath]) =!= $Failed)
]
MeanMolecularWeight[alt_] :=
Module[{mmw},
(
mmw
) /; ((mmw = atmosphericDataInterpolation[$MolecularWeight, alt,
Kilogram/(Kilo Mole), MeanMolecularWeight]) =!= $Failed)
]
MeanParticleSpeed[alt_] :=
Module[{mps},
(
mps
) /; ((mps = atmosphericDataInterpolation[$MeanParticleSpeed, alt,
Meter/Second, MeanParticleSpeed]) =!= $Failed)
]
PressureScaleHeight[alt_] :=
Module[{psh},
(
psh
) /; ((psh = atmosphericDataInterpolation[$PressureScaleHeight, alt,
Meter, PressureScaleHeight]) =!= $Failed)
]
NumberDensity[alt_] :=
Module[{nd},
(
nd
) /; ((nd = atmosphericDataInterpolation[$NumberDensity, alt,
Meter^(-3), NumberDensity]) =!= $Failed)
]
SoundSpeed[alt_] :=
Module[{ss},
(
ss
) /; ((ss = atmosphericDataInterpolation[$SoundSpeed, alt,
Meter/Second, SoundSpeed]) =!= $Failed)
]
ThermalConductivityCoefficient[alt_] :=
Module[{tcc},
(
tcc
) /; ((tcc = atmosphericDataInterpolation[$ThermalConductivity, alt,
Joule/ (Meter Second Kelvin),
ThermalConductivityCoefficient]) =!= $Failed)
]
$Alts={-5000,-4500,-4000,-3500,-3000,-2500,-2000,-1500,-1000,-500,0,500,1000,
1500,2000,2500,3000,3500,4000,4500,5000,5500,6000,6500,7000,7500,8000,
8500,9000,9500,10000,10500,11000,11500,12000,12500,13000,13500,14000,
14500,15000,16000,17000,18000,19000,20000,21000,22000,23000,24000,25000,
26000,27000,28000,29000,30000,31000,32000,33000,34000,35000,36000,38000,
40000,42000,44000,46000,48000,50000,52000,54000,56000,58000,60000,65000,
70000,75000,80000,85000,85500,86000,90000,95000,100000,110000,120000,
130000,140000,150000,160000,170000,180000,190000,200000,210000,220000,
240000,260000,280000,300000,320000,340000,360000,380000,400000,450000,
500000,550000,600000,650000,700000,750000,800000,850000,900000,950000,
1000000};
altitudeHm=
Meter {-5004, -4503, -4003, -3502, -3001, -2501, -2001, -1500, -1000, -500,
0, 500, 1000, 1500, 1999, 2499, 2999, 3498, 3997, 4497, 4996, 5495,
5994, 6493, 6992, 7491, 7990, 8489, 8987, 9486, 9984, 10483, 10981,
11479, 11977, 12475, 12973, 13471, 13969, 14467,14965, 15960, 16955,
17949, 18943, 19937, 20931, 21924, 22917, 23910, 24902, 25894, 26886,
27877, 28868, 29859, 30850, 31840, 32830, 33819, 34808, 35797, 3774,
39750, 41724, 43698, 45669, 47640, 49610, 51578, 53545, 55511, 57476,
59539, 64342, 69238, 74125, 79006, 83878, 84365, 84852, 88744, 93610,
98451, 108129, 117777, 127395, 136983, 146542, 156072, 165572, 175043,
184486, 193899, 203270, 212641, 231268, 249784, 268187, 286480, 304663,
322738, 340705, 358565, 376320, 420250, 463540, 506202, 548252, 589701,
630563, 670850, 710574, 749747, 788380, 826484, 864071};
$GravityAcceleration= (* (Meter/Second^2) *) {9.8221, 9.8295, 9.8190, 9.8175,
9.8159, 9.8144, 9.8128, 9.8113,9.8097, 9.8082, 9.8066, 9.8051, 9.8036,
9.8020, 9.8005, 9.7989, 9.7974,9.7959, 9.7943,9.7928, 9.7912, 9.7897,
9.7882, 9.7866, 9.7851, 9.7836, 9.7820, 9.7805, 9.7789, 9.7774, 9.7759,
9.7743, 9.7728, 9.7713, 9.7697, 9.7682, 9.7667, 9.7651, 9.7636, 9.7621,
9.7605, 9.7575, 9.7544, 9.7513, 9.7483, 9.7452, 9.7422, 9.7391, 9.7361,
9.7330, 9.7300, 9.7269, 9.7239, 9.7208, 9.7178, 9.7147, 9.7117, 9.7087,
9.7056, 9.7026, 9.6995, 9.6965, 9.6904, 9.6844, 9.6783, 9.6723, 9.6662,
9.6602, 9.6542, 9.6482, 9.6421, 9.6361, 9.6316, 9.6241, 9.6091, 9.5942,
9.5793, 9.5644, 9.5496, 9.5481, 9.5466, 9.5348, 9.5200, 9.5052, 9.4759,
9.4466, 9.4175, 9.3886, 9.3597, 9.3310, 9.3024, 9.2740, 9.2457, 9.2175,
9.1895, 9.1615, 9.1061, 9.0511, 8.9966, 8.9427, 8.8892, 8.8361, 8.7836,
8.7315, 8.6799, 8.5529, 8.4286, 8.3070, 8.1880, 8.0716, 7.9576, 7.8460,
7.7368, 7.6298, 7.5250, 7.4224, 7.3218};
$PressureScaleHeight= (* Meter *) {9371.8, 9278.2, 9184.5, 9090.8, 8997.1,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -