pre-merge commit

working steady state, but still numerical instability at turbine, that leads to runaway after approx 2.5 minutes for 1000 m pipeline
This commit is contained in:
Brantegger Georg
2022-08-01 08:58:11 +02:00
parent 0969c29b7d
commit ed710a7371
2 changed files with 16 additions and 37 deletions

View File

@@ -77,7 +77,7 @@ class Ausgleichsbecken_class:
raise Exception('Initial level was already set once. Use the .update_level(self,timestep) method to update level based on net flux.')
def set_level(self,level):
self.level = level
self.level = level
def set_influx(self,influx):
# sets influx to the reservoir in m³/s

View File

@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
@@ -18,7 +18,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
@@ -27,7 +27,7 @@
"#Turbine\n",
"Q_nenn = 0.85 # m³/s\n",
"p_nenn = pressure_conversion(10.6,'bar','Pa')\n",
"closing_time = 30 #s\n",
"closing_time = 30. #s\n",
"\n",
"# physics\n",
"g = 9.81 # gravitational acceleration [m/s²]\n",
@@ -37,7 +37,7 @@
"# define controller constants\n",
"target_level = 8. # m\n",
"Kp = 0.1\n",
"Ti = 10.\n",
"Ti = 7.\n",
"deadband_range = 0.05 # m\n",
"\n",
"\n",
@@ -83,7 +83,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
@@ -112,30 +112,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The current attributes are: \n",
"----------------------------- \n",
"Current flux = -1.0 m³/s \n",
"Current pipe pressure = -1.0 mWS \n",
"Current LA = 90.90909090909089 % \n",
"----------------------------- \n",
"\n"
]
}
],
"source": [
"T_in.get_info()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
@@ -167,13 +144,15 @@
"LA_ist_vec = np.full_like(t_vec,T1.get_current_LA())\n",
"\n",
"LA_soll_vec2 = np.full_like(t_vec,T_in.get_current_LA())\n",
"LA_soll_vec2[200:1500] = 0.\n",
"LA_soll_vec2[1500:2500] = 1. \n"
"LA_soll_vec2[500:1000] = 0.\n",
"LA_soll_vec2[1000:1500] = 1. \n",
"LA_soll_vec2[1500:2000] = 0.\n",
"LA_soll_vec2[2000:2500] = 0.5 \n"
]
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
@@ -201,7 +180,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
@@ -268,7 +247,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
@@ -313,7 +292,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.8.13 ('DT_Slot_3')",
"display_name": "Python 3.8.13 ('Georg_DT_Slot3')",
"language": "python",
"name": "python3"
},
@@ -332,7 +311,7 @@
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "4a28055eb8a3160fa4c7e4fca69770c4e0a1add985300856aa3fcf4ce32a2c48"
"hash": "84fb123bdc47ab647d3782661abcbe80fbb79236dd2f8adf4cef30e8755eb2cd"
}
}
},