## 20 Reputation

2 years, 316 days

## Thank you for your help ...

restart;
mu := 0;
beta := 0.1;
alpha := 1;
Gamma1 := 0.1;
mu := 0

beta := 0.1

alpha := 1

Gamma1 := 0.1

with(PDEtools);
with(plots);
pde1 := {diff(u(x, t), t) = -Gamma1*diff(u(x, t), x) + mu*(w(x, t) - u(x, t)) - 0.5*beta*v(x, t)*(w(x, t) - u(x, t)) - beta*u(x, t)*v(x, t), diff(v(x, t), t) = beta*v(x, t)*(w(x, t) + u(x, t)) - alpha*v(x, t), diff(w(x, t), t) = Gamma1*diff(w(x, t), x) + mu(u(x, t) - w(x, t)) - 0.5*beta*v(x, t)*(u(x, t) - w(x, t)) - beta*w(x, t)*v(x, t)};
/ d                 / d         \
pde1 := { --- u(x, t) = -0.1 |--- u(x, t)|
\ dt                \ dx        /

- 0.05 v(x, t) (w(x, t) - u(x, t)) - 0.1 u(x, t) v(x, t),

d                                                        d
--- v(x, t) = 0.1 v(x, t) (w(x, t) + u(x, t)) - v(x, t), --- w(
dt                                                       dt

/ d         \
x, t) = 0.1 |--- w(x, t)| - 0.05 v(x, t) (u(x, t) - w(x, t))
\ dx        /

\
- 0.1 w(x, t) v(x, t) }
/

IBC1 := {u(0, t) = 0, u(x, 0) = 0.5 + rand(0 .. 10), v(x, 0) = 0, w(1, t) = 0, w(x, 0) = 0.5 + rand(0 .. 10)};
IBC1 := {u(0, t) = 0, u(x, 0) = 0.5 +

(proc () (proc () option builtin = RandNumberInterface; end

proc)(6, 11, 4) end proc), v(x, 0) = 0, w(1, t) = 0, w(x, 0) =

0.5 +

(proc () (proc () option builtin = RandNumberInterface; end

proc)(6, 11, 4) end proc)}

pds1 := pdsolve(pde1, IBC1, numeric, spacestep = 0.001);
pds1 := _m1508441555488

p1u := pds1:-plot(u, t = 0, numpoints = 100, legend = ["u(0)"], linestyle = 1);
p1w := pds1:-plot(w, t = 0, color = blue, numpoints = 100, legend = ["w(0)"], linestyle = 1);
p1v := pds1:-plot(v, t = 0, color = green, numpoints = 100, legend = ["v(0)"], linestyle = 1);

plots[display]({p1u, p1v, p1w}, axes = boxed);
Error, (in pdsolve/numeric/plot) unable to compute solution for t<HFloat(0.0):
solution becomes undefined, problem may be ill posed or method may be ill suited to solution
Error, (in pdsolve/numeric/plot) unable to compute solution for t<HFloat(0.0):
solution becomes undefined, problem may be ill posed or method may be ill suited to solution
Error, (in pdsolve/numeric/plot) unable to compute solution for t<HFloat(0.0):
solution becomes undefined, problem may be ill posed or method may be ill suited to solution
Error, (in plots:-display) expecting plot structures but received: {p1u, p1v, p1w}

I appreciate your answer . I need also to p1i := evalc(Im(Eq2)) and plot Re and Im in one

when I tried p1i := evalc(Im(Eq2)) came equal to zero???!!!!!

## solve IBCs for hyperbolic system...

Thank you for your interest , I solved by change the boundary condition of v(x,0)=exp

It is working now. Thankx alot

I understood your comments,but one mistake in the last equation where u is U=u+w

U is the total population

diff(v(x,t),t)=beta*(u(x,t)+w(x,t))*v(x, t)-alpha*v(x, t) this is the correct one , how I can write a correct IBCs??

regards

 Page 1 of 1
﻿