Azzera filtri
Azzera filtri

, I need help! I do not get to have the graph of the solution of a differential equation.

2 visualizzazioni (ultimi 30 giorni)
  • 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.

Risposta accettata

Roger Stafford
Roger Stafford il 2 Gen 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 Commenti
Roger Stafford
Roger Stafford il 5 Gen 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.
Nadjah
Nadjah il 6 Gen 2015
Hello; The graph '' profile vitesse.pdf '' is the one I got with Maple and that I found (before to solve the problem with Matlab)) close to that of the article (herewith the graph of the article). Whilst if we correct the term in denominator: F=@(x,s)(2-(x./100))./(1+sqrt(1+0.003*x.^2.*(1-exp(-x./25)).^2.* (200-x)./50) ) which becomes: F=@(x,s)(2-(x./100))./(1+sqrt(1+0.003*x.^2.*(1-exp(-x./25)).^2.*(200-x))) you will notice that the result of Matlab is much better! Thank you.

Accedi per commentare.

Più risposte (1)

Andres Bayona
Andres Bayona il 25 Apr 2019
Hi, I was wondering if it were possible that you shared the code with me. I would really appreciate it!

Categorie

Scopri di più su Graphics Performance in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by