Asked by Daniel Head
on 24 Mar 2019

Hello,

I am trying to sovle a modelling problem, however pdepe will not solve a mixed PDE system (as far as I know) with the following PDE's:

With the following initial conditions:

And boundary conditions:

A similar question was asked here: https://uk.mathworks.com/matlabcentral/answers/371313-error-in-solving-system-of-two-reaction-diffusion-equations this talks about the use of discretisation, something I am unsure of and I am unable to figure out how to use this code (suggested by Torsten) with my system.

Any help or codes would be greatly appreciated.

Answer by Torsten
on 25 Mar 2019

Edited by Torsten
on 25 Mar 2019

Accepted Answer

s= [-v*DuDx(1)-psi*km*(qe-u(2)); km*(qe-u(2))];

function [pl,ql,pr,qr] = pdex4bc(xl,ul,xr,ur,t)

Q=2.5; %mL min^-1

A_c=1.96e-5; %cm^2

u=Q/A_c;

e_b=0.368;

v=u/e_b;

pu2 = ?;

pl = [ul(1)-pu2; 0.0];

ql = [-1/v; 1.0];

pr = [0; 0];

qr = [1.0; 1.0];

Daniel Head
on 25 Mar 2019

Torsten
on 25 Mar 2019

In pdex4pde, you overwrite the two-element solution variable vector u by the setting

u=Q/A_c;

Daniel Head
on 25 Mar 2019

I have changed this variable name and now the system solves! Thank you!

Sign in to comment.

Opportunities for recent engineering grads.

Apply Today
## 4 Comments

## Torsten (view profile)

Direct link to this comment:https://fr.mathworks.com/matlabcentral/answers/452071-solving-partial-differential-system#comment_685345

## Daniel Head (view profile)

Direct link to this comment:https://fr.mathworks.com/matlabcentral/answers/452071-solving-partial-differential-system#comment_685386

## Torsten (view profile)

Direct link to this comment:https://fr.mathworks.com/matlabcentral/answers/452071-solving-partial-differential-system#comment_685389

## Daniel Head (view profile)

Direct link to this comment:https://fr.mathworks.com/matlabcentral/answers/452071-solving-partial-differential-system#comment_685407

Sign in to comment.