Skip to content

Commit

Permalink
Merge pull request #526 from kbensafta/biogas
Browse files Browse the repository at this point in the history
Biomethane (bis)
  • Loading branch information
dlohmeier authored Sep 19, 2023
2 parents 6a87439 + ba8f8c3 commit 7d82b3f
Show file tree
Hide file tree
Showing 25 changed files with 474 additions and 163 deletions.
9 changes: 9 additions & 0 deletions doc/source/fluid_properties/composition.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
;**Biomethane pure**;**Biomethane treated**
methane; 96.15% ; 90.94%
nitrogen; 0.75 % ;0.69 %
carbon dioxide; 2.9 % ;2.68 %
oxygen; 0.2 % ; 0.19 %
propane; 0 % ; 5 %
butane; 0 %; 0.5 %
Wobbe-Index (normal conditions) :math:`[\frac{KWh}{m^3}]` ; 13.9 ; 14.9
HHV (normal conditions) :math:`[\frac{KWh}{m^3}]`; 10.6 ; 11.6
12 changes: 10 additions & 2 deletions doc/source/fluid_properties/create_fluids.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ Fluid from Library
==================

In the fluid library some default fluids are already implemented. Currently it is
possible to work with the default fluids high and low calorific natural
gas (hgas and lgas), hydrogen, methane, water and air. The values are loaded from txt-files in
possible to work with the default fluids:

- ``hgas`` and ``lgas`` (high and low calorific natural gas),
- ``hydrogen``,
- ``methane``,
- ``water``,
- ``biomethane_pure`` and ``biomathane_treated`` (see `here <https://pandapipes.readthedocs.io/en/latest/fluid_properties/fluids.html>`_ for the compositions),
- ``air``.

The values are loaded from txt-files in
the 'pandapipes/properties/[fluid name]' folder.
One of these default fluids can be created and added to an
existing network by calling the following function.
Expand Down
24 changes: 22 additions & 2 deletions doc/source/fluid_properties/fluids.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,29 @@ Fluid Properties in pandapipes

The pipelines in the pandapipes network are run with a certain fluid. This can be
chosen individually for the net from the fluid library or by own creation. The fluids
are defined by certain properties. In the fluid library currently high and low calorific natural
gas (hgas and lgas), hydrogen, methane, water and air are implemented with default properties.
are defined by certain properties.

The following fluids currently exist in the library:

- ``hgas`` and ``lgas`` (high and low calorific natural gas),
- ``hydrogen``,
- ``methane``,
- ``water``,
- ``biomethane_pure`` and ``biomathane_treated`` (compositions below)
- ``air``.


.. Note::
**Biomethane(s)**:
A particularity of injecting biomethane in the gas grid in Germany is the addition of LPG to enhance
the Wobbe-Index and the heating value of the gas and thus make it equivalent to the (high-calorific) natural gas transported
in the grid. This addition is done in a gas treatment unit (Biogaseinspeiseanlage) upstream of the biomethane
feed-in junction. The properties of the biomethane(s) were computed based on the package `CoolProp <http://www.coolprop.org/)>`_.

.. csv-table::
:file: composition.csv
:delim: ;
:widths: 10, 10, 10

The Fluid Class
===============
Expand Down
4 changes: 2 additions & 2 deletions pandapipes/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -1629,8 +1629,8 @@ def create_heat_exchangers(net, from_junctions, to_junctions, diameter_m, qext_w
def create_fluid_from_lib(net, name, overwrite=True):
"""
Creates a fluid from library (if there is an entry) and sets net["fluid"] to this value.
Currently, existing fluids in the library are: "hgas", "lgas", "hydrogen", "methane", "water",
"air".
Currently, existing fluids in the library are: "hgas", "lgas", "hydrogen", "methane", "water","biomethane_pure",
"biomethane_treated", "air".
:param net: The net for which this fluid should be created
:type net: pandapipesNet
Expand Down
3 changes: 3 additions & 0 deletions pandapipes/properties/biomethane_pure/compressibility.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# source: linear approximation based on CoolProp (http://www.coolprop.org/)
# slope in 1/bar, offset for linear property
-0.0019303630399938587 0.9958350401842455
58 changes: 58 additions & 0 deletions pandapipes/properties/biomethane_pure/density.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# source: CoolProp (http://www.coolprop.org/)
# temperature in Kelvin, nominal density in kg/Nm^3 at 1.01325 bar
263.15 0.7883176797706959
265.15 0.7823175132720274
267.15 0.7764086858132603
269.15 0.7705891091714784
271.15 0.7648567589356711
273.15 0.7592096720602627
275.15 0.7536459445317518
277.15 0.7481637291423288
279.15 0.742761233364706
281.15 0.7374367173227688
283.15 0.7321884918529732
285.15 0.7270149166517398
287.15 0.721914398504361
289.15 0.7168853895912243
291.15 0.7119263858673918
293.15 0.7070359255118169
295.15 0.7022125874426869
297.15 0.6974549899243704
299.15 0.6927617891486424
301.15 0.6881316779168388
303.15 0.6835633841304272
305.15 0.679055670907835
307.15 0.6746073333963901
309.15 0.6702171990259529
311.15 0.6658841261093711
313.15 0.6616070028247312
315.15 0.6573847462379292
317.15 0.6532163013636869
319.15 0.6491006402632528
321.15 0.6450367611771036
323.15 0.6410236876910659
325.15 0.6370604679343483
327.15 0.6331461738080604
329.15 0.62927990024286
331.15 0.6254607644844474
333.15 0.6216879054056833
335.15 0.6179604828441738
337.15 0.6142776769642169
339.15 0.6106386876420702
341.15 0.6070427338735377
343.15 0.6034890532029326
345.15 0.5999769011734114
347.15 0.5965055507927562
349.15 0.5930742920256563
351.15 0.589682431296971
353.15 0.5863292910154656
355.15 0.5830142091135528
357.15 0.5797365386029372
359.15 0.5764956471455245
361.15 0.5732909166389835
363.15 0.5701217428163711
365.15 0.5669875348592726
367.15 0.5638877150239164
369.15 0.5608217182797604
371.15 0.557788991960064
373.15 0.5547889954239786
3 changes: 3 additions & 0 deletions pandapipes/properties/biomethane_pure/der_compressibility.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# source: own calculation based on CoolProp (http://www.coolprop.org/)
# derivative (slope) of compressibility
-0.0019303630399938587
10 changes: 10 additions & 0 deletions pandapipes/properties/biomethane_pure/gas_composition.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
source: Arbeitsblatt DVGW G 260(A)

Gas composition (molar fraction):
methane: 96.15 %
nitrogen: 0.75 %
carbon dioxide: 2.9 %
oxygen: 0.2 %

Wobbe-Index (normal conditions) : 13.9 KWh/m³
HHV (normal conditions) : 10.6 KWh/m³
58 changes: 58 additions & 0 deletions pandapipes/properties/biomethane_pure/heat_capacity.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#source CoolProp (http://www.coolprop.org/)
# temperature in Kelvin, isobaric heat capacity in J/(kg K)
263.15 2043.9248427852253
265.15 2046.988073303865
267.15 2050.126087163204
269.15 2053.3384737054007
271.15 2056.6247917272185
273.15 2059.9845702851426
275.15 2063.417309553297
277.15 2066.922481727277
279.15 2070.4995319674445
281.15 2074.1478793756605
283.15 2077.8669179998637
285.15 2081.6560178612567
287.15 2085.514525999244
289.15 2089.4417675296154
291.15 2093.4370467118033
293.15 2097.499648021338
295.15 2101.628837223956
297.15 2105.8238624483056
299.15 2110.083955253294
301.15 2114.4083316884407
303.15 2118.7961933423576
305.15 2123.246728391504
307.15 2127.7591126080515
309.15 2132.332510378635
311.15 2136.9660756917788
313.15 2141.6589531087366
315.15 2146.41027871373
317.15 2151.219181042416
319.15 2156.0847819875867
321.15 2161.0061976812103
323.15 2165.982539352107
325.15 2171.0129141586276
327.15 2176.0964259958378
329.15 2181.232176276832
331.15 2186.419264687867
333.15 2191.6567899171305
335.15 2196.9438503570186
337.15 2202.2795447799003
339.15 2207.662972987398
341.15 2213.0932364332866
343.15 2218.569438820182
345.15 2224.0906866702367
347.15 2229.656089870096
349.15 2235.2647621904885
351.15 2240.9158217807285
353.15 2246.608391638581
355.15 2252.3416000559114
357.15 2258.11458104055
359.15 2263.9264747148845
361.15 2269.7764276916773
363.15 2275.6635934276164
365.15 2281.587132555168
367.15 2287.546213193266
369.15 2293.540011237413
371.15 2299.567710629771
373.15 2305.6285036098143
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# source: Arbeitsblatt DVGW G 260(A)
# higher heating value in kWh/kg (at normal conditions)
13.96188746019903
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# lower heating value in kWh/kg (at normal conditions)
2 changes: 2 additions & 0 deletions pandapipes/properties/biomethane_pure/molar_mass.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# source: CoolProp (http://www.coolprop.org/), kg/kmol
16.9755351
58 changes: 58 additions & 0 deletions pandapipes/properties/biomethane_pure/viscosity.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# source: CoolProp (http://www.coolprop.org/)
# temperature in Kelvin, dynamic viscosity in kg/(m s)
263.15 1.018799917679172e-05
265.15 1.0255447167391177e-05
267.15 1.0322713803330764e-05
269.15 1.0389800774187494e-05
271.15 1.0456709739161057e-05
273.15 1.0523442327979087e-05
275.15 1.0590000141762678e-05
277.15 1.0656384753854598e-05
279.15 1.0722597710611642e-05
281.15 1.0788640532164104e-05
283.15 1.08545147131434e-05
285.15 1.0920221723379986e-05
287.15 1.0985763008573338e-05
289.15 1.105113999093497e-05
291.15 1.1116354069806426e-05
293.15 1.1181406622253389e-05
295.15 1.124629900363687e-05
297.15 1.1311032548163775e-05
299.15 1.1375608569415205e-05
301.15 1.144002836085609e-05
303.15 1.1504293196322224e-05
305.15 1.1568404330518516e-05
307.15 1.1632362999438391e-05
309.15 1.1696170420830542e-05
311.15 1.1759827794618619e-05
313.15 1.1823336303312924e-05
315.15 1.1886697112408354e-05
317.15 1.194991137076894e-05
319.15 1.201298021099999e-05
321.15 1.2075904749808127e-05
323.15 1.2138686088349675e-05
325.15 1.2201325312568147e-05
327.15 1.226382349352113e-05
329.15 1.2326181687697131e-05
331.15 1.2388400937322568e-05
333.15 1.2450482270659557e-05
335.15 1.2512426702294873e-05
337.15 1.2574235233420227e-05
339.15 1.2635908852104261e-05
341.15 1.2697448533556995e-05
343.15 1.2758855240386152e-05
345.15 1.282012992284671e-05
347.15 1.2881273519083055e-05
349.15 1.2942286955364732e-05
351.15 1.3003171146315279e-05
353.15 1.3063926995135216e-05
355.15 1.3124555393818743e-05
357.15 1.3185057223364654e-05
359.15 1.3245433353981949e-05
361.15 1.3305684645289342e-05
363.15 1.3365811946510463e-05
365.15 1.3425816096663347e-05
367.15 1.3485697924745226e-05
369.15 1.3545458249912988e-05
371.15 1.3605097881658395e-05
373.15 1.3664617619979682e-05
3 changes: 3 additions & 0 deletions pandapipes/properties/biomethane_treated/compressibility.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# source: linear approximation based on CoolProp (http://www.coolprop.org/)
# slope in 1/bar, offset for linear property
-0.0024789428559189412, 0.9962776221466679
58 changes: 58 additions & 0 deletions pandapipes/properties/biomethane_treated/density.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# source: CoolProp (http://www.coolprop.org/)
# temperature in Kelvin, nominal density in kg/Nm^3 at 1.01325 bar
263.15 0.86048646407235
265.15 0.8539252359131624
267.15 0.8474642302098054
269.15 0.8411011428532086
271.15 0.8348337407285736
273.15 0.8286598589619569
275.15 0.8225773982960998
277.15 0.816584322588365
279.15 0.8106786564240795
281.15 0.8048584828390211
283.15 0.7991219411451699
285.15 0.7934672248542186
287.15 0.7878925796936597
289.15 0.7823963017106081
291.15 0.7769767354587873
293.15 0.7716322722643928
295.15 0.7663613485668018
297.15 0.7611624443303306
299.15 0.7560340815234674
301.15 0.7509748226622115
303.15 0.7459832694143467
305.15 0.7410580612616586
307.15 0.7361978742172673
309.15 0.7314014195954124
311.15 0.7266674428311796
313.15 0.7219947223477784
315.15 0.7173820685226427
317.15 0.712828322486563
319.15 0.7083323552601722
321.15 0.7038930663980693
323.15 0.6995093845290987
325.15 0.695180264243638
327.15 0.6909046867186862
329.15 0.6866816585237271
331.15 0.6825102108281128
333.15 0.6783893986382189
335.15 0.6743183000630635
337.15 0.670296015607147
339.15 0.6663216674893319
341.15 0.6623943989866364
343.15 0.6585133738018817
345.15 0.6546777754541744
347.15 0.6508868066912565
349.15 0.6471396889228147
351.15 0.6434356616738607
353.15 0.6397739820573669
355.15 0.6361539242660609
357.15 0.6325747790786994
359.15 0.6290358533891036
361.15 0.6255364697463401
363.15 0.6220759659128245
365.15 0.6186536944370283
367.15 0.6152690222406079
369.15 0.6119213302193801
371.15 0.60861001285761
373.15 0.6053344778550793
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# source: own calculation based on CoolProp (http://www.coolprop.org/)
# derivative (slope) of compressibility
-0.0024789428559189412
13 changes: 13 additions & 0 deletions pandapipes/properties/biomethane_treated/gas_composition.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
source: Arbeitsblatt DVGW G 260(A)

Gas composition (molar fraction):
methane: 90.94%
nitrogen: 0.69 %
carbon dioxide: 2.68 %
oxygen: 0.19 %
propane: 5 %
butane: 0.5 %


Wobbe-Index (normal conditions) : 14.9 KWh/m³
HHV (normal conditions) : 11.6 KWh/m³
Loading

0 comments on commit 7d82b3f

Please sign in to comment.