Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IES - HP Interpolation Tool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IES-TES
IES - HP Interpolation Tool
Commits
3270be81
Commit
3270be81
authored
1 year ago
by
ENRI
Browse files
Options
Downloads
Patches
Plain Diff
add function to find second law efficiency
parent
b8f71e5f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
HP_Model.py
+20
-0
20 additions, 0 deletions
HP_Model.py
with
20 additions
and
0 deletions
HP_Model.py
+
20
−
0
View file @
3270be81
...
...
@@ -212,3 +212,23 @@ def getCOP(self, T_source_in: float, T_sink_out: float, Q_dot_H: float, K: int =
return
(
Q_dot_H
/
self
.
getElectricalPower
(
T_source_in
,
T_sink_out
,
Q_dot_H
,
K
))
# ====================================================================================================
def
getEta_II
(
self
,
T_source_in
:
float
,
T_sink_out
:
float
,
Q_dot_H
:
float
,
K
:
int
=
3
)
->
float
:
"""
Calculates the interpolated second law efficiency value at the specified coordinate point.
Args:
T_source_in (float): Source temerature (in).
T_sink_out (float): Sink temperature (out).
Q_dot_H (float): Heating power.
K (int, optional): Number of neighbors to consider. Defaults to 3.
Returns:
float: Interpolated second law efficiency value.
"""
COP
=
self
.
getCOP
(
T_source_in
,
T_sink_out
,
Q_dot_H
,
K
)
COP_Carnot
=
(
T_sink_out
+
273.15
)
/
(
T_sink_out
-
T_source_in
)
# in Kelvin!
return
(
COP
/
COP_Carnot
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment