Skip to content

Commit

Permalink
Merge pull request #39 from pietroUngar/master
Browse files Browse the repository at this point in the history
V0.3.10 resolved issue on cost output and y coefficient
  • Loading branch information
pietroUngar committed Jan 25, 2022
2 parents 0fc5150 + c3aea40 commit a4221da
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions EEETools/MainModules/main_module.py
Expand Up @@ -560,7 +560,8 @@ def calculate_coefficients(self, total_destruction):
c_dest = 0

fuel_exergy = self.exergy_analysis["fuel"]
dest_exergy = self.exergy_analysis["distruction"] + self.exergy_analysis["losses"]
dest_exergy = self.exergy_analysis["distruction"]
dest_loss_exergy = self.exergy_analysis["distruction"] + self.exergy_analysis["losses"]

fuel_cost = 0.

Expand All @@ -582,9 +583,9 @@ def calculate_coefficients(self, total_destruction):

r = (self.output_cost - c_fuel) / c_fuel

if not (self.comp_cost + c_dest * abs(dest_exergy)) == 0:
if not (self.comp_cost + c_dest * abs(dest_loss_exergy)) == 0:

f = self.comp_cost / (self.comp_cost + c_dest * abs(dest_exergy))
f = self.comp_cost / (self.comp_cost + c_dest * abs(dest_loss_exergy))

if not total_destruction == 0:

Expand Down
7 changes: 5 additions & 2 deletions EEETools/Tools/API/Tools/main_tools.py
Expand Up @@ -62,9 +62,12 @@ def get_result_data_frames(array_handler: ArrayHandler) -> dict:
comp_data["Destruction Cost [€/kWh]"].append(block.coefficients["c_dest"] * 3600)

comp_data["Fuel Cost [€/s]"].append(block.coefficients["c_fuel"] * block.exergy_analysis["fuel"])
comp_data["Product Cost [€/s]"].append(block.output_cost * block.exergy_analysis["fuel"])
comp_data["Product Cost [€/s]"].append(block.output_cost * block.exergy_analysis["product"])
comp_data["Destruction Cost [€/s]"].append(
block.coefficients["c_dest"] * (block.exergy_analysis["distruction"] + block.exergy_analysis["losses"]))

block.coefficients["c_dest"] * (block.exergy_analysis["distruction"] + block.exergy_analysis["losses"])

)

comp_data["eta"].append(block.coefficients["eta"])
comp_data["r"].append(block.coefficients["r"])
Expand Down
1 change: 0 additions & 1 deletion EEETools/Tools/API/terminal_api.py
Expand Up @@ -4,7 +4,6 @@
from EEETools.MainModules.main_module import CalculationOptions
from EEETools.Tools.API.Tools.file_handler import get_file_position
from tkinter import filedialog
from EEETools import costants
from shutil import copyfile
import tkinter as tk
import os, warnings
Expand Down
2 changes: 1 addition & 1 deletion EEETools/version.py
@@ -1 +1 @@
VERSION = "0.3.9"
VERSION = "0.3.10"
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -6,7 +6,7 @@ openpyxl~=3.0.7
cryptography~=3.4.6
pyvis~=0.1.9
rply~=0.7.8
setuptools~=54.2.0
setuptools
xlrd~=1.2.0
pywin32
numpy
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -18,7 +18,7 @@ def __get_install_requires():
'cryptography~=3.4.6',
'pyvis~=0.1.9',
'rply~=0.7.8',
'setuptools~=54.2.0',
'setuptools',
'xlrd~=1.2.0',
'numpy',
'requests'
Expand Down

0 comments on commit a4221da

Please sign in to comment.