how do i use fsolve to solve a stream function ?

조회 수: 6 (최근 30일)
steven hong
steven hong 2020년 3월 29일
댓글: steven hong 2020년 3월 29일
I have a stream function and am asked to solve it numerically to
calculate velocity at the x and y co-ordinates and then plot the pressure
co-efficient on a rankin oval. But am unsure of how to use the fsolve function to
solve the stream function .
the code i have so far:
syms U0 x y real
psi = U0*y + 4/2/pi * atan2(y, x+1) - 4/2/pi * atan2 (y, x-1);
v=-diff(psi, x)
u=diff(psi, y)
U0=1
x=-3:0.01:3;
y=-3:0.01:3;
u=eval(u)
v=eval(v)
any help is appreciated.
  댓글 수: 4
Thiago Henrique Gomes Lobato
Thiago Henrique Gomes Lobato 2020년 3월 29일
Why you need to "solve" the stream function since it is already there? There's nothing to solve. Most likely what was meant was discretize/numeric calculate it, and your code seems fine so far.
steven hong
steven hong 2020년 3월 29일
Ive added the full question to make it clear what im trying to achieve.
ive added the following to get the velocity magnitude after calculating u and v.
Z=sqrt(u.^2 + v.^2)
then after this i have to calculate pressure and the pressure co-efficient on the surface of the rankin oval using bernoullis equation.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by