Answered step by step
Verified Expert Solution
Question
1 Approved Answer
USE PYTHON, then Implement the given given codes for plotting Problem 1 ( 5 0 = 2 5 + 1 0 + 1 5 )
USE PYTHON, then Implement the given given codes for plotting
Problem
The resistance to flow in coeduitspipes is parameterized by a dimensionless number called the friction
factor For turbulent flow, the Colerook equation provides a means to calculate the friction factor:
where is roughaess in the pipe mam is diameter of the pipe in m and is the Reynolds
number of the flow. is the velocity of the flow in the pipe is the dynamic viscosity of the fluid
and is density of the fluid
a Write a code to Calculate the friction factor for for a range of Reynolds mum
ber and pipe Diameter using the Colebrook equation Equ.
Implenernt the equationsolving technique of your doice, eg FixodPoint Iteration, NewtonRaphson,
Secant, or ModifiedSecant. Note that friction factors uswally range between to
b Use "contourf" to plot the variation of with respect to and calculated in part a In
addition, on the same figure also plot approsimated using the explicit formula called the SwanseJain
equation:
Hint: You many refer to the following codes for the plotting,
fig.aubplotaad juat bottor top left right
waphese hapace
: Plot friction factor va Reynolda mumber and pipe diaseter
pltfigurefigaize
plt aubplot t
plt contourf Rerange, Drange, frictionfactora, cmap'viridia'
pltxlabel Reynolda Samber Re
pltylabel Pipe Diasater
plttielePriction Factor va Reyzolda Muzber and Pipe Diasater'
ple.elia
ax Iig.addaubplot
I SviateeJain equation for compariabo
ptaubplot
pltcolarbar label Friction Factor I
ple.xlabelBeynolda Samber Re
pltylabelPipe Diaseter a
pltticleSwaseeJai Priction Pactor va Rajaolda Muzber and Pipe Diasater'
ple.elia
c For a circular pipe the pressure required per uxit length of pipe is given by
where is the pressure gradient, defined as the pressure drop per leagth of pipe, is the valume flow
rate in the pipe, and Calculate and plot pressure gradient as a function of
using equation when roughness density of water
and dynamic viscosity of water For calculatiag friction factor you may use Equ.
or But, please justify your choice.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started