Skip to content

Commit

Permalink
testing heat exchangers
Browse files Browse the repository at this point in the history
  • Loading branch information
mrk committed Nov 1, 2023
1 parent 81c4fe2 commit a22f267
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 29 deletions.
6 changes: 4 additions & 2 deletions intermediateFoodTests/Ex1.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import matplotlib.pyplot as plt

from tespy.components import Separator,Merge,CycleCloser,Valve
from tespy.components.newcomponents import DiabaticSimpleHeatExchanger,MergeWithPressureLoss,SeparatorWithSpeciesSplits
from tespy.components.newcomponents import DiabaticSimpleHeatExchanger,MergeWithPressureLoss,SeparatorWithSpeciesSplits,SimpleHeatExchanger

import logging
#logging.basicConfig(level=logging.DEBUG)
Expand All @@ -45,7 +45,9 @@
# set conditions around boiler
# fluid_back_ends={'Water': "INCOMP", "PHE": "INCOMP", "S800": "INCOMP"}
c1.set_attr(fluid={'INCOMP::Water': 0.80,'INCOMP::PHE': 0.15,'INCOMP::S800': 0.05}, m=100, h=h0, p=p0, mixing_rule="incompressible")
c2.set_attr(h=h0,p=p0)
#c2.set_attr(h=h0,p=p0)
c2.set_attr(h=h0)
boiler.set_attr(pr=1)

# solve and print results
network.solve('design')
Expand Down
6 changes: 3 additions & 3 deletions intermediateFoodTests/Ex1tespy070.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
,m,m_unit,v,v_unit,p,p_unit,h,h_unit,T,T_unit,Td_bp,Td_bp_unit,vol,vol_unit,x,x_unit,s,s_unit,Water,PHE,S800
source:out1_boiler:in1,100.0,kg / s,0.10392670186561417,m3 / s,2.0,bar,100.0,kJ / kg,46.94571580233958,C,0.0,C,0.0010392670186561417,m3 / kg,0.0,-,326.0023871536029,J / kgK,0.8,0.15,0.05
boiler:out1_sink:in1,100.0,kg / s,0.10392670186561417,m3 / s,2.0,bar,100.0,kJ / kg,46.94571580233958,C,0.0,C,0.0010392670186561417,m3 / kg,0.0,-,326.0023871536029,J / kgK,0.8,0.15,0.05
,m,m_unit,v,v_unit,p,p_unit,h,h_unit,T,T_unit,Td_bp,Td_bp_unit,vol,vol_unit,x,x_unit,s,s_unit,Water,S800,PHE
source:out1_boiler:in1,100.0,kg / s,0.10392670186561417,m3 / s,2.0,bar,100.0,kJ / kg,46.94571580233958,C,0.0,C,0.0010392670186561417,m3 / kg,0.0,-,326.0023871536029,J / kgK,0.8,0.05,0.15
boiler:out1_sink:in1,100.0,kg / s,0.10392670186561417,m3 / s,2.0,bar,100.0,kJ / kg,46.94571580233958,C,0.0,C,0.0010392670186561417,m3 / kg,0.0,-,326.0023871536029,J / kgK,0.8,0.05,0.15
48 changes: 24 additions & 24 deletions intermediateFoodTests/diff.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -11,13 +11,13 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"m 0.000000e+00\n",
"m 2.220446e-16\n",
"p 0.000000e+00\n",
"h 6.494361e-12\n",
"T 2.223999e-12\n",
Expand All @@ -32,7 +32,7 @@
"dtype: float64"
]
},
"execution_count": 28,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -47,7 +47,7 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand All @@ -68,7 +68,7 @@
"dtype: float64"
]
},
"execution_count": 29,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -83,28 +83,28 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"m 7.105427e-15\n",
"m 1.065814e-14\n",
"p 0.000000e+00\n",
"h 1.131468e-10\n",
"T 1.203944e-10\n",
"v 8.985868e-16\n",
"vol 9.996344e-17\n",
"s 1.285571e-09\n",
"s 1.285741e-09\n",
"x 0.000000e+00\n",
"Td_bp 0.000000e+00\n",
"PHE 8.326673e-17\n",
"S800 2.220446e-16\n",
"Water 1.110223e-16\n",
"PHE 2.775558e-16\n",
"S800 3.330669e-16\n",
"Water 6.661338e-16\n",
"dtype: float64"
]
},
"execution_count": 30,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -119,28 +119,28 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"m 7.105427e-15\n",
"m 1.065814e-14\n",
"p 0.000000e+00\n",
"h 1.131468e-10\n",
"T 1.203944e-10\n",
"v 8.985868e-16\n",
"vol 9.996344e-17\n",
"s 1.285571e-09\n",
"s 1.285741e-09\n",
"x 0.000000e+00\n",
"Td_bp 0.000000e+00\n",
"PHE 8.326673e-17\n",
"S800 2.220446e-16\n",
"Water 1.110223e-16\n",
"PHE 2.775558e-16\n",
"S800 3.330669e-16\n",
"Water 6.661338e-16\n",
"dtype: float64"
]
},
"execution_count": 31,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -155,7 +155,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand All @@ -170,13 +170,13 @@
"s 3.728383e-08\n",
"x 0.000000e+00\n",
"Td_bp 0.000000e+00\n",
"Water 5.551115e-16\n",
"Water 6.661338e-16\n",
"PHE 2.220446e-16\n",
"S800 1.040834e-16\n",
"dtype: float64"
]
},
"execution_count": 32,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -206,7 +206,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.15"
"version": "3.10.11"
},
"orig_nbformat": 4
},
Expand Down

0 comments on commit a22f267

Please sign in to comment.