add payload weight

master
sp9unb 2022-10-13 15:55:08 +02:00
rodzic de3bfc1124
commit d07902ba1f
1 zmienionych plików z 11 dodań i 9 usunięć

Wyświetl plik

@ -30,7 +30,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 2,
"id": "6ea87a15-f571-4611-8487-5b7556e2ef45",
"metadata": {
"extensions": {
@ -68,7 +68,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 3,
"id": "d075a994-76bb-46f7-bdfb-cc6ef449dc43",
"metadata": {
"extensions": {
@ -107,7 +107,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 4,
"id": "2f3b63fd-d5ea-40b6-a2f9-b31c84cfef36",
"metadata": {
"extensions": {
@ -129,7 +129,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0d9bb17572474431815f73b28108bdd4",
"model_id": "8b66cd42e9b34ccfb444e407d016d44a",
"version_major": 2,
"version_minor": 0
},
@ -137,13 +137,13 @@
"VBox(children=(FloatSlider(value=2.0, description='Width [m]:', layout=Layout(width='500px'), max=5.0, min=0.1…"
]
},
"execution_count": 7,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"def f(width,height,depth,airTemp,hotAirTemp,coatDens,tapeDens):\n",
"def f(width,height,depth,airTemp,hotAirTemp,coatDens,tapeDens,payloadWeight):\n",
" \n",
" \n",
" out=widgets.Output(layout={'margin': '10px 10px 10px 20px'}) \n",
@ -173,7 +173,7 @@
" totalLiftForce = lift * volume\n",
" print( \"Total lift force: {:.2f} [g]\".format(totalLiftForce)) \n",
" # Free lift force totalLiftForce - coatingWeight \n",
" freeLiftForce = totalLiftForce - coatingWeight - tapeWeight\n",
" freeLiftForce = totalLiftForce - coatingWeight - tapeWeight - payloadWeight\n",
" if freeLiftForce < 0:\n",
" color = 'red'\n",
" else:\n",
@ -249,6 +249,7 @@
"hotAirTemp=widgets.FloatSlider(min=-40, max=55, step=1.0, value=35.0, description='Hot air temp.[°C]:',readout_format='.0f',layout=layout,style=style)\n",
"coatDens=widgets.FloatSlider(min=1, max=50, step=1.0, value=15.0, description='Coating density [g/m2]:',readout_format='.0f',layout=layout,style=style) \n",
"tapeDens=widgets.FloatSlider(min=1, max=20, step=1.0, value=2.0, description='Adh. tape density [g/m]:',readout_format='.0f',layout=layout,style=style) \n",
"payloadWeight=widgets.FloatSlider(min=0.0, max=1000.0, step=1, value=0.0, description='Payload weight [g]:',readout_format='.0f',layout=layout,style=style)\n",
"\n",
"\n",
"w = widgets.interactive_output(f, {\n",
@ -258,12 +259,13 @@
" 'airTemp' : airTemp,\n",
" 'hotAirTemp' : hotAirTemp,\n",
" 'coatDens' : coatDens,\n",
" 'tapeDens' : tapeDens\n",
" 'tapeDens' : tapeDens,\n",
" 'payloadWeight' : payloadWeight\n",
" }\n",
" )\n",
"\n",
"\n",
"widgets.VBox([width, height, depth, airTemp, hotAirTemp, coatDens, tapeDens, w])\n"
"widgets.VBox([width, height, depth, airTemp, hotAirTemp, coatDens, tapeDens, payloadWeight, w])\n"
]
},
{