shooting method for coupled ODE
Afficher commentaires plus anciens
dd
ggg
gg
13 commentaires
J. Alex Lee
le 23 Avr 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
le 24 Avr 2020
Please wrap your updated code in the code wrapper (use alt+enter).
What error are you seeing?
T K
le 24 Avr 2020
T K
le 25 Avr 2020
J. Alex Lee
le 25 Avr 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
le 26 Avr 2020
J. Alex Lee
le 26 Avr 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
le 26 Avr 2020
J. Alex Lee
le 27 Avr 2020
I do not understand what you mean.
T K
le 27 Avr 2020
J. Alex Lee
le 27 Avr 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.
Réponses (1)
T K
le 15 Août 2022
0 votes
Catégories
En savoir plus sur Mathematics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!