Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
fwitte committed Nov 21, 2023
2 parents 58ddc1a + b254960 commit 064858f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ @book{Bakshi2011
doi={10.1017/CBO9780511976049},
publisher={Cambridge University Press},
year={2011},
editor={{}}
editor={Bakshi, Bhavik R. and Gutowski, Timothy G. and Sekulić, Dušan P.}
}

@book{Szargut1988,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exclude = ["docs/_build"]

[project]
name = "tespy"
version = "0.7.0.post1"
version = "0.7.1"
description = "Thermal Engineering Systems in Python (TESPy)"
readme = "README.rst"
authors = [
Expand Down
2 changes: 1 addition & 1 deletion src/tespy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os

__datapath__ = os.path.join(importlib.resources.files("tespy"), "data")
__version__ = '0.7.0.post1 - Newton\'s Nature'
__version__ = '0.7.1 - Newton\'s Nature'

# tespy data and connections import
from . import connections # noqa: F401
Expand Down
14 changes: 11 additions & 3 deletions src/tespy/components/turbomachinery/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,17 @@ def energy_balance_deriv(self, increment_filter, k):
k : int
Position of derivatives in Jacobian matrix (k-th equation).
"""
self.jacobian[k, 0, 0] = self.outl[0].h.val_SI - self.inl[0].h.val_SI
self.jacobian[k, 0, 2] = -self.inl[0].m.val_SI
self.jacobian[k, 1, 2] = self.inl[0].m.val_SI
i = self.inl[0]
o = self.outl[0]
if i.m.is_var:
self.jacobian[k, i.m.J_col] = o.h.val_SI - i.h.val_SI
if i.h.is_var:
self.jacobian[k, i.h.J_col] = -i.m.val_SI
if o.h.is_var:
self.jacobian[k, o.h.J_col] = i.m.val_SI
# custom variable P
if self.P.is_var:
self.jacobian[k, self.P.J_col] = -1

def bus_func(self, bus):
r"""
Expand Down

0 comments on commit 064858f

Please sign in to comment.