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!