Integrate with two dependent variables and solve a system

2 views (last 30 days)
Hello all!
I will try to explain my problem:
I have two equations and two unknowns "w" and "T". One of the equations is an integral from a to b relative to a variable "r". The integral equation contains two terms that are function of both "w" and "r" and this term calls a value on a interpolated plot. Those terms are defined as Cd and Cl.
The equations are the following, knowing that:
  • mult_Cl = CL(-((atan(20/(pi*r)) - pi/18) - atan(w/(omega*r)))*180/pi)* omega*r/(sqrt(omega.^2*r.^2+w.^2));
  • mult_Cd = CD(-((atan(20/(pi*r)) - pi/18) - atan(w/(omega*r)))*180/pi)* omega*r/(sqrt(omega.^2*r.^2+w.^2));
and
  • CL and CD are interpolated functions
T = integral ( rho/2*(omega.^2*r^2 + w.^2)* ( 4 - 2.35294*(r/50 - 0.1)) *( mult_Cl + mult_Cd ),5,50);
T = 2*pi*rho*R.^2*(Vinf - w)*w
----
Where rho, omega, Vinf are known values
I need to solve both T equations at the same time to find a value of "w" for both.
I have never tried that before, so I am kinda lost. Thank you very much!!

Answers (1)

Torsten
Torsten on 9 Nov 2015
Use MATLAB's fzero on the function
f=@(w)integral ( rho/2*(omega.^2*r^2 + w.^2)* ( 4 - 2.35294*(r/50 - 0.1)) *( mult_Cl + mult_Cd ),5,50) - 2*pi*rho*R.^2*(Vinf - w)*w
to get w.
Then insert in one of the above equations to get T.
Best wishes
Torsten.
  4 Comments
Ricardo Rodrigues
Ricardo Rodrigues on 9 Nov 2015
You are right!
Now CL and CD are functions of x, but now the error I get is
FZERO cannot continue because user-supplied function_handle ==> @(w)integral(rho./2.*(omega.^2.*r.^2+w.^2).*(4-2.35294.*(r./50-0.1)).*(CL(-((atan(20./(pi.*r))-pi./18)-atan(w./(omega.*r))).*180./pi).*omega.*r./(sqrt(omega.^2.*r.^2+w.^2))+CD(-((atan(20./(pi.*r))-pi./18)-atan(w./(omega.*r))).*180./pi).*omega.*r./(sqrt(omega.^2.*r.^2+w.^2))),5,50)-2.*pi.*rho.*R.^2.*(Vinf-w).*w failed with the error below.
First input argument must be a function handle.
Torsten
Torsten on 10 Nov 2015
The first argument to "integral" must be a function handle, not an expression.
Best wishes
Torsten.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!