Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

So I find the velocity profile for Pressure driven pipe flow and it looks like:

$$u = \frac{h^2}{2 \mu} \frac{\mathrm{d}P}{\mathrm{d}x}\left[1 - \left(\frac{y}{h}\right)^2\right]$$

Here, a fluid flows between two walls separated by a distance $h$. The pressure gradient $\mathrm{d}P/\mathrm{d}X$ drives the flow. The vertical coordinate axis is $y$.

How do I plot this as a velocity profile (VelocityPlot)? When I try do plot this with

μ = 0.02; Px = -0.5; h = 1.0;
VectorPlot[{(h^2/(2 μ)) Px (1 - (y/h)^2), 0}, {x, 0, 3}, {y, -3, 3}]

I get the following figure: enter image description here

However, the velocity profile is parabolic and should look like:

enter image description here

I apologize for the low quality vector plot from ansys but what went wrong with my VectorPlot[...] definition?

share|improve this question
2  
you are plotting outside the region of validity of your equation. Change {y,-h,h} instead of {y,-3,3} –  gpap Oct 14 '13 at 14:59
add comment

1 Answer

up vote 6 down vote accepted

Some comments: 1. The formula for velocity profile should be $-\frac{dP}{dx}$ as flow travels down a pressure gradient not up. 2. As gpap observes the region of interest is -h,h within the flow region. The "pipe" walls are separated by $2h$ (radius $h$). 3. In the following I have retained same Px but corrected formula so to show flow from left to right. If intention was right to left flow then Px should be positive. 4. I have coloured vector by magnitude of x direction #3&. I have just plotted points at zero to demonstrate parabolic flow profile.

\[Mu] = 0.02; Px = -0.5; h = 1.0;
f = (h^2/(2 \[Mu])) (-Px) (1 - (y/h)^2)
VectorPlot[{f, 0}, {x, 0, 3}, {y, -h, h}, 
 VectorPoints -> Table[{0, j}, {j, -1, 1, 0.1}], 
 VectorScale -> {1, 0.2}, VectorColorFunction -> (Hue[#3*.6] &), 
 PlotRange -> {{0, 4}, {-1.1, 1.1}}, 
 Epilog -> {{Red, Thick, Line[{{0, 1}, {4, 1}}]}, {Red, Thick, 
    Line[{{0, -1}, {4, -1}}]}}]

yields:

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.