add ascent rate

master
sp9unb 2022-10-15 14:07:09 +02:00
rodzic 79cf1380e1
commit 6c36b58904
2 zmienionych plików z 66 dodań i 15 usunięć

Wyświetl plik

@ -30,7 +30,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 36,
"id": "6ea87a15-f571-4611-8487-5b7556e2ef45",
"metadata": {
"extensions": {
@ -63,12 +63,15 @@
"from termcolor import colored\n",
"\n",
"#from scipy.interpolate import interp1d\n",
"#import numpy as np"
"#import numpy as np\n",
"\n",
"#math\n",
"from math import sin, tan, sqrt"
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 37,
"id": "d075a994-76bb-46f7-bdfb-cc6ef449dc43",
"metadata": {
"extensions": {
@ -107,7 +110,28 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 40,
"id": "0e94979b-5973-4607-9d5f-e7b597a8374f",
"metadata": {},
"outputs": [],
"source": [
"# Ascent rate at ground level\n",
"# https://northstar-www.dartmouth.edu/~klynch/pmwiki-gc/uploads/BalloonCalulations.pdf\n",
"\n",
"# Coefficient of Drag assumed to 0.3 (flat top)\n",
"Cd = 0.3\n",
"g = 9.81 # [m/s2]\n",
"\n",
"def ascentRate(volume=1.0, airDens=1.0, liftForce=1.0, topArea=1.0): \n",
" val = ( 2 * liftForce * g ) / ( Cd * airDens * topArea )\n",
" if val < 0.0:\n",
" val = 0.0\n",
" return sqrt( val )\n"
]
},
{
"cell_type": "code",
"execution_count": 41,
"id": "2f3b63fd-d5ea-40b6-a2f9-b31c84cfef36",
"metadata": {
"extensions": {
@ -129,7 +153,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "d8b847f39e5f4582b7392e58279f0843",
"model_id": "7cd59b71891c4d47b1ab8c9e559e5cfd",
"version_major": 2,
"version_minor": 0
},
@ -137,7 +161,7 @@
"VBox(children=(FloatSlider(value=2.0, description='Width [m]:', layout=Layout(width='500px'), max=5.0, min=0.1…"
]
},
"execution_count": 25,
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
@ -180,8 +204,11 @@
" color = 'red'\n",
" else:\n",
" color = None\n",
" print( colored(\"{:<20}{:>6.1f} [g]\".format(\"Free lift force:\",freeLiftForce),color)) \n",
"\n",
" print( colored(\"{:<20}{:>6.1f} [g]\".format(\"Free lift force:\",freeLiftForce),color)) \n",
" # Ascent rate \n",
" topArea = width * depth\n",
" ascRate = ascentRate(volume, airDens/1000.0, freeLiftForce/1000.0, topArea)\n",
" print( \"{:<20}{:>6.1f} [m/s]\".format(\"Ascent rate:\",ascRate)) \n",
"\n",
" geometry=BoxBufferGeometry(\n",
" width=width, \n",

Wyświetl plik

@ -30,7 +30,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 19,
"id": "6ea87a15-f571-4611-8487-5b7556e2ef45",
"metadata": {
"extensions": {
@ -71,7 +71,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 20,
"id": "d075a994-76bb-46f7-bdfb-cc6ef449dc43",
"metadata": {
"extensions": {
@ -110,7 +110,28 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 21,
"id": "612a3232-e9cb-4405-86dd-bd60ac09cd2f",
"metadata": {},
"outputs": [],
"source": [
"# Ascent rate at ground level\n",
"# https://northstar-www.dartmouth.edu/~klynch/pmwiki-gc/uploads/BalloonCalulations.pdf\n",
"\n",
"# Coefficient of Drag assumed to 0.285 (spherical top) \n",
"Cd = 0.285\n",
"g = 9.81 # [m/s2]\n",
"\n",
"def ascentRate(volume=1.0, airDens=1.0, liftForce=1.0, topArea=1.0): \n",
" val = ( 2 * liftForce * g ) / ( Cd * airDens * topArea )\n",
" if val < 0.0:\n",
" val = 0.0\n",
" return sqrt( val )\n"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "229c0a36-bf1f-4c07-884c-f3522d5eaae5",
"metadata": {},
"outputs": [],
@ -143,7 +164,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 23,
"id": "2f3b63fd-d5ea-40b6-a2f9-b31c84cfef36",
"metadata": {
"extensions": {
@ -179,7 +200,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0fb51f22550140339b0a47adcd7d8f9f",
"model_id": "3db54b9e2ef24677a45a78c94e21ed79",
"version_major": 2,
"version_minor": 0
},
@ -187,7 +208,7 @@
"VBox(children=(IntSlider(value=3, description='Segment num:', layout=Layout(width='500px'), max=12, min=3, sty…"
]
},
"execution_count": 7,
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
@ -230,7 +251,10 @@
" else:\n",
" color = None\n",
" print( colored(\"{:<20}{:>6.1f} [g]\".format(\"Free lift force:\",freeLiftForce),color)) \n",
"\n",
" # Ascent rate \n",
" topArea = base_area(width,num)\n",
" ascRate = ascentRate(volume, airDens/1000.0, freeLiftForce/1000.0, topArea)\n",
" print( \"{:<20}{:>6.1f} [m/s]\".format(\"Ascent rate:\",ascRate)) \n",
" \n",
"# coating geometry \n",
" bottomGeometry = CylinderBufferGeometry(\n",