{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "a3782a8a-8d5c-406e-af6c-f16514abe072", "metadata": { "tags": [] }, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import numpy as np\n", "%config InlineBackend.figure_format = 'retina'\n", "import math" ] }, { "cell_type": "code", "execution_count": 2, "id": "8d76ea48-8d4e-4140-80b9-91a9e47c1774", "metadata": { "tags": [] }, "outputs": [], "source": [ "V_kmh = 420\n", "W = 620000\n", "S = 270\n", "mac = 6.5\n", "a = 1\n", "l = 25\n", "cm0 = -0.01\n", "n = 2.5\n", "rho = 1.21\n", "\n", "V = V_kmh/3.6" ] }, { "cell_type": "code", "execution_count": 3, "id": "5fbae697-01fc-47cb-bd2a-e459c2c3b6ed", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "L: 1495943.0528846153\n", "P: 54056.94711538474\n" ] } ], "source": [ "L_tot=2.5*W\n", "M_0 = 0.5 * rho * V * V * S * cm0 * mac\n", "L = (L_tot - (1/l)*M_0)/(1+ a/l)\n", "P = L_tot - L\n", "print(f\"L: {L}\\nP: {P}\")" ] }, { "cell_type": "code", "execution_count": 18, "id": "a02434c6-693b-4eb9-969a-8f59af071487", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "2310349.9999999995" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "0.5 * rho * V * V * S * mac" ] }, { "cell_type": "code", "execution_count": 4, "id": "02116b46-a8f4-4405-9575-bdb7d8f0a8e7", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "maneouvre speed: 74.71053028639291m s^-1\n" ] } ], "source": [ "C_lmax = 1.7\n", "V_man = np.sqrt(5*W / (rho * S * C_lmax))\n", "print(f\"maneouvre speed: {V_man}m s^-1\")" ] }, { "cell_type": "code", "execution_count": 5, "id": "54c53182-466f-424e-a9ff-915d23a9a8e4", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "tail area: 67.50000000000001\n" ] } ], "source": [ "C_lm = 1.4\n", "C_lmt = 1.2\n", "\n", "S_T = S*((C_lmax - C_lm)/C_lmt)\n", "print(f\"tail area: {S_T}\")" ] }, { "cell_type": "code", "execution_count": 6, "id": "662b7a1b-eb5f-4d87-8cde-e19e4f03600a", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "gust load factor: 0.36935483870967745\n" ] } ], "source": [ "L_g = 194e3\n", "P_g = 35e3\n", "n_g = (L_g + P_g)/W\n", "print(f\"gust load factor: {n_g}\")" ] }, { "cell_type": "code", "execution_count": 7, "id": "10b67409-2678-4ce8-b15b-1ee43d5973c7", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "1.6224425403225808" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "U_g = 7.5\n", "dcl_dalpha = 1.2\n", "dcl_dalpha_t = 6\n", "\n", "1+(0.5*rho*(S*dcl_dalpha + S_T*dcl_dalpha_t)* V * U_g / W)" ] }, { "cell_type": "markdown", "id": "196226d5-01f3-4b3f-8d6a-9d86a4a3e6c5", "metadata": {}, "source": [ "# above is wrong" ] }, { "cell_type": "code", "execution_count": 13, "id": "600f2b1f-924d-4267-9a49-93d658ee003f", "metadata": { "tags": [] }, "outputs": [], "source": [ "M = 27000\n", "M_w = 2800\n", "b = 14\n", "S = 92\n", "mac = 3\n", "a = 1\n", "l = 15\n", "cmo = -0.01\n", "rho = 1.23\n", "g = 9.81\n", "\n", "V_eas = 432/3.6\n", "n=2.5" ] }, { "cell_type": "code", "execution_count": 14, "id": "4510430d-372f-4eea-b237-a54842a2845d", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "pitching moment: -24442.56\n" ] } ], "source": [ "M_0 = 0.5 * rho * V_eas * V_eas * S * mac * cmo\n", "print(f\"pitching moment: {M_0}\")" ] }, { "cell_type": "code", "execution_count": 15, "id": "210a2695-8e9f-4dcf-bfaa-6b42ca1b3549", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "lift from the main wing: 622316.7224999999N\n" ] } ], "source": [ "L = (M*g*n - (M_0/l))/(1+ (a/l))\n", "print(f\"lift from the main wing: {L}N\")" ] }, { "cell_type": "code", "execution_count": 16, "id": "b66941de-96da-4bfc-8df1-2b9837333ffa", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "10977666.984899998" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(3/25) * L * (np.power(b, 2) - np.power(b, 4)/(4*np.power(b, 2)))" ] }, { "cell_type": "code", "execution_count": 20, "id": "c0086453-a576-44c3-a81f-71c80e4cf6f8", "metadata": {}, "outputs": [], "source": [ "R = 1e3\n", "v = 100\n", "alpha = np.radians(60)" ] }, { "cell_type": "code", "execution_count": 21, "id": "5474fcbe-7715-4f78-bd8a-ed27df3d4b3c", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "1.5193679918450562" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.cos(alpha) + ((100)**2)/(g*R)" ] }, { "cell_type": "code", "execution_count": 26, "id": "eef01100-653b-487a-bd65-a9b2655ef2ba", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "-180.0" ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "1500-((6*700)/(2.5))" ] }, { "cell_type": "code", "execution_count": 27, "id": "3e7c8f5a-2113-43f8-8412-9438ae9aa8fc", "metadata": { "tags": [] }, "outputs": [], "source": [ "def L(x):\n", " if 0 2\u001b[0m np\u001b[38;5;241m.\u001b[39mtrapz(L(x), x)\n", "Cell \u001b[0;32mIn[27], line 2\u001b[0m, in \u001b[0;36mL\u001b[0;34m(x)\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mL\u001b[39m(x):\n\u001b[0;32m----> 2\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;241m0\u001b[39m\u001b[38;5;241m<\u001b[39mx \u001b[38;5;129;01mand\u001b[39;00m x\u001b[38;5;241m<\u001b[39m\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m1\u001b[39m:\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m x\u001b[38;5;241m*\u001b[39m\u001b[38;5;241m800\u001b[39m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;241m1\u001b[39m\u001b[38;5;241m<\u001b[39mx \u001b[38;5;129;01mand\u001b[39;00m x\u001b[38;5;241m<\u001b[39m\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m3.5\u001b[39m:\n", "\u001b[0;31mValueError\u001b[0m: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()" ] } ], "source": [ "x=np.linspace(0, 6, 1000)\n", "np.trapz(L(x), x)" ] }, { "cell_type": "code", "execution_count": 31, "id": "e17d1d3f-ce63-40ab-b3ff-e0d5273de7f6", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "1.8344970703125" ] }, "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(1.21*75*75*100*1.725)/(2*320e3)" ] }, { "cell_type": "code", "execution_count": 32, "id": "7bb662cc-a0c7-4c04-b20c-59eb93200b7b", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "87.55334769874123" ] }, "execution_count": 32, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.sqrt((2*2.5*320e3)/(1.21*100*1.725))" ] }, { "cell_type": "code", "execution_count": 37, "id": "ce4ef337-abec-4b92-bb3b-893bc95d3575", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "19397.8125" ] }, "execution_count": 37, "metadata": {}, "output_type": "execute_result" } ], "source": [ "0.5 * 1.21 * 75 * 75 * 100 * 5.7 * 0.01" ] }, { "cell_type": "code", "execution_count": 35, "id": "cefa4c61-7df9-422b-80ab-43e8e758c00c", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "0.09966865249116204" ] }, "execution_count": 35, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.arctan(7.5/75)" ] }, { "cell_type": "code", "execution_count": 40, "id": "ff38c028-a192-489c-886a-c6c049109342", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "2.423306219771115" ] }, "execution_count": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ "1+(np.radians(8)*100)/9.81" ] }, { "cell_type": "code", "execution_count": null, "id": "1a527e51-0a45-4bf0-af8a-695282028a42", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.5" } }, "nbformat": 4, "nbformat_minor": 5 }