metanorma / atmospheric

International Standard Atmosphere / ICAO Standard Atmosphere (ISA) from ICAO 7488 / ISO 2533
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Correct calculations and tests #2

Closed newbthenewbd closed 7 months ago

newbthenewbd commented 7 months ago

1

The following problems contributing to the observed discrepancies have been found and corrected:

As a result of the aforementioned changes, the program prints the following output with the supplied tests:

PRE-CALCULATED PRESSURE LAYERS:
[127773.72968448336,
 101325.0,
 22632.040596934745,
 5474.877660660028,
 868.0158377493663,
 110.90578455391473,
 66.93853537303916,
 3.956392754582872,
 0.8862723913002989]

TEST CASE 1: (calculated vs target)
  H =   -2000.0     (-2000.0)
  h =   -1999.370947130308      (-1999.0)
  TK    =   301.15      (301.15)
  TC    =   28.0        (28.0)
  p_mbar    =   1277.7372968448337      (1277.74)
  p_mmhg    =   958.3821923460297       (958.382)
  rho   =   1.4780761339453061      (1.47808)
  g =   9.812821812969393       (9.8128)
  p_p_n =   1.261028667006991       (1.26103)
  rho_rho_n =   1.2065927624043316      (1.20659)
  root_rho_rho_n    =   1.0984501638237083      (1.09845)
  a =   347.88555921638397      (347.886)
  mu    =   1.851438196178237e-05       (1.8514e-05)
  v =   1.2526000208367794e-05      (1.2526e-05)
  lambda    =   0.0263589318155934      (0.026359)
  H_p   =   8815.036029581692       (8809.5)
  gamma =   14.50409772840797       (14.504)
  n =   3.0733627653356467e+25      (3.0734e+25)
  v_bar =   469.18315108853415      (469.18)
  omega =   8533857889.113151       (8535100000.0)
  l =   5.497124527649016e-08       (5.4971e-08)

TEST CASE 2: (calculated vs target)
  H =   -1900.0     (-1900.0)
  h =   -1899.4322708568118     (-1899.0)
  TK    =   300.5       (300.5)
  TC    =   27.350000000000023      (27.35)
  p_mbar    =   1263.3087401749042      (1263.31)
  p_mmhg    =   947.5598802730691       (947.559)
  rho   =   1.464546363067766       (1.46455)
  g =   9.812513176210215       (9.8125)
  p_p_n =   1.2467887887243072      (1.24679)
  rho_rho_n =   1.1955480514838905      (1.19555)
  root_rho_rho_n    =   1.093411199633464       (1.09341)
  a =   347.50991956450883      (347.51)
  mu    =   1.848366536226033e-05       (1.8484e-05)
  v =   1.2620744435528036e-05      (1.2621e-05)
  lambda    =   0.02630843483467121     (0.026308)
  H_p   =   8796.009719041336       (8790.8)
  gamma =   14.370880484773204      (14.371)
  n =   3.0452303213541827e+25      (3.0432e+25)
  v_bar =   468.67653679865793      (468.68)
  omega =   8446611724.628867       (8447800000.0)
  l =   5.547908058454149e-08       (5.5479e-08)

Metanorma PR checklist