Solving coupled PDE-System for advection diffusion problem

Dear Matlab-Support-Team,
I have just discovered the pdepe-solver function in order to solve my coupled pde system. More specific I have to solve two coupled advection-diffusion-equations as given below
pdeEquations.PNG
In order to solve these pde-equations I checked the pdepe-tutorial on the mathworks page (https://de.mathworks.com/help/matlab/ref/pdepe.html). The page showed an example how to solve a pde-system, which is not coupled.Thus, I tried to expand the model to solve a coupled pde-system. The following 'pdepe-Solver-Input' looks like
pdeEquations_PDEPE.PNG
With regard to the pdepe-tutorial on the mathworks page the first column vector on the left equals the 'c-Term', the first matrix on the right equals the 'f-term' and the second matrix on the right equals the 's-term'.
After the implementation of the pde-system the size of the c-Vector is 2x1, the size of the f-matrix is 2x2 and the size of the s matrix is 2x2. When I run the solver I always get 'Assignment has more non-singleton rhs dimensions than non-singleton subscripts'. I followed the code and came to the conclusion that my f- & s-matrix has to be 1x2 instead of 2x2, which makes me clueless how to solve the given pde-system.
I would really appreciate it, if I could get some help with my problem or an advice how to better solve such coupled pde-systems in Matlab.
Thank you very much for your help,
Matthias

Risposte (1)

f = [C3*DuDx(1)+C4*DuDx(2);C8*DuDx(1)+C7*DuDx(2)];
s = [C1*DuDx(1)+C2*DuDx(2);C6*DuDx(1)+C5*DuDx(2)];

2 Commenti

Thank you very much for your fast answer, I will give it a try.
Be careful to specify the boundary conditions correctly with this exotic flux function.

Accedi per commentare.

Richiesto:

il 18 Dic 2018

Commentato:

il 18 Dic 2018

Community Treasure Hunt

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

Start Hunting!

Translated by