System of PDE-ODE with multi point boundary conditions- How to can i solve it?
Show older comments
I have attached a pdf which includes the system i am trying to solve. To summerise, it is a system of PDEs and ODEs. The system consists of several regions that are joined together (see the figure in the pdf) and each region has different physical properties however the governing equation remains the same. The boundary conditions are provided at the intersection of each region. I am not sure how to solve this problem. I am struggling to implement this in matlab. I kindly ask your support and i thank you in advance.
24 Comments
Torsten
on 25 Jul 2023
I don't understand which kind of answer you expect. You give us 5 PDEs and 2 ODEs and ask for our support. We won't code this problem for you. So ask a specific question for a specific problem you encounter (preferably with your code so far) and we might be able to help you.
And yes - the method of lines is applicable here (also for mulitpoint boundary value problems). But you need not only one, but two transmission conditions at the internal boundaries for each solution variable.
Sachin Hegde
on 25 Jul 2023
You mentioned now, that there needs to be two transmission conditions at internal boundaries. I am not quite clear by what you mean. Could you please explain it in detail?
You have a second-order PDEs - thus you must provide two conditions at the interfaces to fix the solution. These conditions usually are continuity of the field variable and its flux:
uleft = uright
Dleft * du/dx(x->xleft) = Dright * du/dx(x->xright)
You may have other conditions (which might even cause a discontinuity at the interface), but you need two of them - at least if the field variable is solved for in both regions.
Maybe the description here is more detailed:
Sachin Hegde
on 25 Jul 2023
Sachin Hegde
on 25 Jul 2023
Torsten
on 25 Jul 2023
Yes of course - I recommend my answer :-)
Sachin Hegde
on 25 Jul 2023
Moved: Torsten
on 26 Jul 2023
Sachin Hegde
on 25 Jul 2023
Moved: Torsten
on 26 Jul 2023
The system of equations to determine T_l_ghost and T_r_ghost (rhs of equation (1) = rhs of equation (2) and rhs of equation (3) = rhs of equation (4)) is written as
a11*T_l_ghost + a12*T_r_ghost = b1 (1)
a21*T_l_ghost + a22*T_r_ghost = b2 (2)
and is then solved for (T_l_ghost,T_r_ghost) (which are named (Tg1,Tg2) in the code) as
[T_l_ghost,T_r_ghost] = [a11 a12;a21 a22]\[b1;b2]
Sachin Hegde
on 25 Jul 2023
Moved: Torsten
on 26 Jul 2023
I understood that part. What i didnt get is, how did you decompose and got the equation for b
By collecting all terms of
rhs of equation (1) = rhs of equation (2)
and
rhs of equation (3) = rhs of equation (4)
that don't contain T_ghost_l or T_ghost_r on the right-hand side.
Sachin Hegde
on 26 Jul 2023
Moved: Torsten
on 26 Jul 2023
Torsten
on 26 Jul 2023
It's d^2/dx^2(i) ~ (u(i+1)-2*u(i)+u(i-1))/h^2 for a possibly non-uniform gridding. Assume (x_l_ghost - xi) = (xi - x_l(n-1)) = h, and you'll arrive at the usual approximation for the second derivative.
Sachin Hegde
on 27 Jul 2023
Torsten
on 27 Jul 2023
In this case, since phi in zones 1 and 2 and phi in zones 4 and 5 are not coupled, these should be two independent boundary value problems to be solved. There are no transmission conditions here, but only 4 x 1 boundary conditions (one at the start of zone 1, one at the end of zone 2, one at the start of zone 4 and one at the end of zone 5), just as you wrote above.
Sachin Hegde
on 27 Jul 2023
Edited: Sachin Hegde
on 27 Jul 2023
You must either have a differential equation for dT1dt(x1(end)) or dT2dt(x2(1)) to compute T at the first interface.
You must either have a differential equation for dT2dt(x2(end)) or dT3dt(x3(1)) to compute T at the second interface.
You must either have a differential equation for dT3dt(x3(end)) or dT4dt(x4(1)) to compute T at the third interface.
You must either have a differential equation for dT4dt(x4(end)) or dT5dt(x5(1)) to compute T at the fourth interface.
But you don't have these 4 differential equations in your code.
Sachin Hegde
on 28 Jul 2023
Moved: Torsten
on 28 Jul 2023
Torsten
on 28 Jul 2023
Yes, you are correct. I overlooked that the xi vectors are enlarged by the ghost point. Thus the loops run up to the original length of the xi vectors.
Sachin Hegde
on 28 Jul 2023
Accepted Answer
More Answers (0)
Categories
Find more on Partial Differential Equation Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

