How to plot power law velocity profile
11 次查看(过去 30 天)
显示 更早的评论
I would like to plot a velocity profile according to the power law model:
{\displaystyle u(r)={\frac {n}{n+1}}\left({\frac {dp}{dz}}{\frac {1}{2K}}\right)^{\frac {1}{n}}\left(R^{\frac {n+1}{n}}-r^{\frac {n+1}{n}}\right)}
When I code this into matlab, I get the following:
n = 0.89
k = 53
d = 0.01125
r = d
p = 15000
u = (n/n+1)*(p/(2*k))^(1/n)*(d.^((n+1)/n)-r.^((n+1)/n))
plot(d,u)
This gives me the following:
Trying the following code I get:
n = 0.89
k = 53
d = linspace(-0.01125, 0.01125)
r = linspace(-0.01125,0.01125)
p = 15000
u = (n/n+1)*(p/(2*k))^(1/n)*(d.^((n+1)/n)-r.^((n+1)/n))
plot(d,u)
I want it to look like the folowing, but I can't seem to get it to plot the x values correctly.
回答(1 个)
Star Strider
2020-1-20
It plots the values correctly.
Note that since ‘d’ and ‘r’ are the same, this part of the expression:
(d.^((n+1)/n)-r.^((n+1)/n))
is identically 0 for all values of ‘d’ and ‘r’.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!