I have the following set of coupled differential equations subject to some initial conditions which I can solve using NDSolve
(after assigning numerical values for remaining arbitrary coefficients):
{
Mt x''[t] ==
- k1 x[t] - k2 (x[t] - y[t]) +
mc rcm Sin[ϕ[t]] ϕ''[t] - γ x'[t],
Mt y''[t] ==
- k1 y[t] - k2 (y[t] - x[t]) +
mc rcm Sin[ψ[t]] ψ''[t] - γ y'[t],
Inertia ϕ''[t] +
mc g rcm Sin[ ϕ[t]] +
γm ϕ'[t] ((ϕ[t]/θ0)^2 - 1) +
mc x''[t] rcm Cos[ϕ[t]] == 0 ,
Inertia ψ''[t] +
mc g rcm Sin[ ψ[t]] +
γm ψ'[t] ((ψ[t]/θ0)^2 - 1) +
mc y''[t] rcm Cos[ψ[t]] == 0
}
subject to the following initial conditions
{
x[1] == 1,
x'[1] == 1,
y[1] == 1,
y'[1] == 1,
ϕ[1] == 1,
ϕ'[1] == 1,
ψ[1] == 1,
ψ'[1] == 1
}
The system can be solved using NDSolve
. Now I have two problems.
Instead of a single
ϕ
andψ
, I want to write down and find the solution for generalϕi
andψi
with remaining parameters in the equations unchanged, and wherei
goes from1
toN
(i.e. instead of 2 coupled ODEs involvingϕi
andψi
, we have2N
coupled ODEs each involving a specificϕi
andψi
). HereN
is input by hand before finding the solution. The initial conditions can also be defined accordingly. How do I write and solve for the same?After this is solved, starting from the same initial conditions, I want to vary the values of
k1
,k2
andrcm
with some step size each time; and want to get the final values ofϕi
andψi
after some finite time. How do I do that?
Any suggestions will be greatly helpful.
Mt
,k1
,k2
,mc
, etc? $\endgroup$Table
will help you. $\endgroup$