# Path: ht/core.py
# def is_heating_temperature(T, T_wall):
#     r'''Checks whether or not a fluid side is being heated or cooled, from
#     the temperature of the wall and the bulk temperature. Returns True for
#     heating the bulk fluid, and False for cooling the bulk fluid.
# 
#     Parameters
#     ----------
#     T : float
#         Temperature of flowing fluid away from the heat transfer surface, [K]
#     T_wall : float
#         Temperature of the fluid at the wall, [K]
# 
#     Returns
#     -------
#     is_heating : bool
#         Whether or not the flow is being heated up by the wall, [-]
# 
#     Examples
#     --------
#     >>> is_heating_temperature(298.15, 350)
#     True
#     '''
#     return T_wall > T
# 
# def is_heating_property(prop, prop_wall):
#     r'''Checks whether or not a fluid side is being heated or cooled, from
#     a property of the fluid at the wall and the bulk temperature. Returns True
#     for heating the bulk fluid, and False for cooling the bulk fluid.
# 
#     Parameters
#     ----------
#     prop : float
#         Viscosity (or Prandtl number) of flowing fluid away from the heat
#         transfer surface, [Pa*s]
#     prop_wall : float
#         Viscosity (or Prandtl number) of the fluid at the wall, [Pa*s]
# 
#     Returns
#     -------
#     is_heating : bool
#         Whether or not the flow is being heated up by the wall, [-]
# 
#     Examples
#     --------
#     >>> is_heating_property(1E-3, 1.2E-3)
#     False
#     '''
#     return prop_wall < prop
# 
# Path: ht/core.py
# WALL_FACTOR_VISCOSITY = 'Viscosity'
# 
# WALL_FACTOR_PRANDTL = 'Prandtl'
# 
# WALL_FACTOR_TEMPERATURE = 'Temperature'
# 
# WALL_FACTOR_DEFAULT = 'Default'


from ht import *
from fluids.numerics import assert_close, assert_close1d, assert_close2d
from ht.core import is_heating_temperature, is_heating_property
from ht.core import WALL_FACTOR_VISCOSITY, WALL_FACTOR_PRANDTL, WALL_FACTOR_TEMPERATURE, WALL_FACTOR_DEFAULT
import numpy as np
import pytest
# -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2016, 2017 Caleb Bell <Caleb.Andrew.Bell@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
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.'''


# Path: ht/core.py
# def is_heating_temperature(T, T_wall):
#     r'''Checks whether or not a fluid side is being heated or cooled, from
#     the temperature of the wall and the bulk temperature. Returns True for
#     heating the bulk fluid, and False for cooling the bulk fluid.
# 
#     Parameters
#     ----------
#     T : float
#         Temperature of flowing fluid away from the heat transfer surface, [K]
#     T_wall : float
#         Temperature of the fluid at the wall, [K]
# 
#     Returns
#     -------
#     is_heating : bool
#         Whether or not the flow is being heated up by the wall, [-]
# 
#     Examples
#     --------
#     >>> is_heating_temperature(298.15, 350)
#     True
#     '''
#     return T_wall > T
# 
# def is_heating_property(prop, prop_wall):
#     r'''Checks whether or not a fluid side is being heated or cooled, from
#     a property of the fluid at the wall and the bulk temperature. Returns True
#     for heating the bulk fluid, and False for cooling the bulk fluid.
# 
#     Parameters
#     ----------
#     prop : float
#         Viscosity (or Prandtl number) of flowing fluid away from the heat
#         transfer surface, [Pa*s]
#     prop_wall : float
#         Viscosity (or Prandtl number) of the fluid at the wall, [Pa*s]
# 
#     Returns
#     -------
#     is_heating : bool
#         Whether or not the flow is being heated up by the wall, [-]
# 
#     Examples
#     --------
#     >>> is_heating_property(1E-3, 1.2E-3)
#     False
#     '''
#     return prop_wall < prop
# 
# Path: ht/core.py
# WALL_FACTOR_VISCOSITY = 'Viscosity'
# 
# WALL_FACTOR_PRANDTL = 'Prandtl'
# 
# WALL_FACTOR_TEMPERATURE = 'Temperature'
# 
# WALL_FACTOR_DEFAULT = 'Default'


# Path: tests/test_core.py
from ht import *
from fluids.numerics import assert_close, assert_close1d, assert_close2d
from ht.core import is_heating_temperature, is_heating_property
from ht.core import WALL_FACTOR_VISCOSITY, WALL_FACTOR_PRANDTL, WALL_FACTOR_TEMPERATURE, WALL_FACTOR_DEFAULT
import numpy as np
import pytest

# -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2016, 2017 Caleb Bell <Caleb.Andrew.Bell@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
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.'''


from __future__ import division