# Path: fluids/core.py
# def F2K(F):
#     """Convert Fahrenheit to Kelvin.
# 
#     Parameters
#     ----------
#     F : float
#         Fahrenheit temperature to be converted.
# 
#     Returns
#     -------
#     K : float
#         Equivalent Kelvin temperature.
# 
#     Notes
#     -----
#     Computes ``K = (F - 32)/1.8 + zero_Celsius`` where `zero_Celsius` =
#     273.15, i.e., (the absolute value of) temperature "absolute zero" as
#     measured in Celsius.
# 
#     Examples
#     --------
#     >>> F2K(-40)
#     233.14999999999998
#     """
#     return (F - 32.0)/1.8 + zero_Celsius


from fluids.compressible import *
from fluids.constants import *
from fluids.core import F2K
from fluids.numerics import assert_close, assert_close1d
from math import log, pi
import pytest
    Q = 42.35366178004172

    # Test all combinations of relevant missing inputs
    assert_close(Panhandle_B(D=D, P1=P1, P2=P2, L=L, SG=SG, Tavg=Tavg), Q)
    assert_close(Panhandle_B(D=D, Q=Q, P2=P2, L=L, SG=SG, Tavg=Tavg), P1)
    assert_close(Panhandle_B(D=D, Q=Q, P1=P1, L=L, SG=SG, Tavg=Tavg), P2)
    assert_close(Panhandle_B(D=D, Q=Q, P1=P1, P2=P2, SG=SG, Tavg=Tavg), L)
    assert_close(Panhandle_B(L=L, Q=Q, P1=P1, P2=P2, SG=SG, Tavg=Tavg), D)

    with pytest.raises(Exception):
        Panhandle_B(D=0.340, P1=90E5, L=160E3, SG=0.693, Tavg=277.15)


def test_Weymouth():
    D = 0.340
    P1 = 90E5
    P2 = 20E5
    L = 160E3
    SG=0.693
    Tavg = 277.15
    Q = 32.07729055913029
    assert_close(Weymouth(D=D, P1=P1, P2=P2, L=L, SG=SG, Tavg=Tavg), Q)
    assert_close(Weymouth(D=D, Q=Q, P2=P2, L=L, SG=SG, Tavg=Tavg), P1)
    assert_close(Weymouth(D=D, Q=Q, P1=P1, L=L, SG=SG, Tavg=Tavg), P2)
    assert_close(Weymouth(D=D, Q=Q, P1=P1, P2=P2, SG=SG, Tavg=Tavg), L)
    assert_close(Weymouth(L=L, Q=Q, P1=P1, P2=P2, SG=SG, Tavg=Tavg), D)

    with pytest.raises(Exception):
        Weymouth(D=0.340, P1=90E5, L=160E3, SG=0.693, Tavg=277.15)


# Path: fluids/core.py
# def F2K(F):
#     """Convert Fahrenheit to Kelvin.
# 
#     Parameters
#     ----------
#     F : float
#         Fahrenheit temperature to be converted.
# 
#     Returns
#     -------
#     K : float
#         Equivalent Kelvin temperature.
# 
#     Notes
#     -----
#     Computes ``K = (F - 32)/1.8 + zero_Celsius`` where `zero_Celsius` =
#     273.15, i.e., (the absolute value of) temperature "absolute zero" as
#     measured in Celsius.
# 
#     Examples
#     --------
#     >>> F2K(-40)
#     233.14999999999998
#     """
#     return (F - 32.0)/1.8 + zero_Celsius


# Path: tests/test_compressible.py
from fluids.compressible import *
from fluids.constants import *
from fluids.core import F2K
from fluids.numerics import assert_close, assert_close1d
from math import log, pi
import pytest

    Q = 42.35366178004172

    # Test all combinations of relevant missing inputs
    assert_close(Panhandle_B(D=D, P1=P1, P2=P2, L=L, SG=SG, Tavg=Tavg), Q)
    assert_close(Panhandle_B(D=D, Q=Q, P2=P2, L=L, SG=SG, Tavg=Tavg), P1)
    assert_close(Panhandle_B(D=D, Q=Q, P1=P1, L=L, SG=SG, Tavg=Tavg), P2)
    assert_close(Panhandle_B(D=D, Q=Q, P1=P1, P2=P2, SG=SG, Tavg=Tavg), L)
    assert_close(Panhandle_B(L=L, Q=Q, P1=P1, P2=P2, SG=SG, Tavg=Tavg), D)

    with pytest.raises(Exception):
        Panhandle_B(D=0.340, P1=90E5, L=160E3, SG=0.693, Tavg=277.15)


def test_Weymouth():
    D = 0.340
    P1 = 90E5
    P2 = 20E5
    L = 160E3
    SG=0.693
    Tavg = 277.15
    Q = 32.07729055913029
    assert_close(Weymouth(D=D, P1=P1, P2=P2, L=L, SG=SG, Tavg=Tavg), Q)
    assert_close(Weymouth(D=D, Q=Q, P2=P2, L=L, SG=SG, Tavg=Tavg), P1)
    assert_close(Weymouth(D=D, Q=Q, P1=P1, L=L, SG=SG, Tavg=Tavg), P2)
    assert_close(Weymouth(D=D, Q=Q, P1=P1, P2=P2, SG=SG, Tavg=Tavg), L)
    assert_close(Weymouth(L=L, Q=Q, P1=P1, P2=P2, SG=SG, Tavg=Tavg), D)

    with pytest.raises(Exception):
        Weymouth(D=0.340, P1=90E5, L=160E3, SG=0.693, Tavg=277.15)


    Q_Weymouth = Weymouth(SG=0.65, Tavg=F2K(80), Ts=F2K(60), Ps=14.7*psi, L=500*foot, D=12*inch, P1=510*psi,