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.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Nadjah
le 2 Jan 2015
Réponse apportée : Andres Bayona
le 25 Avr 2019
- 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.
Réponse acceptée
Roger Stafford
le 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 commentaires
Roger Stafford
le 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.
Plus de réponses (1)
Andres Bayona
le 25 Avr 2019
Hi, I was wondering if it were possible that you shared the code with me. I would really appreciate it!
0 commentaires
Voir également
Catégories
En savoir plus sur Graphics Performance dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!