shooting method for coupled ODE
Show older comments
dd
ggg
gg
13 Comments
J. Alex Lee
on 23 Apr 2020
In your code, you're setting E' to g' in line 83...but really you want the RHS of line 84 to be assigned to dy(7)...right?
Is your issue that you have a BC on g itself, but you aren't solving for g?
J. Alex Lee
on 24 Apr 2020
Please wrap your updated code in the code wrapper (use alt+enter).
What error are you seeing?
T K
on 24 Apr 2020
T K
on 25 Apr 2020
J. Alex Lee
on 25 Apr 2020
The error is straightforward...dg is undefined.
The reason is that you don't have equations in a form where all of the derivatives are explicitly written out (you don't have an explicit form dg/dx = ...)
It's not clear to me that it is possible to express your system in terms of 9 explicit derivatives.
If not, here's somet things to get started:
I don't think you would be able to use the "shooting" method either.
T K
on 26 Apr 2020
J. Alex Lee
on 26 Apr 2020
You are now just asserting that
, i.e., that g is constant (with value 1 according to your 5th BC). It's unlikely what you want. If it is, just remove g completely from the equations and insert 0 in place of dg in Eq. 2.
I'm also unclear where the new BC is coming from (yb(1)-0.1=0) associated with the new DoF.
So no, I don't think this is what you want...
T K
on 26 Apr 2020
J. Alex Lee
on 27 Apr 2020
I do not understand what you mean.
T K
on 27 Apr 2020
J. Alex Lee
on 27 Apr 2020
You've asserted that g' does not vary in x by the line, i.e., g''=0
dy(10)=0;
which may or may not be true of your equations, I don't know.
So rather than g being constant (as I suggested before incorrectly), g' will be constant and take whatever value is consistent with your new boundary condition
yb(1)-0.1
Since I don't know the origin of this BC, I don't know if it is consistent with your original problem. I'm not used to dealing with implicit forms, maybe I'm missing something basic. Hope someone else can chime in at this point, I'm at my limit.
Answers (1)
T K
on 15 Aug 2022
0 votes
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!