first attempt at involving a Pegelregler in the system
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 38,
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -21,15 +21,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 39,
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# define constants\n",
|
||||
"initial_level = 5. # m\n",
|
||||
"initial_influx = 0. # m³/s\n",
|
||||
"initial_outflux = 0. # m³/s\n",
|
||||
"initial_pipeline_pressure = 5.\n",
|
||||
"initial_level = 10. # m\n",
|
||||
"initial_influx = 5. # m³/s\n",
|
||||
"initial_outflux = 1. # m³/s\n",
|
||||
"initial_pipeline_pressure = 10.\n",
|
||||
"initial_pressure_unit = 'mWS'\n",
|
||||
"conversion_pressure_unit = 'mWS'\n",
|
||||
"\n",
|
||||
@@ -41,32 +41,33 @@
|
||||
"\n",
|
||||
"# for while loop\n",
|
||||
"total_min_level = 0.01 # m\n",
|
||||
"total_max_time = 300 # s"
|
||||
"total_max_time = 1000 # s"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 40,
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%matplotlib qt\n",
|
||||
"\n",
|
||||
"V = Ausgleichsbecken_class(area_base, area_outflux, critical_level_low, critical_level_high,simulation_timestep)\n",
|
||||
"V.set_initial_level(initial_level) \n",
|
||||
"V.set_influx(initial_influx)\n",
|
||||
"V.set_outflux(initial_outflux)\n",
|
||||
"\n",
|
||||
"converted_pressure,_ = pressure_conversion(initial_pipeline_pressure,input_unit = initial_pressure_unit, target_unit = 'Pa')\n",
|
||||
"V.pressure = converted_pressure\n",
|
||||
"# V.set_initial_level(initial_level) \n",
|
||||
"# V.set_influx(initial_influx)\n",
|
||||
"# V.set_outflux(initial_outflux)\n",
|
||||
"# converted_pressure,_ = pressure_conversion(initial_pipeline_pressure,input_unit = initial_pressure_unit, target_unit = 'Pa')\n",
|
||||
"# V.pressure = converted_pressure\n",
|
||||
"V.set_steady_state(initial_influx,initial_level,initial_pressure_unit,conversion_pressure_unit)\n",
|
||||
"\n",
|
||||
"time_vec = np.arange(0,total_max_time,simulation_timestep)\n",
|
||||
"outflux_vec = np.empty_like(time_vec)\n",
|
||||
"outflux_vec[0] = initial_outflux\n",
|
||||
"outflux_vec[0] = V.outflux\n",
|
||||
"level_vec = np.empty_like(time_vec)\n",
|
||||
"level_vec[0] = initial_level\n",
|
||||
"level_vec[0] = V.level\n",
|
||||
"\n",
|
||||
"pressure_vec = np.full_like(time_vec,converted_pressure)*((np.sin(time_vec)+1)*np.exp(-time_vec/50))\n",
|
||||
"# pressure_vec = np.full_like(time_vec,converted_pressure)*((np.sin(time_vec)+1)*np.exp(-time_vec/50))\n",
|
||||
"pressure_vec = np.full_like(time_vec,V.pressure)\n",
|
||||
" \n",
|
||||
"i_max = -1\n",
|
||||
"\n",
|
||||
@@ -86,7 +87,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 41,
|
||||
"execution_count": 15,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -112,9 +113,9 @@
|
||||
"\n",
|
||||
"# plt.subplots_adjust(left=0.2, bottom=0.2)\n",
|
||||
"ax4.set_axis_off()\n",
|
||||
"cell_text = np.array([[initial_level, V.level_unit], \\\n",
|
||||
"cell_text = np.array([[level_vec[0], V.level_unit], \\\n",
|
||||
" [initial_influx, V.flux_unit], \\\n",
|
||||
" [initial_outflux, V.flux_unit], \\\n",
|
||||
" [outflux_vec[0], V.flux_unit], \\\n",
|
||||
" [simulation_timestep, V.time_unit], \\\n",
|
||||
" [area_base, V.area_unit], \\\n",
|
||||
" [area_outflux, V.area_unit]])\n",
|
||||
@@ -140,7 +141,7 @@
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3.8.13 ('Georg_DT_Slot3')",
|
||||
"display_name": "Python 3.8.13 ('DT_Slot_3')",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
@@ -159,7 +160,7 @@
|
||||
"orig_nbformat": 4,
|
||||
"vscode": {
|
||||
"interpreter": {
|
||||
"hash": "84fb123bdc47ab647d3782661abcbe80fbb79236dd2f8adf4cef30e8755eb2cd"
|
||||
"hash": "4a28055eb8a3160fa4c7e4fca69770c4e0a1add985300856aa3fcf4ce32a2c48"
|
||||
}
|
||||
}
|
||||
},
|
||||
Reference in New Issue
Block a user