# How to plot this compound function?

I have a function w1(x1), w2(x2) and w3(x3), u1(x4) and u2(x5). Using these functions, I like to plot the deformed configuration of the structure, below is the undeformed configuration of the structure. I have extracted these functions. How to do this? I tried the Piecewise function but it requires single variable input. u1(x4) and u2(x5) they are in local coordinate. How to transform these into one global coordinate. I have not defined any global coordinate as such. But we can consider w1 coordinates as the global coordinate system.

ClearAll["Global*"];
Clear[b]

Y1 = 2*10^11;
L1 = 4;
a1 = 0.1*0.1;
\[Rho]1 = 7850;
Iyy1 = 0.1^4/12;

L2 = 1;
L3 = 1;
\[Rho]2 = \[Rho]1;
\[Rho]3 = \[Rho]1;
Y2 = 10^-5*Y1;
Y3 = 10^-5*Y1;
a2 = a1;

rym1 = Y1/Y2;
rde1 = \[Rho]2/\[Rho]1;
ria = Iyy1/a1;
rym2 = Y1/Y3;
rde2 = \[Rho]3/\[Rho]1;

z[1] = 1;
z[2] = 3;

\[Lambda]1 = N[Sqrt[rym1*rde1*ria*b^4]];
\[Lambda]2 = N[Sqrt[rym2*rde2*ria*b^4]];
w[1] = c[1]*Sin[b*x1] + c[2]*Cos[b*x1] + c[3]*Sinh[b*x1] +
c[4]*Cosh[b*x1];
w[2] = c[5]*Sin[b*(x2)] + c[6]*Cos[b*(x2)] + c[7]*Sinh[b*(x2)] +
c[8]*Cosh[b*(x2)];
w[3] = c[9]*Sin[b*(x3)] + c[10]*Cos[b*(x3)] + c[11]*Sinh[b*(x3)] +
c[12]*Cosh[b*(x3)];
u[1] = c[13]*Cos[\[Lambda]1*x4] + c[14]*Sin[\[Lambda]1*x4];
u[2] = c[15]*Cos[\[Lambda]2*x5] + c[16]*Sin[\[Lambda]2*x5];

(*set of boundary consitions*)
e[1] = w[1] /. x1 -> 0;
e[2] = D[w[1], {x1, 2}] /. x1 -> 0;
e[3] = w[3] /. x3 -> 0;
e[4] = D[w[3], {x3, 2}] /. x3 -> L1;
e[5] = u[1] /. x4 -> 0;
e[6] = u[2] /. x5 -> 0;

(*set of compatability conditions*)
e[7] = ((w[1] /. x1 -> z[1]) - (w[2] /. x2 -> 0));
e[8] = ((D[w[1], {x1, 1}] /. x1 -> z[1]) - (D[w[2], {x2, 1}] /.
x2 -> 0));
e[9] = ((D[w[1], {x1, 2}] /. x1 -> z[1]) - (D[w[2], {x2, 2}] /.
x2 -> 0));
e[10] = ((D[w[1], {x1, 3}] /. x1 -> z[1]) - (D[w[2], {x2, 3}] /.
x2 -> 0)) + (((D[u[1], {x4, 1}]) /. x4 -> L2)/(rym1*ria));
e[11] = ((w[1] /. x1 -> z[1]) - (u[1] /. x4 -> L2));

e[12] = ((w[2] /. x2 -> z[2]) - (w[3] /. x3 -> 0));
e[13] = ((D[w[2], {x2, 1}] /. x2 -> z[2]) - (D[w[3], {x3, 1}] /.
x3 -> 0));
e[14] = ((D[w[2], {x2, 2}] /. x2 -> z[2]) - (D[w[3], {x3, 2}] /.
x3 -> 0));
e[15] = ((D[w[2], {x2, 3}] /. x2 -> z[2]) - (D[w[3], {x3, 3}] /.
x3 -> 0)) + (((D[u[2], {x5, 1}]) /. x5 -> L2)/(rym2*ria));
e[16] = ((w[2] /. x2 -> z[2]) - (u[2] /. x5 -> L2));

eq = Table[e[i], {i, 1, 16}];
var = Table[c[i], {i, 1, 16}];
R = Normal@CoefficientArrays[eq, var][[2]];
P = Det[R];
Plot[P, {b, 0, 2}]
s1 = NSolve[P == 0 && 0 < b < 10];
s2 = b /. s1;
s3 = s2[[6]]
\[Omega] = Sqrt[(s3^4*Y1*Iyy1)/(\[Rho]1*a1)]
fn = \[Omega]/(2 \[Pi])
nn = Flatten[NullSpace[R /. b -> s3]]
w[1] = (w[1] /. Table[var[[i]] -> nn[[i]], {i, 1, 4}]) /. {b -> s3}
w[2] = (w[2] /. Table[var[[i]] -> nn[[i]], {i, 5, 8}]) /. {b -> s3}
w[3] = (w[3] /. Table[var[[i]] -> nn[[i]], {i, 9, 12}]) /. {b -> s3}
u[1] = (u[1] /. Table[var[[i]] -> nn[[i]], {i, 13, 14}]) /. {b -> s3}
u[2] = (u[2] /. Table[var[[i]] -> nn[[i]], {i, 15, 16}]) /. {b -> s3}

• What problem are you solving? Jun 18, 2019 at 11:43

Note the laws of local deformations both parallel and perpendicular to each EF, it is sufficient to rototranslate each EF and plot everything by Show:

EFloc = {{{0, 1}, {1, 1}, {-5.41*10^-3, 4.58*10^-1 - 4.58*10^-1 t + 7.94*10^-2 t^4}},
{{1, 1}, {3, 1}, {-5.41*10^-3 + 5.41*10^-3 t, 7.94*10^-2 + t (-1.41*10^-1 + t (3.88*10^-1 + (-3.17*10^-1 + 7.94*10^-2 t) t))}},
{{3, 1}, {4, 1}, {5.41*10^-3, 7.94*10^-2 + t (1.41*10^-1 + t (4.76*10^-1 + (-3.17*10^-1 + 7.94*10^-2 t) t))}},
{{1, 0}, {1, 1}, {-7.94*10^-2 t, (1.24*10^-1 - 1.30*10^-1 t) t^2}},
{{3, 0}, {3, 1}, {-7.94*10^-2 t, t (-1.24*10^-1 + 1.30*10^-1 t^2)}}};

plots = Table[{A, B, {u, v}} = EFloc[[i]];

{dx, dy} = B - A;
L = Sqrt[dx^2 + dy^2];
matrot = {{dx, -dy}, {dy, dx}} / L;

indef = A + matrot.{{t}, {0}};
def = A + matrot.{{t + u}, {0 - v}};
ParametricPlot[{indef, def}, {t, 0, L}],

{i, Length[EFloc]}];

Magnify[Show[plots, Axes -> False, PlotRange -> All], 2]
`