When air pressure drops in a pipe due to friction losses, how do you calculate the associated temperature drop?

Click For Summary
SUMMARY

The discussion centers on calculating temperature changes in a long straight pipe when pressure drops due to friction losses. It is established that in such scenarios, the temperature typically increases rather than decreases due to heat generated by friction. The Darcy-Weisbach equation is referenced for pressure drop calculations, while the Fanno flow model is suggested for compressible and adiabatic flows. A Python code utilizing the CoolProps module is provided to compute temperature and pressure changes along the pipe, demonstrating a total temperature drop of 1.16 K and a pressure drop of 20645 Pa.

PREREQUISITES
  • Understanding of the Darcy-Weisbach equation for pressure drop calculations.
  • Familiarity with compressible flow concepts, specifically Fanno flow.
  • Knowledge of thermodynamic principles, particularly adiabatic processes.
  • Proficiency in Python programming and use of the CoolProps module for property calculations.
NEXT STEPS
  • Research the application of the Fanno flow model in compressible flow scenarios.
  • Learn how to implement the Darcy-Weisbach equation in various fluid dynamics simulations.
  • Explore the effects of friction on temperature in different types of fluid flow.
  • Investigate advanced Python libraries for thermodynamic property calculations beyond CoolProps.
USEFUL FOR

Engineers, fluid dynamics researchers, and anyone involved in thermal management or fluid transport systems will benefit from this discussion.

Remusco
Messages
30
Reaction score
3
Say I drop the pressure in a pipe from P1 to P2. I know T1. How would I calculate T2?
When you expand the gas the temperature will drop, but there is also heat addition which will raise the temperature a certain amount.
 
Engineering news on Phys.org
Temperature doesn't drop due to friction, it rises. Are you thinking about a throttling device/nozzle that expands the flow? Can you be specific about your scenario?
 
russ_watters said:
Temperature doesn't drop due to friction, it rises. Are you thinking about a throttling device/nozzle that expands the flow? Can you be specific about your scenario?
I am thinking about a long straight pipe, meters in length. Darcy equation will be used to compute the pressure drop, however I would like to calculate the temperature drop as well.
 
Remusco said:
I am thinking about a long straight pipe, meters in length. Darcy equation will be used to compute the pressure drop, however I would like to calculate the temperature drop as well.
Sorry, in a long straight run of pipe the temperature goes up, not down. Friction is dissipating pressure as heat.

Pressure drop * volumetric flow rate = power

How much pressure are you thinking?
 
  • Like
Likes   Reactions: Baluncore
Remusco said:
When you expand the gas

Remusco said:
Darcy equation
Darcy is derived assuming constant density (incompressible flow). So you need to be careful.
 
  • Like
Likes   Reactions: boneh3ad
gmax137 said:
Darcy is derived assuming constant density (incompressible flow). So you need to be careful.
I wrote a code that divides the pipe into small sections and updates the density as the pressure drops.
 
For a compressible and adiabatic flow with friction, the Fanno flow should be considered.

For a compressible flow through long pipes, an isothermal flow is usually considered. (source) That is because the heat caused by the friction goes back into the flow and the flow tends to reach the temperature of the pipe's environment.

Darcy-Weisbach is based on the Bernoulli equation (source), valid for incompressible and isentropic flow, meaning an adiabatic process. (source) If the density is constant, then there cannot be large variations in temperature, and the temperature may be assumed to be constant as well. (source) Therefore, the heat due to friction must go back into the adiabatic flow and heat the fluid. But in a very long pipe, the isothermal process is most likely safe to assume as is the case for compressible flows.
 
jack action said:
For a compressible and adiabatic flow with friction, the Fanno flow should be considered.

For a compressible flow through long pipes, an isothermal flow is usually considered. (source) That is because the heat caused by the friction goes back into the flow and the flow tends to reach the temperature of the pipe's environment.

Darcy-Weisbach is based on the Bernoulli equation (source), valid for incompressible and isentropic flow, meaning an adiabatic process. (source) If the density is constant, then there cannot be large variations in temperature, and the temperature may be assumed to be constant as well. (source) Therefore, the heat due to friction must go back into the adiabatic flow and heat the fluid. But in a very long pipe, the isothermal process is most likely safe to assume as is the case for compressible flows.
I did figure out how to calculate the change in temperature caused by a pressure drop. For the adiabatic case, you can assume constant enthalpy. The enthalpy, combined with the absolute pressure, are two states that can be used to lookup an associated temperature value at each point along the pipe length. According to my calculation, you will actually see a slight temperature drop as the pressure drops due to the fluid expanding. My code assumes constant enthalpy, which would represent the adiabatic case (insulated pipe). Using the CoolProps module in Python enables the properties to be updated at each "node".

Code:
import numpy as np
import matplotlib.pyplot as plt
import CoolProp.CoolProp as cp

P_atm=100594

P_inlet=P_atm+30000 #iterate to obtain this value such that outlet boundary condition = atmospheric pressure
T_inlet=cp.PropsSI('T','P',P_inlet,'Q',1,'ethanol')
dyn_visc_inlet=cp.PropsSI('VISCOSITY','P',P_inlet,'Q',1,'ethanol')
rho_inlet=cp.PropsSI('D','P',P_inlet,'Q',1,'ethanol')


pipe_diam=0.108204 #INTERNAL DIAMETER OF PIPE
Vdot_NFPA=1.05488 #VOLUME FLOW RATE REQUIRED BY NFPA30 ANNEX B
area=0.25*np.pi*pipe_diam**2 #CROSS SECTIONAL AREA OF PIPE
epsilon=0.000046 #PIPE ROUGHNESS IN METERS
pipe_length=9.2 #total length of straight piping

node_spacing=0.1
pipe_nodes=np.arange(0,pipe_length,node_spacing)
mdot=rho_inlet*Vdot_NFPA
enthalpy=cp.PropsSI('H','P',P_inlet,'Q',1,'ethanol')

pressure_loss_array=np.zeros(len(pipe_nodes)-1) #array of pressure losses, between each node

pressure_array=np.zeros(len(pipe_nodes))
pressure_array[0]=P_inlet

temperature_array=np.zeros(len(pipe_nodes))
temperature_array[0]=T_inlet

viscosity_array=np.zeros(len(pipe_nodes))
viscosity_array[0]=dyn_visc_inlet

density_array=np.zeros(len(pipe_nodes))
density_array[0]=rho_inlet


hasrun1=0
hasrun2=0
hasrun3=0


for k in range(len(pressure_array)):
    if k==0:
        P=P_inlet
        T=T_inlet
        dyn_visc=dyn_visc_inlet
        rho=rho_inlet
    f=(-1.8*np.log10((epsilon/(pipe_diam*3.7))**1.11+(6.9/(pipe_diam*(rho)*(mdot/rho/area)/dyn_visc))))**(-2) #E HAALAND FRICTION FACTOR
  
    if k>0:
        pressure_loss_array[k-1]=(f*node_spacing/pipe_diam)*(rho/2)*(mdot/rho/area)**2

        pressure_array[k]=P-pressure_loss_array[k-1]
        P=pressure_array[k]

        temperature_array[k]=cp.PropsSI('T','P',P,'H',enthalpy,'ethanol')
        T=temperature_array[k]

        viscosity_array[k]=cp.PropsSI('VISCOSITY','P',P,'H',enthalpy,'ethanol')
        dyn_visc=viscosity_array[k]

        density_array[k]=cp.PropsSI('D','P',P,'H',enthalpy,'ethanol')
        rho=density_array[k]
  
  
  
    print(f'Node {k}')
    print(f'distance along pipe: {str(round(k*node_spacing,2))} m')
    print('pressure: '+str(round(P,2))+' Pa')
    print('temperature: '+str(round(T,2))+' K')
    print('viscosity: '+str(round(dyn_visc,7))+ ' Pa*sec')
    print('density: '+str(round(rho,4))+ ' kg/m^3') 

    print(f'velocity: {str(round(mdot/rho/area,4))} m/sec')
    plt.plot(k*node_spacing,P,'bo')
    plt.title('Absolute Pressure in Piping System')
    plt.xlabel('Distance along Pipe [m]')
    plt.ylabel('Absolute Pressure [Pa]')
  
    print('------------------------------')

pressure_drop=pressure_array[-1]-pressure_array[0]
temperature_drop=temperature_array[-1]-temperature_array[0]
print('pressure drop total: '+str(round(pressure_drop))+' Pa')
print('temperature drop total: '+str(round(temperature_drop,2))+' K')

print(pressure_array)

The output shows a total temperature drop of 1.16 K and a pressure drop of 20645 K.
The plot of the pressure is shown below:
1734231502677.png
 
  • Like
Likes   Reactions: jack action

Similar threads

Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
6K
Replies
13
Views
4K
Replies
8
Views
2K
Replies
2
Views
2K
  • · Replies 31 ·
2
Replies
31
Views
5K
Replies
25
Views
4K
  • · Replies 20 ·
Replies
20
Views
11K