I want to simulate the following programme on pdepe solver with third type inlet boundary of Heaviside nature with t0 = 140 days and a zero flux ourlet boundary

2 views (last 30 days)
fonction [p1, q1, pr, qr]= pdex1bc (x1, u1, xr, ur) P1 =1; q1 = 1; pr = 0.71*(1+0.2*1)*Ur; qr = 1;

Sign in to comment.

Accepted Answer

Torsten on 5 Apr 2022
Edited: Torsten on 5 Apr 2022
pl = ul - C0 * ( 1 + exp(-2*k*t0) )/( 1 + exp(2*k*(t-t0)) );
ql = 0.0;
I suggest you plot the function
f(t) = C0 * ( 1 + exp(-2*k*t0) )/( 1 + exp(2*k*(t-t0)) )
to deduce a suitable value for k.
Are you sure about your setting for f in pdex1pde ?
Note that the flow velocity will be
v = 0.71*(1+0.2*x)
, but that this setting will generate an artificial source term
s = -0.71*0.2*u
in your model.
Torsten on 5 Apr 2022
Edited: Torsten on 5 Apr 2022
Ok. Then in your code variables, which boundary condition at the inlet do you want to set ?
0.6*dC/dx = 0.71*(C-f(t))
with f(t) defined as above ?

Sign in to comment.

More Answers (1)

Thomas TJOCK-MBAGA on 5 Apr 2022

Yes this is the boundary condition in the inlet that i wanted to set but written as follow -0.6*dC/dx + 0.71*C = C0 And un the ourlet dC/dx = 0.

Now i also wanted to set thr inlet boundary written like this: 0.6*dC/dx + 0.71*C = C0 for 0 < t =< t0 and 0.6*dC/dx + 0.71*C = 0 for t >t0 That is the definition of the pulse boundary.

Sam Chak
Sam Chak on 5 Apr 2022
Got to forgive him. If the View PDF and Download buttons can be missed, then it is not surprising that the "Comment" field was overlooked too. However, it is believed that the replies were genuine.

Sign in to comment.


Find more on Gravitation, Cosmology & Astrophysics 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!