first commit
This commit is contained in:
commit
300873ba7a
|
@ -0,0 +1,24 @@
|
|||
[flake8]
|
||||
# Specify the maximum allowed line length
|
||||
max-line-length = 88
|
||||
|
||||
# Ignore specific rules
|
||||
# For example, E501: Line too long, W503: Line break before binary operator
|
||||
ignore = E501, W503, W504, E226, E265
|
||||
|
||||
# Exclude specific files or directories
|
||||
exclude =
|
||||
.git,
|
||||
__pycache__,
|
||||
build,
|
||||
dist,
|
||||
.conda,
|
||||
tests/autogenerated_*
|
||||
|
||||
# Enable specific plugins or options
|
||||
# Example: Enabling flake8-docstrings
|
||||
select = C,E,F,W,D
|
||||
|
||||
# Specify custom error codes to ignore or enable
|
||||
per-file-ignores =
|
||||
tests/*: D
|
|
@ -0,0 +1,9 @@
|
|||
backend/index/*
|
||||
__pycache__
|
||||
*.code-workspace
|
||||
*.egg.info
|
||||
/src/*.egg-info/*
|
||||
/dist/*
|
||||
.vscode
|
||||
.pytest_cache
|
||||
tests/autogenerated_*.py
|
|
@ -0,0 +1,18 @@
|
|||
cff-version: 1.2.0
|
||||
title: Gaspype
|
||||
abstract: Gaspype is a performant library for thermodynamic calculations with ideal gases
|
||||
authors:
|
||||
- family-names: Kruse
|
||||
given-names: Nicolas
|
||||
orcid: "https://orcid.org/0000-0001-6758-2269"
|
||||
affiliation: "German Aerospace Center (DLR)"
|
||||
address: "Linder Höhe"
|
||||
city: Köln
|
||||
version: 0.11.2
|
||||
date-released: "2025-04-01"
|
||||
#identifiers:
|
||||
# - description: This is the collection of archived snapshots of all versions of Gaspype
|
||||
# type: doi
|
||||
# value: ""
|
||||
license: MIT License
|
||||
repository-code: "https://github.com/DLR-Institute-of-Future-Fuels/gaspype"
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2025 Nicolas Kruse, German Aerospace Center (DLR)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,197 @@
|
|||
# Gaspype
|
||||
The python package provides an performant library for thermodynamic calculations
|
||||
like equilibrium reactions for several hundred gas species and their mixtures -
|
||||
written in Python/Numpy.
|
||||
|
||||
Species are treated as ideal gases. Therefore the application is limited to moderate
|
||||
pressures or high temperature applications.
|
||||
|
||||
Its designed with goal to be portable to Numpy-style GPU frameworks like JAX and PyTorch.
|
||||
|
||||
## Key features
|
||||
- Tensor operations to prevent bottlenecks by the python interpreter
|
||||
- Immutable types
|
||||
- Elegant pythonic interface
|
||||
- Great readable and compact syntax when using this package
|
||||
- Good usability in Jupyter Notebook
|
||||
- High performance for multidimensional fluid arrays
|
||||
|
||||
## Installation
|
||||
Installation with pip:
|
||||
``` bash
|
||||
pip install gaspype
|
||||
```
|
||||
|
||||
Installation with conda:
|
||||
``` bash
|
||||
conda install gaspype
|
||||
```
|
||||
|
||||
Installation for developers with pip:
|
||||
``` bash
|
||||
git clone https://github.com/DLR-Institute-of-Future-Fuels/gaspype
|
||||
pip install -e .[dev]
|
||||
```
|
||||
|
||||
## Getting started
|
||||
Gaspype provides two main classes: ```fluid``` and ```elements```.
|
||||
|
||||
### Fluid
|
||||
A fluid class describes a mixture of molecular species and their individual molar amounts.
|
||||
|
||||
``` python
|
||||
import gaspype as gp
|
||||
fl = gp.fluid({'H2O': 1, 'H2': 2})
|
||||
fl
|
||||
```
|
||||
```
|
||||
Total 3.000e+00 mol
|
||||
H2O 33.33 %
|
||||
H2 66.67 %
|
||||
```
|
||||
|
||||
Its' functions provides thermodynamic, mass balance and ideal gas properties of the mixture.
|
||||
|
||||
``` python
|
||||
cp = fl.get_cp(t=800+273.15)
|
||||
mass = fl.get_mass()
|
||||
gas_volume = fl.get_v(t=800+273.15, p=1e5)
|
||||
```
|
||||
|
||||
The arguments can be provided as numpy-arrays:
|
||||
|
||||
``` python
|
||||
import numpy as np
|
||||
t_range = np.linspace(600, 800, 5) + 273.15
|
||||
fl.get_density(t=t_range, p=1e5)
|
||||
```
|
||||
```
|
||||
array([0.10122906, 0.09574625, 0.09082685, 0.08638827, 0.08236328])
|
||||
```
|
||||
A ```fluid``` object can have multiple compositions. A multidimensional ```fluid``` object can be created for example by multiplication with a numpy array:
|
||||
|
||||
``` python
|
||||
fl2 = gp.fluid({'H2O': 1, 'N2': 2}) + \
|
||||
np.linspace(0, 10, 4) * gp.fluid({'H2': 1})
|
||||
fl2
|
||||
```
|
||||
```
|
||||
Total mol:
|
||||
array([ 3. , 6.33333333, 9.66666667, 13. ])
|
||||
Species:
|
||||
H2 H2O N2
|
||||
Molar fractions:
|
||||
array([[0. , 0.33333333, 0.66666667],
|
||||
[0.52631579, 0.15789474, 0.31578947],
|
||||
[0.68965517, 0.10344828, 0.20689655],
|
||||
[0.76923077, 0.07692308, 0.15384615]])
|
||||
```
|
||||
A fluid object can be converted to a pandas dataframe:
|
||||
``` python
|
||||
import pandas as pd
|
||||
pd.DataFrame(list(fl2))
|
||||
```
|
||||
| | H2O | N2 | H2
|
||||
|----|-----|-----|-------
|
||||
|0 | 1.0 | 2.0 | 0.000000
|
||||
|1 | 1.0 | 2.0 | 3.333333
|
||||
|2 | 1.0 | 2.0 | 6.666667
|
||||
|3 | 1.0 | 2.0 | 10.000000
|
||||
|
||||
The broadcasting behavior is not limited to 1D-arrays:
|
||||
|
||||
``` python
|
||||
fl3 = gp.fluid({'H2O': 1}) + \
|
||||
np.linspace(0, 10, 4) * gp.fluid({'H2': 1}) + \
|
||||
np.expand_dims(np.linspace(1, 3, 3), axis=1) * gp.fluid({'N2': 1})
|
||||
fl3
|
||||
```
|
||||
```
|
||||
Total mol:
|
||||
array([[ 2. , 5.33333333, 8.66666667, 12. ],
|
||||
[ 3. , 6.33333333, 9.66666667, 13. ],
|
||||
[ 4. , 7.33333333, 10.66666667, 14. ]])
|
||||
Species:
|
||||
H2 H2O N2
|
||||
Molar fractions:
|
||||
array([[[0. , 0.5 , 0.5 ],
|
||||
[0.625 , 0.1875 , 0.1875 ],
|
||||
[0.76923077, 0.11538462, 0.11538462],
|
||||
[0.83333333, 0.08333333, 0.08333333]],
|
||||
|
||||
[[0. , 0.33333333, 0.66666667],
|
||||
[0.52631579, 0.15789474, 0.31578947],
|
||||
[0.68965517, 0.10344828, 0.20689655],
|
||||
[0.76923077, 0.07692308, 0.15384615]],
|
||||
|
||||
[[0. , 0.25 , 0.75 ],
|
||||
[0.45454545, 0.13636364, 0.40909091],
|
||||
[0.625 , 0.09375 , 0.28125 ],
|
||||
[0.71428571, 0.07142857, 0.21428571]]])
|
||||
```
|
||||
In some cases not the molecular but the atomic composition is of interest. The ```elements``` class can be used for atom based balances and works similar:
|
||||
|
||||
``` python
|
||||
el = gp.elements({'N': 1, 'Cl': 2})
|
||||
el.get_mass()
|
||||
```
|
||||
```
|
||||
np.float64(0.08490700000000001)
|
||||
```
|
||||
A ```elements``` object can be as well instantiated from a ```fluid``` object. Arithmetic operations between ```elements``` and ```fluid``` result in an ```elements``` object:
|
||||
``` python
|
||||
el2 = gp.elements(fl) + el - 0.3 * fl
|
||||
el2
|
||||
```
|
||||
```
|
||||
Cl 2.000e+00 mol
|
||||
H 4.200e+00 mol
|
||||
N 1.000e+00 mol
|
||||
O 7.000e-01 mol
|
||||
```
|
||||
|
||||
Going from an atomic composition to an molecular composition is a little bit less straight forward, since there is no universal approach. One way is to calculate the thermodynamic equilibrium for a mixture:
|
||||
|
||||
``` python
|
||||
fs = gp.fluid_system('CH4, H2, CO, CO2, O2')
|
||||
el3 = gp.elements({'C': 1, 'H': 2, 'O':1}, fs)
|
||||
fl3 = gp.equilibrium(el3, t=800)
|
||||
fl3
|
||||
```
|
||||
```
|
||||
Total 1.204e+00 mol
|
||||
CH4 33.07 %
|
||||
H2 16.93 %
|
||||
CO 16.93 %
|
||||
CO2 33.07 %
|
||||
O2 0.00 %
|
||||
```
|
||||
|
||||
The ```equilibrium``` function can be called with a ```fluid``` or ```elements``` object as first argument. ```fluid``` and ```elements``` referencing a ```fluid_system``` object witch can be be set as shown above during the object instantiation. If not provided, a new one will be created automatically. Providing a ```fluid_system``` gives more control over which molecular species are included in derived ```fluid``` objects. Furthermore arithmetic operations between objects with the same ```fluid_system``` are potentially faster:
|
||||
|
||||
``` python
|
||||
fl3 + gp.fluid({'CH4': 1}, fs)
|
||||
```
|
||||
```
|
||||
Total 2.204e+00 mol
|
||||
CH4 63.44 %
|
||||
H2 9.24 %
|
||||
CO 9.24 %
|
||||
CO2 18.07 %
|
||||
O2 0.00 %
|
||||
```
|
||||
|
||||
Especially if the ```fluid_system``` of one of the operants has not a subset of molecular species of the other ```fluid_system``` a new ```fluid_system``` will be created for the operation which might degrade performance:
|
||||
|
||||
``` python
|
||||
fl3 + gp.fluid({'NH3': 1})
|
||||
```
|
||||
```
|
||||
Total 2.204e+00 mol
|
||||
CH4 18.07 %
|
||||
CO 9.24 %
|
||||
CO2 18.07 %
|
||||
H2 9.24 %
|
||||
NH3 45.38 %
|
||||
O2 0.00 %
|
||||
```
|
|
@ -0,0 +1,56 @@
|
|||
[project]
|
||||
name = "gaspype"
|
||||
version = "0.0.1"
|
||||
authors = [
|
||||
{ name="Nicolas Kruse", email="nicolas.kruse@dlr.de" },
|
||||
]
|
||||
description = "Performant library for thermodynamic calculations"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
classifiers = [
|
||||
"Programming Language :: Python :: 3",
|
||||
"License :: OSI Approved :: MIT License",
|
||||
"Operating System :: OS Independent",
|
||||
]
|
||||
dependencies = [
|
||||
"pyyaml>6.0.2",
|
||||
"numpy>2.0.0",
|
||||
"scipy>1.12.0",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/DLR-Institute-of-Future-Fuels/gaspype"
|
||||
Issues = "https://github.com/DLR-Institute-of-Future-Fuels/gaspype/issues"
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools>=61.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["src"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
gaspype = ["data/*.yaml"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"flake8",
|
||||
"mypy",
|
||||
"pytest",
|
||||
"pandas",
|
||||
]
|
||||
|
||||
[tool.mypy]
|
||||
files = ["src"]
|
||||
strict = true
|
||||
warn_return_any = true
|
||||
warn_unused_configs = true
|
||||
check_untyped_defs = true
|
||||
no_implicit_optional = true
|
||||
show_error_codes = true
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
minversion = "6.0"
|
||||
addopts = "-ra -q"
|
||||
testpaths = ["tests"]
|
||||
pythonpath = ["src"]
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,90 @@
|
|||
atomic_weights:
|
||||
data:
|
||||
Ag: 107.8682
|
||||
Al: 26.9815384
|
||||
Ar: 39.95
|
||||
As: 74.921595
|
||||
Au: 196.96657
|
||||
B: 10.81
|
||||
Ba: 137.327
|
||||
Be: 9.0121831
|
||||
Bi: 208.9804
|
||||
Br: 79.904
|
||||
C: 12.011
|
||||
Ca: 40.078
|
||||
Cd: 112.414
|
||||
Ce: 140.116
|
||||
Cl: 35.45
|
||||
Co: 58.933194
|
||||
Cr: 51.9961
|
||||
Cs: 132.90545196
|
||||
Cu: 63.546
|
||||
Dy: 162.5
|
||||
Er: 167.259
|
||||
Eu: 151.964
|
||||
F: 18.998403163
|
||||
Fe: 55.845
|
||||
Ga: 69.723
|
||||
Gd: 157.25
|
||||
Ge: 72.63
|
||||
H: 1.008
|
||||
He: 4.002602
|
||||
Hf: 178.49
|
||||
Hg: 200.592
|
||||
Ho: 164.930328
|
||||
I: 126.90447
|
||||
In: 114.818
|
||||
Ir: 192.217
|
||||
K: 39.0983
|
||||
Kr: 83.798
|
||||
La: 138.90547
|
||||
Li: 6.94
|
||||
Lu: 174.9668
|
||||
Mg: 24.305
|
||||
Mn: 54.938043
|
||||
Mo: 95.95
|
||||
N: 14.007
|
||||
Na: 22.98976928
|
||||
Nb: 92.90637
|
||||
Nd: 144.242
|
||||
Ne: 20.1797
|
||||
Ni: 58.6934
|
||||
O: 15.999
|
||||
Os: 190.23
|
||||
P: 30.973761998
|
||||
Pa: 231.03588
|
||||
Pb: 207.2
|
||||
Pd: 106.42
|
||||
Pr: 140.90766
|
||||
Pt: 195.084
|
||||
Rb: 85.4678
|
||||
Re: 186.207
|
||||
Rh: 102.90549
|
||||
Ru: 101.07
|
||||
S: 32.06
|
||||
Sb: 121.76
|
||||
Sc: 44.955908
|
||||
Se: 78.971
|
||||
Si: 28.085
|
||||
Sm: 150.36
|
||||
Sn: 118.71
|
||||
Sr: 87.62
|
||||
Ta: 180.94788
|
||||
Tb: 158.925354
|
||||
Te: 127.6
|
||||
Th: 232.0377
|
||||
Ti: 47.867
|
||||
Tl: 204.38
|
||||
Tm: 168.934218
|
||||
U: 238.02891
|
||||
V: 50.9415
|
||||
W: 183.84
|
||||
Xe: 131.293
|
||||
Y: 88.90584
|
||||
Yb: 173.045
|
||||
Zn: 65.38
|
||||
Zr: 91.224
|
||||
note: Atomic weights values are used from CIAAW.when a single value is given. Available
|
||||
online athttp://www.ciaaw.org/atomic-weights.htmWhen a range of values is given
|
||||
in the CIAAW table, the "conventionalatomic weight" from the IUPAC Periodic Table
|
||||
is used. Availableonline at https://iupac.org/wp-content/uploads/2018/12/IUPAC_Periodic_Table-01Dec18.pdf
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,562 @@
|
|||
prefixes:
|
||||
- symbol: 'y'
|
||||
name: yocto
|
||||
value: 1.0e-24
|
||||
- symbol: z
|
||||
name: zepto
|
||||
value: 1.0e-21
|
||||
- symbol: a
|
||||
name: atto
|
||||
value: 1.0e-18
|
||||
- symbol: f
|
||||
name: femto
|
||||
value: 1.0e-15
|
||||
- symbol: p
|
||||
name: pico
|
||||
value: 1.0e-12
|
||||
- symbol: 'n'
|
||||
name: nano
|
||||
value: 1.0e-9
|
||||
- symbol: µ
|
||||
name: micro
|
||||
value: 1.0e-6
|
||||
- symbol: m
|
||||
name: milli
|
||||
value: 1.0e-3
|
||||
- symbol: c
|
||||
name: centi
|
||||
value: 1.0e-2
|
||||
- symbol: d
|
||||
name: deci
|
||||
value: 1.0e-2
|
||||
- symbol: da
|
||||
name: deca
|
||||
value: 1.0e+1
|
||||
- symbol: h
|
||||
name: hecto
|
||||
value: 1.0e+2
|
||||
- symbol: k
|
||||
name: kilo
|
||||
value: 1.0e+3
|
||||
- symbol: M
|
||||
name: mega
|
||||
value: 1.0e+6
|
||||
- symbol: G
|
||||
name: giga
|
||||
value: 1.0e+9
|
||||
- symbol: T
|
||||
name: tera
|
||||
value: 1.0e+12
|
||||
- symbol: P
|
||||
name: peta
|
||||
value: 1.0e+15
|
||||
- symbol: E
|
||||
name: exa
|
||||
value: 1.0e+18
|
||||
- symbol: Z
|
||||
name: zetta
|
||||
value: 1.0e+21
|
||||
- symbol: 'Y'
|
||||
name: yotta
|
||||
value: 1.0e+24
|
||||
|
||||
units:
|
||||
- symbol: Pa
|
||||
alt_identifier: [pascal]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: -1
|
||||
s: -2
|
||||
typical_si_prefixes: [m, h, k, M, G]
|
||||
si_factor: 1.0
|
||||
usage: [pressure, strain]
|
||||
|
||||
- symbol: 'N'
|
||||
alt_identifier: [newton]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: 1
|
||||
s: -2
|
||||
typical_si_prefixes: [m, k, M, G]
|
||||
si_factor: 1.0
|
||||
usage: [force]
|
||||
|
||||
- symbol: lbf
|
||||
alt_identifier: [pound]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: 1
|
||||
s: -2
|
||||
si_factor: 4.4482
|
||||
usage: [force]
|
||||
|
||||
- symbol: dyn
|
||||
alt_identifier: [dyne]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: 1
|
||||
s: -2
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1.0e-5
|
||||
usage: [force]
|
||||
|
||||
- symbol: atm
|
||||
alt_identifier: [atmosphere]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: -1
|
||||
s: -2
|
||||
typical_si_prefixes: []
|
||||
si_factor: 101325.0
|
||||
usage: [pressure]
|
||||
|
||||
- symbol: t
|
||||
alt_identifier: [ton]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1000.0
|
||||
usage: [mass]
|
||||
|
||||
- symbol: u
|
||||
alt_identifier: [atomic mass unit]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1.66053906660e-27
|
||||
usage: [mass]
|
||||
|
||||
- symbol: g
|
||||
alt_identifier: [gram]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
typical_si_prefixes: [k]
|
||||
si_factor: 0.001
|
||||
usage: [mass]
|
||||
|
||||
- symbol: bar
|
||||
alt_identifier: [bar]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: -1
|
||||
s: -2
|
||||
typical_si_prefixes: []
|
||||
si_factor: 100000.0
|
||||
usage: [pressure]
|
||||
|
||||
- symbol: kgf
|
||||
alt_identifier: [kilogram-force]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: 1
|
||||
s: -2
|
||||
typical_si_prefixes: []
|
||||
si_factor: 9.80665
|
||||
usage: [force]
|
||||
|
||||
- symbol: psi
|
||||
alt_identifier: [pound-force per square inch]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: -1
|
||||
s: -2
|
||||
typical_si_prefixes: []
|
||||
si_factor: 6894.75729
|
||||
usage: [pressure]
|
||||
|
||||
- symbol: oz
|
||||
alt_identifier: [ounce]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 0.0283495
|
||||
usage: [mass]
|
||||
|
||||
- symbol: carat
|
||||
alt_identifier: [carat]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 0.0002
|
||||
usage: [mass]
|
||||
|
||||
- symbol: grain
|
||||
alt_identifier: [grain]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 0.00006479891
|
||||
usage: [mass]
|
||||
|
||||
- symbol: torr
|
||||
alt_identifier: [torr, mmHg]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: -1
|
||||
s: -2
|
||||
typical_si_prefixes: []
|
||||
si_factor: 133.322
|
||||
usage: [pressure]
|
||||
|
||||
- symbol: mol
|
||||
alt_identifier: [mole]
|
||||
si_base_unit:
|
||||
mol: 1
|
||||
typical_si_prefixes: [m, k]
|
||||
si_factor: 1.0
|
||||
usage: [amount of substance]
|
||||
|
||||
- symbol: m
|
||||
alt_identifier: [meter]
|
||||
si_base_unit:
|
||||
m: 1
|
||||
typical_si_prefixes: [p, 'n', µ, m, c, d, k]
|
||||
si_factor: 1.0
|
||||
usage: [length]
|
||||
|
||||
- symbol: mm
|
||||
alt_identifier: [millimeter]
|
||||
si_base_unit:
|
||||
m: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 0.001
|
||||
usage: [length]
|
||||
|
||||
- symbol: in
|
||||
alt_identifier: [inch]
|
||||
si_base_unit:
|
||||
m: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 0.0254
|
||||
usage: [length]
|
||||
|
||||
- symbol: ft
|
||||
alt_identifier: [foot]
|
||||
si_base_unit:
|
||||
m: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 0.3048
|
||||
usage: [length]
|
||||
|
||||
- symbol: yd
|
||||
alt_identifier: [yard]
|
||||
si_base_unit:
|
||||
m: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 0.9144
|
||||
usage: [length]
|
||||
|
||||
- symbol: mi
|
||||
alt_identifier: [mile]
|
||||
si_base_unit:
|
||||
m: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1609.34
|
||||
usage: [length]
|
||||
|
||||
- symbol: m²
|
||||
alt_identifier: [square meter]
|
||||
si_base_unit:
|
||||
m: 2
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1.0
|
||||
usage: [area]
|
||||
|
||||
- symbol: cm²
|
||||
alt_identifier: [square centimeter]
|
||||
si_base_unit:
|
||||
m: 2
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1.0e+4
|
||||
usage: [area]
|
||||
|
||||
- symbol: mm²
|
||||
alt_identifier: [square millimeter]
|
||||
si_base_unit:
|
||||
m: 2
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1.0e+6
|
||||
usage: [area]
|
||||
|
||||
- symbol: km²
|
||||
alt_identifier: [square kilometer]
|
||||
si_base_unit:
|
||||
m: 2
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1.0e-6
|
||||
usage: [area]
|
||||
|
||||
- symbol: ac
|
||||
alt_identifier: [acre]
|
||||
si_base_unit:
|
||||
m: 2
|
||||
typical_si_prefixes: []
|
||||
si_factor: 4046.86
|
||||
usage: [area]
|
||||
|
||||
- symbol: ha
|
||||
alt_identifier: [hectare]
|
||||
si_base_unit:
|
||||
m: 2
|
||||
typical_si_prefixes: []
|
||||
si_factor: 10000.0
|
||||
usage: [area]
|
||||
|
||||
- symbol: l
|
||||
alt_identifier: [liter]
|
||||
si_base_unit:
|
||||
m: 3
|
||||
typical_si_prefixes: ['n', µ, m, c, d, h]
|
||||
si_factor: 0.001
|
||||
usage: [volume]
|
||||
|
||||
- symbol: m³
|
||||
alt_identifier: [cubic meter]
|
||||
si_base_unit:
|
||||
m: 3
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1.0
|
||||
usage: [volume]
|
||||
|
||||
- symbol: cm³
|
||||
alt_identifier: [cubic centimeter]
|
||||
si_base_unit:
|
||||
m: 3
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1.0e+6
|
||||
usage: [volume]
|
||||
|
||||
- symbol: dm³
|
||||
alt_identifier: [cubic decimeter]
|
||||
si_base_unit:
|
||||
m: 3
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1.0e+3
|
||||
usage: [volume]
|
||||
|
||||
- symbol: mm³
|
||||
alt_identifier: [cubic millimeter]
|
||||
si_base_unit:
|
||||
m: 3
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1.0e+9
|
||||
usage: [volume]
|
||||
|
||||
- symbol: km³
|
||||
alt_identifier: [cubic kilometer]
|
||||
si_base_unit:
|
||||
m: 3
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1.0e-9
|
||||
usage: [volume]
|
||||
|
||||
- symbol: gal
|
||||
alt_identifier: [gallon]
|
||||
si_base_unit:
|
||||
m: 3
|
||||
typical_si_prefixes: []
|
||||
si_factor: 0.00378541
|
||||
usage: [volume]
|
||||
|
||||
- symbol: K
|
||||
alt_identifier: [kelvin]
|
||||
si_base_unit:
|
||||
K: 3
|
||||
typical_si_prefixes: [m]
|
||||
si_factor: 1.0
|
||||
usage: [temperature]
|
||||
|
||||
- symbol: C
|
||||
alt_identifier: [celsius]
|
||||
si_base_unit:
|
||||
K: 3
|
||||
typical_si_prefixes: [m]
|
||||
si_factor: 1.0
|
||||
offset: 273.15
|
||||
usage: [temperature]
|
||||
|
||||
- symbol: F
|
||||
alt_identifier: [fahrenheit]
|
||||
si_base_unit:
|
||||
K: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 0.5555555555
|
||||
offset: 255.372222
|
||||
usage: [temperature]
|
||||
|
||||
- symbol: R
|
||||
alt_identifier: [rankine]
|
||||
si_base_unit:
|
||||
K: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 0.5555555555
|
||||
offset: 0
|
||||
usage: [temperature]
|
||||
|
||||
- symbol: V
|
||||
alt_identifier: [volt]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: 2
|
||||
K: -3
|
||||
A: -1
|
||||
typical_si_prefixes: ['n', µ, m, k, M]
|
||||
si_factor: 0.55555555555555
|
||||
usage: [voltage]
|
||||
|
||||
- symbol: A
|
||||
alt_identifier: [ampere]
|
||||
si_base_unit:
|
||||
A: 1
|
||||
typical_si_prefixes: [p, 'n', µ, m, k]
|
||||
si_factor: 0.555555555555555
|
||||
usage: [current]
|
||||
|
||||
- symbol: Barrer
|
||||
alt_identifier: [barrer]
|
||||
si_base_unit:
|
||||
mol: 1
|
||||
s: 1
|
||||
kg: -1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 3.35e-16
|
||||
usage: [permeability]
|
||||
|
||||
- symbol: C
|
||||
alt_identifier: [coulomb]
|
||||
si_base_unit:
|
||||
s: 1
|
||||
A: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 1.0
|
||||
usage: [charge]
|
||||
|
||||
- symbol: Ah
|
||||
alt_identifier: [ampere-hour, amp-hour]
|
||||
si_base_unit:
|
||||
s: 1
|
||||
A: 1
|
||||
typical_si_prefixes: [m]
|
||||
si_factor: 3600.0
|
||||
usage: [charge]
|
||||
|
||||
- symbol: F
|
||||
alt_identifier: [farad]
|
||||
si_base_unit:
|
||||
kg: -1
|
||||
m: -2
|
||||
s: 4
|
||||
A: 2
|
||||
typical_si_prefixes: [p, 'n', µ, m]
|
||||
si_factor: 1.0
|
||||
usage: [capacitance]
|
||||
|
||||
- symbol: S
|
||||
alt_identifier: [siemens, moh]
|
||||
si_base_unit:
|
||||
kg: -1
|
||||
m: -2
|
||||
s: 3
|
||||
A: 2
|
||||
typical_si_prefixes: [µ, m]
|
||||
si_factor: 1.0
|
||||
usage: [conductance]
|
||||
|
||||
- symbol: Ω
|
||||
alt_identifier: [ohm]
|
||||
si_base_unit:
|
||||
kg: 11
|
||||
m: 2
|
||||
s: -3
|
||||
A: -2
|
||||
typical_si_prefixes: [m, k, M, G]
|
||||
si_factor: 1.0
|
||||
usage: [resistance]
|
||||
|
||||
- symbol: s
|
||||
alt_identifier: [second, sec]
|
||||
si_base_unit:
|
||||
s: 1
|
||||
typical_si_prefixes: ['n', µ, m]
|
||||
si_factor: 1
|
||||
usage: [time]
|
||||
|
||||
- symbol: min
|
||||
alt_identifier: [minute]
|
||||
si_base_unit:
|
||||
s: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 60
|
||||
usage: [time]
|
||||
|
||||
- symbol: h
|
||||
alt_identifier: [hour]
|
||||
si_base_unit:
|
||||
s: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 3600
|
||||
usage: [time]
|
||||
|
||||
- symbol: d
|
||||
alt_identifier: [day]
|
||||
si_base_unit:
|
||||
s: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 86400
|
||||
usage: [time]
|
||||
|
||||
- symbol: wk
|
||||
alt_identifier: [week]
|
||||
si_base_unit:
|
||||
s: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 604800
|
||||
usage: [time]
|
||||
|
||||
- symbol: yr
|
||||
alt_identifier: [year]
|
||||
si_base_unit:
|
||||
s: 1
|
||||
typical_si_prefixes: []
|
||||
si_factor: 31557600
|
||||
usage: [time]
|
||||
|
||||
- symbol: J
|
||||
alt_identifier: [joule]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: 2
|
||||
s: -2
|
||||
typical_si_prefixes: ['n', µ, m, k, M, G, T, P]
|
||||
si_factor: 1
|
||||
usage: [energy]
|
||||
|
||||
- symbol: cal
|
||||
alt_identifier: [calorie]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: 2
|
||||
s: -2
|
||||
typical_si_prefixes: [k]
|
||||
si_factor: 4.184
|
||||
usage: [energy]
|
||||
|
||||
- symbol: Wh
|
||||
alt_identifier: [watt-hour]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: 2
|
||||
s: -2
|
||||
typical_si_prefixes: [m, k, M, G, T]
|
||||
si_factor: 3600
|
||||
usage: [energy]
|
||||
|
||||
- symbol: eV
|
||||
alt_identifier: [electronvolt]
|
||||
si_base_unit:
|
||||
kg: 1
|
||||
m: 2
|
||||
s: -2
|
||||
typical_si_prefixes: [k, M]
|
||||
si_factor: 1.602176634e-19
|
||||
usage: [energy]
|
|
@ -0,0 +1,107 @@
|
|||
from . import fluid_system
|
||||
|
||||
|
||||
def syngas(*additional_gases: str) -> fluid_system:
|
||||
"""
|
||||
This function returns a fluid system containing the following gases: H2, H2O, CO2,
|
||||
CO, CH4, C2H6, C2H4, C2H2 (acetylene), CH3OH, C2H5OH, C3H8.
|
||||
Any additional gases provided as arguments will also be included in the fluid system.
|
||||
|
||||
Args:
|
||||
additional_gases: Any number of additional gases to include in the fluid system.
|
||||
|
||||
Returns:
|
||||
fluid_system: A fluid system containing the specified gases.
|
||||
"""
|
||||
return fluid_system(['H2', 'H2O', 'CO2', 'CO', 'CH4', 'C2H6',
|
||||
'C2H4', 'C2H2', 'CH3OH', 'C2H5OH', 'C3H8'] + list(additional_gases))
|
||||
|
||||
|
||||
def syngas_simple(*additional_gases: str) -> fluid_system:
|
||||
"""
|
||||
This function returns a simplified fluid system containing the following gases: H2,
|
||||
H2O, CO2, CO, CH4.
|
||||
Any additional gases provided as arguments will also be included in the fluid system.
|
||||
|
||||
Args:
|
||||
additional_gases: Any number of additional gases to include in the fluid system.
|
||||
|
||||
Returns:
|
||||
fluid_system: A simplified fluid system containing the specified gases.
|
||||
"""
|
||||
return fluid_system(['H2', 'H2O', 'CO2', 'CO', 'CH4'] + list(additional_gases))
|
||||
|
||||
|
||||
def synthetic_air(*additional_gases: str) -> fluid_system:
|
||||
"""
|
||||
This function returns a fluid system containing synthetic air (N2 and O2).
|
||||
Any additional gases provided as arguments will also be included in the fluid system.
|
||||
|
||||
Args:
|
||||
additional_gases: Any number of additional gases to include in the fluid system.
|
||||
|
||||
Returns:
|
||||
fluid_system: A fluid system containing synthetic air and any additional specified gases.
|
||||
"""
|
||||
return fluid_system(['N2', 'O2'] + list(additional_gases))
|
||||
|
||||
|
||||
def air(*additional_gases: str) -> fluid_system:
|
||||
"""
|
||||
This function returns a fluid system containing atmospheric air (N2, O2, Ar and H2O).
|
||||
Any additional gases provided as arguments will also be included in the fluid system.
|
||||
|
||||
Args:
|
||||
additional_gases: Any number of additional gases to include in the fluid system.
|
||||
|
||||
Returns:
|
||||
fluid_system: A fluid system containing atmospheric air and any additional specified gases.
|
||||
"""
|
||||
return fluid_system(['N2', 'O2', 'Ar', 'H2O'] + list(additional_gases))
|
||||
|
||||
|
||||
def dry_air(*additional_gases: str) -> fluid_system:
|
||||
"""
|
||||
This function returns a fluid system containing atmospheric air (N2, O2, and Ar).
|
||||
Any additional gases provided as arguments will also be included in the fluid system.
|
||||
|
||||
Args:
|
||||
additional_gases: Any number of additional gases to include in the fluid system.
|
||||
|
||||
Returns:
|
||||
fluid_system: A fluid system containing atmospheric air and any additional specified gases.
|
||||
"""
|
||||
return fluid_system(['N2', 'O2', 'Ar'] + list(additional_gases))
|
||||
|
||||
|
||||
def electrolysis(*additional_gases: str) -> fluid_system:
|
||||
"""
|
||||
This function returns a fluid system containing the gases produced during
|
||||
electrolysis (H2, H2O, O2, N2). Any additional gases provided as arguments
|
||||
will also be included in the fluid system.
|
||||
|
||||
Args:
|
||||
additional_gases: Any number of additional gases to include in the fluid system.
|
||||
|
||||
Returns:
|
||||
fluid_system: A fluid system containing the gases produced during electrolysis and
|
||||
any additional specified gases.
|
||||
"""
|
||||
return fluid_system(['H2', 'H2O', 'O2', 'N2'] + list(additional_gases))
|
||||
|
||||
|
||||
def methanol_synthesis(*additional_gases: str) -> fluid_system:
|
||||
"""
|
||||
This function returns a fluid system containing the gases involved in methanol synthesis
|
||||
(H2, H2O, O2, CO2, CO, CH4, CH3OH, C3H6O, C2H4O2). Any additional gases provided
|
||||
as arguments will also be included in the fluid system.
|
||||
|
||||
Args:
|
||||
additional_gases: Any number of additional gases to include in the fluid system.
|
||||
|
||||
Returns:
|
||||
fluid_system: A fluid system containing the gases involved in methanol
|
||||
synthesis and any additional specified gases.
|
||||
"""
|
||||
return fluid_system(['H2', 'H2O', 'O2', 'CO2', 'CO',
|
||||
'CH4', 'CH3OH', 'C3H6O', 'C2H4O2'] + list(additional_gases))
|
|
@ -0,0 +1,11 @@
|
|||
from . import R, F, oxygen_partial_pressure, fluid, elements, FloatArray
|
||||
import numpy as np
|
||||
|
||||
# Each O2 molecule is transported as two ions and each ion has a charged of 2e
|
||||
z_O2 = 4
|
||||
|
||||
|
||||
def voltage_potential(f1: fluid | elements, f2: fluid | elements, t: float, p: float = 1e5) -> FloatArray:
|
||||
p1 = oxygen_partial_pressure(f1, t, p)
|
||||
p2 = oxygen_partial_pressure(f2, t, p)
|
||||
return R * t / (z_O2 * F) * np.log(p2 / p1)
|
|
@ -0,0 +1,9 @@
|
|||
class celsius_helper():
|
||||
def __mul__(self, other: float | int) -> float:
|
||||
return other + 273.15
|
||||
|
||||
def __rmul__(self, other: float | int) -> float:
|
||||
return other + 273.15
|
||||
|
||||
|
||||
C = celsius_helper()
|
|
@ -0,0 +1,64 @@
|
|||
import gaspype as gp
|
||||
|
||||
|
||||
def test_one_component_equalibrium():
|
||||
fl = gp.fluid({'O2': 1})
|
||||
|
||||
t = 858
|
||||
p = 2.56e5
|
||||
|
||||
fl_eq = gp.equilibrium(fl, t, p)
|
||||
|
||||
assert (fl.array_composition == fl_eq.array_composition).all()
|
||||
|
||||
|
||||
def test_undipendent_components():
|
||||
fl = gp.fluid({'O2': 1, 'N2': 1, 'CH4': 1})
|
||||
|
||||
t = 858
|
||||
p = 2.56e5
|
||||
|
||||
fl_eq = gp.equilibrium(fl, t, p)
|
||||
|
||||
assert (fl.array_composition == fl_eq.array_composition).all()
|
||||
|
||||
|
||||
def test_restricted_component_equalibrium():
|
||||
fl = gp.fluid({'O2': 1, 'N2': 1, 'H2O': 1})
|
||||
|
||||
t = 858
|
||||
p = 2.56e5
|
||||
|
||||
fl_eq = gp.equilibrium(fl, t, p)
|
||||
|
||||
assert (fl.array_composition == fl_eq.array_composition).all()
|
||||
|
||||
|
||||
def test_comp_cache():
|
||||
|
||||
t = 2500
|
||||
p = 1e5
|
||||
|
||||
# Cached case 1:
|
||||
fl = gp.fluid({'H2': 1, 'CH4': 1})
|
||||
fl_2 = gp.equilibrium(fl, t, p)
|
||||
assert fl is fl_2
|
||||
|
||||
# Cached case 2:
|
||||
fl = gp.fluid({'H2': 1, 'CH4': 1, 'O2': 10, 'N2': 1})
|
||||
fl_2 = gp.equilibrium(fl, t, p)
|
||||
assert fl is fl_2
|
||||
|
||||
# Non cached case 2:
|
||||
fl = gp.fluid({'H2': 1, 'CO': 1, 'CO2': 1, 'CH4': 1})
|
||||
fl_3 = gp.equilibrium(fl, t, p)
|
||||
print(fl_3)
|
||||
print(fl is fl_3)
|
||||
assert not (fl.array_composition == fl_3.array_composition).all()
|
||||
|
||||
# Non cached case 3:
|
||||
fl = gp.fluid({'O2': 1, 'CO': 1, 'CH4': 1, 'H2': 1})
|
||||
fl_3 = gp.equilibrium(fl, t, p)
|
||||
print(fl_3)
|
||||
print(fl is fl_3)
|
||||
assert not (fl.array_composition == fl_3.array_composition).all()
|
|
@ -0,0 +1,167 @@
|
|||
p /bar abs;T /°C;m CH4 /g/s;m C2H6 /g/s;m C3H8 /g/s;m C4H10 /g/s;m H2O /g/s;x CxHy;x H2O;T Reak /°C;Q trans /W;T /°C;x CH4;x C2H6;x C3H8;x C4H10;x H2O;x H2;x CO2;x CO;x C(s);Summe;x CH4;x C2H6;x C3H8;x C4H10;x H2O;x H2;x CO2;x CO
|
||||
1;100;10;;;;1,248;0,9;0,1;100;23,65;100;0,8994;0;0;0;0,0996;0,0008;0,0002;0;0;1;0,900;0,000;0,000;0,000;0,100;0,001;0,000;0,000
|
||||
1;125;10;;;;1,248;0,9;0,1;125;47,28;125;0,8988;;;;0,0991;0,0016;0,0004;0;0;0,9999;0,899;0,000;0,000;0,000;0,099;0,001;0,000;0,000
|
||||
1;300;10;;;;1,248;0,9;0,1;300;1861,58;300;0,8184;0;0;0;0,0916;0,0608;0,0013;0;0,0278;0,9999;0,875;0,000;0,000;0,000;0,080;0,036;0,009;0,000
|
||||
1;500;10;;;;1,248;0,9;0,1;500;18388,61;500;0,3796;0;0;0;0,0563;0,3782;0,002;0,0026;0,1813;1;0,760;0,000;0,000;0,000;0,020;0,170;0,019;0,031
|
||||
1;700;10;;;;1,248;0,9;0,1;700;51426,43;700;0,0685;0;0;0;0,0134;0,6211;0,0009;0,0254;0,2707;1;0,668;0,000;0,000;0,000;0,000;0,249;0,000;0,083
|
||||
1;900;10;;;;1,248;0,9;0,1;900;63662,08;900;0,012;0;0;0;0,0012;0,6697;0;0,0353;0,2818;1;0,667;0,000;0,000;0,000;0,000;0,250;0,000;0,083
|
||||
1;1100;10;;;;1,248;0,9;0,1;1100;66312,3;1100;0,0031;0;0;0;0,0002;0,6764;0;0,0358;0,2845;1;0,667;0,000;0,000;0,000;0,000;0,250;0,000;0,083
|
||||
1;1300;10;;;;1,248;0,9;0,1;1300;66973,34;1300;0,0011;0;0;0;0;0,6778;0;0,0358;0,2853;1;0,667;0,000;0,000;0,000;0,000;0,250;0,000;0,083
|
||||
1;1500;10;;;;1,248;0,9;0,1;1500;67085,18;1500;0,0005;0;0;0;0;0,6782;0;0,0357;0,2855;0,9999;0,667;0,000;0,000;0,000;0,000;0,250;0,000;0,083
|
||||
1;100;10;;;;4,813;0,7;0,3;100;44,96;100;0,6993;0;0;0;0,2992;0,0012;0,0003;0;0;1;0,700;0,000;0,000;0,000;0,299;0,001;0,000;0,000
|
||||
1;290;10;;;;4,813;0,7;0,3;290;1964,56;290;0,6709;;;;0,2686;0,0484;0,0121;0;0;1;0,671;0,000;0,000;0,000;0,268;0,049;0,012;0,000
|
||||
1;300;10;;;;4,813;0,7;0,3;300;2262,44;300;0,6646;0;0;0;0,2651;0,0555;0,013;0,0001;0,0017;1;0,667;0,000;0,000;0,000;0,264;0,055;0,014;0,000
|
||||
1;500;10;;;;4,813;0,7;0,3;500;21531,84;500;0,3231;0;0;0;0,1601;0,3597;0,0187;0,0082;0,1301;0,9999;0,512;0,000;0,000;0,000;0,120;0,289;0,054;0,025
|
||||
1;700;10;;;;4,813;0,7;0,3;700;68473,16;700;0,0626;0;0;0;0,0397;0,6321;0,0085;0,0838;0,1732;0,9999;0,270;0,000;0,000;0,000;0,008;0,543;0,004;0,175
|
||||
1;900;10;;;;4,813;0,7;0,3;900;88901,88;900;0,0112;0;0;0;0,0036;0,6982;0,0005;0,1232;0,1633;1;0,251;0,000;0,000;0,000;0,000;0,562;0,000;0,187
|
||||
1;1100;10;;;;4,813;0,7;0,3;1100;92926,21;1100;0,0029;0;0;0;0,0005;0,7061;0;0,1251;0,1653;0,9999;0,251;0,000;0,000;0,000;0,000;0,562;0,000;0,187
|
||||
1;1300;10;;;;4,813;0,7;0,3;1300;93629,66;1300;0,001;0;0;0;0,0001;0,7076;0;0,1251;0,1661;0,9999;0,250600;0,000000;0,000000;0,000000;0,000000;0,562100;0,000000;0,187400
|
||||
1;1500;10;;;;4,813;0,7;0,3;1500;93612;1500;0,0005;0;0;0;0;0,708;0;0,1251;0,1664;1;0,251;0,000;0,000;0,000;0,000;0,562;0,000;0,187
|
||||
1;100;10;;;;11,23;0,5;0,5;100;72,33;100;0,4993;0;0;0;0,499;0,0014;0,0003;0;0;1;0,500;0,000;0,000;0,000;0,499;0,001;0,000;0,000
|
||||
1;300;10;;;;11,23;0,5;0,5;300;3636,44;300;0,4683;0;0;0;0,4525;0,0633;0,0158;0,0001;0;1;0,469;0,000;0,000;0,000;0,452;0,064;0,016;0,000
|
||||
1;440;10;;;;11,23;0,5;0,5;440;16020,54;440;0,3788;;;;0,323;0,2376;0,0557;0,0049;0;1;0,379;0,000;0,000;0,000;0,322;0,238;0,056;0,005
|
||||
1;500;10;;;;11,23;0,5;0,5;500;27680,77;500;0,2784;0;0;0;0,2598;0,351;0,0572;0,015;0,0386;1;0,319;0,000;0,000;0,000;0,247;0,343;0,071;0,019
|
||||
1;700;10;;;;11,23;0,5;0,5;700;98612,3;700;0,0575;0;0;0;0,0669;0,6544;0,0264;0,1591;0,0358;1,0001;0,079;0,000;0,000;0,000;0,054;0,657;0,025;0,186
|
||||
1;845;10;;;;11,23;0,5;0,5;845;132264,08;845;0,0161;;;;0,0123;0,7297;0,0038;0,2382;0;1,0001;0,017;0,000;0,000;0,000;0,012;0,729;0,004;0,238
|
||||
1;900;10;;;;11,23;0,5;0,5;900;136343,97;900;0,0092;0;0;0;0,0073;0,7381;0,0019;0,2435;0;1;0,010;0,000;0,000;0,000;0,007;0,738;0,002;0,244
|
||||
1;1100;10;;;;11,23;0,5;0,5;1100;140733,92;1100;0,0017;0;0;0;0,0014;0,7477;0,0002;0,2489;0;0,9999;0,002;0,000;0,000;0,000;0,001;0,748;0,000;0,249
|
||||
1;1300;10;;;;11,23;0,5;0,5;1300;141616,33;1300;0,0005;0;0;0;0,0004;0,7494;0;0,2497;0;1;0,001;0,000;0,000;0,000;0,000;0,749;0,000;0,250
|
||||
1;1500;10;;;;11,23;0,5;0,5;1500;141381,67;1500;0,0002;0;0;0;0,0002;0,7498;0;0,2499;0;1,0001;0,001;0,000;0,000;0,000;0,000;0,750;0,000;0,250
|
||||
1;100;10;;;;26,202;0,3;0,7;100;124,79;100;0,2994;0;0;0;0,6988;0,0014;0,0004;0;0;1;0,300;0,000;0,000;0,000;0,698;0,001;0,000;0,000
|
||||
1;300;10;;;;26,202;0,3;0,7;300;6275,52;300;0,2738;0;0;0;0,6443;0,0655;0,0164;0;0;1;0,274;0,000;0,000;0,000;0,644;0,066;0,017;0,000
|
||||
1;500;10;;;;26,202;0,3;0,7;500;44581,22;500;0,153;0;0;0;0,4011;0,354;0,0784;0,0134;0;0,9999;0,153;0,000;0,000;0,000;0,400;0,355;0,079;0,013
|
||||
1;700;10;;;;26,202;0,3;0,7;700;125653,97;700;0,0104;0;0;0;0,2021;0,6065;0,0635;0,1175;0;1;0,011;0,000;0,000;0,000;0,202;0,607;0,064;0,117
|
||||
1;900;10;;;;26,202;0,3;0,7;900;137077,27;900;0,0001;0;0;0;0,2097;0,6028;0,0405;0,147;0;1,0001;0,000;0,000;0,000;0,000;0,209;0,603;0,041;0,147
|
||||
1;1100;10;;;;26,202;0,3;0,7;1100;139008,52;1100;0;0;0;0;0,221;0,5915;0,029;0,1585;0;1;0,000;0,000;0,000;0,000;0,220;0,592;0,029;0,159
|
||||
1;1300;10;;;;26,202;0,3;0,7;1300;139740,84;1300;0;0;0;0;0,2276;0,5849;0,0224;0,1651;0;1;0,000;0,000;0,000;0,000;0,227;0,585;0,022;0,165
|
||||
1;1500;10;;;;26,202;0,3;0,7;1500;139784,72;1500;0;0;0;0;0,2316;0,5809;0,0184;0,1691;0;1;0,000;0,000;0,000;0,000;0,231;0,581;0,018;0,169
|
||||
1;100;10;;;;101,06;0,1;0,9;100;333,12;100;0,0996;0;0;0;0,8988;0,0013;0,0003;0;0;1;0,100;0,000;0,000;0,000;0,899;0,001;0,000;0,000
|
||||
1;300;10;;;;101,06;0,1;0,9;300;16449,27;300;0,0828;0;0;0;0,8454;0,0575;0,0144;0;0;1,0001;0,083;0,000;0,000;0,000;0,845;0,058;0,015;0,000
|
||||
1;500;10;;;;101,06;0,1;0,9;500;94225,47;500;0,0169;0;0;0;0,6421;0,2717;0,064;0,0053;0;1;0,017;0,000;0,000;0,000;0,641;0,272;0,064;0,005
|
||||
1;700;10;;;;101,06;0,1;0,9;700;123883,58;700;0,0001;0;0;0;0,6037;0,3129;0,0631;0,0202;0;1;0,000;0,000;0,000;0,000;0,603;0,313;0,063;0,020
|
||||
1;900;10;;;;101,06;0,1;0,9;900;128887,01;900;0;0;0;0;0,6152;0,3015;0,0515;0,0319;0;1,0001;0,000;0,000;0,000;0,000;0,615;0,302;0,052;0,032
|
||||
1;1100;10;;;;101,06;0,1;0,9;1100;132088,91;1100;0;0;0;0;0,6241;0,2926;0,0426;0,0408;0;1,0001;0,000;0,000;0,000;0,000;0,624;0,293;0,043;0,041
|
||||
1;1300;10;;;;101,06;0,1;0,9;1300;133954,03;1300;0;0;0;0;0,6304;0,2862;0,0362;0,0471;0;0,9999;0,000;0,000;0,000;0,000;0,630;0,287;0,036;0,047
|
||||
1;1500;10;;;;101,06;0,1;0,9;1500;134879,64;1500;0;0;0;0;0,635;0,2817;0,0317;0,0516;0;1;0,000;0,000;0,000;0,000;0,635;0,282;0,032;0,052
|
||||
1;100;;10;;;0,666;0,9;0,1;100;-9097,89;100;0,7101;0;0;0;0,0524;0,0006;0,0001;0;0,2368;1;0,933;0,000;0,000;0,000;0,000;0,000;0,000;0,067
|
||||
1;300;;10;;;0,666;0,9;0,1;300;-7681,24;300;0,6538;0;0;0;0,0492;0,0478;0,0005;0;0,2487;1;0,933;0,000;0,000;0,000;0,000;0,000;0,000;0,067
|
||||
1;500;;10;;;0,666;0,9;0,1;500;5135,34;500;0,3266;0;0;0;0,0329;0,3202;0,0008;0,0015;0,318;1;0,933;0,000;0,000;0,000;0,000;0,000;0,000;0,067
|
||||
1;700;;10;;;0,666;0,9;0,1;700;29977,66;700;0,0618;0;0;0;0,0083;0,552;0,0004;0,0154;0,3621;1;0,933;0,000;0,000;0,000;0,000;0,000;0,000;0,067
|
||||
1;900;;10;;;0,666;0,9;0,1;900;38759,17;900;0,0109;0;0;0;0,0007;0,5994;0;0,0215;0,3675;1;0,933;0,000;0,000;0,000;0,000;0,000;0,000;0,067
|
||||
1;1100;;10;;;0,666;0,9;0,1;1100;40319,59;1100;0,0028;0;0;0;0,0001;0,6064;0;0,0218;0,3689;1;0,933;0,000;0,000;0,000;0,000;0,000;0,000;0,067
|
||||
1;1300;;10;;;0,666;0,9;0,1;1300;40562,59;1300;0,001;0;0;0;0;0,6079;0;0,0218;0,3693;1;0,933;0,000;0,000;0,000;0,000;0,000;0,000;0,067
|
||||
1;1500;;10;;;0,666;0,9;0,1;1500;40616,97;1500;0,0005;0;0;0;0;0,6083;0;0,0218;0,3695;1,0001;0,933;0,000;0,000;0,000;0,000;0,000;0,000;0,067
|
||||
1;100;;10;;;2,568;0,7;0,3;100;-9078,48;100;0,62;0;0;0;0,1742;0,0005;0,0013;0;0,204;1;0,857;0,000;0,000;0,000;0,000;0,000;0,071;0,072
|
||||
1;300;;10;;;2,568;0,7;0,3;300;-7486,5;300;0,5783;0;0;0;0,1594;0,046;0,0054;0;0,2108;0,9999;0,857;0,000;0,000;0,000;0,000;0,000;0,071;0,072
|
||||
1;500;;10;;;2,568;0,7;0,3;500;6761,01;500;0,2933;0;0;0;0,1031;0,3123;0,0086;0,005;0,2776;0,9999;0,778;0,000;0,000;0,000;0,003;0,055;0,035;0,129
|
||||
1;700;;10;;;2,568;0,7;0,3;700;39135,9;700;0,0581;0;0;0;0,0265;0,5623;0,0041;0,0535;0,2955;1;0,689;0,000;0,000;0,000;0,000;0,124;0,000;0,187
|
||||
1;900;;10;;;2,568;0,7;0,3;900;52369,1;900;0,0104;0;0;0;0,0024;0,6215;0,0002;0,0777;0,2877;0,9999;0,688;0,000;0,000;0,000;0,000;0,124;0,000;0,187
|
||||
1;1100;;10;;;2,568;0,7;0,3;1100;54525,69;1100;0,0027;0;0;0;0,0003;0,6293;0;0,079;0,2887;1;0,688;0,000;0,000;0,000;0,000;0,124;0,000;0,187
|
||||
1;1300;;10;;;2,568;0,7;0,3;1300;54783,69;1300;0,001;0;0;0;0,0001;0,6308;0;0,079;0,2891;1;0,688;0,000;0,000;0,000;0,000;0,124;0,000;0,187
|
||||
1;1500;;10;;;2,568;0,7;0,3;1500;54769,22;1500;0,0004;0;0;0;0;0,6312;0;0,079;0,2893;0,9999;0,688;0,000;0,000;0,000;0,000;0,124;0,000;0,187
|
||||
1;100;;10;;;5,992;0,5;0,5;100;-9002,09;100;0,5106;0;0;0;0,3258;0,0005;0,0056;0;0,1576;1,0001;0,700;0,000;0,000;0,000;0,199;0,000;0,100;0,000
|
||||
1;300;;10;;;5,992;0,5;0,5;300;-7030,67;300;0,4974;0;0;0;0,2907;0,0444;0,0209;0,0001;0,1466;1,0001;0,683;0,000;0,000;0,000;0,183;0,028;0,105;0,000
|
||||
1;500;;10;;;5,992;0,5;0,5;500;9936,78;500;0,2614;0;0;0;0,1832;0,3092;0,0303;0,0099;0,2059;0,9999;0,543;0,000;0,000;0,000;0,090;0,215;0,105;0,048
|
||||
1;700;;10;;;5,992;0,5;0,5;700;55330,15;700;0,0544;0;0;0;0,0482;0,5823;0,0145;0,1077;0,193;1,0001;0,272;0,000;0,000;0,000;0,008;0,478;0,006;0,237
|
||||
1;900;;10;;;5,992;0,5;0,5;900;76894,25;900;0,0099;0;0;0;0,0045;0,6555;0,0009;0,1636;0,1655;0,9999;0,251;0,000;0,000;0,000;0,000;0,499;0,000;0,250
|
||||
1;1100;;10;;;5,992;0,5;0,5;1100;80102,2;1100;0,0026;0;0;0;0,0006;0,6643;0,0001;0,1668;0,1656;1;0,251;0,000;0,000;0,000;0,000;0,500;0,000;0,250
|
||||
1;1300;;10;;;5,992;0,5;0,5;1300;80383,41;1300;0,0009;0;0;0;0,0001;0,6659;0;0,1668;0,1662;0,9999;0,251;0,000;0,000;0,000;0,000;0,500;0,000;0,250
|
||||
1;1500;;10;;;5,992;0,5;0,5;1500;80244,62;1500;0,0004;0;0;0;0;0,6664;0;0,1668;0,1664;1;0,251;0,000;0,000;0,000;0,000;0,500;0,000;0,250
|
||||
1;100;;10;;;13,977;0,3;0,7;100;-8667,56;100;0,3782;0;0;0;0,5205;0,0005;0,0191;0;0,0817;1;0,457;0,000;0,000;0,000;0,478;0,000;0,065;0,000
|
||||
1;300;;10;;;13,977;0,3;0,7;300;-5677,27;300;0,4147;0;0;0;0,4577;0,0434;0,0621;0,0001;0,022;1;0,437;0,000;0,000;0,000;0,447;0,042;0,074;0,000
|
||||
1;500;;10;;;13,977;0,3;0,7;500;17823,14;500;0,2326;0;0;0;0,2843;0,316;0,0821;0,0177;0,0673;1;0,298;0,000;0,000;0,000;0,257;0,307;0,112;0,026
|
||||
1;700;;10;;;13,977;0,3;0,7;700;92605,92;700;0,051;0;0;0;0,0766;0,6228;0,0391;0,1958;0,0147;1;0,058;0,000;0,000;0,000;0,070;0,625;0,038;0,208
|
||||
1;725;;10;;;13,977;0,3;0,7;725;102623,11;725;0,0405;;;;0,0595;0,6457;0,0301;0,2243;0;1,0001;0,041;0,000;0,000;0,000;0,059;0,645;0,030;0,224
|
||||
1;900;;10;;;13,977;0,3;0,7;900;124244,63;900;0,0016;0;0;0;0,0363;0,6901;0,0109;0,2611;0;1;0,001700;0,000000;0,000000;0,000000;0,036000;0,690200;0,010800;0,261300
|
||||
1;1100;;10;;;13,977;0,3;0,7;1100;125340,06;1100;0,0001;0;0;0;0,0383;0,689;0,0072;0,2655;0;1,0001;0,000;0,000;0,000;0,000;0,038;0,689;0,007;0,266
|
||||
1;1300;;10;;;13,977;0,3;0,7;1300;125084,57;1300;0;0;0;0;0,04;0,6873;0,0054;0,2673;0;1;0,000;0,000;0,000;0,000;0,040;0,688;0,005;0,268
|
||||
1;1500;;10;;;13,977;0,3;0,7;1500;124638,45;1500;0;0;0;0;0,041;0,6862;0,0044;0,2684;0;1;0,000;0,000;0,000;0,000;0,041;0,687;0,004;0,269
|
||||
1;100;;10;;;53,911;0,1;0,9;100;-7749,54;100;0,1665;0;0;0;0,8091;0,0005;0,0239;0;0;1;0,167;0,000;0,000;0,000;0,809;0,001;0,024;0,000
|
||||
1;300;;10;;;53,911;0,1;0,9;300;-9,6;300;0,1499;0;0;0;0,7638;0,0505;0,0358;0,0001;0;1,0001;0,150;0,000;0,000;0,000;0,763;0,051;0,036;0,000
|
||||
1;500;;10;;;53,911;0,1;0,9;500;55036,21;500;0,0597;0;0;0;0,5294;0,3106;0,09;0,0103;0;1;0,060;0,000;0,000;0,000;0,529;0,311;0,090;0,010
|
||||
1;700;;10;;;53,911;0,1;0,9;700;110538,63;700;0,0009;0;0;0;0,4158;0,4411;0,086;0,0562;0;1;0,001;0,000;0,000;0,000;0,415;0,442;0,086;0,056
|
||||
1;900;;10;;;53,911;0,1;0,9;900;116115,7;900;0;0;0;0;0,4357;0,4214;0,0643;0,0786;0;1;0,000;0,000;0,000;0,000;0,435;0,422;0,064;0,079
|
||||
1;1100;;10;;;53,911;0,1;0,9;1100;118640,26;1100;0;0;0;0;0,4498;0,4073;0,0501;0,0927;0;0,9999;0,000;0,000;0,000;0,000;0,449;0,408;0,050;0,093
|
||||
1;1300;;10;;;53,911;0,1;0,9;1300;119854,93;1300;0;0;0;0;0,459;0,3982;0,041;0,1019;0;1,0001;0,000;0,000;0,000;0,000;0,459;0,399;0,041;0,102
|
||||
1;1500;;10;;;53,911;0,1;0,9;1500;120411,5;1500;0;0;0;0;0,4651;0,3921;0,0349;0,108;0;1,0001;0,000;0,000;0,000;0,000;0,465;0,392;0,035;0,108
|
||||
1;100;;;10;;0,454;0,9;0,1;100;-10352,64;100;0,6424;0;0;0;0,0356;0,0005;0,0001;0;0,3214;1;0,949;0,000;0,000;0,000;0,000;0,000;0,000;0,051
|
||||
1;300;;;10;;0,454;0,9;0,1;300;-9197,42;300;0,5942;0;0;0;0,0337;0,043;0,0002;0;0,3288;0,9999;0,949;0,000;0,000;0,000;0,000;0,000;0,000;0,051
|
||||
1;500;;;10;;0,454;0,9;0,1;500;2174,14;500;0,3055;0;0;0;0,0233;0,2971;0,0004;0,001;0,3727;1;0,949;0,000;0,000;0,000;0,000;0,000;0,000;0,051
|
||||
1;700;;;10;;0,454;0,9;0,1;700;23325,23;700;0,059;0;0;0;0,006;0,5224;0,0002;0,0111;0,4014;1,0001;0,949;0,000;0,000;0,000;0,000;0,000;0,000;0,051
|
||||
1;900;;;10;;0,454;0,9;0,1;900;31358,21;900;0,0105;0;0;0;0,0005;0,5688;0;0,0154;0,4048;1;0,949;0,000;0,000;0,000;0,000;0,000;0,000;0,051
|
||||
1;1100;;;10;;0,454;0,9;0,1;1100;32536,38;1100;0,0027;0;0;0;0,0001;0,5758;0;0,0156;0,4058;1;0,949;0,000;0,000;0,000;0,000;0,000;0,000;0,051
|
||||
1;1300;;;10;;0,454;0,9;0,1;1300;32628;1300;0,001;0;0;0;0;0,5773;0;0,0156;0,4061;1;0,949;0,000;0,000;0,000;0,000;0,000;0,000;0,051
|
||||
1;1500;;;10;;0,454;0,9;0,1;1500;32660,53;1500;0,0004;0;0;0;0;0,5777;0;0,0156;0,4062;0,9999;0,949;0,000;0,000;0,000;0,000;0,000;0,000;0,051
|
||||
1;100;;;10;;1,751;0,7;0,3;100;-10340,75;100;0,5843;0;0;0;0,1237;0,0005;0,0007;0;0,2908;1;0,838;0,000;0,000;0,000;0,000;0,000;0,000;0,162
|
||||
1;300;;;10;;1,751;0,7;0,3;300;-9071,87;300;0,5441;0;0;0;0,1145;0,0422;0,003;0;0,2962;1;0,838;0,000;0,000;0,000;0,000;0,000;0,000;0,162
|
||||
1;500;;;10;;1,751;0,7;0,3;500;3261,35;500;0,2814;0;0;0;0,0767;0,2922;0,0049;0,0036;0,3411;0,9999;0,838;0,000;0,000;0,000;0,000;0,000;0,000;0,162
|
||||
1;700;;;10;;1,751;0,7;0,3;700;30208,85;700;0,0562;0;0;0;0,02;0,5308;0,0024;0,0394;0,3512;1;0,838;0,000;0,000;0,000;0,000;0,000;0,000;0,162
|
||||
1;900;;;10;;1,751;0,7;0,3;900;40637,18;900;0,0101;0;0;0;0,0018;0,5862;0,0001;0,0568;0,345;1;0,838;0,000;0,000;0,000;0,000;0,000;0,000;0,162
|
||||
1;1100;;;10;;1,751;0,7;0,3;1100;42223,7;1100;0,0026;0;0;0;0,0002;0,5938;0;0,0577;0,3456;0,9999;0,838;0,000;0,000;0,000;0,000;0,000;0,000;0,162
|
||||
1;1300;;;10;;1,751;0,7;0,3;1300;42326,28;1300;0,0009;0;0;0;0,0001;0,5953;0;0,0577;0,3459;0,9999;0,838;0,000;0,000;0,000;0,000;0,000;0,000;0,162
|
||||
1;1500;;;10;;1,751;0,7;0,3;1500;42311,46;1500;0,0004;0;0;0;0;0,5958;0;0,0577;0,346;0,9999;0,838;0,000;0,000;0,000;0,000;0,000;0,000;0,162
|
||||
1;100;;;10;;4,086;0,5;0,5;100;-10295,87;100;0,5059;0;0;0;0,2451;0,0005;0,0032;0;0,2453;1;0,833;0,000;0,000;0,000;0,000;0,000;0,166;0,001
|
||||
1;300;;;10;;4,086;0,5;0,5;300;-8785,61;300;0,4836;0;0;0;0,221;0,0413;0,0124;0,0001;0,2416;1;0,828;0,000;0,000;0,000;0,002;0,002;0,162;0,006
|
||||
1;500;;;10;;4,086;0,5;0,5;500;5374,52;500;0,2554;0;0;0;0,1434;0,29;0,019;0,0075;0,2847;1;0,696;0,000;0,000;0,000;0,013;0,091;0,085;0,117
|
||||
1;700;;;10;;4,086;0,5;0,5;700;41311,02;700;0,0531;0;0;0;0,038;0,5471;0,0092;0,0818;0,2707;0,9999;0,504;0,000;0,000;0,000;0,001;0,246;0,001;0,248
|
||||
1;900;;;10;;4,086;0,5;0,5;900;57356,2;900;0,0097;0;0;0;0,0036;0,6142;0,0006;0,1228;0,2493;1,0002;0,501;0,000;0,000;0,000;0,000;0,249;0,000;0,250
|
||||
1;1100;;;10;;4,086;0,5;0,5;1100;59664,42;1100;0,0025;0;0;0;0,0005;0,6226;0;0,1251;0,2492;0,9999;0,501;0,000;0,000;0,000;0,000;0,249;0,000;0,250
|
||||
1;1300;;;10;;4,086;0,5;0,5;1300;59783,65;1300;0,0009;0;0;0;0,0001;0,6242;0;0,1251;0,2496;0,9999;0,501;0,000;0,000;0,000;0,000;0,249;0,000;0,250
|
||||
1;1500;;;10;;4,086;0,5;0,5;1500;59684,14;1500;0,0004;0;0;0;0;0,6247;0;0,1251;0,2498;1;0,501;0,000;0,000;0,000;0,000;0,249;0,000;0,250
|
||||
1;100;;;10;;9,535;0,3;0,7;100;-10103,43;100;0,3958;0;0;0;0,4237;0,0004;0,0121;0;0,1679;0,9999;0,577;0,000;0,000;0,000;0,307;0,000;0,116;0,000
|
||||
1;300;;;10;;9,535;0,3;0,7;300;-7929,16;300;0,412;0;0;0;0,373;0,0407;0,0415;0,0001;0,1326;0,9999;0,560;0,000;0,000;0,000;0,287;0,032;0,121;0,000
|
||||
1;500;;;10;;9,535;0,3;0,7;500;10656,55;500;0,2287;0;0;0;0,2357;0,2959;0,0574;0,014;0,1684;1,0001;0,420;0,000;0,000;0,000;0,157;0,252;0,131;0,041
|
||||
1;700;;;10;;9,535;0,3;0,7;700;66844,41;700;0,0499;0;0;0;0,0639;0,5826;0,0277;0,1557;0,1201;0,9999;0,138;0,000;0,000;0,000;0,027;0,563;0,020;0,253
|
||||
1;900;;;10;;9,535;0,3;0,7;900;97378,99;900;0,0092;0;0;0;0,0062;0,6665;0,0018;0,2448;0,0715;1;0,085;0,000;0,000;0,000;0,001;0,624;0,000;0,291
|
||||
1;1100;;;10;;9,535;0,3;0,7;1100;100370,49;1100;0,0024;0;0;0;0,0008;0,6762;0,0002;0,2501;0,0703;1;0,084;0,000;0,000;0,000;0,000;0,625;0,000;0,292
|
||||
1;1300;;;10;;9,535;0,3;0,7;1300;100522,9;1300;0,0009;0;0;0;0,0002;0,6778;0;0,2502;0,0708;0,9999;0,084;0,000;0,000;0,000;0,000;0,625;0,000;0,292
|
||||
1;1500;;;10;;9,535;0,3;0,7;1500;100225,15;1500;0,0004;0;0;0;0,0001;0,6783;0;0,2502;0,0711;1,0001;0,084;0,000;0,000;0,000;0,000;0,625;0,000;0,292
|
||||
1;100;;;10;;36,755;0,1;0,9;100;-8565,18;100;0,2273;0;0;0;0,7268;0,0004;0,0456;0;0;1,0001;0,227;0,000;0,000;0,000;0,727;0,000;0,046;0,000
|
||||
1;300;;;10;;36,755;0,1;0,9;300;-3747,2;300;0,2104;0;0;0;0,6869;0,0466;0,056;0,0001;0;1;0,211;0,000;0,000;0,000;0,686;0,047;0,056;0,000
|
||||
1;500;;;10;;36,755;0,1;0,9;500;38213,36;500;0,1063;0;0;0;0,4541;0,3185;0,1066;0,0145;0;1;0,106;0,000;0,000;0,000;0,453;0,319;0,107;0,015
|
||||
1;700;;;10;;36,755;0,1;0,9;700;107632;700;0,0037;0;0;0;0,2926;0,5184;0,0886;0,0967;0;1;0,004;0,000;0,000;0,000;0,292;0,519;0,089;0,097
|
||||
1;900;;;10;;36,755;0,1;0,9;900;114567,32;900;0;0;0;0;0,3127;0,4997;0,0621;0,1254;0;0,9999;0,000;0,000;0,000;0,000;0,312;0,500;0,062;0,126
|
||||
1;1100;;;10;;36,755;0,1;0,9;1100;116452,89;1100;0;0;0;0;0,3281;0,4844;0,0467;0,1409;0;1,0001;0,000;0,000;0,000;0,000;0,328;0,485;0,047;0,141
|
||||
1;1300;;;10;;36,755;0,1;0,9;1300;117179,29;1300;0;0;0;0;0,3375;0,4749;0,0373;0,1503;0;1;0,000;0,000;0,000;0,000;0,337;0,475;0,037;0,150
|
||||
1;1500;;;10;;36,755;0,1;0,9;1500;117434,53;1500;0;0;0;0;0,3436;0,4689;0,0312;0,1564;0;1,0001;0,000;0,000;0,000;0,000;0,343;0,469;0,031;0,157
|
||||
1;100;;;;10;0,344;0,9;0,1;100;-10490,2;100;0,6076;0;0;0;0,027;0,0005;0;0;0,3649;1;0,958;0,000;0,000;0,000;0,000;0,000;0,000;0,042
|
||||
1;300;;;;10;0,344;0,9;0,1;300;-9504,22;300;0,5634;0;0;0;0,0256;0,0406;0,0001;0;0,3702;0,9999;0,958;0,000;0,000;0,000;0,000;0,000;0,000;0,042
|
||||
1;500;;;;10;0,344;0,9;0,1;500;1122,89;500;0,2942;0;0;0;0,018;0,2846;0,0003;0,0008;0,4021;1;0,958;0,000;0,000;0,000;0,000;0,000;0,000;0,042
|
||||
1;700;;;;10;0,344;0,9;0,1;700;20846,48;700;0,0574;0;0;0;0,0047;0,5059;0,0001;0,0086;0,4232;0,9999;0,958;0,000;0,000;0,000;0,000;0,000;0,000;0,042
|
||||
1;900;;;;10;0,344;0,9;0,1;900;28062,22;900;0,0102;0;0;0;0,0004;0,5516;0;0,012;0,4258;1;0,958;0,000;0,000;0,000;0,000;0,000;0,000;0,042
|
||||
1;1100;;;;10;0,344;0,9;0,1;1100;29061,48;1100;0,0027;0;0;0;0,0001;0,5586;0;0,0122;0,4265;1,0001;0,958;0,000;0,000;0,000;0,000;0,000;0,000;0,042
|
||||
1;1300;;;;10;0,344;0,9;0,1;1300;29068,34;1300;0,001;0;0;0;0;0,5601;0;0,0122;0,4267;1;0,958;0,000;0,000;0,000;0,000;0,000;0,000;0,042
|
||||
1;1500;;;;10;0,344;0,9;0,1;1500;29040,22;1500;0,0004;0;0;0;0;0,5606;0;0,0122;0,4268;1;0,958;0,000;0,000;0,000;0,000;0,000;0,000;0,042
|
||||
1;100;;;;10;1,329;0,7;0,3;100;-10481,84;100;0,5649;0;0;0;0,096;0,0005;0,0004;0;0,3382;1;0,864;0,000;0,000;0,000;0,000;0,000;0,000;0,136
|
||||
1;300;;;;10;1,329;0,7;0,3;300;-9412,45;300;0,5259;0;0;0;0,0895;0,0401;0,0019;0;0,3427;1,0001;0,864;0,000;0,000;0,000;0,000;0,000;0,000;0,136
|
||||
1;500;;;;10;1,329;0,7;0,3;500;1936,82;500;0,2752;0;0;0;0,0612;0,2811;0,0032;0,0029;0,3765;1,0001;0,864;0,000;0,000;0,000;0,000;0,000;0,000;0,136
|
||||
1;700;;;;10;1,329;0,7;0,3;700;26086,77;700;0,0552;0;0;0;0,0161;0,5129;0,0016;0,0312;0,3831;1,0001;0,864;0,000;0,000;0,000;0,000;0,000;0,000;0,136
|
||||
1;900;;;;10;1,329;0,7;0,3;900;35100,96;900;0,0099;0;0;0;0,0014;0,5659;0,0001;0,0447;0,3779;0,9999;0,864;0,000;0,000;0,000;0,000;0,000;0,000;0,136
|
||||
1;1100;;;;10;1,329;0,7;0,3;1100;36410,91;1100;0,0026;0;0;0;0,0002;0,5734;0;0,0455;0,3784;1,0001;0,864;0,000;0,000;0,000;0,000;0,000;0,000;0,136
|
||||
1;1300;;;;10;1,329;0,7;0,3;1300;36425,93;1300;0,0009;0;0;0;0;0,5749;0;0,0455;0,3786;0,9999;0,864;0,000;0,000;0,000;0,000;0,000;0,000;0,136
|
||||
1;1500;;;;10;1,329;0,7;0,3;1500;36362,23;1500;0,0004;0;0;0;0;0,5754;0;0,0455;0,3787;1;0,864;0,000;0,000;0,000;0,000;0,000;0,000;0,136
|
||||
1;100;;;;10;3,1;0,5;0,5;100;-10451,2;100;0,5036;0;0;0;0,1967;0,0005;0,0021;0;0,2972;1,0001;0,750;0,000;0,000;0,000;0,000;0,000;0,000;0,250
|
||||
1;300;;;;10;3,1;0,5;0,5;300;-9207,98;300;0,477;0;0;0;0,1789;0,0395;0,0082;0;0,2963;0,9999;0,750;0,000;0,000;0,000;0,000;0,000;0,000;0,250
|
||||
1;500;;;;10;3,1;0,5;0,5;500;3510,24;500;0,2529;0;0;0;0,1184;0,2792;0,0131;0,006;0,3303;0,9999;0,750;0,000;0,000;0,000;0,000;0,000;0,000;0,250
|
||||
1;700;;;;10;3,1;0,5;0,5;700;34546,12;700;0,0525;0;0;0;0,0316;0,5264;0,0064;0,0661;0,3169;0,9999;0,750;0,000;0,000;0,000;0,000;0,000;0,000;0,250
|
||||
1;900;;;;10;3,1;0,5;0,5;900;47784,41;900;0,0095;0;0;0;0,0029;0,5895;0,0004;0,0982;0,2995;1;0,750;0,000;0,000;0,000;0,000;0,000;0,000;0,250
|
||||
1;1100;;;;10;3,1;0,5;0,5;1100;49644,67;1100;0,0025;0;0;0;0,0004;0,5976;0;0,1001;0,2994;1;0,750;0,000;0,000;0,000;0,000;0,000;0,000;0,250
|
||||
1;1300;;;;10;3,1;0,5;0,5;1300;49672,79;1300;0,0009;0;0;0;0,0001;0,5992;0;0,1001;0,2997;1;0,750;0,000;0,000;0,000;0,000;0,000;0,000;0,250
|
||||
1;1500;;;;10;3,1;0,5;0,5;1500;49544,87;1500;0,0004;0;0;0;0;0,5997;0;0,1001;0,2998;1;0,750;0,000;0,000;0,000;0,000;0,000;0,000;0,250
|
||||
1;100;;;;10;7,235;0,3;0,7;100;-10322,97;100;0,4092;0;0;0;0,3578;0,0004;0,0084;0;0,2242;1;0,673;0,000;0,000;0,000;0,172;0,000;0,155;0,000
|
||||
1;300;;;;10;7,235;0,3;0,7;300;-8597,86;300;0,413;0;0;0;0,3164;0,0391;0,0298;0,0001;0,2015;0,9999;0,659;0,000;0,000;0,000;0,159;0,023;0,159;0,001
|
||||
1;500;;;;10;7,235;0,3;0,7;500;7452,47;500;0,2276;0;0;0;0,2028;0,2837;0,0427;0,0116;0,2317;1,0001;0,524;0,000;0,000;0,000;0,084;0,193;0,138;0,061
|
||||
1;700;;;;10;7,235;0,3;0,7;700;53987,33;700;0,0495;0;0;0;0,0551;0,5571;0,0208;0,1296;0,1879;1;0,236;0,000;0,000;0,000;0,010;0,471;0,009;0,274
|
||||
1;900;;;;10;7,235;0,3;0,7;900;77410,38;900;0,0091;0;0;0;0,0053;0,6353;0,0013;0,2017;0,1472;0,9999;0,209;0,000;0,000;0,000;0,000;0,499;0,000;0,292
|
||||
1;1100;;;;10;7,235;0,3;0,7;1100;80530,19;1100;0,0024;0;0;0;0,0007;0,6447;0,0001;0,206;0,1461;1;0,209;0,000;0,000;0,000;0,000;0,500;0,000;0,292
|
||||
1;1300;;;;10;7,235;0,3;0,7;1300;80584,59;1300;0,0009;0;0;0;0,0002;0,6463;0;0,2061;0,1465;1;0,209;0,000;0,000;0,000;0,000;0,500;0,000;0,292
|
||||
1;1500;;;;10;7,235;0,3;0,7;1500;80306,36;1500;0,0004;0;0;0;0,0001;0,6468;0;0,206;0,1468;1,0001;0,209;0,000;0,000;0,000;0,000;0,500;0,000;0,292
|
||||
1;100;;;;10;27,848;0,1;0,9;100;-9001,82;100;0,256;0;0;0;0,6632;0,0004;0,0459;0;0,0346;1,0001;0,283;0,000;0,000;0,000;0,651;0,000;0,066;0,000
|
||||
1;150;;;;10;27,848;0,1;0,9;150;-8516,59;150;0,2825;;;;0,6499;0,0018;0,0658;0;0;1;0,283;0,000;0,000;0,000;0,650;0,002;0,066;0,000
|
||||
1;300;;;;10;27,848;0,1;0,9;300;-5163,14;300;0,2661;0;0;0;0,6155;0,0435;0,0747;0,0001;0;0,9999;0,266;0,000;0,000;0,000;0,615;0,044;0,075;0,000
|
||||
1;500;;;;10;27,848;0,1;0,9;500;28657,69;500;0,1524;0;0;0;0,3941;0,3156;0,1194;0,0186;0;1,0001;0,152;0,000;0,000;0,000;0,394;0,316;0,120;0,019
|
||||
1;700;;;;10;27,848;0,1;0,9;700;105318,22;700;0,0093;0;0;0;0,2095;0,5638;0,0818;0,1356;0;1;0,009;0,000;0,000;0,000;0,209;0,564;0,082;0,135
|
||||
1;900;;;;10;27,848;0,1;0,9;900;114961,42;900;0,0001;0;0;0;0,2232;0,5543;0,0538;0,1687;0;1,0001;0,000;0,000;0,000;0,000;0,223;0,554;0,054;0,169
|
||||
1;1100;;;;10;27,848;0,1;0,9;1100;116322,49;1100;0;0;0;0;0,2374;0,5401;0,0394;0,1831;0;1;0,000;0,000;0,000;0,000;0,237;0,540;0,039;0,183
|
||||
1;1300;;;;10;27,848;0,1;0,9;1300;116657,19;1300;0;0;0;0;0,2459;0,5316;0,0309;0,1916;0;1;0,000;0,000;0,000;0,000;0,246;0,532;0,031;0,192
|
||||
1;1500;;;;10;27,848;0,1;0,9;1500;116628,53;1500;0;0;0;0;0,2512;0,5263;0,0256;0,1969;0;1;0,000;0,000;0,000;0,000;0,251;0,526;0,026;0,197
|
|
|
@ -0,0 +1,9 @@
|
|||
T p roh h s cp
|
||||
300.00 0.10000 0.040067 7979.4 107.89 28.853
|
||||
400.00 0.10000 0.030054 10886. 116.25 29.189
|
||||
500.00 0.10000 0.024045 13809. 122.77 29.256
|
||||
600.00 0.10000 0.020039 16738. 128.11 29.330
|
||||
700.00 0.10000 0.017177 19677. 132.64 29.460
|
||||
800.00 0.10000 0.015030 22632. 136.58 29.653
|
||||
900.00 0.10000 0.013361 25610. 140.09 29.908
|
||||
1000.0 0.10000 0.012025 28616. 143.26 30.222
|
|
|
@ -0,0 +1,6 @@
|
|||
T p roh h s cp
|
||||
300.00 0.10000 0.040502 28847. 120.80 36.849
|
||||
400.00 0.10000 0.030171 32612. 131.62 38.883
|
||||
500.00 0.10000 0.024091 36665. 140.65 42.280
|
||||
600.00 0.10000 0.020060 41081. 148.69 46.083
|
||||
700.00 0.10000 0.017188 45885. 156.09 50.015
|
|
|
@ -0,0 +1,4 @@
|
|||
T p roh h s cp
|
||||
500.00 0.10000 0.024091 36665. 140.65 42.280
|
||||
600.00 0.10000 0.020060 41081. 148.69 46.083
|
||||
700.00 0.10000 0.017188 45885. 156.09 50.015
|
|
|
@ -0,0 +1,122 @@
|
|||
import gaspype as gp
|
||||
import numpy as np
|
||||
|
||||
fs = gp.fluid_system(gp.species('C2H#'))
|
||||
|
||||
|
||||
def test_broadcast_temperature():
|
||||
fl = gp.fluid({'C2H4': 0.5, 'C2H6': 0.5}, fs)
|
||||
|
||||
assert fl.shape == tuple()
|
||||
|
||||
assert fl.array_fractions.shape == (len(fs.species),)
|
||||
|
||||
s = fl.get_s(np.array([300, 400, 500, 600]), 1e6)
|
||||
assert s.shape == (4,)
|
||||
s = fl.get_g(np.array([300, 400, 500, 600]), 1e6)
|
||||
assert s.shape == (4,)
|
||||
s = fl.get_g_rt(np.array([300, 400, 500, 600]), 1e6)
|
||||
assert s.shape == (4,)
|
||||
s = fl.get_h(np.array([300, 400, 500, 600]))
|
||||
assert s.shape == (4,)
|
||||
s = fl.get_cp(np.array([300, 400, 500, 600]))
|
||||
assert s.shape == (4,)
|
||||
s = fl.get_v(np.array([300, 400, 500, 600]), 1e6)
|
||||
assert s.shape == (4,)
|
||||
s = fl.get_density(np.array([300, 400, 500, 600]), 1e6)
|
||||
assert s.shape == (4,)
|
||||
|
||||
s = fl.get_s(np.array([[300, 400, 500, 600], [305, 405, 505, 605]]), 1e6)
|
||||
assert s.shape == (2, 4)
|
||||
s = fl.get_g(np.array([[300, 400, 500, 600], [305, 405, 505, 605]]), 1e6)
|
||||
assert s.shape == (2, 4)
|
||||
s = fl.get_g_rt(np.array([[300, 400, 500, 600], [305, 405, 505, 605]]), 1e6)
|
||||
assert s.shape == (2, 4)
|
||||
s = fl.get_h(np.array([[300, 400, 500, 600], [305, 405, 505, 605]]))
|
||||
assert s.shape == (2, 4)
|
||||
s = fl.get_cp(np.array([[300, 400, 500, 600], [305, 405, 505, 605]]))
|
||||
assert s.shape == (2, 4)
|
||||
s = fl.get_v(np.array([[300, 400, 500, 600], [305, 405, 505, 605]]), 1e6)
|
||||
assert s.shape == (2, 4)
|
||||
s = fl.get_density(np.array([[300, 400, 500, 600], [305, 405, 505, 605]]), 1e6)
|
||||
assert s.shape == (2, 4)
|
||||
|
||||
s = fl.get_s(np.array([[300], [305]]), 1e6)
|
||||
assert s.shape == (2, 1)
|
||||
s = fl.get_g(np.array([[300], [305]]), 1e6)
|
||||
assert s.shape == (2, 1)
|
||||
s = fl.get_g_rt(np.array([[300], [305]]), 1e6)
|
||||
assert s.shape == (2, 1)
|
||||
s = fl.get_h(np.array([[300], [305]]))
|
||||
assert s.shape == (2, 1)
|
||||
s = fl.get_cp(np.array([[300], [305]]))
|
||||
assert s.shape == (2, 1)
|
||||
s = fl.get_v(np.array([[300], [305]]), 1e6)
|
||||
assert s.shape == (2, 1)
|
||||
s = fl.get_density(np.array([[300], [305]]), 1e6)
|
||||
assert s.shape == (2, 1)
|
||||
|
||||
|
||||
def test_broadcast_temperature_ex():
|
||||
fl = gp.fluid({'C2H4': 0.5, 'C2H6': 0.5}, fs, [2, 4])
|
||||
|
||||
assert fl.shape == (2, 4)
|
||||
|
||||
assert fl.array_fractions.shape == (2, 4, len(fs.species))
|
||||
|
||||
s = fl.get_s(np.array([300, 400, 500, 600]), 1e6)
|
||||
assert s.shape == (2, 4)
|
||||
|
||||
s = fl.get_s(np.array([[300, 400, 500, 600], [305, 405, 505, 605]]), 1e6)
|
||||
assert s.shape == (2, 4)
|
||||
|
||||
s = fl.get_s(np.array([[300], [305]]), 1e6)
|
||||
assert s.shape == (2, 4)
|
||||
|
||||
|
||||
def test_broadcast_pressure():
|
||||
fl = gp.fluid({'C2H4': 0.5, 'C2H6': 0.5}, fs)
|
||||
|
||||
assert fl.shape == tuple()
|
||||
|
||||
assert fl.array_fractions.shape == (len(fs.species),)
|
||||
|
||||
s = fl.get_s(800, np.array([1e5, 2e5, 3e5, 4e5]))
|
||||
assert s.shape == (4,)
|
||||
s = fl.get_g(800, np.array([1e5, 2e5, 3e5, 4e5]))
|
||||
assert s.shape == (4,)
|
||||
s = fl.get_g_rt(800, np.array([1e5, 2e5, 3e5, 4e5]))
|
||||
assert s.shape == (4,)
|
||||
s = fl.get_v(800, np.array([1e5, 2e5, 3e5, 4e5]))
|
||||
assert s.shape == (4,)
|
||||
s = fl.get_density(800, np.array([1e5, 2e5, 3e5, 4e5]))
|
||||
assert s.shape == (4,)
|
||||
|
||||
s = fl.get_s(800, np.array([[1e5, 2e5, 3e5, 4e5], [1.5e5, 2.5e5, 3.5e5, 4.5e5]]))
|
||||
assert s.shape == (2, 4)
|
||||
s = fl.get_g(800, np.array([[1e5, 2e5, 3e5, 4e5], [1.5e5, 2.5e5, 3.5e5, 4.5e5]]))
|
||||
assert s.shape == (2, 4)
|
||||
s = fl.get_g_rt(800, np.array([[1e5, 2e5, 3e5, 4e5], [1.5e5, 2.5e5, 3.5e5, 4.5e5]]))
|
||||
assert s.shape == (2, 4)
|
||||
s = fl.get_v(800, np.array([[1e5, 2e5, 3e5, 4e5], [1.5e5, 2.5e5, 3.5e5, 4.5e5]]))
|
||||
assert s.shape == (2, 4)
|
||||
s = fl.get_density(800, np.array([[1e5, 2e5, 3e5, 4e5], [1.5e5, 2.5e5, 3.5e5, 4.5e5]]))
|
||||
assert s.shape == (2, 4)
|
||||
|
||||
s = fl.get_s(800, np.array([[1e5], [1.5e5]]))
|
||||
assert s.shape == (2, 1)
|
||||
s = fl.get_g(800, np.array([[1e5], [1.5e5]]))
|
||||
assert s.shape == (2, 1)
|
||||
s = fl.get_g_rt(800, np.array([[1e5], [1.5e5]]))
|
||||
assert s.shape == (2, 1)
|
||||
s = fl.get_v(800, np.array([[1e5], [1.5e5]]))
|
||||
assert s.shape == (2, 1)
|
||||
s = fl.get_density(800, np.array([[1e5], [1.5e5]]))
|
||||
assert s.shape == (2, 1)
|
||||
|
||||
|
||||
def test_equilibrium_on_temperature_range():
|
||||
fl = gp.fluid({'C2H4': 0.5, 'C2H6': 0.5}, fs)
|
||||
fl2 = gp.equilibrium(fl, np.linspace(300, 1000, 3), 1e5)
|
||||
|
||||
assert fl2.shape == (3,)
|
|
@ -0,0 +1,52 @@
|
|||
import re
|
||||
from typing import Generator
|
||||
|
||||
|
||||
def convert_markdown_file(md_filename: str, out_filename: str):
|
||||
with open(md_filename, "r") as f_in:
|
||||
with open(out_filename, "w") as f_out:
|
||||
f_out.write('def run_test():\n')
|
||||
for block in markdown_to_code([line for line in f_in]):
|
||||
f_out.write(block + '\n')
|
||||
|
||||
|
||||
def markdown_to_code(lines: list[str], language: str = "python") -> Generator[str, None, None]:
|
||||
regex = re.compile(
|
||||
r"(?P<start>^```\s*(?P<block_language>(\w|-)*)\n)(?P<code>.*?\n)(?P<end>```)",
|
||||
re.DOTALL | re.MULTILINE,
|
||||
)
|
||||
blocks = [
|
||||
(match.group("block_language"), match.group("code"))
|
||||
for match in regex.finditer("".join(lines))
|
||||
]
|
||||
|
||||
ret_block_flag = False
|
||||
|
||||
for block_language, block in blocks:
|
||||
if block_language == language:
|
||||
lines = [line for line in block.splitlines() if line.strip()]
|
||||
ret_block_flag = lines[-1] if '=' not in lines[-1] else None
|
||||
|
||||
yield ''
|
||||
yield ' print("---------------------------------------------------------")'
|
||||
yield ''
|
||||
if ret_block_flag:
|
||||
yield from [' ' + str(line) for line in block.splitlines()[:-1]]
|
||||
else:
|
||||
yield from [' ' + str(line) for line in block.splitlines()]
|
||||
yield f' print("-- Result (({ret_block_flag})):")'
|
||||
yield f' print(({ret_block_flag}).__repr__().strip())'
|
||||
|
||||
elif ret_block_flag:
|
||||
yield ' ref_str = """'
|
||||
yield from [str(line) for line in block.splitlines()]
|
||||
yield '"""'
|
||||
yield f' print("-- Reference (({ret_block_flag})):")'
|
||||
yield ' print(ref_str.strip())'
|
||||
yield f' assert ({ret_block_flag}).__repr__().strip() == ref_str.strip()'
|
||||
|
||||
|
||||
def test_readme():
|
||||
convert_markdown_file('README.md', 'tests/autogenerated_readme.py')
|
||||
import autogenerated_readme
|
||||
autogenerated_readme.run_test()
|
|
@ -0,0 +1,42 @@
|
|||
import gaspype as gp
|
||||
import pytest
|
||||
import numpy as np
|
||||
|
||||
|
||||
def test_elements_from_dict():
|
||||
el = gp.elements({'Si': 1, 'H': 1, 'O': 1})
|
||||
fl = gp.equilibrium(el, t=1000, p=1e5)
|
||||
|
||||
assert 'SiO' in el.fs.species and \
|
||||
'SiH' in el.fs.species and \
|
||||
'H2' in el.fs.species
|
||||
|
||||
assert fl.get_x('H2') == pytest.approx(0.3333, abs=0.5)
|
||||
|
||||
|
||||
def test_elements_from_dict_with_fs():
|
||||
fs = gp.fluid_system('Si, O2, H2')
|
||||
el = gp.elements({'Si': 1, 'O': 2}, fs)
|
||||
fl = gp.equilibrium(el, t=1000, p=1e5)
|
||||
|
||||
assert 'SiO' not in el.fs.species and \
|
||||
'Si' in el.fs.species and \
|
||||
'O2' in el.fs.species
|
||||
|
||||
assert len(fl.fs.species) == 3
|
||||
assert np.sum(el) == 3
|
||||
|
||||
|
||||
def test_elements_from_fluid():
|
||||
fl = gp.fluid({'SiO': 1, 'H2': 1, 'O2': 1})
|
||||
el = gp.elements(fl)
|
||||
|
||||
assert 'SiO' in el.fs.species and \
|
||||
'SiH' not in el.fs.species and \
|
||||
'O2' in el.fs.species and \
|
||||
'H2' in el.fs.species
|
||||
|
||||
|
||||
def test_elements_mass():
|
||||
el = gp.elements({'Si': 1, 'O': 2})
|
||||
assert el.get_mass() == pytest.approx(0.0601, abs=0.0001)
|
|
@ -0,0 +1,49 @@
|
|||
import gaspype as gp
|
||||
|
||||
|
||||
def test_set_and_read_solver():
|
||||
tmp = gp.get_solver()
|
||||
gp.set_solver('gibs minimization')
|
||||
assert gp.get_solver() == 'gibs minimization'
|
||||
gp.set_solver(tmp)
|
||||
|
||||
|
||||
def test_fluid_stacking_concat():
|
||||
fl1 = gp.fluid({'O2': 1, 'N2': 0})
|
||||
fl2 = gp.fluid({'N2': 1}, fl1.fs)
|
||||
|
||||
fl3 = gp.stack([fl1, fl2])
|
||||
assert fl3.shape == (2,)
|
||||
|
||||
fl4 = gp.stack([fl3, fl3])
|
||||
assert fl4.shape == (2, 2)
|
||||
|
||||
fl5 = gp.concat([fl3, fl3])
|
||||
assert fl5.shape == (4,)
|
||||
|
||||
|
||||
def test_elements_stacking_concat():
|
||||
el1 = gp.elements(gp.fluid({'O2': 1, 'N2': 0}))
|
||||
el2 = gp.elements(gp.fluid({'N2': 1}), el1.fs)
|
||||
|
||||
assert el1.fs == el2.fs
|
||||
|
||||
el3 = gp.stack([el1, el2])
|
||||
assert el3.shape == (2,)
|
||||
|
||||
el4 = gp.stack([el3, el3])
|
||||
assert el4.shape == (2, 2)
|
||||
|
||||
el5 = gp.concat([el3, el3])
|
||||
assert el5.shape == (4,)
|
||||
|
||||
|
||||
def test_element_casting():
|
||||
fl1 = gp.fluid({'O2': 1, 'N2': 2, 'H2': 3})
|
||||
|
||||
el1 = gp.elements(fl1)
|
||||
assert el1.get_elemental_composition() == {'N': 4.0, 'H': 6.0, 'O': 2.0}
|
||||
|
||||
fs = gp.fluid_system('H2, O2, N2')
|
||||
el2 = gp.elements(fl1, fs)
|
||||
assert el2.get_elemental_composition() == {'N': 4.0, 'H': 6.0, 'O': 2.0}
|
|
@ -0,0 +1,58 @@
|
|||
import gaspype as gp
|
||||
# import gaspype.membrane as mb
|
||||
import pytest
|
||||
|
||||
|
||||
def test_oxygen_partial_pressure():
|
||||
# Compare equalibrium calculation with oxygen_partial_pressure function
|
||||
fs = gp.fluid_system('CO, CO2, H2, O2, H2O, N2')
|
||||
fl = gp.fluid({'H2O': 0.99, 'H2': 0.01}, fs)
|
||||
|
||||
t = 2500
|
||||
|
||||
ox1 = gp.equilibrium(fl, t, 1e5).get_x('O2') * 1e5 # Pa
|
||||
print(ox1)
|
||||
|
||||
ox2 = gp.oxygen_partial_pressure(fl, t, 1e5)
|
||||
print(ox2)
|
||||
|
||||
assert ox1 == pytest.approx(ox2, abs=1e-1) # type: ignore
|
||||
|
||||
|
||||
"""
|
||||
def test_voltage_potential():
|
||||
fs = gp.fluid_system('CO, CO2, H2, O2, H2O, N2')
|
||||
fl1 = gp.fluid({'H2O': 0.5, 'H2': 0.5}, fs)
|
||||
fl2 = gp.fluid({'O2': 0.2, 'N2': 0.8}, fs)
|
||||
|
||||
potential = mb.voltage_potential(fl1, fl2, 300, 1e5) # V
|
||||
#assert potential == pytest.approx(1.1736986, abs=1e-4)
|
||||
|
||||
potential = mb.voltage_potential(fl1, fl2, 273.15 + 800, 1e5) # V
|
||||
assert potential == pytest.approx(0.9397330, abs=1e-4)
|
||||
|
||||
fl1 = gp.fluid({'H2O': 0.01, 'H2': 0.99}, fs)
|
||||
fl2 = gp.fluid({'O2': 0.99, 'N2': 0.01}, fs)
|
||||
|
||||
potential = mb.voltage_potential(fl1, fl2, 273.15 + 800, 1e5) # V
|
||||
#assert potential == pytest.approx(1.18918092, abs=1e-4)
|
||||
|
||||
fl1 = gp.fluid({'H2O': 0.90, 'H2': 0.10}, fs)
|
||||
fl2 = gp.fluid({'O2': 0.20, 'N2': 0.80}, fs)
|
||||
|
||||
potential = mb.voltage_potential(fl1, fl2, 273.15 + 800, 1e5) # V
|
||||
assert potential == pytest.approx(0.83813680, abs=1e-4)
|
||||
|
||||
|
||||
|
||||
def test_voltage_potential_without_o2():
|
||||
fl1 = gp.fluid({'H2O': 0.5, 'CO': 0, 'CO2': 0, 'H2': 0.5})
|
||||
fs = gp.fluid_system('CO, CO2, H2, O2, H2O, N2')
|
||||
fl2 = gp.fluid({'O2': 0.2, 'N2': 0.8}, fs)
|
||||
|
||||
potential = mb.voltage_potential(fl1, fl2, 300, 1e5) # V
|
||||
#assert potential == pytest.approx(1.1736986, abs=1e-4)
|
||||
|
||||
potential = mb.voltage_potential(fl1, fl2, 273.15 + 800, 1e5) # V
|
||||
#assert potential == pytest.approx(0.9397330, abs=1e-4)
|
||||
"""
|
|
@ -0,0 +1,152 @@
|
|||
import gaspype as gp
|
||||
|
||||
|
||||
def test_op_same_fluid_systems():
|
||||
fl1 = gp.fluid({'N2': 1, 'O2': 1})
|
||||
fl2 = gp.fluid({'O2': 1}, fl1.fs)
|
||||
|
||||
fl_ret = fl1 + fl2
|
||||
|
||||
assert isinstance(fl_ret, gp.fluid)
|
||||
|
||||
assert fl1.fs is fl2.fs
|
||||
assert fl_ret.fs is fl1.fs
|
||||
|
||||
fl_ret = fl1 - fl2
|
||||
|
||||
assert fl1.fs is fl2.fs
|
||||
assert fl_ret.fs is fl1.fs
|
||||
|
||||
|
||||
def test_op_different_fluid_systems():
|
||||
# no fs subset -> new fs
|
||||
fl1 = gp.fluid({'N2': 1, 'O2': 1})
|
||||
fl2 = gp.fluid({'NH3': 1, 'O2': 2})
|
||||
fl_ret = fl1 + fl2
|
||||
|
||||
assert isinstance(fl_ret, gp.fluid)
|
||||
|
||||
assert fl1.fs is not fl_ret.fs
|
||||
assert fl2.fs is not fl_ret.fs
|
||||
|
||||
# fl1 is a subset of fl2 -> fl_ret uses fs of fl2
|
||||
fl1 = gp.fluid({'N2': 5, 'O2': 1})
|
||||
fl2 = gp.fluid({'N2': 11, 'O2': 12, 'NH3': 20})
|
||||
|
||||
fl_ret = fl1 + fl2
|
||||
assert fl1.fs is not fl_ret.fs
|
||||
assert fl2.fs is fl_ret.fs
|
||||
|
||||
fl_ret = fl2 - fl1
|
||||
assert fl1.fs is not fl_ret.fs
|
||||
assert fl2.fs is fl_ret.fs
|
||||
assert isinstance(fl_ret, gp.fluid)
|
||||
assert fl_ret.total == 37
|
||||
|
||||
|
||||
def test_op_different_fluid_systems_elements():
|
||||
# no fs subset -> new fs
|
||||
fl1 = gp.fluid({'N2': 1, 'O2': 1})
|
||||
fl2 = gp.fluid({'NH3': 1, 'O2': 2})
|
||||
|
||||
el_ret = gp.elements(fl1) + gp.elements(fl2)
|
||||
assert fl1.fs is not el_ret.fs
|
||||
assert fl2.fs is not el_ret.fs
|
||||
|
||||
el_ret = gp.elements(fl1) - gp.elements(fl2)
|
||||
assert fl1.fs is not el_ret.fs
|
||||
assert fl2.fs is not el_ret.fs
|
||||
|
||||
# fl1 is a subset of fl2 -> fl_ret uses fs of fl2
|
||||
fl1 = gp.fluid({'N2': 1, 'O2': 1})
|
||||
fl2 = gp.fluid({'N2': 1, 'O2': 1, 'NH3': 1})
|
||||
|
||||
el_ret = gp.elements(fl1) + gp.elements(fl2)
|
||||
assert fl1.fs is not el_ret.fs
|
||||
assert fl2.fs is el_ret.fs
|
||||
|
||||
el_ret = gp.elements(fl2) - gp.elements(fl1)
|
||||
assert fl1.fs is not el_ret.fs
|
||||
assert fl2.fs is el_ret.fs
|
||||
|
||||
|
||||
def test_op_different_fluid_systems_mixed():
|
||||
# no fs subset -> new fs
|
||||
fl1 = gp.fluid({'N2': 1, 'O2': 1})
|
||||
fl2 = gp.fluid({'NH3': 1, 'O2': 2})
|
||||
|
||||
el_ret = fl1 + gp.elements(fl2)
|
||||
|
||||
assert isinstance(el_ret, gp.elements)
|
||||
|
||||
assert fl1.fs is not el_ret.fs
|
||||
assert fl2.fs is not el_ret.fs
|
||||
|
||||
el_ret = gp.elements(fl1) + fl2
|
||||
assert fl1.fs is not el_ret.fs
|
||||
assert fl2.fs is not el_ret.fs
|
||||
assert isinstance(el_ret, gp.elements)
|
||||
assert {'H', 'O', 'N'} == el_ret.get_elemental_composition().keys()
|
||||
|
||||
# fl1 is a subset of fl2 -> fl_ret uses fs of fl2
|
||||
fl1 = gp.fluid({'N2': 1, 'O2': 1})
|
||||
fl2 = gp.fluid({'N2': 1, 'O2': 1, 'NH3': 1})
|
||||
|
||||
el_ret = gp.elements(fl1) + fl2
|
||||
assert fl1.fs is not el_ret.fs
|
||||
assert fl2.fs is el_ret.fs
|
||||
|
||||
el_ret = fl2 - gp.elements(fl1)
|
||||
assert fl1.fs is not el_ret.fs
|
||||
assert fl2.fs is el_ret.fs
|
||||
|
||||
|
||||
def test_op_elements_same_fluid_systems():
|
||||
fs = gp.fluid_system('N2, O2')
|
||||
|
||||
el1 = gp.elements({'N': 1, 'O': 1}, fs)
|
||||
el2 = gp.elements({'O': 1}, fs)
|
||||
|
||||
el_ret = el1 + el2
|
||||
|
||||
assert isinstance(el_ret, gp.elements)
|
||||
|
||||
assert el1.fs is el2.fs
|
||||
assert el_ret.fs is el1.fs
|
||||
|
||||
el_ret = el1 - el2
|
||||
|
||||
assert el1.fs is el2.fs
|
||||
assert el_ret.fs is el1.fs
|
||||
|
||||
|
||||
def test_op_elements_different_fluid_systems():
|
||||
fs1 = gp.fluid_system('N2, O2')
|
||||
fs2 = gp.fluid_system('O2')
|
||||
el1 = gp.elements({'N': 1, 'O': 1}, fs1)
|
||||
el2 = gp.elements({'O': 1}, fs2)
|
||||
|
||||
el_ret = el1 + el2
|
||||
|
||||
assert isinstance(el_ret, gp.elements)
|
||||
|
||||
assert el1.fs is not el2.fs
|
||||
assert el2.fs is not el_ret.fs
|
||||
assert el1.fs is el_ret.fs
|
||||
|
||||
el_ret = el1 - el2
|
||||
|
||||
assert el1.fs is not el2.fs
|
||||
assert el2.fs is not el_ret.fs
|
||||
assert el1.fs is el_ret.fs
|
||||
|
||||
|
||||
def test_op_tt():
|
||||
fl = gp.fluid({'H2O': 1, 'H2': 2})
|
||||
el = gp.elements({'N': 1, 'Cl': 2})
|
||||
|
||||
assert isinstance(fl + el, gp.elements)
|
||||
|
||||
assert 'H' in (fl + el).elements and \
|
||||
'Cl' in (fl + el).elements and \
|
||||
'O' in (fl + el).elements
|
|
@ -0,0 +1,125 @@
|
|||
import gaspype as gp
|
||||
import numpy as np
|
||||
import pytest
|
||||
import pandas as pd
|
||||
|
||||
|
||||
def outp(arr, decr=''):
|
||||
print(decr + ' '.join([f'{f*100:8.1f} %' for f in arr]))
|
||||
|
||||
|
||||
def check_gas_data(composition, reference_file, rel_error=3e-3):
|
||||
test_data = np.genfromtxt(reference_file, delimiter='\t', skip_header=1)
|
||||
fl = gp.fluid(composition)
|
||||
|
||||
h0, s0 = test_data[0, 3:5]
|
||||
t0 = test_data[0, 0]
|
||||
|
||||
for t, p, roh, h, s, cp in test_data:
|
||||
print(f'T = {t} K')
|
||||
assert fl.get_v(t, p * 1e6) == pytest.approx(1e-3 / roh, rel=rel_error)
|
||||
assert fl.get_h(t) - fl.get_h(t0) == pytest.approx(h - h0, rel=rel_error)
|
||||
assert fl.get_s(t, p * 1e6) - fl.get_s(t0, p * 1e6) == pytest.approx(s - s0, rel=rel_error)
|
||||
assert fl.get_cp(t) == pytest.approx(cp, rel=rel_error)
|
||||
|
||||
|
||||
def test_density_vs_volume():
|
||||
fl = gp.fluid({sp: 1 for sp in gp.species('C#H#(|OH)')})
|
||||
|
||||
t = 858
|
||||
p = 2.56e5
|
||||
|
||||
assert fl.get_density(t, p) == pytest.approx(fl.get_mass() / fl.get_v(t, p))
|
||||
|
||||
|
||||
def test_volume():
|
||||
fl = gp.fluid({'O2': 1}) # 1 mol oxygen
|
||||
|
||||
t = 273.15 # K
|
||||
p = 1e5 # Pa
|
||||
v_ref = 22.710954 # l
|
||||
|
||||
assert fl.get_v(t, p) == pytest.approx(v_ref / 1000)
|
||||
|
||||
|
||||
def test_h2_data():
|
||||
# Compare results to Refprop calculation
|
||||
check_gas_data({'H2': 1}, 'tests/test_data/test_data_h2.tsv')
|
||||
|
||||
|
||||
def test_nh3_data():
|
||||
# Compare results to Refprop calculation
|
||||
check_gas_data({'NH3': 1}, 'tests/test_data/test_data_nh3_ht.tsv', 4e-2)
|
||||
|
||||
|
||||
def test_equilibrium():
|
||||
# Compare equilibrium calculations to Cycle-Tempo results
|
||||
df = pd.read_csv('tests/test_data/cycle_temp_matlab_ref.csv', sep=';', decimal=',').fillna(0)
|
||||
fs = gp.fluid_system(['CH4', 'C2H6', 'C3H8', 'C4H10,n-butane', 'H2O', 'H2', 'CO2', 'CO'])
|
||||
|
||||
for index, row in df.iterrows():
|
||||
compositions = {'CH4': row['m CH4 /g/s'],
|
||||
'C2H6': row['m C2H6 /g/s'],
|
||||
'C3H8': row['m C3H8 /g/s'],
|
||||
'C4H10,n-butane': row['m C4H10 /g/s'],
|
||||
'H2O': row['m H2O /g/s']
|
||||
}
|
||||
|
||||
reference_values = [v for v in row[
|
||||
['x CH4.1', 'x C2H6', 'x C3H8', 'x C4H10',
|
||||
'x H2O.1', 'x H2', 'x CO2', 'x CO']]]
|
||||
|
||||
t = row['T /°C'] + 273.15
|
||||
p = row['p /bar abs'] * 1e5
|
||||
carbon = row['x C(s)']
|
||||
|
||||
# Compare only results without solid carbon in the equilibrium because
|
||||
# this code does not consider solids
|
||||
if carbon == 0:
|
||||
mass_comp = np.array([compositions[s] if s in compositions else 0 for s in fs.species])
|
||||
molar_comp = mass_comp / fs.array_molar_mass / np.sum(mass_comp / fs.array_molar_mass)
|
||||
|
||||
fl = gp.fluid(molar_comp, fs)
|
||||
|
||||
result_values = gp.equilibrium(fl, t, p).array_fractions
|
||||
|
||||
print(index, gp.get_solver(), '----')
|
||||
print(molar_comp)
|
||||
outp(result_values, 'Under test: ')
|
||||
outp(reference_values, 'Reference: ')
|
||||
|
||||
assert result_values == pytest.approx(reference_values, abs=1e-3, rel=0.01)
|
||||
|
||||
|
||||
def test_carbon():
|
||||
# Compare if solid carbon is in equilibrium present to Cycle-Tempo results
|
||||
df = pd.read_csv('tests/test_data/cycle_temp_matlab_ref.csv', sep=';', decimal=',').fillna(0)
|
||||
fs = gp.fluid_system(['CH4', 'C2H6', 'C3H8', 'C4H10,n-butane', 'H2O', 'H2', 'CO2', 'CO'])
|
||||
|
||||
for index, row in df.iterrows():
|
||||
compositions = {'CH4': row['m CH4 /g/s'],
|
||||
'C2H6': row['m C2H6 /g/s'],
|
||||
'C3H8': row['m C3H8 /g/s'],
|
||||
'C4H10,n-butane': row['m C4H10 /g/s'],
|
||||
'H2O': row['m H2O /g/s']
|
||||
}
|
||||
|
||||
t = row['T /°C'] + 273.15
|
||||
p = row['p /bar abs'] * 1e5
|
||||
carbon = row['x C(s)']
|
||||
|
||||
mass_comp = np.array([compositions[s] if s in compositions else 0 for s in fs.species])
|
||||
molar_comp = mass_comp / fs.array_molar_mass / np.sum(mass_comp / fs.array_molar_mass)
|
||||
|
||||
fl = gp.fluid(molar_comp, fs)
|
||||
|
||||
result_values = gp.carbon_activity(fl, t, p)
|
||||
|
||||
print('----')
|
||||
print(f'Under test, carbon activity: {result_values}')
|
||||
print(f'Reference carbon amount in mol: {carbon}')
|
||||
|
||||
if carbon > 0:
|
||||
assert result_values > 0.9
|
||||
else:
|
||||
assert result_values < 1.1
|
|
@ -0,0 +1,49 @@
|
|||
import gaspype as gp
|
||||
import numpy as np
|
||||
# import pytest
|
||||
import cantera as ct # type: ignore
|
||||
|
||||
|
||||
def test_equilibrium_cantera():
|
||||
# Compare equilibrium calculations to Cantera results
|
||||
|
||||
# gp.set_solver('system of equations')
|
||||
# gp.set_solver('gibs minimization')
|
||||
|
||||
# fs = gp.fluid_system(['CH4', 'C2H6', 'C3H8', 'H2O', 'H2', 'CO2', 'CO', 'O2'])
|
||||
fs = gp.fluid_system(['CH4', 'H2O', 'H2', 'CO2', 'CO', 'O2'])
|
||||
# fs = gp.fluid_system([s for s in flow1.species_names if s in gps])
|
||||
|
||||
composition = gp.fluid({'H2': 1}, fs) +\
|
||||
gp.fluid({'CH4': 1}, fs) * np.linspace(0, 0.05, 30) +\
|
||||
gp.fluid({'O2': 1}, fs) * np.expand_dims(np.linspace(0, 0.5, 30), axis=1)
|
||||
|
||||
t = 1495 + 273.15 # K
|
||||
p = 1e5 # Pa
|
||||
|
||||
fl = gp.equilibrium(composition, t, p)
|
||||
data = fl.get_x()
|
||||
gp_result_array = np.reshape(data, (data.shape[0] * data.shape[1], data.shape[2]))
|
||||
|
||||
flow1 = ct.Solution('gri30.yaml') # type: ignore
|
||||
ct_results = []
|
||||
comp = (composition.array_fractions[i, j] for i in range(composition.shape[0]) for j in range(composition.shape[1]))
|
||||
for c in comp:
|
||||
comp_dict = {s: v for s, v in zip(fs.species, c)}
|
||||
|
||||
flow1.TP = t, p
|
||||
flow1.X = comp_dict
|
||||
flow1.equilibrate('TP') # type: ignore
|
||||
indeces = [i for flsn in fs.active_species for i, sn in enumerate(flow1.species_names) if flsn == sn] # type: ignore
|
||||
ct_results.append(flow1.X[indeces]) # type: ignore
|
||||
|
||||
#if flow1.X[indeces][0] > 0.01:
|
||||
# print(flow1.X[indeces])
|
||||
|
||||
ct_result_array = np.stack(ct_results) # type: ignore
|
||||
|
||||
max_deviation = np.max(np.abs((gp_result_array - ct_result_array)))
|
||||
mean_deviation = np.mean(np.abs((gp_result_array - ct_result_array)))
|
||||
|
||||
assert max_deviation < 0.04
|
||||
assert mean_deviation < 2e-4
|
|
@ -0,0 +1,39 @@
|
|||
import gaspype as gp
|
||||
import numpy as np
|
||||
|
||||
fs = gp.fluid_system('CO, CO2, H2, O2, H2O, N2')
|
||||
|
||||
fl = gp.fluid({'H2O': 0.99, 'H2': 0.01}, fs) * np.ones([2, 3, 4])
|
||||
el = gp.elements(fl)
|
||||
|
||||
|
||||
def test_str_index():
|
||||
assert fl['CO2'].shape == (2, 3, 4)
|
||||
assert el['C'].shape == (2, 3, 4)
|
||||
|
||||
|
||||
def test_str_list_index():
|
||||
assert fl[['CO2', 'H2', 'CO']].shape == (2, 3, 4, 3)
|
||||
assert el[['C', 'H', 'O']].shape == (2, 3, 4, 3)
|
||||
|
||||
|
||||
def test_int_list_index():
|
||||
assert fl[[1, 2, 0, 5]].shape == (2, 3, 4, 4)
|
||||
assert el[[1, 2, 0, 3]].shape == (2, 3, 4, 4)
|
||||
|
||||
|
||||
def test_mixed_list_index():
|
||||
assert el[[1, 'H', 0, 'O']].shape == (2, 3, 4, 4)
|
||||
|
||||
|
||||
def test_int_index():
|
||||
assert fl[5].shape == (2, 3, 4)
|
||||
assert el[-1].shape == (2, 3, 4)
|
||||
|
||||
|
||||
def test_slice_index():
|
||||
assert fl[0:3].shape == (2, 3, 4, 3)
|
||||
assert fl[:].shape == (2, 3, 4, 6)
|
||||
|
||||
assert el[0:3].shape == (2, 3, 4, 3)
|
||||
assert el[:].shape == (2, 3, 4, 4)
|
|
@ -0,0 +1,24 @@
|
|||
import gaspype as gp
|
||||
|
||||
|
||||
def test_patter_filter():
|
||||
species_list = gp.species('H*O')
|
||||
assert 'H2O' in species_list
|
||||
|
||||
|
||||
def test_regex_filter():
|
||||
species_list = gp.species('H.*O', use_regex=True)
|
||||
assert 'H2O' in species_list
|
||||
|
||||
|
||||
def test_element_filter():
|
||||
species_list = gp.species(element_names='O, Cl')
|
||||
assert 'ClO2' in species_list
|
||||
|
||||
species_list = gp.species(element_names=['O', 'Cl'])
|
||||
assert 'ClO2' in species_list and 'Cl2' in species_list and 'O2' in species_list
|
||||
|
||||
|
||||
def test_combined_filter():
|
||||
species_list = gp.species('Cl*', 'O, Cl')
|
||||
assert 'ClO2' in species_list and 'Cl2' in species_list and 'O2' not in species_list
|
|
@ -0,0 +1,23 @@
|
|||
import gaspype as gp
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
|
||||
|
||||
def test_fluid():
|
||||
fl = gp.fluid({'O2': 1, 'H2': 2, 'H2O': 3})
|
||||
|
||||
df = pd.DataFrame(list(fl))
|
||||
assert df.shape == (1, 3)
|
||||
|
||||
df = pd.DataFrame(list(fl * np.array([1, 2, 3, 4])))
|
||||
assert df.shape == (4, 3)
|
||||
|
||||
|
||||
def test_elements():
|
||||
fl = gp.fluid({'O2': 1, 'H2': 2, 'H2O': 3})
|
||||
|
||||
df = pd.DataFrame(list(gp.elements(fl)))
|
||||
assert df.shape == (1, 2)
|
||||
|
||||
df = pd.DataFrame(list(gp.elements(fl * np.array([1, 2, 3, 4]))))
|
||||
assert df.shape == (4, 2)
|
Loading…
Reference in New Issue