Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

there is confusion about the exergy_balance function #613

Open
legendary-zju opened this issue Feb 17, 2025 · 2 comments
Open

there is confusion about the exergy_balance function #613

legendary-zju opened this issue Feb 17, 2025 · 2 comments

Comments

@legendary-zju
Copy link

Dear Francesco:
I have some confusion about your code. There is no information of the property (self.E_P and self.E_F in the exergy_balance function) in comp class. Could you teach me their meaning? In the heat exchanger class, the condition of calculating exergy is divided into 6 cases. The logic of calculating self.E_P and self.E_F under one condition seems to be distinctly different from under another condition. Could you tell me their calculating logic? I would appreciate it.

Best

Zhang

@legendary-zju
Copy link
Author

The code that confused me:
if all([c.T.val_SI > T0 for c in self.inl + self.outl]):
self.E_P = self.outl[1].Ex_therm - self.inl[1].Ex_therm # cold side
self.E_F = self.inl[0].Ex_physical - self.outl[0].Ex_physical + (
self.inl[1].Ex_mech - self.outl[1].Ex_mech)
elif all([c.T.val_SI <= T0 for c in self.inl + self.outl]):
self.E_P = self.outl[0].Ex_therm - self.inl[0].Ex_therm # hot side
self.E_F = self.inl[1].Ex_physical - self.outl[1].Ex_physical + (
self.inl[0].Ex_mech - self.outl[0].Ex_mech)
elif (self.inl[0].T.val_SI > T0 and self.outl[1].T.val_SI > T0 and
self.outl[0].T.val_SI <= T0 and self.inl[1].T.val_SI <= T0):
self.E_P = self.outl[0].Ex_therm + self.outl[1].Ex_therm
self.E_F = self.inl[0].Ex_physical + self.inl[1].Ex_physical - (
self.outl[0].Ex_mech + self.outl[1].Ex_mech)
elif (self.inl[0].T.val_SI > T0 and self.inl[1].T.val_SI <= T0 and
self.outl[0].T.val_SI <= T0 and self.outl[1].T.val_SI <= T0):
self.E_P = self.outl[0].Ex_therm
self.E_F = self.inl[0].Ex_physical + self.inl[1].Ex_physical - (
self.outl[1].Ex_physical + self.outl[0].Ex_mech)
elif (self.inl[0].T.val_SI > T0 and self.outl[0].T.val_SI > T0 and
self.inl[1].T.val_SI <= T0 and self.outl[1].T.val_SI <= T0):
self.E_P = np.nan
self.E_F = self.inl[0].Ex_physical - self.outl[0].Ex_physical + (
self.inl[1].Ex_physical - self.outl[1].Ex_physical)
else: # only self.inl[1].T.val_SI <= T0
self.E_P = self.outl[1].Ex_therm
self.E_F = self.inl[0].Ex_physical - self.outl[0].Ex_physical + (
self.inl[1].Ex_physical - self.outl[1].Ex_mech)

@fwitte
Copy link
Member

fwitte commented Feb 19, 2025

Hi @legendary-zju,

the fuel exergy, product exergy and exergy destruction per component depend on the purpose of the component and on the context, i.e. the ambient state and the fluid's state (specifically temperature). I would direct you to read the paper on the implementation of the feature in tespy and the references on exergy (mostly (co-)authored by Tsatsaronis) cited in it: https://www.mdpi.com/1996-1073/15/11/4087.

Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants