small changes

This commit is contained in:
Brantegger Georg
2023-02-09 13:11:02 +01:00
parent 1218939752
commit df0fb4f0ed
7 changed files with 48 additions and 32 deletions

View File

@@ -189,7 +189,7 @@
{ {
"data": { "data": {
"application/vnd.jupyter.widget-view+json": { "application/vnd.jupyter.widget-view+json": {
"model_id": "3987c69b8123480db34b021e1a5393a0", "model_id": "edc00116bee443f0975cd1fb20cf8179",
"version_major": 2, "version_major": 2,
"version_minor": 0 "version_minor": 0
}, },

View File

@@ -209,7 +209,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 7,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [

View File

@@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": 1,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -22,7 +22,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10, "execution_count": 2,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -77,7 +77,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11, "execution_count": 3,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@@ -94,7 +94,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12, "execution_count": 4,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -111,7 +111,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 13, "execution_count": 5,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -156,7 +156,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14, "execution_count": 6,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -195,7 +195,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 15, "execution_count": 7,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -264,7 +264,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 16, "execution_count": 8,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -300,7 +300,7 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3.8.13 ('DT_Slot_3')", "display_name": "Python 3.8.13 ('Georg_DT_Slot3')",
"language": "python", "language": "python",
"name": "python3" "name": "python3"
}, },
@@ -319,7 +319,7 @@
"orig_nbformat": 4, "orig_nbformat": 4,
"vscode": { "vscode": {
"interpreter": { "interpreter": {
"hash": "4a28055eb8a3160fa4c7e4fca69770c4e0a1add985300856aa3fcf4ce32a2c48" "hash": "84fb123bdc47ab647d3782661abcbe80fbb79236dd2f8adf4cef30e8755eb2cd"
} }
} }
}, },

View File

@@ -1,5 +1,15 @@
{ {
"cells": [ "cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"to dos:\n",
"Francis Turbine in Turbine umbennenen\n",
"Fall für andere Anzahl an Turbinen in Dokumentation aufnehmen\n",
"DevBranch wegwerfen"
]
},
{ {
"attachments": {}, "attachments": {},
"cell_type": "markdown", "cell_type": "markdown",

View File

@@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -24,7 +24,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -95,7 +95,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -117,7 +117,7 @@
"KW_OL.add_turbine(OL_T1)\n", "KW_OL.add_turbine(OL_T1)\n",
"KW_OL.add_turbine(OL_T2)\n", "KW_OL.add_turbine(OL_T2)\n",
"\n", "\n",
"KW_OL.set_steady_state(flux_init,OL_T1_p_nenn)\n", "KW_OL.set_steady_state_by_flux(flux_init,OL_T1_p_nenn)\n",
"\n", "\n",
"# downstream turbines\n", "# downstream turbines\n",
"UL_T1 = Francis_Turbine(UL_T1_Q_nenn,UL_T1_p_nenn,UL_T1_closingTime,Pip_dt,pUnit_conv)\n", "UL_T1 = Francis_Turbine(UL_T1_Q_nenn,UL_T1_p_nenn,UL_T1_closingTime,Pip_dt,pUnit_conv)\n",
@@ -127,7 +127,7 @@
"KW_UL.add_turbine(UL_T1)\n", "KW_UL.add_turbine(UL_T1)\n",
"KW_UL.add_turbine(UL_T2)\n", "KW_UL.add_turbine(UL_T2)\n",
"\n", "\n",
"KW_UL.set_steady_state(flux_init,pipe.get_current_pressure_distribution()[-1])\n", "KW_UL.set_steady_state_by_flux(flux_init,pipe.get_current_pressure_distribution()[-1])\n",
"\n", "\n",
"# level controller\n", "# level controller\n",
"level_control = PI_controller_class(Con_targetLevel,Con_deadbandRange,Con_K_p,Con_T_i,Pip_dt)\n", "level_control = PI_controller_class(Con_targetLevel,Con_deadbandRange,Con_K_p,Con_T_i,Pip_dt)\n",
@@ -136,7 +136,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -208,7 +208,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -241,11 +241,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"convergence_parameters = [p_old[-2],v_old[-2],Pip_dia,Pip_area,Pip_angle,Pip_f_D,Pip_pw_vel,rho,Pip_dt]\n", "convergence_parameters = [p_old[-2],v_old[-2],Pip_dia,Pip_area,Pip_angle,Pip_f_D,Pip_pw_vel,rho,Pip_dt,p_old[-1]]\n",
"\n", "\n",
"# loop through Con_T_ime steps of the pipeline\n", "# loop through Con_T_ime steps of the pipeline\n",
"for it_pipe in range(1,nt+1):\n", "for it_pipe in range(1,nt+1):\n",
@@ -323,7 +323,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -389,7 +389,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [

View File

@@ -90,7 +90,7 @@ class Francis_Turbine:
self.set_pressure(ss_pressure) self.set_pressure(ss_pressure)
self.get_current_Q() self.get_current_Q()
#getter - get attributes # getter - get attributes
def get_current_Q(self): def get_current_Q(self):
# return the flux through the turbine, based on the current pressure in front # return the flux through the turbine, based on the current pressure in front
# of the turbine and the Leitapparatöffnung # of the turbine and the Leitapparatöffnung

View File

@@ -81,7 +81,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": 6,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -97,11 +97,11 @@
"\n", "\n",
"# downstream turbine\n", "# downstream turbine\n",
"turbine = Francis_Turbine(Tur_Q_nenn,Tur_p_nenn,Tur_closingTime,Pip_dt,pUnit_conv)\n", "turbine = Francis_Turbine(Tur_Q_nenn,Tur_p_nenn,Tur_closingTime,Pip_dt,pUnit_conv)\n",
"turbine.set_steady_state(flux_init,pipe.get_current_pressure_distribution()[-1])\n", "turbine.set_steady_state_by_flux(flux_init,pipe.get_current_pressure_distribution()[-1])\n",
"\n", "\n",
"# influx setting turbine\n", "# influx setting turbine\n",
"turbine_in = Francis_Turbine(Tur_Q_nenn,Tur_p_nenn,Tur_closingTime/2,Pip_dt,pUnit_conv)\n", "turbine_in = Francis_Turbine(Tur_Q_nenn,Tur_p_nenn,Tur_closingTime/2,Pip_dt,pUnit_conv)\n",
"turbine_in.set_steady_state(flux_init,Tur_p_nenn)\n", "turbine_in.set_steady_state_by_flux(flux_init,Tur_p_nenn)\n",
"\n", "\n",
"# level controll\n", "# level controll\n",
"level_control = PI_controller_class(Con_targetLevel,Con_deadbandRange,Con_K_p,Con_T_i,Pip_dt)\n", "level_control = PI_controller_class(Con_targetLevel,Con_deadbandRange,Con_K_p,Con_T_i,Pip_dt)\n",
@@ -110,7 +110,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": 7,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -155,7 +155,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": 8,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -188,7 +188,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -232,7 +232,6 @@
"\n", "\n",
" # the the boundary condition in the pipe.object and thereby calculate boundary pressure at turbine\n", " # the the boundary condition in the pipe.object and thereby calculate boundary pressure at turbine\n",
" pipe.set_boundary_conditions_next_timestep(p_boundary_res[it_pipe],v_boundary_tur[it_pipe])\n", " pipe.set_boundary_conditions_next_timestep(p_boundary_res[it_pipe],v_boundary_tur[it_pipe])\n",
" # pipe.v[0] = (0.8*pipe.v[0]+0.2*reservoir.get_current_outflux()/Res_area_out) # unnecessary\n",
" p_boundary_tur[it_pipe] = pipe.get_current_pressure_distribution()[-1]\n", " p_boundary_tur[it_pipe] = pipe.get_current_pressure_distribution()[-1]\n",
" v_boundary_res[it_pipe] = pipe.get_current_velocity_distribution()[0]\n", " v_boundary_res[it_pipe] = pipe.get_current_velocity_distribution()[0]\n",
" Q_boundary_res[it_pipe] = pipe.get_current_flux_distribution()[0]\n", " Q_boundary_res[it_pipe] = pipe.get_current_flux_distribution()[0]\n",
@@ -270,7 +269,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": 10,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -329,6 +328,13 @@
"fig2.tight_layout()\n", "fig2.tight_layout()\n",
"plt.show()" "plt.show()"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {