{ "cells": [ { "cell_type": "markdown", "id": "1f7a8949", "metadata": {}, "source": [ "# Tutorial 62: 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": 1, "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": null, "id": "a9d5d77c", "metadata": {}, "outputs": [], "source": [ "SIR3S_SIRGRAF_DIR = r\"C:\\3S\\SIR 3S\\SirGraf-90-15-00-24_Quebec-Upd2\" #change to local path" ] }, { "cell_type": "code", "execution_count": 3, "id": "b42a91b2", "metadata": {}, "outputs": [], "source": [ "import sir3stoolkit" ] }, { "cell_type": "code", "execution_count": 4, "id": "43ee1f6e", "metadata": {}, "outputs": [], "source": [ "from sir3stoolkit.core import wrapper" ] }, { "cell_type": "code", "execution_count": 5, "id": "c2dad02e", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sir3stoolkit" ] }, { "cell_type": "code", "execution_count": 6, "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": 7, "id": "03ebacd6", "metadata": {}, "outputs": [], "source": [ "from sir3stoolkit.mantle import alternative_models" ] }, { "cell_type": "code", "execution_count": 8, "id": "1f485cff", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Initialization complete\n" ] } ], "source": [ "s3s = alternative_models.SIR3S_Model_Alternative_Models()" ] }, { "cell_type": "markdown", "id": "c0730ad9", "metadata": {}, "source": [ "## Additional" ] }, { "cell_type": "code", "execution_count": 9, "id": "65935b99", "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 10, "id": "b89e2fc9", "metadata": {}, "outputs": [], "source": [ "import pandapipes as pp" ] }, { "cell_type": "code", "execution_count": 11, "id": "7482c0bb", "metadata": {}, "outputs": [], "source": [ "from shapely import wkt" ] }, { "cell_type": "code", "execution_count": 12, "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": 13, "id": "9920e451", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Model is open for further operation\n" ] } ], "source": [ "s3s.OpenModel(dbName=r\"Toolkit_Tutorial62_Model.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": "e6da7651", "metadata": {}, "source": [ "# Calculate Model" ] }, { "cell_type": "code", "execution_count": 14, "id": "ad53c5c9", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Model Calculation is complete\n" ] } ], "source": [ "s3s.ExecCalculation(True) # To ensure result data" ] }, { "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": 15, "id": "c7d4cfc2", "metadata": {}, "outputs": [], "source": [ "net = pp.create_empty_network(fluid=\"water\")" ] }, { "cell_type": "code", "execution_count": 16, "id": "7c1b1e36", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[2026-03-03 15:43:37,321] INFO in sir3stoolkit.mantle.dataframes: [model_data] Generating model_data dataframe for element type: ObjectTypes.Node\n", "[2026-03-03 15:43:37,330] INFO in sir3stoolkit.mantle.dataframes: [model_data] Retrieved 9 element(s) of element type ObjectTypes.Node.\n", "[2026-03-03 15:43:37,345] INFO in sir3stoolkit.mantle.dataframes: [Resolving model_data Properties] Using 5 model_data properties.\n", "[2026-03-03 15:43:37,347] INFO in sir3stoolkit.mantle.dataframes: [model_data] Retrieving model_data properties ['Name', 'QmEin', 'bz.PhEin', 'Zkor', 'Ktyp'], geometry...\n", "[2026-03-03 15:43:37,377] INFO in sir3stoolkit.mantle.dataframes: [model_data] Transforming DataFrame to GeoDataFrame successful with EPSG: 25832\n", "[2026-03-03 15:43:37,377] INFO in sir3stoolkit.mantle.dataframes: [model_data] Done. Shape: (9, 7)\n" ] } ], "source": [ "df_nodes_model_data = s3s.generate_element_model_data_dataframe(element_type=s3s.ObjectTypes.Node, properties=['Name', 'QmEin', 'bz.PhEin', 'Zkor', 'Ktyp'], geometry=True)" ] }, { "cell_type": "code", "execution_count": 17, "id": "106646f2", "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", "
tkNameQmEinbz.PhEinZkorKtypgeometry
05136506604482101815K0000010010PKONPOINT (150 500)
15174640379525019821K00010010QKONPOINT (350 600)
25665004361761998834K00020010QKONPOINT (550 600)
\n", "
" ], "text/plain": [ " tk Name QmEin bz.PhEin Zkor Ktyp geometry\n", "0 5136506604482101815 K0000 0 100 10 PKON POINT (150 500)\n", "1 5174640379525019821 K0001 0 0 10 QKON POINT (350 600)\n", "2 5665004361761998834 K0002 0 0 10 QKON POINT (550 600)" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_nodes_model_data.head(3)" ] }, { "cell_type": "code", "execution_count": 18, "id": "1d394cb2", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[2026-03-03 15:43:37,479] INFO in sir3stoolkit.mantle.dataframes: [results] Generating results dataframe for element type: ObjectTypes.Node\n", "[2026-03-03 15:43:37,485] INFO in sir3stoolkit.mantle.dataframes: [Resolving Timestamps] Only static timestamp 2025-06-05 15:27:46.000 +02:00 is used\n", "[2026-03-03 15:43:37,485] INFO in sir3stoolkit.mantle.dataframes: [Resolving Timestamps] 1 valid timestamp(s) will be used.\n", "[2026-03-03 15:43:37,492] INFO in sir3stoolkit.mantle.dataframes: [Resolving tks] Retrieved 9 element(s) of element type ObjectTypes.Node.\n", "[2026-03-03 15:43:37,494] INFO in sir3stoolkit.mantle.dataframes: [results] Using 3 result properties.\n", "[2026-03-03 15:43:37,575] INFO in sir3stoolkit.mantle.dataframes: [results] Retrieving result values...\n", "[2026-03-03 15:43:37,601] INFO in sir3stoolkit.mantle.dataframes: [results] 0 fully NaN columns dropped.\n", "[2026-03-03 15:43:37,608] INFO in sir3stoolkit.mantle.dataframes: [results] Done. Shape: (1, 27)\n" ] } ], "source": [ "df_nodes_results = s3s.generate_element_results_dataframe(element_type=s3s.ObjectTypes.Node, properties=['PH', 'T', 'QM'], timestamps=s3s.GetTimeStamps()[0])" ] }, { "cell_type": "code", "execution_count": 19, "id": "71797db9", "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", "
tk513650660448210181551746403795250198215665004361761998834518549372887236083447769314670664659135229509832448527475507349047813631365554173149869886665875366461594623940805
nameK0000K0001K0002K0003K0004K0005K0006K0007K0008
end_nodesNo end nodes on element typeNo end nodes on element typeNo end nodes on element typeNo end nodes on element typeNo end nodes on element typeNo end nodes on element typeNo end nodes on element typeNo end nodes on element typeNo end nodes on element type
propertyPHTQMPHTQMPHTQMPHTQMPHTQMPHTQMPHTQMPHTQMPHTQM
timestamp
2025-06-05 15:27:46.000 +02:00100.00.0400.099.982630.00.099.916530.00.099.771610.0-100.099.771610.0-100.099.958450.00.099.916910.00.099.909070.0-100.099.909070.0-100.0
\n", "
" ], "text/plain": [ "tk 5136506604482101815 \\\n", "name K0000 \n", "end_nodes No end nodes on element type \n", "property PH T QM \n", "timestamp \n", "2025-06-05 15:27:46.000 +02:00 100.0 0.0 400.0 \n", "\n", "tk 5174640379525019821 \\\n", "name K0001 \n", "end_nodes No end nodes on element type \n", "property PH T QM \n", "timestamp \n", "2025-06-05 15:27:46.000 +02:00 99.98263 0.0 0.0 \n", "\n", "tk 5665004361761998834 \\\n", "name K0002 \n", "end_nodes No end nodes on element type \n", "property PH T QM \n", "timestamp \n", "2025-06-05 15:27:46.000 +02:00 99.91653 0.0 0.0 \n", "\n", "tk 5185493728872360834 \\\n", "name K0003 \n", "end_nodes No end nodes on element type \n", "property PH T QM \n", "timestamp \n", "2025-06-05 15:27:46.000 +02:00 99.77161 0.0 -100.0 \n", "\n", "tk 4776931467066465913 \\\n", "name K0004 \n", "end_nodes No end nodes on element type \n", "property PH T QM \n", "timestamp \n", "2025-06-05 15:27:46.000 +02:00 99.77161 0.0 -100.0 \n", "\n", "tk 5229509832448527475 \\\n", "name K0005 \n", "end_nodes No end nodes on element type \n", "property PH T QM \n", "timestamp \n", "2025-06-05 15:27:46.000 +02:00 99.95845 0.0 0.0 \n", "\n", "tk 5073490478136313655 \\\n", "name K0006 \n", "end_nodes No end nodes on element type \n", "property PH T QM \n", "timestamp \n", "2025-06-05 15:27:46.000 +02:00 99.91691 0.0 0.0 \n", "\n", "tk 5417314986988666587 \\\n", "name K0007 \n", "end_nodes No end nodes on element type \n", "property PH T QM \n", "timestamp \n", "2025-06-05 15:27:46.000 +02:00 99.90907 0.0 -100.0 \n", "\n", "tk 5366461594623940805 \n", "name K0008 \n", "end_nodes No end nodes on element type \n", "property PH T QM \n", "timestamp \n", "2025-06-05 15:27:46.000 +02:00 99.90907 0.0 -100.0 " ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_nodes_results.head(3)" ] }, { "cell_type": "code", "execution_count": 20, "id": "3c4b0954", "metadata": {}, "outputs": [], "source": [ "df_nodes_results.columns = df_nodes_results.columns.droplevel([1, 2])\n", "df_nodes_results = df_nodes_results.T.unstack(level=0).T\n", "df_nodes_results = df_nodes_results.droplevel(0, axis=0)\n", "df_nodes = df_nodes_model_data.merge(on=\"tk\",\n", " how=\"outer\",\n", " right=df_nodes_results)" ] }, { "cell_type": "code", "execution_count": 21, "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", "
tkNameQmEinbz.PhEinZkorKtypgeometryPHQMT
04776931467066465913K0004-100010QKONPOINT (750 550)99.77161-100.00.0
15073490478136313655K00060010QKONPOINT (550 400)99.916910.00.0
25136506604482101815K0000010010PKONPOINT (150 500)100.00000400.00.0
\n", "
" ], "text/plain": [ " tk Name QmEin bz.PhEin Zkor Ktyp geometry \\\n", "0 4776931467066465913 K0004 -100 0 10 QKON POINT (750 550) \n", "1 5073490478136313655 K0006 0 0 10 QKON POINT (550 400) \n", "2 5136506604482101815 K0000 0 100 10 PKON POINT (150 500) \n", "\n", " PH QM T \n", "0 99.77161 -100.0 0.0 \n", "1 99.91691 0.0 0.0 \n", "2 100.00000 400.0 0.0 " ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_nodes.head(3)" ] }, { "cell_type": "code", "execution_count": 22, "id": "2eb58471", "metadata": {}, "outputs": [], "source": [ "js = {}\n", "\n", "for idx, row in df_nodes.iterrows():\n", " geom = 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[int(row['tk'])] = j" ] }, { "cell_type": "code", "execution_count": 23, "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
0K0004~4776931467066465913100.77161273.1510.0Truejunction
1K0006~5073490478136313655100.91691273.1510.0Truejunction
2K0000~5136506604482101815101.00000273.1510.0Truejunction
3K0001~5174640379525019821100.98263273.1510.0Truejunction
4K0003~5185493728872360834100.77161273.1510.0Truejunction
5K0005~5229509832448527475100.95845273.1510.0Truejunction
6K0008~5366461594623940805100.90907273.1510.0Truejunction
7K0007~5417314986988666587100.90907273.1510.0Truejunction
8K0002~5665004361761998834100.91653273.1510.0Truejunction
\n", "
" ], "text/plain": [ " name pn_bar tfluid_k height_m in_service \\\n", "0 K0004~4776931467066465913 100.77161 273.15 10.0 True \n", "1 K0006~5073490478136313655 100.91691 273.15 10.0 True \n", "2 K0000~5136506604482101815 101.00000 273.15 10.0 True \n", "3 K0001~5174640379525019821 100.98263 273.15 10.0 True \n", "4 K0003~5185493728872360834 100.77161 273.15 10.0 True \n", "5 K0005~5229509832448527475 100.95845 273.15 10.0 True \n", "6 K0008~5366461594623940805 100.90907 273.15 10.0 True \n", "7 K0007~5417314986988666587 100.90907 273.15 10.0 True \n", "8 K0002~5665004361761998834 100.91653 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": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.junction" ] }, { "cell_type": "markdown", "id": "bfe88f29", "metadata": {}, "source": [ "### pipes" ] }, { "cell_type": "code", "execution_count": 24, "id": "b7fa4c24", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[2026-03-03 15:43:37,751] INFO in sir3stoolkit.mantle.dataframes: [model_data] Generating model_data dataframe for element type: ObjectTypes.Pipe\n", "[2026-03-03 15:43:37,751] INFO in sir3stoolkit.mantle.dataframes: [model_data] Retrieved 9 element(s) of element type ObjectTypes.Pipe.\n", "[2026-03-03 15:43:37,754] INFO in sir3stoolkit.mantle.dataframes: [Resolving model_data Properties] Using 4 model_data properties.\n", "[2026-03-03 15:43:37,754] INFO in sir3stoolkit.mantle.dataframes: [model_data] Retrieving model_data properties ['L', 'Di', 'Rau', 'Name'], geometry, end nodes...\n", "[2026-03-03 15:43:37,810] INFO in sir3stoolkit.mantle.dataframes: [model_data] 2 non-empty end node columns were created.\n", "[2026-03-03 15:43:37,831] INFO in sir3stoolkit.mantle.dataframes: [model_data] Transforming DataFrame to GeoDataFrame successful with EPSG: 25832\n", "[2026-03-03 15:43:37,831] INFO in sir3stoolkit.mantle.dataframes: [model_data] Done. Shape: (9, 8)\n" ] } ], "source": [ "df_pipes_model_data = s3s.generate_element_model_data_dataframe(element_type=s3s.ObjectTypes.Pipe, properties=['L', 'Di', 'Rau', 'Name'], end_nodes=True, geometry=True)" ] }, { "cell_type": "code", "execution_count": 25, "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
047629473580054953411000.04500.25Rohr K0000 K0001LINESTRING (150 500, 350 600)51365066044821018155174640379525019821
154791236493624396501000.02500.25Rohr K0002 K0003LINESTRING (550 600, 750 650)56650043617619988345185493728872360834
253673038848522006821000.02500.25Rohr K0002 K0004LINESTRING (550 600, 750 550)56650043617619988344776931467066465913
\n", "
" ], "text/plain": [ " tk L Di Rau Name \\\n", "0 4762947358005495341 1000.0 450 0.25 Rohr K0000 K0001 \n", "1 5479123649362439650 1000.0 250 0.25 Rohr K0002 K0003 \n", "2 5367303884852200682 1000.0 250 0.25 Rohr K0002 K0004 \n", "\n", " geometry fkKI fkKK \n", "0 LINESTRING (150 500, 350 600) 5136506604482101815 5174640379525019821 \n", "1 LINESTRING (550 600, 750 650) 5665004361761998834 5185493728872360834 \n", "2 LINESTRING (550 600, 750 550) 5665004361761998834 4776931467066465913 " ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_pipes_model_data.head(3)" ] }, { "cell_type": "code", "execution_count": 26, "id": "21c5f0bc", "metadata": {}, "outputs": [], "source": [ "ps = {}\n", "\n", "for idx, row in df_pipes_model_data.iterrows():\n", " geom = 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": 27, "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~476294735800549534123None1.00.450.250.00.0NaN0.01Truepipe
1Rohr K0002 K0003~547912364936243965084None1.00.250.250.00.0NaN0.01Truepipe
2Rohr K0002 K0004~536730388485220068280None1.00.250.250.00.0NaN0.01Truepipe
\n", "
" ], "text/plain": [ " name from_junction to_junction std_type \\\n", "0 Rohr K0000 K0001~4762947358005495341 2 3 None \n", "1 Rohr K0002 K0003~5479123649362439650 8 4 None \n", "2 Rohr K0002 K0004~5367303884852200682 8 0 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": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.pipe.head(3)" ] }, { "cell_type": "markdown", "id": "1c772f21", "metadata": {}, "source": [ "### sources/sinks" ] }, { "cell_type": "code", "execution_count": 28, "id": "7fa2168a", "metadata": {}, "outputs": [], "source": [ "for idx, row in df_nodes.iterrows():\n", " ktyp = (row.get(\"Ktyp\"))\n", " tk = int(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": 29, "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~51365066044821018152101.0273.15Truept
\n", "
" ], "text/plain": [ " name junction p_bar t_k in_service type\n", "0 Src: K0000~5136506604482101815 2 101.0 273.15 True pt" ] }, "execution_count": 29, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.ext_grid" ] }, { "cell_type": "code", "execution_count": 30, "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: K0004~47769314670664659130100.01.0Truesink
1Snk: K0003~51854937288723608344100.01.0Truesink
2Snk: K0008~53664615946239408056100.01.0Truesink
3Snk: K0007~54173149869886665877100.01.0Truesink
\n", "
" ], "text/plain": [ " name junction mdot_kg_per_s scaling \\\n", "0 Snk: K0004~4776931467066465913 0 100.0 1.0 \n", "1 Snk: K0003~5185493728872360834 4 100.0 1.0 \n", "2 Snk: K0008~5366461594623940805 6 100.0 1.0 \n", "3 Snk: K0007~5417314986988666587 7 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": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.sink" ] }, { "cell_type": "markdown", "id": "b5f6bff3", "metadata": {}, "source": [ "## Calculate" ] }, { "cell_type": "code", "execution_count": 31, "id": "73ef9a8b", "metadata": {}, "outputs": [], "source": [ "pp.pipeflow(net)" ] }, { "cell_type": "markdown", "id": "5534d1c4", "metadata": {}, "source": [ "### View Results" ] }, { "cell_type": "code", "execution_count": 32, "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
098.417039273.15
1100.068190273.15
2101.000000273.15
3100.823662273.15
498.417039273.15
5100.534095273.15
699.991334273.15
799.991334273.15
8100.064571273.15
\n", "
" ], "text/plain": [ " p_bar t_k\n", "0 98.417039 273.15\n", "1 100.068190 273.15\n", "2 101.000000 273.15\n", "3 100.823662 273.15\n", "4 98.417039 273.15\n", "5 100.534095 273.15\n", "6 99.991334 273.15\n", "7 99.991334 273.15\n", "8 100.064571 273.15" ] }, "execution_count": 32, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_junction" ] }, { "cell_type": "code", "execution_count": 33, "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.956300101.000000100.823662273.15273.15273.15152.074654-152.0746540.152093241084.7570590.017356
12.037427100.06457198.417039273.15273.15273.15100.000000-100.0000000.100012285354.9557340.019847
22.037427100.06457198.417039273.15273.15273.15100.000000-100.0000000.100012285354.9557340.019847
31.559043101.000000100.534095273.15273.15273.15247.925346-247.9253460.247955393037.3667930.017253
41.559043100.534095100.068190273.15273.15273.15247.925346-247.9253460.247955393037.3667930.017253
50.628836100.06819099.991334273.15273.15273.15100.000000-100.0000000.100012158530.5309630.017494
60.628836100.06819099.991334273.15273.15273.15100.000000-100.0000000.100012158530.5309630.017494
73.098411100.823662100.064571273.15273.15273.15152.074654-152.0746540.152093433952.5627070.019770
8-0.301372100.064571100.068190273.15273.15273.15-47.92534647.925346-0.04793175976.3048670.017933
\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.956300 101.000000 100.823662 273.15 273.15 273.15 \n", "1 2.037427 100.064571 98.417039 273.15 273.15 273.15 \n", "2 2.037427 100.064571 98.417039 273.15 273.15 273.15 \n", "3 1.559043 101.000000 100.534095 273.15 273.15 273.15 \n", "4 1.559043 100.534095 100.068190 273.15 273.15 273.15 \n", "5 0.628836 100.068190 99.991334 273.15 273.15 273.15 \n", "6 0.628836 100.068190 99.991334 273.15 273.15 273.15 \n", "7 3.098411 100.823662 100.064571 273.15 273.15 273.15 \n", "8 -0.301372 100.064571 100.068190 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 152.074654 -152.074654 0.152093 241084.757059 \n", "1 100.000000 -100.000000 0.100012 285354.955734 \n", "2 100.000000 -100.000000 0.100012 285354.955734 \n", "3 247.925346 -247.925346 0.247955 393037.366793 \n", "4 247.925346 -247.925346 0.247955 393037.366793 \n", "5 100.000000 -100.000000 0.100012 158530.530963 \n", "6 100.000000 -100.000000 0.100012 158530.530963 \n", "7 152.074654 -152.074654 0.152093 433952.562707 \n", "8 -47.925346 47.925346 -0.047931 75976.304867 \n", "\n", " lambda \n", "0 0.017356 \n", "1 0.019847 \n", "2 0.019847 \n", "3 0.017253 \n", "4 0.017253 \n", "5 0.017494 \n", "6 0.017494 \n", "7 0.019770 \n", "8 0.017933 " ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_pipe" ] }, { "cell_type": "code", "execution_count": 34, "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": 34, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_sink" ] }, { "cell_type": "code", "execution_count": 35, "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": 35, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_ext_grid" ] }, { "cell_type": "markdown", "id": "3275794e", "metadata": {}, "source": [ "## Plot" ] }, { "cell_type": "code", "execution_count": 36, "id": "82d44447", "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAA+gAAAMDCAYAAAAxID+lAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAApQ0lEQVR4nO3da6xldX3/8c8++8zgjMwFUERUpqitLVipbdSOqTZRK7TYRLRaU2JR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YJ82gQ4AAMCSBPtkCXQAAAD6ItjHS6ADAAAwFME+WgIdAACAkRDsayPQAQAAGItig/3hh5Of/jQ5eDA5+eRk27ak0xn9OgMS6AAAAEzE1IP95puTT386ueqqXpwfdvbZyaWXJhdemDzxicPvf40EOgAAAFMxsWBfXEze977kr/4qmZ1N5ueP/n2nk1RV8rSnJTfckJx11hpf2XAEOgAAAEUYS7BXVXLZZcmnPrX6AN1usnlzsnNn8qxnrfHVDE6gAwAAUKSRBPs3v5mcd17/i3a7yQtfmNx00whewWAEOgAAALUwTLCf8/73Z9OOHeksLAy22K23Juecs7aBByTQAQAAqKXVgv2E++7Li97whgx8ffbZ2eStb00++9mRzrvqshNdDQAAAEak0+lkw4YN2bBhQ5761KceF+ydHTsGj/OkdxG5f/mXUY+7KoEOAABAIxwX7DffPPzOHnlkdIP1aQx3fAcAAIDp62zdOvzGa9l2SAIdAACAZnrxi5MTThh8u253sCu/j4hABwAAoJlOOim58MLeRd8GUVXJ298+nplWINABAABorssu6wV3v7rd5PWvT57+9PHNtAyBDgAAQHM973nJlVf2fu6sck33bjc566zkiivGP9cSBDoAAADN9uY3J1dfnWzc2Pv3saF++BT43/qt5HvfSzZtmux8j+pU1SDH+gEAAKCm9u5Nvvzl5DOfSf7t35K5ud7V2n/v95I/+qPknHOmOp5ABwAAgAI4xR0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACiDQAQAAoAACHQAAAAog0AEAAKAAAh0AAAAKINABAACgAAIdAAAACvD/Acf6V0rfkICfAAAAAElFTkSuQmCC", "text/plain": [ "
" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "" ] }, "execution_count": 36, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pp_plot.simple_plot(net)" ] }, { "cell_type": "code", "execution_count": 37, "id": "b19a24b7", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "customdata": [ [ 98.41703904139733 ], [ 100.06819026535807 ], [ 101 ], [ 100.82366244304148 ], [ 98.41703904139733 ], [ 100.53409513267904 ], [ 99.99133447481083 ], [ 99.99133447481083 ], [ 100.06457123079163 ] ], "hovertemplate": "x=%{x}
y=%{y}
Pressure [bar]=%{marker.color}", "legendgroup": "", "marker": { "color": [ 98.41703904139733, 100.06819026535807, 101, 100.82366244304148, 98.41703904139733, 100.53409513267904, 99.99133447481083, 99.99133447481083, 100.06457123079163 ], "coloraxis": "coloraxis", "symbol": "circle" }, "mode": "markers", "name": "", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 749.9998807907104, 550.0000715255737, 149.99985694885254, 349.99996423721313, 749.9998807907104, 349.99996423721313, 749.9998807907104, 749.9998807907104, 550.0000715255737 ], "xaxis": "x", "y": [ 550.0000715255737, 399.9999165534973, 500.00011920928955, 600.0000238418579, 649.9999761581421, 399.9999165534973, 349.99996423721313, 449.9998688697815, 600.0000238418579 ], "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": "markdown", "id": "79eb5b22", "metadata": {}, "source": [ "Now we can perform the same steps above confined into one method using [SIR_3S_to_pandapipes()](https://3sconsult.github.io/sir3stoolkit/references/sir3stoolkit.mantle.html#sir3stoolkit.mantle.alternative_models.Alternative_Models_SIR3S_Model.SIR_3S_to_pandapipes)." ] }, { "cell_type": "code", "execution_count": 38, "id": "9465e500", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "[2026-03-03 15:44:04,159] INFO in sir3stoolkit.mantle.dataframes: [model_data] Generating model_data dataframe for element type: ObjectTypes.Node\n", "[2026-03-03 15:44:04,161] INFO in sir3stoolkit.mantle.dataframes: [model_data] Retrieved 9 element(s) of element type ObjectTypes.Node.\n", "[2026-03-03 15:44:04,166] INFO in sir3stoolkit.mantle.dataframes: [Resolving model_data Properties] Using 5 model_data properties.\n", "[2026-03-03 15:44:04,167] INFO in sir3stoolkit.mantle.dataframes: [model_data] Retrieving model_data properties ['Name', 'Zkor', 'QmEin', 'bz.PhEin', 'Ktyp'], geometry...\n", "[2026-03-03 15:44:04,206] INFO in sir3stoolkit.mantle.dataframes: [model_data] Transforming DataFrame to GeoDataFrame successful with EPSG: 25832\n", "[2026-03-03 15:44:04,206] INFO in sir3stoolkit.mantle.dataframes: [model_data] Done. Shape: (9, 7)\n", "[2026-03-03 15:44:04,233] INFO in sir3stoolkit.mantle.dataframes: [results] Generating results dataframe for element type: ObjectTypes.Node\n", "[2026-03-03 15:44:04,258] INFO in sir3stoolkit.mantle.dataframes: [Resolving Timestamps] Only static timestamp 2025-06-05 15:27:46.000 +02:00 is used\n", "[2026-03-03 15:44:04,258] INFO in sir3stoolkit.mantle.dataframes: [Resolving Timestamps] 1 valid timestamp(s) will be used.\n", "[2026-03-03 15:44:04,263] INFO in sir3stoolkit.mantle.dataframes: [Resolving tks] Retrieved 9 element(s) of element type ObjectTypes.Node.\n", "[2026-03-03 15:44:04,268] INFO in sir3stoolkit.mantle.dataframes: [results] Using 3 result properties.\n", "[2026-03-03 15:44:04,280] INFO in sir3stoolkit.mantle.dataframes: [results] Retrieving result values...\n", "[2026-03-03 15:44:04,291] INFO in sir3stoolkit.mantle.dataframes: [results] 0 fully NaN columns dropped.\n", "[2026-03-03 15:44:04,302] INFO in sir3stoolkit.mantle.dataframes: [results] Done. Shape: (1, 27)\n", "[2026-03-03 15:44:04,368] INFO in sir3stoolkit.mantle.dataframes: [model_data] Generating model_data dataframe for element type: ObjectTypes.Pipe\n", "[2026-03-03 15:44:04,373] INFO in sir3stoolkit.mantle.dataframes: [model_data] Retrieved 9 element(s) of element type ObjectTypes.Pipe.\n", "[2026-03-03 15:44:04,374] INFO in sir3stoolkit.mantle.dataframes: [Resolving model_data Properties] Using 4 model_data properties.\n", "[2026-03-03 15:44:04,374] INFO in sir3stoolkit.mantle.dataframes: [model_data] Retrieving model_data properties ['L', 'Di', 'Rau', 'Name'], geometry, end nodes...\n", "[2026-03-03 15:44:04,393] INFO in sir3stoolkit.mantle.dataframes: [model_data] 2 non-empty end node columns were created.\n", "[2026-03-03 15:44:04,439] INFO in sir3stoolkit.mantle.dataframes: [model_data] Transforming DataFrame to GeoDataFrame successful with EPSG: 25832\n", "[2026-03-03 15:44:04,440] INFO in sir3stoolkit.mantle.dataframes: [model_data] 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": 39, "id": "7c371e7b", "metadata": {}, "outputs": [], "source": [ "pp.pipeflow(net)" ] }, { "cell_type": "markdown", "id": "86960e92", "metadata": {}, "source": [ "### View Results" ] }, { "cell_type": "code", "execution_count": 40, "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
098.417039273.15
1100.068190273.15
2101.000000273.15
3100.823662273.15
498.417039273.15
5100.534095273.15
699.991334273.15
799.991334273.15
8100.064571273.15
\n", "
" ], "text/plain": [ " p_bar t_k\n", "0 98.417039 273.15\n", "1 100.068190 273.15\n", "2 101.000000 273.15\n", "3 100.823662 273.15\n", "4 98.417039 273.15\n", "5 100.534095 273.15\n", "6 99.991334 273.15\n", "7 99.991334 273.15\n", "8 100.064571 273.15" ] }, "execution_count": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_junction" ] }, { "cell_type": "code", "execution_count": 41, "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.956300101.000000100.823662273.15273.15273.15152.074654-152.0746540.152093241084.7570590.017356
12.037427100.06457198.417039273.15273.15273.15100.000000-100.0000000.100012285354.9557340.019847
22.037427100.06457198.417039273.15273.15273.15100.000000-100.0000000.100012285354.9557340.019847
31.559043101.000000100.534095273.15273.15273.15247.925346-247.9253460.247955393037.3667930.017253
41.559043100.534095100.068190273.15273.15273.15247.925346-247.9253460.247955393037.3667930.017253
50.628836100.06819099.991334273.15273.15273.15100.000000-100.0000000.100012158530.5309630.017494
60.628836100.06819099.991334273.15273.15273.15100.000000-100.0000000.100012158530.5309630.017494
73.098411100.823662100.064571273.15273.15273.15152.074654-152.0746540.152093433952.5627070.019770
8-0.301372100.064571100.068190273.15273.15273.15-47.92534647.925346-0.04793175976.3048670.017933
\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.956300 101.000000 100.823662 273.15 273.15 273.15 \n", "1 2.037427 100.064571 98.417039 273.15 273.15 273.15 \n", "2 2.037427 100.064571 98.417039 273.15 273.15 273.15 \n", "3 1.559043 101.000000 100.534095 273.15 273.15 273.15 \n", "4 1.559043 100.534095 100.068190 273.15 273.15 273.15 \n", "5 0.628836 100.068190 99.991334 273.15 273.15 273.15 \n", "6 0.628836 100.068190 99.991334 273.15 273.15 273.15 \n", "7 3.098411 100.823662 100.064571 273.15 273.15 273.15 \n", "8 -0.301372 100.064571 100.068190 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 152.074654 -152.074654 0.152093 241084.757059 \n", "1 100.000000 -100.000000 0.100012 285354.955734 \n", "2 100.000000 -100.000000 0.100012 285354.955734 \n", "3 247.925346 -247.925346 0.247955 393037.366793 \n", "4 247.925346 -247.925346 0.247955 393037.366793 \n", "5 100.000000 -100.000000 0.100012 158530.530963 \n", "6 100.000000 -100.000000 0.100012 158530.530963 \n", "7 152.074654 -152.074654 0.152093 433952.562707 \n", "8 -47.925346 47.925346 -0.047931 75976.304867 \n", "\n", " lambda \n", "0 0.017356 \n", "1 0.019847 \n", "2 0.019847 \n", "3 0.017253 \n", "4 0.017253 \n", "5 0.017494 \n", "6 0.017494 \n", "7 0.019770 \n", "8 0.017933 " ] }, "execution_count": 41, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_pipe" ] }, { "cell_type": "code", "execution_count": 42, "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": 42, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_sink" ] }, { "cell_type": "code", "execution_count": 43, "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": 43, "metadata": {}, "output_type": "execute_result" } ], "source": [ "net.res_ext_grid" ] }, { "cell_type": "markdown", "id": "be31dc70", "metadata": {}, "source": [ "## Plot" ] }, { "cell_type": "code", "execution_count": 44, "id": "55f45516", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "customdata": [ [ 98.41703904139733 ], [ 100.06819026535807 ], [ 101 ], [ 100.82366244304148 ], [ 98.41703904139733 ], [ 100.53409513267904 ], [ 99.99133447481083 ], [ 99.99133447481083 ], [ 100.06457123079163 ] ], "hovertemplate": "x=%{x}
y=%{y}
Pressure [bar]=%{marker.color}", "legendgroup": "", "marker": { "color": [ 98.41703904139733, 100.06819026535807, 101, 100.82366244304148, 98.41703904139733, 100.53409513267904, 99.99133447481083, 99.99133447481083, 100.06457123079163 ], "coloraxis": "coloraxis", "symbol": "circle" }, "mode": "markers", "name": "", "orientation": "v", "showlegend": false, "type": "scatter", "x": [ 749.9998807907104, 550.0000715255737, 149.99985694885254, 349.99996423721313, 749.9998807907104, 349.99996423721313, 749.9998807907104, 749.9998807907104, 550.0000715255737 ], "xaxis": "x", "y": [ 550.0000715255737, 399.9999165534973, 500.00011920928955, 600.0000238418579, 649.9999761581421, 399.9999165534973, 349.99996423721313, 449.9998688697815, 600.0000238418579 ], "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 }