Good morning,
I want to find a numerical solution to the following equation using NDSOLVE:
$$ (1)\hspace{1cm}EJ\frac{\partial^4 v}{\partial x^4} +kv+\rho A \frac{\partial^2 v}{\partial t^2} = q \hspace{1cm} \forall x \in [0;L_o] $$
$$ (2)\hspace{1,7cm}EJ\frac{\partial^4 w}{\partial x^4} +\rho A \frac{\partial^2 w}{\partial t^2} = q \hspace{1cm} \forall x \in [L_o;L] $$
$$ BC_{(1)}:\hspace{1cm} \left|\frac{\partial^3 w}{\partial x^3}\right|_{x=0} =0\hspace{1cm}\left|\frac{\partial^2 w}{\partial x^2}\right|_{x=0} =0\hspace{1cm} \forall t $$
$$ BC_{(2)}:\hspace{1cm} \left|\frac{\partial^3 v}{\partial x^3}\right|_{x=L} =0\hspace{1cm}\left|\frac{\partial^2 v}{\partial x^2}\right|_{x=L} =0\hspace{1cm} \forall t $$
$$ BC_{(1\space and\space2)}:\hspace{1cm} \left|\frac{\partial^i v}{\partial x^i}\right|_{x=L_o} = \left|\frac{\partial^i w}{\partial x^i}\right|_{x=L_o} \hspace{1cm} i=0,...,3 \hspace{0,9cm}\forall t $$
$$IC_{(1\space and\space2)}:\hspace{1cm} v(x,t)=w(x,t)=0\hspace{1cm}\forall x, \space t=0$$
$$\hspace{3,1cm} \frac{\partial v}{\partial t}=\frac{\partial w}{\partial t}=0\hspace{1cm}\forall x, \space t=0 $$
How can I use 'NDSOLVE' and imposing two-domain integration? As suggested let's think that Eq. (2) is valid in y domain so: $$ (2')\hspace{1,7cm}EJ\frac{\partial^4 w}{\partial y^4} +\rho A \frac{\partial^2 w}{\partial t^2} = q \hspace{1cm} \forall y \in [L_o;L] $$ And (as suggested in a comment) let's assume $$ y=y(x),\hspace{1,7cm} y=L-\frac{x}{L_o}(L-L_o)$$ if it's the case we have: $$ \frac{\partial w}{\partial x} =\frac{\partial w}{\partial y}\frac{\mathrm{d}y}{\mathrm{d}x} \hspace{0,2cm}\rightarrow \hspace{0,2cm} \frac{\partial^2 w}{\partial x^2}=\frac{\partial^2 w}{\partial y^2}\Big(\frac{\mathrm{d}y}{\mathrm{d}x}\Big)^2 \hspace{0,2cm} \rightarrow \space...\space\rightarrow \hspace{0,2cm} \frac{\partial^4 w}{\partial y^4}=\frac{\partial^4 w}{\partial x^4}\Big(\frac{\mathrm{d}y}{\mathrm{d}x}\Big)^{-4} \hspace{0,2cm} $$ At the end EQ(2) is replaced with: $$ (2'')\hspace{1,7cm}EJ\Big(\frac{L_o}{L_o-L}\Big)^4\frac{\partial^4 w}{\partial x^4} +\rho A \frac{\partial^2 w}{\partial t^2} = q \hspace{1cm} \forall x \in [0;L_o] $$ I wrote this code but is not working.
Clear[b, h, Emod, m, Lo, Lf, q, k, J, y, u, v];
b = 0.20; (*m*)
h = 0.20; (*m*)
Emod =10000000000;(*modulo el N/m^2*)
Lo = 2;(*l ini m*)
L = 4;(*l fin m*)
rho = 10;(*rho kN/m^3*)
m = b*h*rho;(*N/m*)
q = 1000;(*N/m*)
k = 50000;(*N*)
P = 0.00000;
J = (b*h^3)/12;
tmax = 30;
sol = NDSolve[{
(*1st*)
+Emod*J*D[u[t, x], {x, 4}] + k*u[t, x] == q - m*(D[u[t, x], {t, 2}]),
(*2nd*)
+Emod*J*(Lo/(Lo - L))^4*D[v[t, x], {x, 4}] + k*v[t, x] == q - m*(D[v[t, x],{t, 2}]),
(*1st boundary conditions*)
Derivative[0, 2][u][t, 0] == 0,
Derivative[0, 3][u][t, 0] == P*2/Pi*ArcTan[t],
(*1st initial conditions*)
u[0, x] == 0,
Derivative[1, 0][u][0, x] == 0,
(*2nd boundary conditions*)
(Lo/(Lo - L))^2*Derivative[0, 2][v][t, 0] == 0,
(Lo/(Lo - L))^3*Derivative[0, 3][v][t, 0] == 0,
(*2nd initial conditions*)
v[0, x] == 0,
Derivative[1, 0][v][0, x] == 0,
(*commonn*)
u[t, Lo] == -v[t, Lo],
Derivative[0, 1][u][t, Lo] == (Lo/(Lo - L))*
Derivative[0, 1][v][t, Lo],
Derivative[0, 2][u][t, Lo] == (Lo/(Lo - L))*
Derivative[0, 2][v][t, Lo],
Derivative[0, 3][u][t, Lo] == (Lo/(Lo - L))*
Derivative[0, 3][v][t, Lo]
}, {u, v}, {t, 0, tmax}, {x, 0, Lo}, PrecisionGoal -> 2]
ADDITIONAL INTERESTING QUESTION: As suggested in a comment I used "UnitStep" function, but now I want to add an ODE that prescribes the "lenght of UniStep". What I want to do is easy understandable by the following code (but it doesn't work):
Lo = 1; L = 3; J = 1; m = 100; Emod = 1; k = 0.5; q = 0.001; tmax = 20;
sol = NDSolve[{
m*D[u1[t, x], {t, 2}] + Emod*J*D[u1[t, x], {x, 4}] +
UnitStep[Lo + u2[t] - x] k*u1[t, x] == q,
Derivative[0, 2][u1][t, 0] == 0,
Derivative[0, 3][u1][t, 0] == 0,
Derivative[0, 2][u1][t, L] == 0,
Derivative[0, 3][u1][t, L] == 0,
u1[0, x] == -0.001*x,
Derivative[1, 0][u1][0, x] == 0,
D[u2[t], {t,1}] == -NeumannValue[D[u1[t, x], {t, 1}], x == Lo + u2[t]]/
NeumannValue[D[u1[t, x], {x, 1}], x == Lo + u2[t]],
u2[0] == 0},
{u1, u2}, {t, 0, tmax}, {x, 0, L}, MaxSteps -> 100000]
Plot3D[Evaluate[u1[t, x] /. sol[[1, 1]]], {t, 0, tmax}, {x, 0, L}]
Lo
is, or is that an unknown you need to solve for? This looks sort of like a linear eigenvalue equation, except for the terms inq
. I can help if so providedq=0
. $\endgroup$