consolidated the getter methods of the classes

This commit is contained in:
Georg ´Brantegger
2022-07-01 11:28:21 +02:00
parent b948ab39cb
commit 28d38e8bb4
3 changed files with 108 additions and 86 deletions

View File

@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
@@ -21,7 +21,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
@@ -105,7 +105,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
@@ -133,7 +133,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
@@ -171,15 +171,15 @@
"for it in range(1,pipe.nt):\n",
" pipe.set_boundary_conditions_next_timestep(v_1[it],p_1[it],v_np1[it])\n",
" pipe.timestep_characteristic_method()\n",
" lo_00.set_ydata(pipe.p_new)\n",
" lo_01.set_ydata(pipe.v_new)\n",
" lo_00.set_ydata(pipe.p)\n",
" lo_01.set_ydata(pipe.v)\n",
"\n",
" # store parameters of node 1 (at reservoir)\n",
" pipe.p_1[it] = pipe.p_new[0]\n",
" pipe.v_1[it] = pipe.v_new[0]\n",
" pipe.p_1[it] = pipe.p[0]\n",
" pipe.v_1[it] = pipe.v[0]\n",
" # store parameters of node N+1 (at reservoir)\n",
" pipe.p_np1[it] = pipe.p_new[-1]\n",
" pipe.v_np1[it] = pipe.v_new[-1]\n",
" pipe.p_np1[it] = pipe.p[-1]\n",
" pipe.v_np1[it] = pipe.v[-1]\n",
" \n",
" fig2.suptitle(str(it))\n",
" fig2.canvas.draw()\n",
@@ -189,7 +189,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [