-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
414 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import sys | ||
import platform | ||
import sys | ||
|
||
is_pypy = 'PyPy' in sys.version | ||
|
||
def pytest_ignore_collect(path): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Heat Transfer documentation build configuration file, created by | ||
# sphinx-quickstart on Sat Jan 2 17:15:23 2016. | ||
|
@@ -59,12 +58,12 @@ | |
'sphinxcontrib.katex', | ||
'sphinx_sitemap', | ||
] | ||
# | ||
# | ||
|
||
katex_css_path = \ | ||
'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css' | ||
katex_js_path = 'katex.min.js' | ||
katex_autorender_path = 'auto-render.min.js' | ||
katex_autorender_path = 'auto-render.min.js' | ||
|
||
|
||
html_baseurl = 'https://ht.readthedocs.io/' | ||
|
@@ -86,14 +85,14 @@ | |
master_doc = 'index' | ||
|
||
# General information about the project. | ||
project = u'Heat Transfer' | ||
project = 'Heat Transfer' | ||
|
||
import datetime | ||
|
||
build_date = datetime.datetime.utcfromtimestamp( | ||
int(os.environ.get('SOURCE_DATE_EPOCH', time.time())) | ||
) | ||
copyright = u'2016 - %s, Caleb Bell and contributors' %build_date.year | ||
copyright = '2016 - %s, Caleb Bell and contributors' %build_date.year | ||
|
||
|
||
# The version info for the project you're documenting, acts as replacement for | ||
|
@@ -102,6 +101,7 @@ | |
# | ||
# The short X.Y version. | ||
import ht | ||
|
||
version = ht.__version__ | ||
# The full version, including alpha/beta/rc tags. | ||
release = ht.__version__ | ||
|
@@ -247,8 +247,8 @@ | |
# (source start file, target name, title, | ||
# author, documentclass [howto, manual, or own class]). | ||
latex_documents = [ | ||
('index', 'Heat Transfer.tex', u'Heat Transfer Documentation', | ||
u'Caleb Bell', 'manual'), | ||
('index', 'Heat Transfer.tex', 'Heat Transfer Documentation', | ||
'Caleb Bell', 'manual'), | ||
] | ||
|
||
# The name of an image file (relative to this directory) to place at the top of | ||
|
@@ -277,8 +277,8 @@ | |
# One entry per manual page. List of tuples | ||
# (source start file, name, description, authors, manual section). | ||
man_pages = [ | ||
('index', 'ht', u'Heat Transfer Documentation', | ||
[u'Caleb Bell'], 1) | ||
('index', 'ht', 'Heat Transfer Documentation', | ||
['Caleb Bell'], 1) | ||
] | ||
|
||
# If true, show URL addresses after external links. | ||
|
@@ -291,8 +291,8 @@ | |
# (source start file, target name, title, author, | ||
# dir menu entry, description, category) | ||
texinfo_documents = [ | ||
('index', 'Heat Transfer', u'Heat Transfer Documentation', | ||
u'Caleb Bell', 'Heat Transfer', 'One line description of project.', | ||
('index', 'Heat Transfer', 'Heat Transfer Documentation', | ||
'Caleb Bell', 'Heat Transfer', 'One line description of project.', | ||
'Miscellaneous'), | ||
] | ||
nbsphinx_requirejs_path = '' # fixes katex not working | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. | ||
Copyright (C) 2016, Caleb Bell <[email protected]> | ||
|
@@ -18,7 +17,8 @@ | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE.''' | ||
SOFTWARE. | ||
''' | ||
|
||
from setuptools import setup | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. | ||
Copyright (C) 2016, 2017, 2018, 2019, Caleb Bell <[email protected]> | ||
|
@@ -18,15 +17,25 @@ | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE.''' | ||
SOFTWARE. | ||
''' | ||
|
||
from __future__ import division | ||
from ht import (Ft_aircooler, air_cooler_noise_GPSA, air_cooler_noise_Mukherjee, dP_ESDU_high_fin, | ||
dP_ESDU_low_fin, h_Briggs_Young, h_ESDU_high_fin, h_ESDU_low_fin, h_Ganguli_VDI) | ||
import pytest | ||
from fluids.constants import foot, hp, inch, minute | ||
from fluids.geometry import AirCooledExchanger | ||
from fluids.numerics import assert_close, assert_close2d | ||
from fluids.constants import minute, hp, inch, foot | ||
import pytest | ||
|
||
from ht import ( | ||
Ft_aircooler, | ||
air_cooler_noise_GPSA, | ||
air_cooler_noise_Mukherjee, | ||
dP_ESDU_high_fin, | ||
dP_ESDU_low_fin, | ||
h_Briggs_Young, | ||
h_ESDU_high_fin, | ||
h_ESDU_low_fin, | ||
h_Ganguli_VDI, | ||
) | ||
|
||
### Air Cooler | ||
|
||
|
@@ -48,7 +57,7 @@ def test_air_cooler_noise_GPSA(): | |
|
||
|
||
def test_air_cooler_noise_Mukherjee(): | ||
''' # Confirmed to be log10's because of example tip speed reduction | ||
'''# Confirmed to be log10's because of example tip speed reduction | ||
# of 60 m/s to 40 m/s saves 5.3 dB. | ||
# hp in shaft horse power | ||
# d in meters | ||
|
@@ -213,10 +222,10 @@ def test_AirCooledExchangerPermutations(): | |
tube_passes_options = range(1, 20) | ||
tubes_per_row_options = range(1, 40) | ||
|
||
from ht.hx import HTRI_Ls, HEDH_pitches | ||
from ht.air_cooler import fin_densities, fin_heights, ODs | ||
from ht.air_cooler import ODs, fin_densities, fin_heights | ||
from ht.hx import HEDH_pitches, HTRI_Ls | ||
angles = [30, 45, 60, 90] | ||
pitches = sorted((set([j for k in HEDH_pitches.values() for j in k]))) | ||
pitches = sorted({j for k in HEDH_pitches.values() for j in k}) | ||
pitches = [1.25, 1.312, 1.33, 1.375, 1.4, 1.5] | ||
|
||
fin_thicknesses = [3E-4, 4E-4, 5E-4, 6E-4, 7E-4] # made up | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# -*- coding: utf-8 -*- | ||
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. | ||
Copyright (C) 2016, 2017, 2018, 2019, Caleb Bell <[email protected]> | ||
|
@@ -18,13 +17,13 @@ | |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE.''' | ||
SOFTWARE. | ||
''' | ||
|
||
from __future__ import division | ||
from ht.boiling_flow import (Chen_Bennett, Chen_Edelstein, Lazarek_Black, Li_Wu, Liu_Winterton, | ||
Sun_Mishima, Thome, Yun_Heo_Kim) | ||
from fluids.numerics import assert_close | ||
import pytest | ||
from fluids.numerics import assert_close | ||
|
||
from ht.boiling_flow import Chen_Bennett, Chen_Edelstein, Lazarek_Black, Li_Wu, Liu_Winterton, Sun_Mishima, Thome, Yun_Heo_Kim | ||
|
||
|
||
def test_Lazarek_Black(): | ||
|
@@ -37,7 +36,7 @@ def test_Lazarek_Black(): | |
|
||
with pytest.raises(Exception): | ||
Lazarek_Black(m=10, D=0.3, mul=1E-3, kl=0.6, Hvap=2E6) | ||
''' | ||
""" | ||
The code to derive the form with `Te` specified is | ||
as follows: | ||
|
@@ -47,7 +46,7 @@ def test_Lazarek_Black(): | |
>>> solve(Eq(h, 30*Relo**Rational(857,1000)*(Bgish*h*Te)**Rational(714, | ||
... 1000)*kl/D), h) | ||
[27000*30**(71/143)*Bgish**(357/143)*Relo**(857/286)*Te**(357/143)*kl**(500/143)/D**(500/143)] | ||
''' | ||
""" | ||
|
||
|
||
def test_Li_Wu(): | ||
|
@@ -61,15 +60,15 @@ def test_Li_Wu(): | |
with pytest.raises(Exception): | ||
Li_Wu(m=1, x=0.2, D=0.3, rhol=567., rhog=18.09, kl=0.086, mul=156E-6, sigma=0.02, Hvap=9E5) | ||
|
||
''' | ||
""" | ||
The code to derive the form with `Te` specified is | ||
as follows: | ||
>>> from sympy import * | ||
>>> h, A, Te, G, Hvap = symbols('h, A, Te, G, Hvap', positive=True, real=True) | ||
>>> solve(Eq(h, A*(h*Te/G/Hvap)**0.3), h) | ||
[A**(10/7)*Te**(3/7)/(G**(3/7)*Hvap**(3/7))] | ||
''' | ||
""" | ||
|
||
def test_Sun_Mishima(): | ||
h = Sun_Mishima(m=1.0, D=0.3, rhol=567., rhog=18.09, kl=0.086, mul=156E-6, sigma=0.02, Hvap=9E5, Te=10) | ||
|
@@ -85,15 +84,15 @@ def test_Sun_Mishima(): | |
with pytest.raises(Exception): | ||
Sun_Mishima(m=1, D=0.3, rhol=567., rhog=18.09, kl=0.086, mul=156E-6, sigma=0.02, Hvap=9E5) | ||
|
||
''' | ||
""" | ||
The code to derive the form with `Te` specified is | ||
as follows: | ||
>>> from sympy import * | ||
>>> h, A, Te, G, Hvap = symbols('h, A, Te, G, Hvap', positive=True, real=True) | ||
>>> solve(Eq(h, A*(h*Te/G/Hvap)**0.54), h) | ||
[A**(50/23)*Te**(27/23)/(G**(27/23)*Hvap**(27/23))] | ||
''' | ||
""" | ||
|
||
def test_Thome(): | ||
h = Thome(m=1.0, x=0.4, D=0.3, rhol=567., rhog=18.09, kl=0.086, kg=0.2, mul=156E-6, mug=1E-5, Cpl=2300.0, Cpg=1400, sigma=0.02, Hvap=9E5, Psat=1E5, Pc=22E6, q=1E5) | ||
|
@@ -120,15 +119,15 @@ def test_Yun_Heo_Kim(): | |
with pytest.raises(Exception): | ||
Yun_Heo_Kim(m=1, x=0.4, D=0.3, rhol=567., mul=156E-6, sigma=0.02, Hvap=9E5) | ||
|
||
''' | ||
""" | ||
The code to derive the form with `Te` specified is | ||
as follows: | ||
>>> from sympy import * | ||
>>> h, A = symbols('h, A', positive=True, real=True) | ||
>>> solve(Eq(h, A*(h)**0.1993), h) | ||
[A**(10000/8707)] | ||
''' | ||
""" | ||
|
||
def test_Liu_Winterton(): | ||
h = Liu_Winterton(m=1.0, x=0.4, D=0.3, rhol=567., rhog=18.09, kl=0.086, mul=156E-6, Cpl=2300.0, P=1E6, Pc=22E6, MW=44.02, Te=7.0) | ||
|
Oops, something went wrong.