Rouben Rostamian

MaplePrimes Activity


These are replies submitted by Rouben Rostamian

You have a system of 15 first order PDEs in 15 unknowns, each being a function of z and t.  You discretize the z variable and obtain a system of 15n ODEs in 15n unknowns.  Even for moderate n that's a very inefficient way of solving the system, as well as being a very poor approximation.

 I suggest applying pdsolve() to solve the system of PDEs directly.  Have you tried that?

 

 

@Neel There are many different approaches to calculating the eigenfunctions.  I showed the simplest approach in my earlier reply.  Since you are asking for a solution with with matrices, here is the matrix version.  As to the forced vibration, I showed how to to that in my pdf writeup.

restart;

with(LinearAlgebra):

pde := diff(w(x,t),t,t) + c^2*diff(w(x,t),x$4) = 0;

diff(diff(w(x, t), t), t)+c^2*(diff(diff(diff(diff(w(x, t), x), x), x), x)) = 0

eval(pde, w(x,t) = u(x)*cos(omega*t));
de_tmp := expand(% / (c^2*cos(omega*t)));

-u(x)*omega^2*cos(omega*t)+c^2*(diff(diff(diff(diff(u(x), x), x), x), x))*cos(omega*t) = 0

-u(x)*omega^2/c^2+diff(diff(diff(diff(u(x), x), x), x), x) = 0

mu_def := omega = c*mu^2/L^2;

omega = c*mu^2/L^2

de := eval(de_tmp, mu_def);

-u(x)*mu^4/L^4+diff(diff(diff(diff(u(x), x), x), x), x) = 0

dsol_tmp := dsolve(de);

u(x) = _C1*exp(-mu*x/L)+_C2*exp(mu*x/L)+_C3*sin(mu*x/L)+_C4*cos(mu*x/L)

Convert to sinh and cosh, and make the result into a function:

subs(exp(mu*x/L) = cosh(mu*x/L)+sinh(mu*x/L),
     exp(-mu*x/L)= cosh(mu*x/L)-sinh(mu*x/L), dsol_tmp);
u_general := unapply(rhs(%), x);

u(x) = _C1*(cosh(mu*x/L)-sinh(mu*x/L))+_C2*(cosh(mu*x/L)+sinh(mu*x/L))+_C3*sin(mu*x/L)+_C4*cos(mu*x/L)

proc (x) options operator, arrow; _C1*(cosh(mu*x/L)-sinh(mu*x/L))+_C2*(cosh(mu*x/L)+sinh(mu*x/L))+_C3*sin(mu*x/L)+_C4*cos(mu*x/L) end proc

bc := u(0)=0, (D@@2)(u)(0)=0, u(L)=0, (D@@2)(u)(L)=0;

u(0) = 0, ((D@@2)(u))(0) = 0, u(L) = 0, ((D@@2)(u))(L) = 0

Apply the boundary conditions:

bc_applied := eval({bc}, u = u_general);

{_C1+_C2+_C4 = 0, _C1*mu^2/L^2+_C2*mu^2/L^2-_C4*mu^2/L^2 = 0, _C1*(mu^2*cosh(mu)/L^2-mu^2*sinh(mu)/L^2)+_C2*(mu^2*cosh(mu)/L^2+mu^2*sinh(mu)/L^2)-_C3*mu^2*sin(mu)/L^2-_C4*mu^2*cos(mu)/L^2 = 0, _C1*(cosh(mu)-sinh(mu))+_C2*(cosh(mu)+sinh(mu))+_C3*sin(mu)+_C4*cos(mu) = 0}

bc_matrix_form := GenerateMatrix(bc_applied, [_C1, _C2, _C3, _C4])[1];

Matrix(4, 4, {(1, 1) = 1, (1, 2) = 1, (1, 3) = 0, (1, 4) = 1, (2, 1) = mu^2/L^2, (2, 2) = mu^2/L^2, (2, 3) = 0, (2, 4) = -mu^2/L^2, (3, 1) = mu^2*cosh(mu)/L^2-mu^2*sinh(mu)/L^2, (3, 2) = mu^2*cosh(mu)/L^2+mu^2*sinh(mu)/L^2, (3, 3) = -mu^2*sin(mu)/L^2, (3, 4) = -mu^2*cos(mu)/L^2, (4, 1) = cosh(mu)-sinh(mu), (4, 2) = cosh(mu)+sinh(mu), (4, 3) = sin(mu), (4, 4) = cos(mu)})

eq := Determinant(bc_matrix_form);

-8*mu^4*sin(mu)*sinh(mu)/L^4

solve(eq, allsolutions);

{L = L, mu = 0}, {L = L, mu = Pi*_Z1}, {L = L, mu = I*Pi*_Z2}

about(_Z1);

Originally _Z1, renamed _Z1~:
  is assumed to be: integer
 

We don't want the mu = 0 solution (first group), nor do we want the complex solution (third group),
therefore we pick the middle groups which says
mu = n*Pi for integer n.  Plug this into the matrix.
The system's nonzero solutions correspond to the matrix's null space:

eval(bc_matrix_form, mu=n*Pi) assuming n::integer;
N := NullSpace(%);

Matrix(4, 4, {(1, 1) = 1, (1, 2) = 1, (1, 3) = 0, (1, 4) = 1, (2, 1) = n^2*Pi^2/L^2, (2, 2) = n^2*Pi^2/L^2, (2, 3) = 0, (2, 4) = -n^2*Pi^2/L^2, (3, 1) = n^2*Pi^2*cosh(n*Pi)/L^2-n^2*Pi^2*sinh(n*Pi)/L^2, (3, 2) = n^2*Pi^2*cosh(n*Pi)/L^2+n^2*Pi^2*sinh(n*Pi)/L^2, (3, 3) = 0, (3, 4) = -n^2*Pi^2*(-1)^n/L^2, (4, 1) = cosh(n*Pi)-sinh(n*Pi), (4, 2) = cosh(n*Pi)+sinh(n*Pi), (4, 3) = 0, (4, 4) = (-1)^n})

{Vector[column](%id = 18446883856494723910)}

Evaluate the coefficients, then the general solution to obtain the eigenfunction.

convert(<_C1, _C2, _C3, _C4> =~ op(N), set);
subs(%, u_general(x));

{_C1 = 0, _C2 = 0, _C3 = 1, _C4 = 0}

sin(mu*x/L)

where mu = n*Pi/L.
 

Download eigenfunction-calculation2.mw

 

@Neel See if this helps.

restart;

pde := diff(w(x,t),t,t) + c^2*diff(w(x,t),x$4) = 0;

diff(diff(w(x, t), t), t)+c^2*(diff(diff(diff(diff(w(x, t), x), x), x), x)) = 0

(1)

eval(pde, w(x,t) = u(x)*cos(omega*t));
de_tmp := expand(% / (c^2*cos(omega*t)));

-u(x)*omega^2*cos(omega*t)+c^2*(diff(diff(diff(diff(u(x), x), x), x), x))*cos(omega*t) = 0

 

-u(x)*omega^2/c^2+diff(diff(diff(diff(u(x), x), x), x), x) = 0

(2)

mu_def := omega = c*mu^2/L^2;

omega = c*mu^2/L^2

(3)

de := eval(de_tmp, mu_def);

-u(x)*mu^4/L^4+diff(diff(diff(diff(u(x), x), x), x), x) = 0

(4)

bc := u(0)=0, (D@@2)(u)(0)=0, u(L)=0, (D@@2)(u)(L)=a;

u(0) = 0, ((D@@2)(u))(0) = 0, u(L) = 0, ((D@@2)(u))(L) = a

(5)

dsol := dsolve({de,bc}, u(x));

u(x) = (1/2)*a*L^2*exp(mu*x/L)/((exp(mu)-exp(-mu))*mu^2)-(1/2)*a*L^2*exp(-mu*x/L)/((exp(mu)-exp(-mu))*mu^2)-(1/2)*a*L^2*sin(mu*x/L)/(sin(mu)*mu^2)

(6)

We recognize the e^mu-e^(-mu) combination as 2*sinh(mu).  Same with the e^(-mu*x/L)thing.

algsubs( exp(mu) - exp(-mu) = 2*sinh(mu), rhs(dsol));
algsubs( exp(mu*x/L) - exp(-mu*x/L) = 2*sinh(mu*x/L), %);
my_u_tmp := %;

(1/4)*a*L^2*exp(mu*x/L)/(mu^2*sinh(mu))-(1/4)*a*L^2*exp(-mu*x/L)/(mu^2*sinh(mu))-(1/2)*a*L^2*sin(mu*x/L)/(sin(mu)*mu^2)

 

(1/2)*a*L^2*(sinh(mu*x/L)*sin(mu)-sin(mu*x/L)*sinh(mu))/(mu^2*sinh(mu)*sin(mu))

 

(1/2)*a*L^2*(sinh(mu*x/L)*sin(mu)-sin(mu*x/L)*sinh(mu))/(mu^2*sinh(mu)*sin(mu))

(7)

We know that any constant multiple of the solution u(x)of our differential equation is also a solution.
Therefore we simplify the solution obtained above by getting rid of some irrelevant multipliers:

my_u := expand(my_u_tmp/(-a*L^2)*(2*mu^2*sin(mu)));

-sinh(mu*x/L)*sin(mu)/sinh(mu)+sin(mu*x/L)

(8)

Let's apply the boundary condition u__xx(L) = 0.

diff(my_u, x, x);
eq := eval(%, x=L);

-mu^2*sinh(mu*x/L)*sin(mu)/(sinh(mu)*L^2)-mu^2*sin(mu*x/L)/L^2

 

-2*mu^2*sin(mu)/L^2

(9)

We need to solve eq=0.  We don't want the mu = 0 solution since that leads to the trivial
solution
u(x) = 0. Therefore we are left with sin(mu) = 0, the solution to which is mu = n*Pi for
any integer
n.

 

Aside:  It is overkill to ask Maple to solve that equation, but if you insist, we do:

solve(sin(mu)=0, allsolutions);

Pi*_Z1

(10)

What is `~`[_Z1]?  Let's ask Maple:

about(_Z1);

Originally _Z1, renamed _Z1~:
  is assumed to be: integer
 

 

There we have it.  The solution is n*Pi for any integer n, as asserted earlier.  Let's plug that
value of
mu into our solution:

eval(my_u, mu=n*Pi);
Eigenfunction := simplify(%) assuming n::integer;

-sinh(n*Pi*x/L)*sin(n*Pi)/sinh(n*Pi)+sin(n*Pi*x/L)

 

sin(n*Pi*x/L)

(11)

That's the eigenfunction that you had asked for.

 

But please note:  This worksheet's calculations are best done by hand.  Maple can be useful in many
situations, but the problem worked out here is not one of those.

 

 

Download eigenfunction-calculation.mw

 

@Neel See if the writeup in the attached PDF answers your questions.

By the way, in your line of work you will need to go beyond writing mathematics by hand.  Look into learning LaTeX if you haven't done so already.  My writeup is done in LaTeX.

steady-state-oscillations.pdf

Note added later:
I spotted a few (harmless) typos in the previous PDF.  Here is one with corrections.

steady-state-oscillations2.pdf

You are suffering from culture shock.  You must already know that when in a foreign country, speaking louder in your own language does not make you any better understood.  Learn the local language and customs instead of complaining that they do not agree with yours.

 

@Neel In equation (9.B.20) you have the force expressed as a delta function.  The picture below that equation also indicates that you do mean a delta function.  But now you are saying q(x,t)= Fo*(1-(x/L))* cos(omega*t) without a delta function.  You need to decide which one you want.

 

 

@Neel I looked quickly through your PDF.  The calculations up to (9.B.19) appear to be correct, but after that point I felt lost.

In (9.B.22) we have the equation of motion:

ρ A wtt + E I wxxxx = q(x,t)

which is correct, but we have no clear statement of what q(x,t) is.  You need to say
q(x,t) = something.

What is that something?

The boundary conditions
w(0,t) = wxx(0,t) = w(L,t) = wxx(L,t) = 0.
for pinned ends are good.

I also don't see what the initial condition are.  You need to specify the initial displacement and initial velocity as

w(x,0) = something
wt(x,0) = something

Can you tell me what those "something"s are?

 

@Earl   The Harvard Weekly Problems is a good collection math and physics puzzles.  The one you are referring to is Problem #15.  Beware though that the shape discussed in that problem is the 3D solid obtained by rotating your lamina about the horizontal axis.

 

@acer  As you have observed, computing  int(int(x,y=-f(x)..f(x)),x=0..1) without the method=meijerg option produces an answer in terms of EllipticE and EllipticK functions with imaginary arguments:

int(int(x, y=-f(x)..f(x)), x=0..1);      
                                     
                      -4/5 EllipticK(I) + 4/5 EllipticE(I)

As we have seen in my original replay, that answer then gets reduced to a real value after applying convert and simplify.

Interestingly, if we change to polar coordinates by letting x=r*cos(t), y=r*sin(t), the equation of the lamina's boundary changes to r = sqrt(cos(t)), where t goes from −π/2 to π/2, and the integration produces an answer in terms of EllipticE and EllipticK functions with real arguments:

int(int(r*r*cos(t), r=0..sqrt(cos(t))), t=-Pi/2..Pi/2);                       
                                   1/2                        1/2
                    1/2           2            1/2           2
              -2/5 2    EllipticK(----) + 4/5 2    EllipticE(----)
                                   2                          2

simplify(convert(%, hypergeom));                                              
                                   1/2           2
                                  2    GAMMA(3/4)
                              2/5 ----------------
                                         1/2
                                       Pi

That is not as good as the direct answer obtained with the method=meijerg option, but at least it has no imaginary parts.

 

@mmcdara That's an interesting approach.  I wouldn't have thought of applying statistical tools to solve a mechanics problem.

I have converted your "Reply" to an "Answer".  Thumb up!

@Joe Riel That's good. Thanks!

 

@vv If we could distribute ln over a product, it would convert it to a sum and then the thing will simplify.  But I don't know how to distribute ln even in the simplest case of ln(b/a).  How does one get ln(b) - ln(a) out of this?

 

@PhD_Wallyson I have made a few corrections to the worksheet and now you can see the modal shapes.  Your interface conditions appear to be correct but I have not examined them carefully.  Be sure to check!  Also be sure that the values of the constants are provided in consistent units.

Download: corrections.mw

@PhD_Wallyson It is possible, in principle, to program Maple to produce a table like that, but I don't think that's worth the effort.  It would be quicker to run your worksheet 10 times with the desired values of the lengths and copy the results into your thesis.

@PhD_Wallyson In this latest worksheet, you handle the symbolic coefficients correctly.  That's good.  Continue doing it that way.

The interface conditions, however, don't look correct.  You have:

(D@@2)(X[1])(L[1]) = -(kr)*(D(X[1])(L[1]))+(D@@2)(X[2])(L[1]),     # equilibrium condition bending moment at x=L[1]

A beam's bending moment is EI X''.  Shoudn't the interface condition have EI in it?

One more thing.  In the worksheet image that you posted today, we see that the μ values are calculated incorrectly.  We even have a negative μ!  I expect that once you correct the missing EI issue, that problem will go away.  And then the plotting of the mode shape will work as before.

Yet another comment: The legnths L1, L2, L3 in the worksheet are in centimeters.  Be sure that kt, kr, E, I, A, etc., are in compatible units.

 

First 33 34 35 36 37 38 39 Last Page 35 of 99