Skip to content

Commit 6fc6111

Browse files
Renamed to Float-Storage
1 parent 3dc1cb6 commit 6fc6111

File tree

1 file changed

+32
-12
lines changed

1 file changed

+32
-12
lines changed

Conversion-Files/Conversion_to_Float-Storage.ipynb

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"cell_type": "markdown",
66
"metadata": {},
77
"source": [
8-
"# Converting a Normal EPANET .inp File to a SWMM .inp file assuming Volume-Restricted Withdrawal (Outlet-Storage)\n",
9-
"This notebook takes an input EPANET file with demands input normally as a CWS base demand and outputs a .inp file configured for SWMM and uses a volume-restricted assumption \n",
10-
"A simplified schematic of the modified demand node in this method (Outlet-Storage) is seen below: \n",
8+
"# Converting a Normal EPANET .inp File to a SWMM .inp file: Float-valved Storage w/ concurrent consumption and leaks\n",
9+
"This notebook takes an input EPANET file with demands input normally as a CWS base demand and outputs a .inp file configured for SWMM in the Float-Storage Method \n",
10+
"A simplified schematic of the modified demand node in this method (Float-Storage) is seen below: \n",
1111
"\n"
1212
]
1313
},
@@ -24,9 +24,21 @@
2424
},
2525
{
2626
"cell_type": "code",
27-
"execution_count": 9,
27+
"execution_count": 1,
2828
"metadata": {},
29-
"outputs": [],
29+
"outputs": [
30+
{
31+
"ename": "ModuleNotFoundError",
32+
"evalue": "No module named 'pyperclip'",
33+
"output_type": "error",
34+
"traceback": [
35+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
36+
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
37+
"Cell \u001b[0;32mIn[1], line 6\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mre\u001b[39;00m\n\u001b[1;32m 5\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mmath\u001b[39;00m\n\u001b[0;32m----> 6\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;21;01mpyperclip\u001b[39;00m\n",
38+
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'pyperclip'"
39+
]
40+
}
41+
],
3042
"source": [
3143
"import wntr\n",
3244
"import numpy as np \n",
@@ -62,8 +74,8 @@
6274
],
6375
"source": [
6476
" # Replace with appropriate path and filename\n",
65-
"directory=r\"C:/IWS_Modelling/Other SWMM Trials/Mohan and Abhi Undulating/Pipe_Length_Comparison/\"\n",
66-
"filename=r'Network3_8hr_PDA.inp'\n",
77+
"directory=\"../Network-Files/Network 1/\"\n",
78+
"filename=\"Network3_4hr_PDA.inp\"\n",
6779
"name_only=filename.rsplit('_',maxsplit=1)[0]\n",
6880
"print(\"Selected File: \",name_only)\n",
6981
"abs_path=directory+filename"
@@ -118,7 +130,6 @@
118130
"coords=dict() # For storing coordinates corresponding to each node as a tuple with the id as key\n",
119131
"all_nodes=[] # For storing list of node ids of all nodes\n",
120132
"all_elevations=[] # For storing elevations of all nodes\n",
121-
"## MAYBE SAVE ALL NODE IDS IN DATAFRAME WITH ELEVATION AND BASE DEMAND AND THEN FILTER DATA FRAME LATER FOR DEMAND NODES ONLY\n",
122133
"\n",
123134
"# Creates a network model object using EPANET .inp file\n",
124135
"network=wntr.network.WaterNetworkModel(abs_path)\n",
@@ -176,6 +187,15 @@
176187
" supply_hh='0'+supply_hh"
177188
]
178189
},
190+
{
191+
"cell_type": "code",
192+
"execution_count": null,
193+
"metadata": {},
194+
"outputs": [],
195+
"source": [
196+
"for conduit in conduits.index:"
197+
]
198+
},
179199
{
180200
"attachments": {},
181201
"cell_type": "markdown",
@@ -243,7 +263,7 @@
243263
" \n",
244264
" # If the end node is a reservoir\n",
245265
" if end_node in reservoir_ids:\n",
246-
" # MAke the end elevation the same as the start but subtract 1 (since reservoirs don't have ground elevation in EPANET)\n",
266+
" # Make the end elevation the same as the start but subtract 1 (since reservoirs don't have ground elevation in EPANET)\n",
247267
" end_elevation=start_elevation-1\n",
248268
" # Make the end elevation equal to the elevation of the end node\n",
249269
" else: end_elevation=junctions.at[end_node,\"Elevation\"]\n",
@@ -873,7 +893,7 @@
873893
],
874894
"metadata": {
875895
"kernelspec": {
876-
"display_name": "base",
896+
"display_name": "Python 3.9.15 ('base')",
877897
"language": "python",
878898
"name": "python3"
879899
},
@@ -887,12 +907,12 @@
887907
"name": "python",
888908
"nbconvert_exporter": "python",
889909
"pygments_lexer": "ipython3",
890-
"version": "3.9.13"
910+
"version": "3.9.15"
891911
},
892912
"orig_nbformat": 4,
893913
"vscode": {
894914
"interpreter": {
895-
"hash": "fcd9f59ab1bf6e16dbc8d4c230f1b8c30298bc0144001d70fccf9fa6dc2fc062"
915+
"hash": "dd6a0ae2e89424b22bc0c3fd46707be6f981ef35bdac29f85707eba2fc78ecd7"
896916
}
897917
}
898918
},

0 commit comments

Comments
 (0)