How can i code and solve this PDE on matlab?
Afficher commentaires plus anciens

Hi! I am looking to solve this PDE on matlab but I am unable to obtain any solution using pdepe function. Would appreciate any assistance!
Réponses (1)
Torsten
le 22 Oct 2018
c = 1;
f = alpha2*sqrt(u(1))/(1-u(1))^1.5*DuDx;
s = alpha1*u(1)*(2-u(1))/(1-u(1))^2*DuDx;
u0=?
(You didn't provide a profile at t=0 for epsilon)
pl=?
ql=?
pr=?
qr=?
(You didn't provide boundary conditions for epsilon)
19 commentaires
Kevin Lee
le 22 Oct 2018
So,
z0 = 0;
z1 = 1;
u0=0.8*(z==z0)+0.261*(z>z0 & z<z1)+0.2*(z==z1)
and
pl = ur-0.8;
ql = 0;
pr = ur-0.2;
qr = 0;
Does it work ?
Torsten
le 22 Oct 2018
You didn't define z0 and z1. Further, pdex1ic is a function of x, not z.
Kevin Lee
le 22 Oct 2018
Torsten
le 22 Oct 2018
Please include your final code as plain text, not as a graphic file.
Kevin Lee
le 22 Oct 2018
Torsten
le 22 Oct 2018
By copy-and-paste from the text file in which you develop your code.
Kevin Lee
le 22 Oct 2018
Torsten
le 22 Oct 2018
Then save it to a text file.
Torsten
le 22 Oct 2018
I meant that you should use the text from the saved text file to include it here.
Torsten
le 22 Oct 2018
Two mistakes I can spot in your code:
1. Define r *before* you calculate V.
2. Use pl = ul-0.8 instead of pl = ur-0.8.
Torsten
le 22 Oct 2018
The code is technically ok now.
Since I don't know about the background of your problem, I can't help you any longer.
Catégories
En savoir plus sur Boundary Conditions dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
