Skip to content

Commit b425cd9

Browse files
committed
Update README.md
1 parent b5912c1 commit b425cd9

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

README.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# property-utils
2-
Utilities for programming that involves physical properties
1+
[![image](https://img.shields.io/pypi/v/property-utils.svg)](https://pypi.python.org/pypi/property-utils)
2+
[![image](https://img.shields.io/pypi/l/property-utils.svg)](https://opensource.org/license/mit/)
3+
[![image](https://img.shields.io/pypi/pyversions/property-utils.svg)](https://pypi.python.org/pypi/property-utils)
4+
[![Actions status](https://github.com/Maxcode123/property-utils/actions/workflows/test-package.yml/badge.svg?branch=main)](https://github.com/Maxcode123/property-utils/actions/workflows/test-package.yml?query=branch%3Amain)
5+
36

47
---
58
**Documentation:** https://maxcode123.github.io/property-utils/
@@ -8,10 +11,13 @@ Utilities for programming that involves physical properties
811

912
---
1013

14+
# property-utils
15+
*Utilities for programming that involves physical properties*
16+
1117
## What is property-utils?
1218
property-utils is a python library that aims at making programming with physical properties easier. It was created to be used by scientists and engineers with little programming experience.
1319

14-
**What is provided by property-utils?**
20+
***What is provided by property-utils?***
1521

1622
### Unit arithmetics
1723
You can divide and multiply units to create new units. For example you can create velocity units by dividing length units with time units.
@@ -48,7 +54,7 @@ from property_utils.units import (
4854

4955
tube_radius = p(12, CENTI_METER)
5056
tube_length = p(2.3, METER)
51-
heat_exchange_area = 2 * math.pi * tube_radius * tube_length
57+
heat_exchange_area = 2 * math.pi * tube_length * tube_radius
5258

5359
heat_transfer_coeff = p(150, BTU / RANKINE / FOOT**2 / HOUR)
5460

@@ -60,13 +66,25 @@ diff_in = hot_in - cold_in
6066
diff_out = hot_out - cold_out
6167
temperature_diff = (diff_in - diff_out) / math.log((diff_in / diff_out).value)
6268

63-
heat_duty = (heat_transfer_coeff * heat_exchange_area * temperature_diff).to_unit(KILO_WATT)
69+
print("Heat transfer coefficient =", heat_transfer_coeff)
70+
print("Heat exchange area =", heat_exchange_area)
71+
print("Temperature difference =", temperature_diff)
72+
73+
heat_duty = heat_transfer_coeff * heat_exchange_area * temperature_diff
6474

65-
print(heat_duty)
75+
print("\nHeat duty =", heat_duty)
76+
print(" =", heat_duty.to_si())
77+
print(" =", heat_duty.to_unit(KILO_WATT))
6678
```
6779

6880
Result:
6981

7082
```
71-
306.1224518046951 kW
83+
Heat transfer coefficient = 150 Btu / (ft^2) / hr / °R
84+
Heat exchange area = 1.7341591447815656 (m^2)
85+
Logarithmic mean temperature difference = 207.24308513672648 K
86+
87+
Heat duty = 1044588.4611345044 Btu / hr
88+
= 306122.45180469507 J / s
89+
= 306.12245180469506 kW
7290
```

0 commit comments

Comments
 (0)