diff --git a/dymos/models/atmosphere/atmos_1976.py b/dymos/models/atmosphere/atmos_1976.py index 2375c7ad6..0a5ac7079 100644 --- a/dymos/models/atmosphere/atmos_1976.py +++ b/dymos/models/atmosphere/atmos_1976.py @@ -1232,6 +1232,203 @@ [-4.1533473952434885e-12, 1.7009023252670026e-16, 3.0793816165788615e-22, -6.5538746189301104e-26], [-2.4871899999999984e-12, 1.5658737190306762e-16, 0.0000000000000000e+00, 0.0000000000000000e+00]]) +USatm1976Data.akima_dT = \ + np.array([[-3.5660000000000310e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [-3.5660000000000310e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [-3.5660000000000310e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [-3.5660000000000310e-03, 0.0000000000000000e+00, -5.2041704279304214e-24, 3.4694469519536144e-27], + [-3.5660000000000327e-03, 0.0000000000000000e+00, 3.5212297422812804e-24, -1.7865062663044732e-27], + [-3.5660000000000310e-03, 1.6829406856491413e-21, -2.7920542672855984e-24, 1.1091135816364571e-27], + [-3.5660000000000310e-03, -5.7382710401268435e-22, -3.0850379679481940e-22, 1.9632059796033961e-25], + [-3.5660000000001437e-03, -2.8619626812632625e-20, 7.6403353557776996e-22, -5.0903249515016410e-25], + [-3.5659999999999173e-03, -2.7650041107584704e-20, -2.9192059171500655e-22, 2.0421152167013355e-25], + [-3.5660000000000327e-03, 1.1433404728028958e-21, 2.9174894823246298e-24, -2.3261064791507186e-27], + [-3.5660000000000310e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [-3.5660000000000310e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [-3.5660000000000310e-03, 0.0000000000000000e+00, -2.6020852139652107e-24, 1.7347234759768072e-27], + [-3.5660000000000318e-03, 0.0000000000000000e+00, 2.6020852139652107e-24, -1.7347234759768072e-27], + [-3.5660000000000310e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [-3.5660000000000310e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [-3.5660000000000310e-03, 0.0000000000000000e+00, -5.2041704279304214e-24, 3.4694469519536144e-27], + [-3.5660000000000327e-03, 0.0000000000000000e+00, 3.5658204783967707e-24, -1.8310970024199634e-27], + [-3.5660000000000310e-03, 1.6383499495336512e-21, -4.8816141353451644e-24, 3.2432641858115131e-27], + [-3.5660000000000310e-03, 1.6049142362778624e-21, 1.7373196607707861e-22, -1.1635628213014504e-25], + [-3.5659999999999720e-03, 0.0000000000000000e+00, -8.1687039043883716e-24, 5.1329378214289591e-27], + [-3.5659999999999750e-03, -9.3859434448986658e-22, 3.3163666838641952e-24, -2.3777723393743289e-27], + [-3.5659999999999750e-03, -1.4391779948844621e-21, -6.1742317494823523e-23, 3.5425919874079071e-26], + [-3.5660000000000028e-03, -1.8646053362294297e-20, 1.2727303948230367e-22, -8.0871410504380451e-26], + [-3.5659999999999750e-03, -6.7142059108283272e-21, -3.3452540746026762e-22, 2.2761522569461510e-25], + [-3.5660000000000886e-03, 7.0806562524816779e-21, 1.4749827890877287e-22, -9.6032017847037308e-26], + [-3.5660000000000301e-03, 1.3981160528915500e-20, -6.1572588404881642e-23, 4.5856704399989345e-26], + [-3.5660000000000318e-03, 2.8406096919120223e-20, 1.2018941876228966e-22, -8.9614917498198416e-26], + [-3.5659999999999728e-03, -5.9818050895752124e-23, -4.9758450760932235e-24, 2.8672587820179668e-27], + [-3.5659999999999750e-03, -1.4097318570282987e-21, 4.2327023667491451e-24, -2.8229705097208468e-27], + [-3.5659999999999750e-03, -1.4132386526925481e-21, -3.3691327537316993e-22, 2.2470212634938160e-25], + [-3.5660000000000886e-03, -1.1334103508875900e-21, 1.7082691639194523e-22, -1.1114658872684039e-25], + [-3.5660000000000301e-03, 7.0806562524816779e-21, -3.7923589029853584e-23, 2.9108209301395099e-26], + [-3.5660000000000318e-03, 1.8558106096959804e-20, 3.2157078613420889e-23, -2.2959609094751779e-26], + [-3.5660000000000041e-03, 1.3993436039546243e-20, -1.3038226125530807e-23, -5.2152904502123331e-28], + [-3.5660000000000036e-03, -1.3647603346579073e-20, -5.7762002598576084e-23, 4.2786668591537842e-26], + [-3.5660000000000323e-03, -8.1160276911772045e-22, 1.3283025473193839e-24, -8.3018909207461823e-29], + [-3.5660000000000318e-03, 1.5959455978986622e-21, 4.2415210623883702e-25, -2.8537422816069206e-28], + [-3.5660000000000301e-03, 1.5881271258942600e-21, -9.9685518056132013e-24, 6.6457012037421350e-27], + [-3.5660000000000318e-03, 1.5881271258942596e-21, 7.9260822237022356e-23, -5.3093373747287710e-26], + [-3.5660000000000041e-03, 8.2965035807586428e-22, -1.0105141361364028e-24, 6.1454464705474038e-28], + [-3.5660000000000036e-03, 6.5225602696727952e-22, 3.4798446828799577e-25, -1.3287875726687174e-28], + [-3.5660000000000028e-03, 9.4958869174265587e-22, 6.8544780873514941e-23, -4.1738793949628690e-26], + [-3.5659999999999750e-03, 1.2822768589886488e-20, -3.7869851715706968e-22, 2.5225136089070231e-25], + [-3.5660000000000886e-03, 1.2179816947854107e-20, 3.1803058768687002e-22, -2.1615233608924907e-25], + [-3.5659999999999746e-03, -2.1601594615300550e-22, -7.8439005731187217e-25, 5.6672513447067575e-28], + [-3.5659999999999750e-03, -8.4620657364722290e-23, 3.8440081562579277e-25, -2.9978015826107044e-28], + [-3.5659999999999750e-03, -2.1515950089634817e-22, -6.4190354482799751e-23, 3.6649938368067183e-26], + [-3.5660000000000028e-03, -1.8646053362294297e-20, 9.2803257963696991e-23, -4.6401628985773789e-26], + [-3.5659999999999750e-03, 2.7755575607778336e-20, -2.7115709449243962e-22, 1.2977713120818039e-25], + [-3.5660000000000886e-03, -1.2522721975255970e-19, -2.0028189157730910e-12, 1.0031267029930416e-15], + [-3.5669996922129939e-03, -9.9625772269228451e-10, 1.2254094274982323e-11, -7.6326157114829321e-17], + [-3.5558181818178187e-03, 2.3282952355927869e-08, 1.0620888640741600e-08, -7.0883534112797104e-12], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 1.6469999999993081e-09, -1.0979999999994212e-12], + [5.4899999999988671e-04, 3.5236570605765774e-19, -2.0466659026707953e-22, 1.8606053644462861e-28], + [5.4900000000003459e-04, -5.6409292867167477e-20, 2.0410840855700778e-22, -2.0429446909358366e-25], + [5.4899999999997800e-04, -2.6107588303390283e-19, -1.2499999993962655e-12, 7.4999999968394619e-16], + [5.4850000000000460e-04, -2.5000000000176791e-10, 2.4999999997206074e-13, 1.4636767378862491e-26], + [5.4849999999998953e-04, 2.4999999998626385e-10, 9.9999999962467344e-13, -7.4999999967906728e-16], + [5.4899999999992140e-04, 1.9840899751642701e-19, -1.1340754715163525e-22, -4.1928193038914967e-35], + [5.4900000000000641e-04, -2.8406096912628106e-20, -2.8513897605254428e-23, 2.8513897598762319e-26], + [5.4899999999997800e-04, 1.0780067314998730e-22, 6.4849963327493877e-25, -5.3945987192782517e-28], + [5.4899999999997822e-04, -2.1357967608361065e-22, -1.5108180649171444e-25, 1.4782104807822419e-28], + [5.4899999999997800e-04, -7.2280144832366960e-23, 1.4289228632244853e-25, -7.0612141490081578e-29], + [5.4899999999997800e-04, 1.6680033422853913e-24, 3.7696238893152794e-25, -1.6178995777671243e-28], + [5.4899999999997822e-04, 2.7022290787520395e-22, 5.5838067159840390e-23, -2.7919033583092487e-26], + [5.4900000000000641e-04, 2.8189256478278543e-20, -1.1340754727429677e-22, 3.8657554733232256e-35], + [5.4899999999992119e-04, -1.9862583795434230e-19, -1.2499999993595109e-12, 7.4999999964112021e-16], + [5.4850000000000417e-04, -2.4999999999428689e-10, 2.5000000001532046e-13, -2.1250341901200573e-26], + [5.4850000000000395e-04, 2.4999999997260286e-10, 9.9999999997758169e-13, -7.4999999997592195e-16], + [5.4899999999997822e-04, -9.4062159422563647e-35, -6.5052130349102056e-25, 4.3368086899401365e-28], + [5.4899999999997800e-04, -9.4039548070542158e-35, -1.6680033420973124e-27, 1.6680033421913521e-30], + [5.4899999999997800e-04, 1.6680033422853913e-24, 3.7696238893152794e-25, -1.6178995777671243e-28], + [5.4899999999997822e-04, 2.7022290787520395e-22, 8.3810483203621848e-23, -5.5891449626873926e-26], + [5.4900000000000641e-04, 2.1684043449709910e-22, -2.1975710441144154e-22, 1.3432197321958382e-25], + [5.4899999999992119e-04, -3.6331448729634610e-20, 3.6667858267176863e-23, -1.1956910304514903e-28], + [5.4899999999992140e-04, 3.6645560495583662e-20, 1.8182185829489697e-22, -1.3346596846761703e-25], + [5.4900000000000641e-04, -1.0862831747359454e-22, -4.4069039886846444e-23, 1.5771571285199824e-26], + [5.4899999999997800e-04, -4.0931994235567020e-20, -5.9537542729533210e-23, 4.3874183561356913e-26], + [5.4899999999992140e-04, -2.8384529010562740e-20, 2.2720563956804303e-22, -1.1360281980011961e-25], + [5.4900000000000662e-04, 8.5218290725164436e-20, -1.1351596742383618e-22, -3.1999446396615447e-36], + [5.4899999999997832e-04, -1.4181364413210771e-19, -1.2499999996447376e-12, 7.4999999981239710e-16], + [5.4850000000000417e-04, -2.4999999999409720e-10, 2.4999999995886063e-13, 2.1141884460824461e-26], + [5.4849999999999008e-04, 2.4999999998704983e-10, 9.9999999962310147e-13, -7.4999999967849822e-16], + [5.4899999999992173e-04, 1.9775847621344235e-19, -1.1308228650088428e-22, -4.1440186465131543e-35], + [5.4900000000000641e-04, -2.8406096912646727e-20, -2.8513585170370917e-23, 2.8513585163897427e-26], + [5.4899999999997800e-04, 1.0748823830372049e-22, 6.4912450296747240e-25, -5.3977230677409197e-28], + [5.4899999999997822e-04, -2.1357967608361065e-22, -1.5108180649171444e-25, 1.4782104807822419e-28], + [5.4899999999997800e-04, -7.2280144832366960e-23, 1.4366053682449699e-25, -7.1380391992130041e-29], + [5.4899999999997800e-04, 8.9975284023693319e-25, 3.2391102248529591e-25, -1.0797034082843196e-28], + [5.4899999999997822e-04, 3.2481077532553289e-22, 1.0386746787695753e-22, -5.1933733938481745e-26], + [5.4900000000003047e-04, 5.2258544713795354e-20, -3.2238244834759421e-22, 2.1808219935449467e-25], + [5.4899999999997843e-04, 6.1740246082090894e-20, 2.5949145744776415e-09, -1.6829145744799853e-12], + [1.4609999999976966e-03, 1.4108542551538935e-07, -5.3266847902286211e-11, -1.1819602200928863e-14], + [1.5369989754098709e-03, -9.0707689196963226e-10, -1.1827724456692648e-12, 1.0908739277696013e-15], + [1.5360000000000016e-03, 6.4208140634019175e-22, 6.6740109779352472e-25, -6.5896120064241361e-28], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, -1.3010426069826054e-24, 8.6736173798840360e-28], + [1.5360000000000018e-03, 0.0000000000000000e+00, 1.3010426069826054e-24, -8.6736173798840360e-28], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, -1.3010426069826054e-24, 8.6736173798840360e-28], + [1.5360000000000018e-03, 0.0000000000000000e+00, 1.3010426069826054e-24, -8.6736173798840360e-28], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, -3.9031278209478168e-24, 2.6020852139652106e-27], + [1.5360000000000009e-03, 0.0000000000000000e+00, 3.9031278209478168e-24, -2.6020852139652106e-27], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, -1.3010426069826054e-24, 8.6736173798840360e-28], + [1.5360000000000018e-03, 0.0000000000000000e+00, 1.3010426069826054e-24, -8.6736173798840360e-28], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, -1.3010426069826054e-24, 8.6736173798840360e-28], + [1.5360000000000018e-03, 0.0000000000000000e+00, 1.3010426069826054e-24, -8.6736173798840360e-28], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 1.5265566588595904e-22, -9.7144514654701195e-26], + [1.5360000000000577e-03, 1.3877787807814454e-20, -3.7884844937538925e-22, 2.5264731649807655e-25], + [1.5359999999999454e-03, 1.4122838551265550e-20, 1.3894135982641465e-22, -9.7119366277428176e-26], + [1.5360000000000013e-03, 6.4745937181034224e-22, 2.1792149705676360e-25, -4.3169999987290416e-28], + [1.5360000000000018e-03, -2.1179763369484273e-22, 9.8334615644034160e-26, -1.0337741644629234e-28], + [1.5360000000000016e-03, -3.2526065174565138e-22, -1.1384122811097798e-24, 8.1315162936412843e-28], + [1.5360000000000009e-03, -1.6263032587282567e-22, 4.2283884726934680e-24, -2.7647155398380367e-27], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, -1.3010426069826054e-24, 8.6736173798840360e-28], + [1.5360000000000018e-03, 0.0000000000000000e+00, 1.3010426069826054e-24, -8.6736173798840360e-28], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [1.5360000000000022e-03, 0.0000000000000000e+00, -3.0215672048864661e-12, 1.1795217985846751e-17], + [1.5329902280131016e-03, -6.0077487558153883e-09, -4.5869551865276719e-09, 3.0599727072703863e-12], + [4.3368086899420177e-19, -8.6821487341612216e-22, 4.3538713984963902e-25, -8.5313542771859891e-31], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00, 0.0000000000000000e+00], + [0.0000000000000000e+00, 0.0000000000000000e+00, -4.6029004930409209e-09, 3.0673769579784685e-12], + [-1.5355235350624525e-03, -3.6701121464362004e-09, 2.1910152502462100e-12, 4.2422646222117625e-18], + [-1.5369983896940202e-03, 7.2464514792285527e-10, 7.0354936489526757e-13, -7.0253209152947963e-16], + [-1.5362727272727316e-03, 2.4147603124951213e-11, 8.7685723967871137e-16, -1.6754559359626766e-19], + [-1.5361111111111105e-03, -8.5789301603548462e-12, -9.5088063452432147e-16, 9.1988476169137501e-20], + [-1.5361999999999973e-03, -1.0002639397310594e-22, 4.8194535279175531e-26, -3.8191895881864935e-30], + [-1.5361999999999973e-03, -2.8189256484554352e-22, 2.3889200396943746e-28, -2.3889200403820859e-32], + [-1.5362000000000002e-03, -2.8428148488730084e-22, -3.8590246817282017e-27, 1.9295123408641667e-31], + [-1.5362000000000032e-03, -3.0357660829593997e-22, 1.4958287520699182e-25, 7.8099581014963960e-30], + [-1.5361999999999835e-03, 5.0310683262928160e-21, 9.7310966662702481e-12, -5.7212490927918054e-16], + [-1.1352152426520887e-03, 2.2984460541655878e-08, -1.0557396818103798e-12, -2.1855394583432683e-17], + [-1.0328000000000006e-03, -4.6869514695815243e-09, 0.0000000000000000e+00, 0.0000000000000000e+00]]) + class USatm1976Comp(om.ExplicitComponent): """ @@ -1261,12 +1458,15 @@ def initialize(self): self.options.declare('h_def', values=('geopotential', 'geodetic'), default='geopotential', desc='The definition of altitude provided as input to the component. If "geodetic",' 'it will be converted to geopotential based on Equation 19 in the original standard.') + self.options.declare('output_dsos_dh', types=bool, default=False, + desc='If true, the derivative of the speed of sound will be added as an output') def setup(self): """ Add component inputs and outputs. """ nn = self.options['num_nodes'] + output_dsos_dh = self.options['output_dsos_dh'] self._geodetic = self.options['h_def'] == 'geodetic' self._R0 = 6_356_766 / 0.3048 # Value of R0 from the original standard (m -> ft) @@ -1279,10 +1479,14 @@ def setup(self): self.add_output('viscosity', val=1. * np.ones(nn), units='lbf*s/ft**2') self.add_output('drhos_dh', val=1. * np.ones(nn), units='slug/ft**4') self.add_output('sos', val=1 * np.ones(nn), units='ft/s') + if output_dsos_dh: + self.add_output('dsos_dh', val=1 * np.ones(nn), units='1/s') arange = np.arange(nn, dtype=int) self.declare_partials(['temp', 'pres', 'rho', 'viscosity', 'drhos_dh', 'sos'], 'h', rows=arange, cols=arange) + if output_dsos_dh: + self.declare_partials('dsos_dh', 'h', rows=arange, cols=arange) def compute(self, inputs, outputs): """ @@ -1297,6 +1501,7 @@ def compute(self, inputs, outputs): """ table_points = USatm1976Data.alt h = inputs['h'] + output_dsos_dh = self.options['output_dsos_dh'] if self._geodetic: h = h / (self._R0 + h) * self._R0 # Equation 19 from the original standard. @@ -1308,7 +1513,8 @@ def compute(self, inputs, outputs): dx = h - h_bin_left[idx] coeffs = USatm1976Data.akima_T[idx] - outputs['temp'] = coeffs[:, 0] + dx * (coeffs[:, 1] + dx * (coeffs[:, 2] + dx * coeffs[:, 3])) + T = coeffs[:, 0] + dx * (coeffs[:, 1] + dx * (coeffs[:, 2] + dx * coeffs[:, 3])) + outputs['temp'] = T coeffs = USatm1976Data.akima_P[idx] outputs['pres'] = coeffs[:, 0] + dx * (coeffs[:, 1] + dx * (coeffs[:, 2] + dx * coeffs[:, 3])) @@ -1321,6 +1527,10 @@ def compute(self, inputs, outputs): outputs['viscosity'] = coeffs[:, 0] + dx * (coeffs[:, 1] + dx * (coeffs[:, 2] + dx * coeffs[:, 3])) outputs['sos'] = np.sqrt(self._K * outputs['temp']) + if output_dsos_dh: + coeffs = USatm1976Data.akima_dT[idx] + dT_dh = (coeffs[:, 0] + dx * (coeffs[:, 1] + dx * (coeffs[:, 2] + dx * coeffs[:, 3]))).ravel() + outputs['dsos_dh'] = (0.5 / np.sqrt(self._K * T) * dT_dh * self._K) def compute_partials(self, inputs, partials): """ @@ -1336,12 +1546,13 @@ def compute_partials(self, inputs, partials): table_points = USatm1976Data.alt h = inputs['h'] dz_dh = 1.0 + output_dsos_dh = self.options['output_dsos_dh'] if self._geodetic: dz_dh = (self._R0 / (self._R0 + h)) ** 2 h = h / (self._R0 + h) * self._R0 # Equation 19 from the original standard. - # From this point forawrd, h is geopotential altitude (z in the original reference). + # From this point forward, h is geopotential altitude (z in the original reference). idx = np.searchsorted(table_points, h, side='left') h_index = np.hstack((table_points[0], table_points)) @@ -1369,6 +1580,11 @@ def compute_partials(self, inputs, partials): partials['viscosity', 'h'][...] = dvisc_dh.ravel() partials['drhos_dh', 'h'][...] = d2rho_dh2.ravel() partials['sos', 'h'][...] = (0.5 / np.sqrt(self._K * T) * partials['temp', 'h'] * self._K) + if output_dsos_dh: + coeffs = USatm1976Data.akima_dT[idx] + _dT_dh = (coeffs[:, 0] + dx * (coeffs[:, 1] + dx * (coeffs[:, 2] + dx * coeffs[:, 3]))).ravel() + d2T_dh2 = (coeffs[:, 1] + dx * (2.0 * coeffs[:, 2] + 3.0 * coeffs[:, 3] * dx)).ravel() + partials['dsos_dh', 'h'] = 0.5 * np.sqrt(self._K / T) * (d2T_dh2 - 0.5 * dT_dh**2 / T) if self._geodetic: partials['sos', 'h'][...] *= dz_dh @@ -1377,6 +1593,8 @@ def compute_partials(self, inputs, partials): partials['rho', 'h'][...] *= dz_dh partials['pres', 'h'][...] *= dz_dh partials['drhos_dh', 'h'][...] *= dz_dh ** 2 + if output_dsos_dh: + partials['dsos_dh', 'h'] *= dz_dh ** 2 def _build_akima_coefs(out_stream=sys.stdout): @@ -1398,11 +1616,15 @@ def _build_akima_coefs(out_stream=sys.stdout): T_interp = InterpND(method='1D-akima', points=USatm1976Data.alt, values=USatm1976Data.T, extrapolate=True) P_interp = InterpND(method='1D-akima', points=USatm1976Data.alt, values=USatm1976Data.P, extrapolate=True) rho_interp = InterpND(method='1D-akima', points=USatm1976Data.alt, values=USatm1976Data.rho, extrapolate=True) - visc_interp = InterpND(method='1D-akima', points=USatm1976Data.alt, values=USatm1976Data.viscosity, extrapolate=True) + visc_interp = InterpND(method='1D-akima', points=USatm1976Data.alt, values=USatm1976Data.viscosity, + extrapolate=True) _, _drho_dh = rho_interp.interpolate(USatm1976Data.alt, compute_derivative=True) drho_interp = InterpND(method='1D-akima', points=USatm1976Data.alt, values=_drho_dh.ravel(), extrapolate=True) + _, _dT_dh = T_interp.interpolate(USatm1976Data.alt, compute_derivative=True) + dT_interp = InterpND(method='1D-akima', points=USatm1976Data.alt, values=_dT_dh.ravel(), extrapolate=True) + # Find midpoints of all bins plus an extrapolation point on each end. min_alt = np.min(USatm1976Data.alt) max_alt = np.max(USatm1976Data.alt) @@ -1417,12 +1639,13 @@ def _build_akima_coefs(out_stream=sys.stdout): coeffs_rho = np.empty((n, 4)) coeffs_visc = np.empty((n, 4)) coeffs_drho = np.empty((n, 4)) + coeffs_dT = np.empty((n, 4)) - interps = [T_interp, P_interp, rho_interp, visc_interp, drho_interp] - coeff_arrays = [coeffs_T, coeffs_P, coeffs_rho, coeffs_visc, coeffs_drho] + interps = [T_interp, P_interp, rho_interp, visc_interp, drho_interp, dT_interp] + coeff_arrays = [coeffs_T, coeffs_P, coeffs_rho, coeffs_visc, coeffs_drho, coeffs_dT] np.set_printoptions(precision=18) - vars = ['T', 'P', 'rho', 'viscosity', 'drho'] + vars = ['T', 'P', 'rho', 'viscosity', 'drho', 'dT'] with np.printoptions(linewidth=1024): for var, interp, coeff_array in zip(vars, interps, coeff_arrays): _ = interp.interpolate(hbin, compute_derivative=False) diff --git a/dymos/models/atmosphere/test/test_atmos.py b/dymos/models/atmosphere/test/test_atmos.py index bcff53e80..1be77eee1 100644 --- a/dymos/models/atmosphere/test/test_atmos.py +++ b/dymos/models/atmosphere/test/test_atmos.py @@ -5,6 +5,7 @@ from openmdao.utils.assert_utils import assert_near_equal, assert_check_partials from dymos.models.atmosphere.atmos_1976 import USatm1976Comp, USatm1976Data, _build_akima_coefs +from scipy.interpolate import Akima1DInterpolator class TestAtmosphere(unittest.TestCase): @@ -17,7 +18,7 @@ def test_atmos_comp_geopotential(self): ivc = p.model.add_subsystem('ivc', subsys=om.IndepVarComp(), promotes_outputs=['*']) ivc.add_output(name='alt', val=USatm1976Data.alt, units='ft') - p.model.add_subsystem('atmos', subsys=USatm1976Comp(num_nodes=n)) + p.model.add_subsystem('atmos', subsys=USatm1976Comp(num_nodes=n, output_dsos_dh=True)) p.model.connect('alt', 'atmos.h') p.setup(force_alloc_complex=True) @@ -28,11 +29,22 @@ def test_atmos_comp_geopotential(self): rho = p.get_val('atmos.rho', units='slug/ft**3') sos = p.get_val('atmos.sos', units='ft/s') + drho_dh = p.get_val('atmos.drhos_dh', units='slug/ft**4') + dsos_dh = p.get_val('atmos.dsos_dh', units='1/s') + + rho_interp = Akima1DInterpolator(USatm1976Data.alt, rho) + drho_interp = rho_interp.derivative()(USatm1976Data.alt) + sos_interp = Akima1DInterpolator(USatm1976Data.alt, sos) + dsos_interp = sos_interp.derivative()(USatm1976Data.alt) + assert_near_equal(T, USatm1976Data.T, tolerance=1.0E-4) assert_near_equal(P, USatm1976Data.P, tolerance=1.0E-4) assert_near_equal(rho, USatm1976Data.rho, tolerance=1.0E-4) assert_near_equal(sos, USatm1976Data.a, tolerance=1.0E-4) + assert_near_equal(drho_interp, drho_dh, tolerance=1.0E-4) + assert_near_equal(dsos_interp, dsos_dh, tolerance=1.0E-2) + cpd = p.check_partials(method='cs', out_stream=None) assert_check_partials(cpd) @@ -44,7 +56,7 @@ def test_atmos_comp_geodetic(self): ivc = p.model.add_subsystem('ivc', subsys=om.IndepVarComp(), promotes_outputs=['*']) ivc.add_output(name='alt', val=USatm1976Data.alt, units='ft') - p.model.add_subsystem('atmos', subsys=USatm1976Comp(num_nodes=n, h_def='geodetic')) + p.model.add_subsystem('atmos', subsys=USatm1976Comp(num_nodes=n, h_def='geodetic', output_dsos_dh=True)) p.model.connect('alt', 'atmos.h') p.setup(force_alloc_complex=True) @@ -60,11 +72,22 @@ def test_atmos_comp_geodetic(self): rho = p.get_val('atmos.rho', units='slug/ft**3') sos = p.get_val('atmos.sos', units='ft/s') + drho_dh = p.get_val('atmos.drhos_dh', units='slug/ft**4') + dsos_dh = p.get_val('atmos.dsos_dh', units='1/s') + + rho_interp = Akima1DInterpolator(USatm1976Data.alt, rho) + drho_interp = rho_interp.derivative()(USatm1976Data.alt) + sos_interp = Akima1DInterpolator(USatm1976Data.alt, sos) + dsos_interp = sos_interp.derivative()(USatm1976Data.alt) + assert_near_equal(T, USatm1976Data.T, tolerance=1.0E-4) assert_near_equal(P, USatm1976Data.P, tolerance=1.0E-4) assert_near_equal(rho, USatm1976Data.rho, tolerance=1.0E-4) assert_near_equal(sos, USatm1976Data.a, tolerance=1.0E-4) + assert_near_equal(drho_interp, drho_dh, tolerance=1.0E-4) + assert_near_equal(dsos_interp, dsos_dh, tolerance=1.0E-2) + with np.printoptions(linewidth=100000): cpd = p.check_partials(method='cs') assert_check_partials(cpd)