How to plot power law velocity profile

조회 수: 11 (최근 30일)
BeigeSponge
BeigeSponge 2020년 1월 20일
댓글: Star Strider 2020년 1월 20일
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:
Annotation 2020-01-20 193129.png
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)
Annotation 2020-01-20 193410.png
I want it to look like the folowing, but I can't seem to get it to plot the x values correctly.
hqdefault.jpg

답변 (1개)

Star Strider
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’.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by