Last active
November 13, 2019 10:48
-
-
Save iamz33/973f14ab8c651154b99226a42ce38b1e to your computer and use it in GitHub Desktop.
Codes related to Fluid dynamics, thermodynamics, other applications
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Mon Sep 23 17:13:05 2019 | |
| @author: Zeeshan | |
| This code calculates Reynolds number for internal forced flow of a fluid through a cylindrical tube, in this case, Propylene Glycol water mixture with 40% concentration | |
| Change the dimensions of the tube in code accordingly | |
| """ | |
| import CoolProp.CoolProp as CP | |
| per = '40%' | |
| flow=float(input('Enter flow rate lit/hr')) | |
| T=float(input('Input avg Tmean')) | |
| mew=CP.PropsSI('V','T',T+273.15,'P',101325,'INCOMP::MPG-'+per)/1000 #Viscosity | |
| row=CP.PropsSI('D','T',T+273.15,'P',101325,'INCOMP::MPG-'+per)/1000 #Density | |
| sp_gravity=1.017 | |
| #row=sp_gravity*1000 | |
| q=flow/(3.6e6) | |
| dia=12e-3 #Diameter | |
| csa=3.14/4*(dia**2) #Cross Section Area | |
| #q=csa*velocity | |
| velocity=q/csa #Velocity of Fluid Flowing through Tube | |
| Re=row*velocity*dia/mew #Reynold's Number Formula | |
| print('Reynolds Number is {:06f}'.format(Re)) | |
| if (Re<2300): | |
| print('Laminar') | |
| elif (Re >=2300) & (Re <= 4000.00): | |
| print('Transient') | |
| elif (Re > 4000): | |
| print('Turbulent') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment