Hi,
I have to solve this Differential Algebraic System. I cannot understand the error message. Can anyone help me?
l = 1; P = 381; S = 0.5; Z = 1 - S; B = 100; Ks = 1000;
NDSolve[{B*x''[t] + P*Z*Sin[x[t]] + P*S*Sin[x[t] + y[t]] == 0, Ks*S^2*Sin[y[t]]*Cos[y[t]] - P*S*Sin[x[t] + y[t]] == 0, x'[0] == 0, x'[l] == 0}, {x, y}, {t, 0, l}]
NDSolve::bvdae: Differential-algebraic equations must be given as initial value problems.
You have a boundary value problem:
\[Theta]'[0] == 0, \[Theta]'[l] == 0
Apparently, NDSolve does not do that kind of differential-algebraic systems.
Do you have any suggestions?
danl
(Daniel Lichtblau)
February 21, 2022, 4:31pm
4
This code appears to be garbled. You might want to edit to repair that.
I hope this is better
l = 1;
P = 381;
S = 0.5;
Z = 1 - S;
B = 100;
Ks = 1000;
NDSolve[{B*x''[t] + P*Z*Sin[x[t]] + P*S*Sin[x[t] + y[t]] == 0,
Ks*S^2*Sin[y[t]]*Cos[y[t]] - P*S*Sin[x[t] + y[t]] == 0, x'[0] == 0,
x'[l] == 0}, {x, y}, {t, 0, l}]
danl
(Daniel Lichtblau)
February 21, 2022, 4:41pm
6
It’s at least readable this time. It is missing some multiplications though.
My own restoration is like this:
l = 1; P = 380.57402011815145`; \[Sigma] = 0.5; \[Zeta] =
1 - \[Sigma]; B = 100; Ks = 1000; NDSolve[{B \[Theta]''[t] +
P \[Zeta] Sin[\[Theta][t]] +
P \[Sigma] Sin[\[Theta][t] + \[Beta][t]] == 0,
Ks \[Sigma]^2 Sin[\[Beta][t]] Cos[\[Beta][t]] -
P \[Sigma] Sin[\[Theta][t] + \[Beta][t]] == 0,
\[Theta]'[0] == 0, \[Theta][l] == 0},
{\[Theta], \[Beta]}, {t, 0, l}]
paritoshm
(Paritosh Mokhasi)
February 22, 2022, 5:30pm
8
One way to solve this would be to explicitly use finite element method. However, you may need to play around with the the boundary conditions for \[Beta][t]. The code below should give a starting point:
l = 1; P = 380.57402011815145`; \[Sigma] = 0.5; \[Zeta] =
1 - \[Sigma]; B = 100; Ks = 1000; NDSolve[{B \[Theta]''[t] +
P \[Zeta] Sin[\[Theta][t]] +
P \[Sigma] Sin[\[Theta][t] + \[Beta][t]] ==
NeumannValue[0, t == 0],
Ks \[Sigma]^2 Sin[\[Beta][t]] Cos[\[Beta][t]] -
P \[Sigma] Sin[\[Theta][t] + \[Beta][t]] == 0, \[Theta][l] ==
0, \[Beta][0] == 0}, {\[Theta], \[Beta]}, {t, 0, l},
Method -> "PDEDiscretization" -> "FiniteElement",
InitialSeeding -> {\[Theta][t] == 0.1, \[Beta][t] == 0}]