Boundary condtions for an index reduced DAE system using ode solvers
Show older comments
Hey,
so i have the following set of differential equations. Its called the poisson nerst planck equation and i am trying to solve it using the ode solvers of matlab.


with the boundary conditions for
are neuman boudnary conditions
(it depends on i)and for ϕ are dirichlet boundary conditions
Now I have allready tried to formulate this problem into a system of frist oder differential equation as follows:

Now i insert
and
in
and solve for 

The complete ode system should consist of these 3 first oder equations now:

with boundary conditions:

as you can see I have only 3 first oder equations but 4 boundary conditions. aditionally i dont have boundary conditions for for each
but rather two boundary conditions for
and two boudnary condition for
.
Now i am clueless on how to implement the boundary conditions for this system of equations with a suitible ode solver for matlab. Is there a way of implementing two dirichlet and two neuman boundary conditions?
As an extra. I want to solve this set of equations for 3 adjacient regions within the overall domain of
as
, where
for
and
and
for
. This gives the problem a stiff character becasue almost instantanious increas of
at these internal regions.
, where 10 Comments
Torsten
on 2 Mar 2023
Why did you proceed differently than suggested to your previous question ?
Berat Cagan Türkmen
on 2 Mar 2023
Edited: Torsten
on 2 Mar 2023
Torsten
on 2 Mar 2023
Both YR(1,3) and YR(2,3) are missing in your specification of boundary conditions in your above code. That is not possible - you have to set a condition at the outer right boundary.
Berat Cagan Türkmen
on 2 Mar 2023
Edited: Torsten
on 2 Mar 2023
Well, you know best the physical background of the problem. I cannot help you in this respect.
But I cannot imagine that solving the additional equation for phi can help to circumvent specifying adequate transmission conditions for the concentrations.
By the way: In your problem formulation from above, you forgot the equation
dy4/dx = -F/eps*sum_(z_i*c_i) + rho_fix
So what is the problem ? Four first-order equations with four boundary conditions.
Berat Cagan Türkmen
on 2 Mar 2023
But form what i understand the solver want me to give 1 boundary ocndition for y(1) and one condition for y(2).
No. The number of boundary conditions must equal the number of equations. That's the only restriction for that the solver accepts your settings. Whether these settings make sense and give a unique solution is a different question.
Same for the transmission conditions.
But giving both conditions for the derivative is dangerous in general because (at least for linear ODEs) together with c, also c+constant is a solution.
Berat Cagan Türkmen
on 2 Mar 2023
Berat Cagan Türkmen
on 3 Mar 2023
Answers (0)
Categories
Find more on Mathematics 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!
