Mathematica Asked by andris0110 on March 28, 2021
I have to write a notebook about comparing the results of the deflection of an elastic beam, calculated with discrete methods and FE methods. The code has to be generalized for any kind of beam structure, as it reads the inputs to arrays (for example: Iv, Lv, Mv
). With the FEM I have no problem, but with the discrete method, I can’t make it work. I have to combine a lot of equations under a DSolve
and it keeps giving me an error. I have my boundary conditions and my deflection functions done, but the DSolve
itself won’t run, because it says
"Supplied equations are not differential or integral equations of the given functions".
I don’t know what the problem is here: I used everything with a correct head, and I have no idea how to go forward. Here is the code in question:
rdiff := Table[
D[ToExpression["w" <> ToString[i]][x], {x, 2}] == -(1/(Iv[[i]]*Ev[[i]]))*Sum[Mh[[j]], {j, i}]
, {i, 1, Length[Lv]}]
su := Sum[Lv[[j]], {j, 1, i - 1}];
peremfeltetelek2 = Table["", {i, 1, 2*Length[peremv - 1]}];
Do[
Switch[peremv[[i]],
"b",
(peremfeltetelek2[[
2 i - 1]] = (ToExpression["w" <> ToString[i]][su] == 0);
peremfeltetelek2[[
2 i]] = (ToExpression["w" <> ToString[i]]'[su] == 0)),
"cs",
(peremfeltetelek2[[
2 i - 1]] = (ToExpression["w" <> ToString[i]][su] == 0);
peremfeltetelek2[[
2 i]] = (ToExpression["w" <> ToString[i]]'[su] ==
ToExpression["w" <> ToString[i + 1]]'[su])),
0,
(peremfeltetelek2[[
2 i - 1]] = (ToExpression["w" <> ToString[i]][su] ==
ToExpression["w" <> ToString[i + 1]][su]);
peremfeltetelek2[[
2 i]] = (ToExpression["w" <> ToString[i]]'[su] ==
ToExpression["w" <> ToString[i + 1]]'[su]))
]
, {i, 1, Length[peremv - 1]}
]
rdiff
{
w1''[x]==0.0848473 x,
w2''[x]==-0.0000424236 (-1500. (-0.22+x)^2-2000. x),
w3''[x]==-0.000169695 (900. -1500. (-0.54+x)^2-1500. (-0.22+x)^2-2000. x),
w4''[x]==-0.000169695 (900. -500. (-0.73+x)+F5 (-0.73+x)-1500. (-0.73+x)^2-1500. (-0.54+x)^2-1500. (-0.22+x)^2-2000. x)
}
peremfeltetelek2
{
w1[0]==w2[0],
w1'[0]==w2'[0],
w2[0.22]==w3[0.22],
w2'[0.22]==w3'[0.22],
,w3[0.54]==w4[0.54],
w3'[0.54]==w4'[0.54],
w4[0.73]==0,
w4'[0.73]==w5'[0.73],
w5[0.88]==0,w5'[0.88]==0
}
wmegoldas =
DSolve[Join[rdiff, peremfeltetelek2],
Table[(ToExpression["w" <> ToString[i]])[x], {i, 1, Length[Lv]}], x]
And here is where the error happens. What seems to be the problem?
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP