Sorry, I think I have not attached the graphs! Thank you.
, I need help! I do not get to have the graph of the solution of a differential equation.
3 views (last 30 days)
Show older comments
- I have a differential equation of the first order. It describes the basic velocity profile of fluid flowing over an inclined plane.
- I used the Euler method with Matlab to solve the equation.
- My goal is to plot the graph of the solution of this equation. I want to have the velocity U on axis (ox) on the interval [0,18], in fonction of the height of the flow channel y, on axis (oy) in the interval [0,200] .
- No errors in the program are displayed, but the result I get is different from that of the article on which I work. The velocity profile should be parabolic while I get a straight line!
- I Attach the program that I do, the graph that I get and the graph that I must have.Could you please help me understand and solve the problem? I will be very grateful.
Accepted Answer
Roger Stafford
on 2 Jan 2015
I am guessing that you left out the parentheses in the denominator of F, which would presumably be this instead:
F=@(x,s)(2-(x./100))./(1+sqrt(1+0.003*x.^2.*(1-exp(-x./25)).^2.*(200-x)./50));
^ ^
The values for U I get with this alteration do not agree with those in your 'profile vitesse.pdf' plot but the shape appears to be similar to that plot.
Also I find it curious that F, as you have defined it, does not depend on the second argument 's', so you are simply finding U(x) = the integral of F(t) from t = 0 to x where F does not depend on U. In other words, it is not really a differential equation but merely an integral which could have been solved using 'cumtrapz'.
8 Comments
Roger Stafford
on 5 Jan 2015
Not quite identical. There is the discrepancy between U being 16.2473 with matlab and somewhere near 15.3 for the article for x = 200.
More Answers (1)
Andres Bayona
on 25 Apr 2019
Hi, I was wondering if it were possible that you shared the code with me. I would really appreciate it!
0 Comments
See Also
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!