# 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
    mu1, mu2 = 0.0003595695325135477, 0.0003595695325135477
    Pr1, Pr2 = 6.2859707150337805, 6.2859707150337805
    assert not is_heating_property(prop=mu1, prop_wall=mu2)
    assert not is_heating_property(prop=Pr1, prop_wall=Pr2)

    # Lower wall temperatures - not heating in that case
    T1, T2 = 280, 260
    mu1, mu2 = 0.0003595695325135477, 0.0004531397378208441
    Pr1, Pr2 = 6.2859707150337805, 7.27333944072039
    assert not is_heating_property(prop=mu1, prop_wall=mu2)
    assert not is_heating_property(prop=Pr1, prop_wall=Pr2)

def test_wall_factor():
    # Only one value provided
    with pytest.raises(Exception):
        wall_factor(mu=1, property_option=WALL_FACTOR_VISCOSITY)

    with pytest.raises(Exception):
        wall_factor(mu_wall=1, property_option=WALL_FACTOR_VISCOSITY)

    with pytest.raises(Exception):
        wall_factor(Pr=1, property_option=WALL_FACTOR_PRANDTL)

    with pytest.raises(Exception):
        wall_factor(Pr_wall=1, property_option=WALL_FACTOR_PRANDTL)

    with pytest.raises(Exception):
        wall_factor(T=1, property_option=WALL_FACTOR_TEMPERATURE)

    with pytest.raises(Exception):

# 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

    mu1, mu2 = 0.0003595695325135477, 0.0003595695325135477
    Pr1, Pr2 = 6.2859707150337805, 6.2859707150337805
    assert not is_heating_property(prop=mu1, prop_wall=mu2)
    assert not is_heating_property(prop=Pr1, prop_wall=Pr2)

    # Lower wall temperatures - not heating in that case
    T1, T2 = 280, 260
    mu1, mu2 = 0.0003595695325135477, 0.0004531397378208441
    Pr1, Pr2 = 6.2859707150337805, 7.27333944072039
    assert not is_heating_property(prop=mu1, prop_wall=mu2)
    assert not is_heating_property(prop=Pr1, prop_wall=Pr2)

def test_wall_factor():
    # Only one value provided
    with pytest.raises(Exception):
        wall_factor(mu=1, property_option=WALL_FACTOR_VISCOSITY)

    with pytest.raises(Exception):
        wall_factor(mu_wall=1, property_option=WALL_FACTOR_VISCOSITY)

    with pytest.raises(Exception):
        wall_factor(Pr=1, property_option=WALL_FACTOR_PRANDTL)

    with pytest.raises(Exception):
        wall_factor(Pr_wall=1, property_option=WALL_FACTOR_PRANDTL)

    with pytest.raises(Exception):
        wall_factor(T=1, property_option=WALL_FACTOR_TEMPERATURE)

    with pytest.raises(Exception):

        wall_factor(T_wall=1, property_option=WALL_FACTOR_TEMPERATURE)