{ "cells": [ { "cell_type": "markdown", "id": "1f7a8949", "metadata": {}, "source": [ "# Example 3: Pandapipes" ] }, { "cell_type": "markdown", "id": "1325c585", "metadata": {}, "source": [ "This Example demonstrates how to generate a pandapipes network based on a SIR 3S model. When working with SIR 3S, pandapipes used to offer some freedom in creating simple DH models via Python, but with the introduction of the SIR 3S Toolkit, pandapipes is no longer necessary for this. Therefore the main benefit of pandapipes for SIR 3S users is for comparing calculations to SIR 3S results. " ] }, { "cell_type": "markdown", "id": "d215554d", "metadata": {}, "source": [ "Note that the SIR 3S model we are using in this Example is quite simple." ] }, { "cell_type": "markdown", "id": "cc993b56", "metadata": {}, "source": [ "In this Example we will first generate the pandapipes network manually by obtaining element dataframes for pipes and nodes via SIR 3S Toolkit. Then we will perform the same steps but built into one single Toolkit function." ] }, { "cell_type": "markdown", "id": "b8637c9f", "metadata": {}, "source": [ "# Toolkit Release" ] }, { "cell_type": "code", "execution_count": 43, "id": "8b73c793", "metadata": {}, "outputs": [], "source": [ "#pip install " ] }, { "cell_type": "markdown", "id": "6a7ede6c", "metadata": {}, "source": [ "# Imports" ] }, { "cell_type": "markdown", "id": "26c294cd", "metadata": {}, "source": [ "## SIR 3S Toolkit" ] }, { "cell_type": "markdown", "id": "83217915", "metadata": {}, "source": [ "### Regular Import/Init" ] }, { "cell_type": "code", "execution_count": 44, "id": "a9d5d77c", "metadata": {}, "outputs": [], "source": [ "SIR3S_SIRGRAF_DIR = r\"C:\\3S\\SIR 3S Entwicklung\\SirGraf-90-15-00-16_Quebec_x64\" #change to local path" ] }, { "cell_type": "code", "execution_count": 45, "id": "b42a91b2", "metadata": {}, "outputs": [], "source": [ "import sir3stoolkit" ] }, { "cell_type": "code", "execution_count": 46, "id": "43ee1f6e", "metadata": {}, "outputs": [], "source": [ "from sir3stoolkit.core import wrapper" ] }, { "cell_type": "code", "execution_count": 47, "id": "c2dad02e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 47, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sir3stoolkit" ] }, { "cell_type": "code", "execution_count": 48, "id": "d46cfd1c", "metadata": {}, "outputs": [], "source": [ "wrapper.Initialize_Toolkit(SIR3S_SIRGRAF_DIR)" ] }, { "cell_type": "markdown", "id": "6d0045f5", "metadata": {}, "source": [ "### Additional Import/Init for Alternative_Models class" ] }, { "cell_type": "code", "execution_count": 49, "id": "03ebacd6", "metadata": {}, "outputs": [], "source": [ "from sir3stoolkit.mantle import alternative_models" ] }, { "cell_type": "code", "execution_count": 50, "id": "1f485cff", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Initialization complete\n" ] } ], "source": [ "s3s = alternative_models.Alternative_Models_SIR3S_Model()" ] }, { "cell_type": "markdown", "id": "c0730ad9", "metadata": {}, "source": [ "## Additional" ] }, { "cell_type": "code", "execution_count": 51, "id": "65935b99", "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 52, "id": "b89e2fc9", "metadata": {}, "outputs": [], "source": [ "import pandapipes as pp" ] }, { "cell_type": "code", "execution_count": 53, "id": "7482c0bb", "metadata": {}, "outputs": [], "source": [ "from shapely import wkt" ] }, { "cell_type": "code", "execution_count": 54, "id": "2dfbb32d", "metadata": {}, "outputs": [], "source": [ "import pandapipes.plotting as pp_plot" ] }, { "cell_type": "markdown", "id": "917947a8", "metadata": {}, "source": [ "# Open SIR 3S Model" ] }, { "cell_type": "code", "execution_count": 55, "id": "9920e451", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Model is open for further operation\n" ] } ], "source": [ "s3s.OpenModel(dbName=r\"C:\\Users\\aUsername\\3S\\PT3S\\PT3S\\Examples\\Example9_2.db3\",\n providerType=s3s.ProviderTypes.SQLite,\n Mid=\"M-1-0-1\",\n saveCurrentlyOpenModel=False,\n namedInstance=\"\",\n userID=\"\",\n password=\"\")" ] }, { "cell_type": "markdown", "id": "25f2cdce", "metadata": {}, "source": [ "# Generate Pandapipes network manually" ] }, { "cell_type": "markdown", "id": "d1a7f06d", "metadata": {}, "source": [ "## Create pandapipes network" ] }, { "cell_type": "markdown", "id": "d7adf9b5", "metadata": {}, "source": [ "### Nodes" ] }, { "cell_type": "code", "execution_count": 56, "id": "c7d4cfc2", "metadata": {}, "outputs": [], "source": [ "net = pp.create_empty_network(fluid=\"water\")" ] }, { "cell_type": "code", "execution_count": 57, "id": "7c1b1e36", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[2025-10-07 13:27:29,772] INFO in sir3stoolkit.mantle.dataframes: [metadata] Generating metadata dataframe for element type: ObjectTypes.Node\n", "[2025-10-07 13:27:29,773] INFO in sir3stoolkit.mantle.dataframes: [metadata] Retrieved 9 element(s) of element type ObjectTypes.Node.\n", "[2025-10-07 13:27:29,776] DEBUG in sir3stoolkit.mantle.dataframes: [Resolving Metadata Properties] Using 5 metadata properties.\n", "[2025-10-07 13:27:29,777] INFO in sir3stoolkit.mantle.dataframes: [metadata] Retrieving metadata properties ['Name', 'QmEin', 'bz.PhEin', 'Zkor', 'Ktyp'], geometry...\n", "[2025-10-07 13:27:29,777] INFO in sir3stoolkit.mantle.dataframes: [metadata] 0 non-empty end node columns were created)\n", "[2025-10-07 13:27:29,783] INFO in sir3stoolkit.mantle.dataframes: [metadata] Done. Shape: (9, 7)\n" ] } ], "source": [ "df_nodes_metadata = s3s.generate_element_metadata_dataframe(s3s.ObjectTypes.Node, ['Name', 'QmEin', 'bz.PhEin', 'Zkor', 'Ktyp'], geometry=True)" ] }, { "cell_type": "code", "execution_count": 58, "id": "1d394cb2", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[2025-10-07 13:27:29,803] INFO in sir3stoolkit.mantle.dataframes: [results] Generating results dataframe for element type: ObjectTypes.Node\n", "[2025-10-07 13:27:29,812] INFO in sir3stoolkit.mantle.dataframes: [Resolving Timestamps] Only static timestamp 2025-06-05 15:27:46.000 +02:00 is available\n", "[2025-10-07 13:27:29,813] INFO in sir3stoolkit.mantle.dataframes: [results] Retrieved 9 tks.\n", "[2025-10-07 13:27:29,816] INFO in sir3stoolkit.mantle.dataframes: [results] Using 3 result properties.\n", "[2025-10-07 13:27:29,816] INFO in sir3stoolkit.mantle.dataframes: [results] Retrieving result properties...\n", "[2025-10-07 13:27:29,820] INFO in sir3stoolkit.mantle.dataframes: [results] Done. Shape: (9, 5)\n" ] } ], "source": [ "df_nodes_results = s3s.generate_element_results_dataframe(s3s.ObjectTypes.Node, ['PH', 'T', 'QM'], s3s.GetTimeStamps()[0])" ] }, { "cell_type": "code", "execution_count": 59, "id": "3c4b0954", "metadata": {}, "outputs": [], "source": [ "df_nodes = pd.merge(df_nodes_metadata, df_nodes_results, on='tk', how='inner')" ] }, { "cell_type": "code", "execution_count": 60, "id": "4ca02538", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tkNameQmEinbz.PhEinZkorKtypgeometrytimestampPHTQM
05136506604482101815K0000010010PKONPOINT (149.99985694885254 500.00011920928955)2025-06-05 15:27:46.000 +02:001000400
15174640379525019821K00010010QKONPOINT (349.99996423721313 600.00002384185791)2025-06-05 15:27:46.000 +02:0099.9930600
25665004361761998834K00020010QKONPOINT (550.00007152557373 600.00002384185791)2025-06-05 15:27:46.000 +02:0099.8653100
\n", "
" ], "text/plain": [ " tk Name QmEin bz.PhEin Zkor Ktyp \\\n", "0 5136506604482101815 K0000 0 100 10 PKON \n", "1 5174640379525019821 K0001 0 0 10 QKON \n", "2 5665004361761998834 K0002 0 0 10 QKON \n", "\n", " geometry \\\n", "0 POINT (149.99985694885254 500.00011920928955) \n", "1 POINT (349.99996423721313 600.00002384185791) \n", "2 POINT (550.00007152557373 600.00002384185791) \n", "\n", " timestamp PH T QM \n", "0 2025-06-05 15:27:46.000 +02:00 100 0 400 \n", "1 2025-06-05 15:27:46.000 +02:00 99.99306 0 0 \n", "2 2025-06-05 15:27:46.000 +02:00 99.86531 0 0 " ] }, "execution_count": 60, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_nodes.head(3)" ] }, { "cell_type": "code", "execution_count": 61, "id": "2eb58471", "metadata": {}, "outputs": [], "source": [ "js = {}\n", "\n", "for idx, row in df_nodes.iterrows():\n", " geom = wkt.loads(row[\"geometry\"])\n", " x, y = geom.x, geom.y\n", "\n", " j = pp.create_junction(\n", " net,\n", " pn_bar=1 + float(row['PH']),\n", " tfluid_k=273.15 + float(row['T']),\n", " height_m=float(row['Zkor']),\n", " name=f\"{row['Name']}~{row['tk']}\"\n", " )\n", "\n", " # Assign geodata to junction_geodata table\n", " net.junction_geodata.at[j, \"x\"] = x\n", " net.junction_geodata.at[j, \"y\"] = y\n", "\n", " js[row['tk']] = j" ] }, { "cell_type": "code", "execution_count": 62, "id": "e9b757ab", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
namepn_bartfluid_kheight_min_servicetype
0K0000~5136506604482101815101.00000273.1510.0Truejunction
1K0001~5174640379525019821100.99306273.1510.0Truejunction
2K0002~5665004361761998834100.86531273.1510.0Truejunction
3K0003~5185493728872360834100.72040273.1510.0Truejunction
4K0004~4776931467066465913100.72040273.1510.0Truejunction
5K0005~5229509832448527475100.93705273.1510.0Truejunction
6K0006~5073490478136313655100.87409273.1510.0Truejunction
7K0007~5417314986988666587100.86626273.1510.0Truejunction
8K0008~5366461594623940805100.86626273.1510.0Truejunction
\n", "
" ], "text/plain": [ " name pn_bar tfluid_k height_m in_service \\\n", "0 K0000~5136506604482101815 101.00000 273.15 10.0 True \n", "1 K0001~5174640379525019821 100.99306 273.15 10.0 True \n", "2 K0002~5665004361761998834 100.86531 273.15 10.0 True \n", "3 K0003~5185493728872360834 100.72040 273.15 10.0 True \n", "4 K0004~4776931467066465913 100.72040 273.15 10.0 True \n", "5 K0005~5229509832448527475 100.93705 273.15 10.0 True \n", "6 K0006~5073490478136313655 100.87409 273.15 10.0 True \n", "7 K0007~5417314986988666587 100.86626 273.15 10.0 True \n", "8 K0008~5366461594623940805 100.86626 273.15 10.0 True \n", "\n", " type \n", "0 junction \n", "1 junction \n", "2 junction \n", "3 junction \n", "4 junction \n", "5 junction \n", "6 junction \n", "7 junction \n", "8 junction " ] }, "execution_count": 62, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.junction" ] }, { "cell_type": "markdown", "id": "bfe88f29", "metadata": {}, "source": [ "### pipes" ] }, { "cell_type": "code", "execution_count": 63, "id": "b7fa4c24", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[2025-10-07 13:27:29,918] INFO in sir3stoolkit.mantle.dataframes: [metadata] Generating metadata dataframe for element type: ObjectTypes.Pipe\n", "[2025-10-07 13:27:29,919] INFO in sir3stoolkit.mantle.dataframes: [metadata] Retrieved 9 element(s) of element type ObjectTypes.Pipe.\n", "[2025-10-07 13:27:29,921] DEBUG in sir3stoolkit.mantle.dataframes: [Resolving Metadata Properties] Using 4 metadata properties.\n", "[2025-10-07 13:27:29,922] INFO in sir3stoolkit.mantle.dataframes: [metadata] Retrieving metadata properties ['L', 'Di', 'Rau', 'Name'], geometry, end nodes...\n", "[2025-10-07 13:27:29,927] INFO in sir3stoolkit.mantle.dataframes: [metadata] 2 non-empty end node columns were created)\n", "[2025-10-07 13:27:29,927] INFO in sir3stoolkit.mantle.dataframes: [metadata] Done. Shape: (9, 8)\n" ] } ], "source": [ "df_pipes_metadata = s3s.generate_element_metadata_dataframe(s3s.ObjectTypes.Pipe, ['L', 'Di', 'Rau', 'Name'], end_nodes=True, geometry=True)" ] }, { "cell_type": "code", "execution_count": 64, "id": "b7fa4c24", "metadata": {}, "outputs": [], "source": [ "for idx,row in df_pipes_metadata.iterrows():\n", " raw_value = row[\"Rau\"]\n", " row[\"Rau\"] = float(str(raw_value).replace(\",\", \".\"))" ] }, { "cell_type": "code", "execution_count": 65, "id": "c394549a", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
tkLDiRauNamegeometryfkKIfkKK
0476294735800549534110004500.25Rohr K0000 K0001LINESTRING (149.99985694885254 500.00011920928...51365066044821018155174640379525019821
1547912364936243965010002500.25Rohr K0002 K0003LINESTRING (550.00007152557373 600.00002384185...56650043617619988345185493728872360834
2536730388485220068210002500.25Rohr K0002 K0004LINESTRING (550.00007152557373 600.00002384185...56650043617619988344776931467066465913
\n", "
" ], "text/plain": [ " tk L Di Rau Name \\\n", "0 4762947358005495341 1000 450 0.25 Rohr K0000 K0001 \n", "1 5479123649362439650 1000 250 0.25 Rohr K0002 K0003 \n", "2 5367303884852200682 1000 250 0.25 Rohr K0002 K0004 \n", "\n", " geometry fkKI \\\n", "0 LINESTRING (149.99985694885254 500.00011920928... 5136506604482101815 \n", "1 LINESTRING (550.00007152557373 600.00002384185... 5665004361761998834 \n", "2 LINESTRING (550.00007152557373 600.00002384185... 5665004361761998834 \n", "\n", " fkKK \n", "0 5174640379525019821 \n", "1 5185493728872360834 \n", "2 4776931467066465913 " ] }, "execution_count": 65, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_pipes_metadata.head(3)" ] }, { "cell_type": "code", "execution_count": 66, "id": "21c5f0bc", "metadata": {}, "outputs": [], "source": [ "ps = {}\n", "\n", "for idx, row in df_pipes_metadata.iterrows():\n", " geom = wkt.loads(row[\"geometry\"]) \n", " coords = list(geom.coords) \n", "\n", " # Create pipe\n", " p = pp.create_pipe_from_parameters(\n", " net,\n", " from_junction=js[row['fkKI']],\n", " to_junction=js[row['fkKK']],\n", " length_km=float(row['L']) / 1000.,\n", " diameter_m=float(row['Di']) / 1000.,\n", " k_mm=float(row['Rau']),\n", " name=f\"{row['Name']}~{row['tk']}\"\n", " )\n", " ps[row['tk']] = p\n", "\n", " net.pipe_geodata.at[p, \"coords\"] = coords" ] }, { "cell_type": "code", "execution_count": 67, "id": "f946ad6e", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
namefrom_junctionto_junctionstd_typelength_kmdiameter_mk_mmloss_coefficientu_w_per_m2ktext_kqext_wsectionsin_servicetype
0Rohr K0000 K0001~476294735800549534101None1.00.450.250.00.0NaN0.01Truepipe
1Rohr K0002 K0003~547912364936243965023None1.00.250.250.00.0NaN0.01Truepipe
2Rohr K0002 K0004~536730388485220068224None1.00.250.250.00.0NaN0.01Truepipe
\n", "
" ], "text/plain": [ " name from_junction to_junction std_type \\\n", "0 Rohr K0000 K0001~4762947358005495341 0 1 None \n", "1 Rohr K0002 K0003~5479123649362439650 2 3 None \n", "2 Rohr K0002 K0004~5367303884852200682 2 4 None \n", "\n", " length_km diameter_m k_mm loss_coefficient u_w_per_m2k text_k qext_w \\\n", "0 1.0 0.45 0.25 0.0 0.0 NaN 0.0 \n", "1 1.0 0.25 0.25 0.0 0.0 NaN 0.0 \n", "2 1.0 0.25 0.25 0.0 0.0 NaN 0.0 \n", "\n", " sections in_service type \n", "0 1 True pipe \n", "1 1 True pipe \n", "2 1 True pipe " ] }, "execution_count": 67, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.pipe.head(3)" ] }, { "cell_type": "markdown", "id": "1c772f21", "metadata": {}, "source": [ "### sources/sinks" ] }, { "cell_type": "code", "execution_count": 68, "id": "7fa2168a", "metadata": {}, "outputs": [], "source": [ "for idx, row in df_nodes.iterrows():\n", " ktyp = (row.get(\"Ktyp\"))\n", " tk = row.get(\"tk\")\n", "\n", " # Create source if Ktyp is PKON and PH > 0\n", " if ktyp == \"PKON\" and float(row.get(\"PH\", 0)) > 0:\n", " pp.create_ext_grid(\n", " net,\n", " junction=js[tk],\n", " p_bar=1 + float(row[\"PH\"]),\n", " t_k=273.15 + float(row[\"T\"]),\n", " name=f\"Src: {row['Name']}~{tk}\"\n", " )\n", "\n", " # Create sink if Ktyp is QKON and QM < 0\n", " elif ktyp == \"QKON\" and float(row.get(\"QM\", 0)) < 0:\n", " pp.create_sink(\n", " net,\n", " junction=js[tk],\n", " mdot_kg_per_s=abs(float(row[\"QM\"])),\n", " name=f\"Snk: {row['Name']}~{tk}\"\n", " )" ] }, { "cell_type": "code", "execution_count": 69, "id": "2aa47c56", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
namejunctionp_bart_kin_servicetype
0Src: K0000~51365066044821018150101.0273.15Truept
\n", "
" ], "text/plain": [ " name junction p_bar t_k in_service type\n", "0 Src: K0000~5136506604482101815 0 101.0 273.15 True pt" ] }, "execution_count": 69, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.ext_grid" ] }, { "cell_type": "code", "execution_count": 70, "id": "4081d2f2", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
namejunctionmdot_kg_per_sscalingin_servicetype
0Snk: K0003~51854937288723608343100.01.0Truesink
1Snk: K0004~47769314670664659134100.01.0Truesink
2Snk: K0007~54173149869886665877100.01.0Truesink
3Snk: K0008~53664615946239408058100.01.0Truesink
\n", "
" ], "text/plain": [ " name junction mdot_kg_per_s scaling \\\n", "0 Snk: K0003~5185493728872360834 3 100.0 1.0 \n", "1 Snk: K0004~4776931467066465913 4 100.0 1.0 \n", "2 Snk: K0007~5417314986988666587 7 100.0 1.0 \n", "3 Snk: K0008~5366461594623940805 8 100.0 1.0 \n", "\n", " in_service type \n", "0 True sink \n", "1 True sink \n", "2 True sink \n", "3 True sink " ] }, "execution_count": 70, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.sink" ] }, { "cell_type": "markdown", "id": "b5f6bff3", "metadata": {}, "source": [ "## Calculate" ] }, { "cell_type": "code", "execution_count": 71, "id": "73ef9a8b", "metadata": {}, "outputs": [], "source": [ "pp.pipeflow(net)" ] }, { "cell_type": "markdown", "id": "5534d1c4", "metadata": {}, "source": [ "### View Results" ] }, { "cell_type": "code", "execution_count": 72, "id": "80ae2f42", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
p_bart_k
0101.000000273.15
1100.932708273.15
299.491364273.15
397.843832273.15
497.843832273.15
5100.289209273.15
699.578419273.15
799.501563273.15
899.501563273.15
\n", "
" ], "text/plain": [ " p_bar t_k\n", "0 101.000000 273.15\n", "1 100.932708 273.15\n", "2 99.491364 273.15\n", "3 97.843832 273.15\n", "4 97.843832 273.15\n", "5 100.289209 273.15\n", "6 99.578419 273.15\n", "7 99.501563 273.15\n", "8 99.501563 273.15" ] }, "execution_count": 72, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_junction" ] }, { "cell_type": "code", "execution_count": 73, "id": "7d5ef546", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
v_mean_m_per_sp_from_barp_to_bart_from_kt_to_kt_outlet_kmdot_from_kg_per_smdot_to_kg_per_svdot_m3_per_sreynoldslambda
00.587940101.000000100.932708273.15273.15273.1593.496673-93.4966730.093508148220.7752540.017522
12.03742799.49136497.843832273.15273.15273.15100.000000-100.0000000.100012285354.9557340.019847
22.03742799.49136497.843832273.15273.15273.15100.000000-100.0000000.100012285354.9557340.019847
31.927402101.000000100.289209273.15273.15273.15306.503327-306.5033270.306540485901.3485990.017222
41.927402100.28920999.578419273.15273.15273.15306.503327-306.5033270.306540485901.3485990.017222
50.62883699.57841999.501563273.15273.15273.15100.000000-100.0000000.100012158530.5309630.017494
60.62883699.57841999.501563273.15273.15273.15100.000000-100.0000000.100012158530.5309630.017494
71.904927100.93270899.491364273.15273.15273.1593.496673-93.4966730.093508266797.3954570.019862
8-0.66973199.49136499.578419273.15273.15273.15-106.503327106.503327-0.106516168840.2866720.017470
\n", "
" ], "text/plain": [ " v_mean_m_per_s p_from_bar p_to_bar t_from_k t_to_k t_outlet_k \\\n", "0 0.587940 101.000000 100.932708 273.15 273.15 273.15 \n", "1 2.037427 99.491364 97.843832 273.15 273.15 273.15 \n", "2 2.037427 99.491364 97.843832 273.15 273.15 273.15 \n", "3 1.927402 101.000000 100.289209 273.15 273.15 273.15 \n", "4 1.927402 100.289209 99.578419 273.15 273.15 273.15 \n", "5 0.628836 99.578419 99.501563 273.15 273.15 273.15 \n", "6 0.628836 99.578419 99.501563 273.15 273.15 273.15 \n", "7 1.904927 100.932708 99.491364 273.15 273.15 273.15 \n", "8 -0.669731 99.491364 99.578419 273.15 273.15 273.15 \n", "\n", " mdot_from_kg_per_s mdot_to_kg_per_s vdot_m3_per_s reynolds \\\n", "0 93.496673 -93.496673 0.093508 148220.775254 \n", "1 100.000000 -100.000000 0.100012 285354.955734 \n", "2 100.000000 -100.000000 0.100012 285354.955734 \n", "3 306.503327 -306.503327 0.306540 485901.348599 \n", "4 306.503327 -306.503327 0.306540 485901.348599 \n", "5 100.000000 -100.000000 0.100012 158530.530963 \n", "6 100.000000 -100.000000 0.100012 158530.530963 \n", "7 93.496673 -93.496673 0.093508 266797.395457 \n", "8 -106.503327 106.503327 -0.106516 168840.286672 \n", "\n", " lambda \n", "0 0.017522 \n", "1 0.019847 \n", "2 0.019847 \n", "3 0.017222 \n", "4 0.017222 \n", "5 0.017494 \n", "6 0.017494 \n", "7 0.019862 \n", "8 0.017470 " ] }, "execution_count": 73, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_pipe" ] }, { "cell_type": "code", "execution_count": 74, "id": "c9923d56", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
mdot_kg_per_s
0100.0
1100.0
2100.0
3100.0
\n", "
" ], "text/plain": [ " mdot_kg_per_s\n", "0 100.0\n", "1 100.0\n", "2 100.0\n", "3 100.0" ] }, "execution_count": 74, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_sink" ] }, { "cell_type": "code", "execution_count": 75, "id": "7d4636f8", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
mdot_kg_per_s
0-400.0
\n", "
" ], "text/plain": [ " mdot_kg_per_s\n", "0 -400.0" ] }, "execution_count": 75, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_ext_grid" ] }, { "cell_type": "markdown", "id": "3275794e", "metadata": {}, "source": [ "## Plot" ] }, { "cell_type": "code", "execution_count": 76, "id": "82d44447", "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAA+gAAAMDCAYAAAAxID+lAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAApQ0lEQVR4nO3da6xldX3/8c8++8zgjMwFUERUpqitLVipbdSOqTZRK7TYRLRaU2JRvGCrgvWBD4xNbGxTjTbGC1rBpo1RpCI1KSRWvDURmTYTgYgIlbb/VMpAh1YGGOZy5pyz/g82A3M5l7332ZffWuv1SiZzZp+91u+7n+zs96y11+pUVVUFAAAAmKqZaQ8AAAAACHQAAAAogkAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACAAgh0AAAAKIBABwAAgAIIdAAAACiAQAcAAIACCHQAAAAogEAHAACgHfbuTa64IvmVX0k2bEhmZ5NTTkkuuSS59dZpT5dOVVXVtIcAAACAsfr7v0/e8pZk377ev49M4dnZZH4+Oe+85Oqrky1bpjKiQAcAAKDZ/vZvk4svTjqdo8P8WN1uctZZyY03Jps3T26+Rwl0AAAAmuuHP0ye//xkcbG/53e7yetel3z5y+Odawm+gw4AAEBzfeITycwA6buwkHzlK8l///f4ZlqGQAcAAKCZHngg+dKXet8vH0Sn07uY3IQJdAAAAJrpppuSgwcH325hIfmnfxr9PKsQ6AAAADRStWfP8BuvZdshzU58RQAAAB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PHNtAyBDgAAQHM973nJlVf2fu6sck33bjc566zkiivGP9cSBDoAAADN9uY3J1dfnWzc2Pv3saF++BT43/qt5HvfSzZtmux8j+pU1SDH+gEAAKCm9u5Nvvzl5DOfSf7t35K5ud7V2n/v95I/+qPknHOmOp5ABwAAgAI4xR0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACvD/Acf6V0rfkICfAAAAAElFTkSuQmCC", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "" ] }, "execution_count": 76, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pp_plot.simple_plot(net)" ] }, { "cell_type": "code", "execution_count": 77, "id": "b19a24b7", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "customdata": [ [ 101 ], [ 100.93270768766557 ], [ 99.4913642865344 ], [ 97.8438320971401 ], [ 97.8438320971401 ], [ 100.28920932485765 ], [ 99.5784186497153 ], [ 99.50156285916806 ], [ 99.50156285916806 ] ], "hovertemplate": "x=%{x}
y=%{y}
Pressure [bar]=%{marker.color}", "legendgroup": "", "marker": { "color": [ 101, 100.93270768766557, 99.4913642865344, 97.8438320971401, 97.8438320971401, 100.28920932485765, 99.5784186497153, 99.50156285916806, 99.50156285916806 ], "coloraxis": "coloraxis", "symbol": "circle" }, "mode": "markers", "name": "", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 149.99985694885254, 349.99996423721313, 550.0000715255737, 749.9998807907104, 749.9998807907104, 349.99996423721313, 550.0000715255737, 749.9998807907104, 749.9998807907104 ], "xaxis": "x", "y": [ 500.00011920928955, 600.0000238418579, 600.0000238418579, 649.9999761581421, 550.0000715255737, 399.9999165534973, 399.9999165534973, 449.9998688697815, 349.99996423721313 ], "yaxis": "y" } ], "layout": { "coloraxis": { "colorbar": { "title": { "text": "Pressure [bar]" } }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "legend": { "tracegroupgap": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Junctions: Pressure and Temperature" }, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "x" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "y" } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import plotly.express as px\n", "\n", "junctions = net.res_junction.copy()\n", "junctions[\"x\"] = net.junction_geodata[\"x\"]\n", "junctions[\"y\"] = net.junction_geodata[\"y\"]\n", "\n", "fig = px.scatter(\n", " junctions,\n", " x=\"x\", y=\"y\",\n", " color=\"p_bar\",\n", " hover_data=[\"p_bar\"],\n", " title=\"Junctions: Pressure and Temperature\",\n", " labels={\"p_bar\": \"Pressure [bar]\"}\n", ")\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "f6a723e4", "metadata": {}, "source": [ "The above depiction is not displayed in the online documentation." ] }, { "cell_type": "markdown", "id": "f47c62c1", "metadata": {}, "source": [ "# Generating Pandapipes network using alternative_models() class from SIR 3S Toolkit" ] }, { "cell_type": "markdown", "id": "f8e71b57", "metadata": {}, "source": [ "## Create" ] }, { "cell_type": "code", "execution_count": 78, "id": "9465e500", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[2025-10-07 13:27:30,428] INFO in sir3stoolkit.mantle.dataframes: [metadata] Generating metadata dataframe for element type: ObjectTypes.Node\n", "[2025-10-07 13:27:30,429] INFO in sir3stoolkit.mantle.dataframes: [metadata] Retrieved 9 element(s) of element type ObjectTypes.Node.\n", "[2025-10-07 13:27:30,430] DEBUG in sir3stoolkit.mantle.dataframes: [Resolving Metadata Properties] Using 5 metadata properties.\n", "[2025-10-07 13:27:30,431] INFO in sir3stoolkit.mantle.dataframes: [metadata] Retrieving metadata properties ['Name', 'Zkor', 'QmEin', 'bz.PhEin', 'Ktyp'], geometry...\n", "[2025-10-07 13:27:30,436] INFO in sir3stoolkit.mantle.dataframes: [metadata] 0 non-empty end node columns were created)\n", "[2025-10-07 13:27:30,437] INFO in sir3stoolkit.mantle.dataframes: [metadata] Done. Shape: (9, 7)\n", "[2025-10-07 13:27:30,483] INFO in sir3stoolkit.mantle.dataframes: [results] Generating results dataframe for element type: ObjectTypes.Node\n", "[2025-10-07 13:27:30,501] INFO in sir3stoolkit.mantle.dataframes: [Resolving Timestamps] Only static timestamp 2025-06-05 15:27:46.000 +02:00 is available\n", "[2025-10-07 13:27:30,503] INFO in sir3stoolkit.mantle.dataframes: [results] Retrieved 9 tks.\n", "[2025-10-07 13:27:30,504] INFO in sir3stoolkit.mantle.dataframes: [results] Using 3 result properties.\n", "[2025-10-07 13:27:30,504] INFO in sir3stoolkit.mantle.dataframes: [results] Retrieving result properties...\n", "[2025-10-07 13:27:30,508] INFO in sir3stoolkit.mantle.dataframes: [results] Done. Shape: (9, 5)\n", "[2025-10-07 13:27:30,536] INFO in sir3stoolkit.mantle.dataframes: [metadata] Generating metadata dataframe for element type: ObjectTypes.Pipe\n", "[2025-10-07 13:27:30,537] INFO in sir3stoolkit.mantle.dataframes: [metadata] Retrieved 9 element(s) of element type ObjectTypes.Pipe.\n", "[2025-10-07 13:27:30,539] DEBUG in sir3stoolkit.mantle.dataframes: [Resolving Metadata Properties] Using 4 metadata properties.\n", "[2025-10-07 13:27:30,540] INFO in sir3stoolkit.mantle.dataframes: [metadata] Retrieving metadata properties ['L', 'Di', 'Rau', 'Name'], geometry, end nodes...\n", "[2025-10-07 13:27:30,543] INFO in sir3stoolkit.mantle.dataframes: [metadata] 2 non-empty end node columns were created)\n", "[2025-10-07 13:27:30,544] INFO in sir3stoolkit.mantle.dataframes: [metadata] Done. Shape: (9, 8)\n" ] } ], "source": [ "pp_net = s3s.SIR_3S_to_pandapipes()" ] }, { "cell_type": "markdown", "id": "b7bda858", "metadata": {}, "source": [ "## Calculate" ] }, { "cell_type": "code", "execution_count": 79, "id": "7c371e7b", "metadata": {}, "outputs": [], "source": [ "pp.pipeflow(net)" ] }, { "cell_type": "markdown", "id": "86960e92", "metadata": {}, "source": [ "### View Results" ] }, { "cell_type": "code", "execution_count": 80, "id": "11790d86", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
p_bart_k
0101.000000273.15
1100.932708273.15
299.491364273.15
397.843832273.15
497.843832273.15
5100.289209273.15
699.578419273.15
799.501563273.15
899.501563273.15
\n", "
" ], "text/plain": [ " p_bar t_k\n", "0 101.000000 273.15\n", "1 100.932708 273.15\n", "2 99.491364 273.15\n", "3 97.843832 273.15\n", "4 97.843832 273.15\n", "5 100.289209 273.15\n", "6 99.578419 273.15\n", "7 99.501563 273.15\n", "8 99.501563 273.15" ] }, "execution_count": 80, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_junction" ] }, { "cell_type": "code", "execution_count": 81, "id": "46adfa26", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
v_mean_m_per_sp_from_barp_to_bart_from_kt_to_kt_outlet_kmdot_from_kg_per_smdot_to_kg_per_svdot_m3_per_sreynoldslambda
00.587940101.000000100.932708273.15273.15273.1593.496673-93.4966730.093508148220.7752540.017522
12.03742799.49136497.843832273.15273.15273.15100.000000-100.0000000.100012285354.9557340.019847
22.03742799.49136497.843832273.15273.15273.15100.000000-100.0000000.100012285354.9557340.019847
31.927402101.000000100.289209273.15273.15273.15306.503327-306.5033270.306540485901.3485990.017222
41.927402100.28920999.578419273.15273.15273.15306.503327-306.5033270.306540485901.3485990.017222
50.62883699.57841999.501563273.15273.15273.15100.000000-100.0000000.100012158530.5309630.017494
60.62883699.57841999.501563273.15273.15273.15100.000000-100.0000000.100012158530.5309630.017494
71.904927100.93270899.491364273.15273.15273.1593.496673-93.4966730.093508266797.3954570.019862
8-0.66973199.49136499.578419273.15273.15273.15-106.503327106.503327-0.106516168840.2866720.017470
\n", "
" ], "text/plain": [ " v_mean_m_per_s p_from_bar p_to_bar t_from_k t_to_k t_outlet_k \\\n", "0 0.587940 101.000000 100.932708 273.15 273.15 273.15 \n", "1 2.037427 99.491364 97.843832 273.15 273.15 273.15 \n", "2 2.037427 99.491364 97.843832 273.15 273.15 273.15 \n", "3 1.927402 101.000000 100.289209 273.15 273.15 273.15 \n", "4 1.927402 100.289209 99.578419 273.15 273.15 273.15 \n", "5 0.628836 99.578419 99.501563 273.15 273.15 273.15 \n", "6 0.628836 99.578419 99.501563 273.15 273.15 273.15 \n", "7 1.904927 100.932708 99.491364 273.15 273.15 273.15 \n", "8 -0.669731 99.491364 99.578419 273.15 273.15 273.15 \n", "\n", " mdot_from_kg_per_s mdot_to_kg_per_s vdot_m3_per_s reynolds \\\n", "0 93.496673 -93.496673 0.093508 148220.775254 \n", "1 100.000000 -100.000000 0.100012 285354.955734 \n", "2 100.000000 -100.000000 0.100012 285354.955734 \n", "3 306.503327 -306.503327 0.306540 485901.348599 \n", "4 306.503327 -306.503327 0.306540 485901.348599 \n", "5 100.000000 -100.000000 0.100012 158530.530963 \n", "6 100.000000 -100.000000 0.100012 158530.530963 \n", "7 93.496673 -93.496673 0.093508 266797.395457 \n", "8 -106.503327 106.503327 -0.106516 168840.286672 \n", "\n", " lambda \n", "0 0.017522 \n", "1 0.019847 \n", "2 0.019847 \n", "3 0.017222 \n", "4 0.017222 \n", "5 0.017494 \n", "6 0.017494 \n", "7 0.019862 \n", "8 0.017470 " ] }, "execution_count": 81, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_pipe" ] }, { "cell_type": "code", "execution_count": 82, "id": "9d3cbfc5", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
mdot_kg_per_s
0100.0
1100.0
2100.0
3100.0
\n", "
" ], "text/plain": [ " mdot_kg_per_s\n", "0 100.0\n", "1 100.0\n", "2 100.0\n", "3 100.0" ] }, "execution_count": 82, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_sink" ] }, { "cell_type": "code", "execution_count": 83, "id": "4bc775d7", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
mdot_kg_per_s
0-400.0
\n", "
" ], "text/plain": [ " mdot_kg_per_s\n", "0 -400.0" ] }, "execution_count": 83, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_ext_grid" ] }, { "cell_type": "markdown", "id": "be31dc70", "metadata": {}, "source": [ "## Plot" ] }, { "cell_type": "code", "execution_count": 84, "id": "55f45516", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "customdata": [ [ 101 ], [ 100.93270768766557 ], [ 99.4913642865344 ], [ 97.8438320971401 ], [ 97.8438320971401 ], [ 100.28920932485765 ], [ 99.5784186497153 ], [ 99.50156285916806 ], [ 99.50156285916806 ] ], "hovertemplate": "x=%{x}
y=%{y}
Pressure [bar]=%{marker.color}", "legendgroup": "", "marker": { "color": [ 101, 100.93270768766557, 99.4913642865344, 97.8438320971401, 97.8438320971401, 100.28920932485765, 99.5784186497153, 99.50156285916806, 99.50156285916806 ], "coloraxis": "coloraxis", "symbol": "circle" }, "mode": "markers", "name": "", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 149.99985694885254, 349.99996423721313, 550.0000715255737, 749.9998807907104, 749.9998807907104, 349.99996423721313, 550.0000715255737, 749.9998807907104, 749.9998807907104 ], "xaxis": "x", "y": [ 500.00011920928955, 600.0000238418579, 600.0000238418579, 649.9999761581421, 550.0000715255737, 399.9999165534973, 399.9999165534973, 449.9998688697815, 349.99996423721313 ], "yaxis": "y" } ], "layout": { "coloraxis": { "colorbar": { "title": { "text": "Pressure [bar]" } }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "legend": { "tracegroupgap": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Junctions: Pressure and Temperature" }, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "x" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "y" } } } } }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import plotly.express as px\n", "\n", "junctions = net.res_junction.copy()\n", "junctions[\"x\"] = net.junction_geodata[\"x\"]\n", "junctions[\"y\"] = net.junction_geodata[\"y\"]\n", "\n", "fig = px.scatter(\n", " junctions,\n", " x=\"x\", y=\"y\",\n", " color=\"p_bar\",\n", " hover_data=[\"p_bar\"],\n", " title=\"Junctions: Pressure and Temperature\",\n", " labels={\"p_bar\": \"Pressure [bar]\"}\n", ")\n", "fig.show()" ] }, { "cell_type": "markdown", "id": "56e028e5", "metadata": {}, "source": [ "The above depiction is not displayed in the online documentation." ] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.8" } }, "nbformat": 4, "nbformat_minor": 5 }