I am currently trying to solve the 1D wave equation with Mathematica:

$$c^2\frac{\partial u}{\partial x^2}=\frac{\partial u}{\partial t^2}$$ I want to do so for a cantilever with a tip mass:

a busy cat

One Side is fixed the other one has the movable tip mass. The mass obeys this condition: $$ M \ddot{u}(L,t)=-EAu'(l,t) \Rightarrow u'(l,t)=-k\cdot \ddot{u}(L,t)$$ To solve the equation we need 2 boundary and 2 initial conditions. The system starts with an initial velocity $v_0$ out of rest: $$ \begin{array} \dot{u}(l,0)&=-v_0 \\ u(x,0) &=0 \\ u(0,t) &=0 \\ u'(l,t) &=-k\cdot\ddot{u}(l,t) \end{array} $$

I am able to solve it with pen and paper, but I want to further study the resulting fourier series. Therefore I want to implement this in Mathematica.

c = 1; k = 1; v = 1; L=1;
BOUN1 = k*Derivative[0, 2][u][L, t] + Derivative[1, 0][u][L, t] == 0;
BOUN2 = u[0, t] == 0;
INIT1 = u[x, 0] == 0;
INIT2 = Derivative[0, 1][u][L, 0] == -v;

DEQN1 = c^2*D[u[x, t], {x, 2}] - D[u[x, t], {t, 2}] == 0 ;

SOLU1= NDSolveValue[{DEQN1,BOUN1,BOUN2,INIT1,INIT2 }, u, {x,0,L}, {t,0,1}]

Can someone help me solve the problems I am facing with the boundary conditions? The Error message is:

INIT2 is not specified on a single edge of the boundary of the computational \ domain.

I tried defining it over the entire domain with an diracDelta, but with no effect. Any help would be much appreciated.

  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – user9660 Feb 28 '15 at 18:13
  • $\begingroup$ I get Derivative[0, 1][u][1, 0] instead of INIT2, suggesting that you haven't evaluated INIT2. But I get an error because Derivative[0, 1][u][L, 0] == -v specifies a condition at a point, not along an edge. There seem to be other issues, too, such as BOUN1 not having only derivatives of order less than DEQN1. There are several wave equation questions on this site here: mathematica.stackexchange.com/search?q=wave+equation $\endgroup$ – Michael E2 Feb 28 '15 at 18:14
  • $\begingroup$ Defining INIT2 as Derivative[0, 1][u][x, 0] == -v DiracDelta[x - L] might fix that problem. Which leaves me with a problem with BOUN1. The condition I described is correct but maybe not properly defined. But even if I remove the second time derivative by setting k=0 I can't get a solution. Tricky...Of course I checked similar questions first but this did not help with this boundary related problem. $\endgroup$ – Moerp Feb 28 '15 at 18:54
  • $\begingroup$ Pretty sure you need to add the cantilever bc Derivative[1,0][u][0,t]==0, but then I get error about non-linear Dirichlet condition, which I believe is still a limitation of the current DSolve. $\endgroup$ – Bill Watts Jan 25 '18 at 21:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.