MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Membrane arbitray shape

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44666] Membrane arbitray shape
  • From: CAP F <Ferdinand.Cap at eunet.at>
  • Date: Thu, 20 Nov 2003 03:16:32 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

This notebook calculates the eigenfrequencies of membranes of arbitrary
shape.
A Cassini curve is given as an example.



(************** Content-type: application/mathematica **************

                    Mathematica-Compatible Notebook

This notebook can be used with any Mathematica-compatible
application, such as Mathematica, MathReader or Publicon. The data
for the notebook starts with the line containing stars above.

To get the notebook into a Mathematica-compatible application, do
one of the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the
  application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing
the word CacheID, otherwise Mathematica-compatible applications may
try to use invalid cache data.

For more information on notebooks and Mathematica-compatible 
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info at wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from 
Wolfram Research.
*******************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[      6487,        187]*)
(*NotebookOutlinePosition[      7116,        209]*)
(*  CellTagsIndexPosition[      7072,        205]*)
(*WindowFrame->Normal*)



Notebook[{
Cell["\<\
(* c42: Cassmem.nb Clamped  Cassini membrane in Cartesian \
Coordinates. Collocation method for the eigenvalue problem of the \
homogeneous Helmholtz equation.Check the solution *)
Clear[u,x,y,A,b,n,k];
u[x,y]=A[n]*Cos[Sqrt[k^2-b[n]^2]*x]*Cos[b[n]*y];
Simplify[D[u[x,y],{x,2}]+D[u[x,y],{y,2}]+k^2*u[x,y]]\
\>", "Input",
  AspectRatioFixed->True,
  FontSize->18],

Cell[BoxData[
    \(\(\( (*\ Step : \(1 : \ Define\ the\ Cassini\ boundary\), \ 
      the\ 4\ vertex\ points\ and\ n\ collocation\ points\ *) \)\(\n\
\)\(Clear[F, b, xmin, xmax, ymax, ymin, Fy, Fx, x, y, n, a, c]; 
    n = 8; a = 1.0; c = 0.85; 
    F[x_, y_] := \((x^2 + y^2)\)^2 - 2*c^2*\((x^2 - y^2)\) - a^4 + 
        c^4; Fy[x_] = InputForm[Solve[F[x, y] \[Equal] 0, y]]; 
    ymax = Sqrt[Sqrt[a^4] - c^2]; 
    Fx[y] = InputForm[Solve[F[x, y] \[Equal] 0, x]]; 
    Fx[y_] := Sqrt[c^2 - y^2 + Sqrt[a^4 - 4*c^2*y^2]]\)\)\)], "Input"],

Cell[BoxData[
    \(xmax = Fx[0]; xmin = \(-xmax\); ymin = \(-ymax\); 
    dx = xmax/\((n - 1)\); x[1] = xmin; 
    Table[x[l] = xmin + \((l - 1)\)*dx, {l, 1, n}]; 
    dth = N[Pi/\((2*n)\)]; 
    r[phi_] := 
      Sqrt[c^2*Cos[2*phi] + 
          Sqrt[a^4 - c^4*\((Sin[2*phi])\)^2]]\)], "Input"],

Cell[BoxData[
    \(Table[x[l] = r[l*dth]*Cos[l*dth], {l, 1, n}]; 
    Table[y[l] = r[l*dth]*Sin[l*dth], {l, 1, n}]; 
    TXY = Table[{x[l], y[l]}, {l, 1, n}]; << 
      Graphics`ImplicitPlot`\)], "Input"],

Cell[BoxData[
    \($Packages\)], "Input"],

Cell[BoxData[{
    \(Clear[pl1, pl2, pl3]; Off[General::spell]\), "\n", 
    \(\(pl1 = 
        ImplicitPlot[F[x, y] \[Equal] 0, {x, xmin, xmax}, 
          AspectRatio \[Rule] 1, 
          DisplayFunction \[Rule] Identity];\)\), "\n", 
    \(pl2 = 
      ListPlot[TXY, DisplayFunction \[Rule] Identity]\)}], "Input"],

Cell[BoxData[
    \(pl3 = 
      Show[pl1, pl2, DisplayFunction \[Rule] $DisplayFunction, 
        Prolog \[Rule] AbsolutePointSize[6]]; 
    Off[General::spell]\)], "Input"],

Cell[BoxData[
    \(\(\( (*\ 
      Step\ 2 : 
        Calculate\ the\ separation\ constants\ \(\(b\)\(.\)\)\ \
*) \)\(\n\)\(Clear[fst, delta, b, tb]; fst = 2.3; delta = fst/n; 
    b[1] = fst - 0.0001; Table[b[k + 1] = b[k] - delta, {k, 1, n}]; 
    tb = Table[b[k], {k, 1, n}];\)\)\)], "Input"],

Cell[BoxData[
    \(\(\( (*\ 
      Step\ 3 : \ 
        Fill\ matrix\ MM\ for\ the\ boundary\ condition\ *) \)\(\n\
\)\(Clear[M, MM, k, W]; M = Table[ip*li, {li, 1, n}, {ip, 1, n}]; 
    MM = Table[
        M[\([li, ip]\)] = 
          Cos[Sqrt[k^2 - b[ip]^2]*x[li]]*Cos[b[ip]*y[li]], {li, 1, 
          n}, {ip, 1, n}]; \(W[k_] = Det[MM];\) // 
      Timing\)\)\)], "Input"],

Cell[BoxData[
    \(\(\( (*\ 
      Step\ 4 : \ 
        Find\ the\ eigenvalue\ k . \ 
            Do\ not\ forget\ to\ define\ the\ result\ as\ k\ *) \)\(\n\
\)\(Clear[k]; 
    FindRoot[W[k] \[Equal] 0, {k, {fst, 3.0}}] // 
      Timing\)\)\)], "Input"],

Cell[BoxData[
    \(k = 2.99572\)], "Input"],

Cell[BoxData[
    \(\(\( (*\ 
      Step\ 5 : \ 
        Calculate\ the\ partial\ amplitudes\ A[n]\ *) \)\(\n\)\(nf = 
      n - 1; bbf = Table[\(-MM[\([\ ifit, n]\)]\), {ifit, 1, nf}];\n
    rdutn = 
      Table[MM[\([ifit, klfit]\)], {ifit, 1, nf}, {klfit, 1, nf}]; 
    B = LinearSolve[rdutn, bbf]; An = {1}; 
    A = Table[B[\([lk]\)], {lk, 1, nf}]\)\)\)], "Input"],

Cell[BoxData[
    \(\(\( (*\ 
      Step\ 6 : \ 
        Check\ satisfaction\ of\ the\ boundary\ condition\ *) \)\(\n\
\)\(Amp = Join[A, An]; boundary\  = \ MM\  . \ Amp\)\)\)], "Input"],

Cell[BoxData[{
    \(\(fxy[x_, y_] = 
        Sum[Amp[\([l]\)]*Cos[b[l]*y]*Cos[Sqrt[k^2 - b[l]^2]*x], {l, 
            1, n}];\)\), "\n", 
    \(Do[Print[fxy[x[l], y[l]]], {l, 1, n}]\)}], "Input"],

Cell[BoxData[
    \(Clear[pl4]; 
    pl4 = ContourPlot[fxy[x, y], {x, xmin, xmax}, {y, ymin, ymax}, 
        ContourShading \[Rule] False, ContourSmoothing -> 2, 
        PlotPoints \[Rule] 
          60 (*\(,\)\(Contours \[Rule] {0}\)*) ]\)], "Input"],

Cell[BoxData[
    \(Show[pl2, pl4, AspectRatio \[Rule] 1, 
      DisplayFunction \[Rule] $DisplayFunction, 
      Prolog \[Rule] AbsolutePointSize[6]]\)], "Input"],

Cell[BoxData[
    \(Show[pl3, pl4, AspectRatio \[Rule] 1, 
      DisplayFunction \[Rule] $DisplayFunction, 
      Prolog \[Rule] AbsolutePointSize[6]]\)], "Input"],

Cell[BoxData[
    RowBox[{"(*", " ", 
      RowBox[{\(For\ the\ theory\ \(see : \ F . \ Cap\)\), ",", " ", 
        RowBox[{
        "Mathematical", " ", "Methods", " ", "in", " ", "Physics", 
          " ", "and", " ", "Engineering", " ", "with", " ", 
          StyleBox["Mathematica",
            FontSlant->"Italic"]}], 
        StyleBox[",",
          FontSlant->"Italic"], "\[IndentingNewLine]", \(CRC\ Press\),
         ",", " ", \(ISBN\ 01584884029\)}], " ", "*)"}]], "Input"]
},
FrontEndVersion->"4.1 for X",
ScreenRectangle->{{0, 1024}, {0, 768}},
WindowSize->{759, 621},
WindowMargins->{{Automatic, 115}, {Automatic, 0}}
]

(*******************************************************************
Cached data follows.  If you edit this Notebook file directly, not
using Mathematica, you must remove the line containing CacheID at
the top of  the file.  The cache data will then be recreated when
you save this file from within Mathematica.
*******************************************************************)

(*CellTagsOutline
CellTagsIndex->{}
*)

(*CellTagsIndex
CellTagsIndex->{}
*)

(*NotebookFileOutline
Notebook[{
Cell[1705, 50, 371, 9, 132, "Input"],
Cell[2079, 61, 538, 9, 193, "Input"],
Cell[2620, 72, 296, 7, 101, "Input"],
Cell[2919, 81, 205, 4, 101, "Input"],
Cell[3127, 87, 42, 1, 32, "Input"],
Cell[3172, 90, 318, 7, 101, "Input"],
Cell[3493, 99, 174, 4, 78, "Input"],
Cell[3670, 105, 296, 6, 101, "Input"],
Cell[3969, 113, 376, 9, 147, "Input"],
Cell[4348, 124, 254, 7, 78, "Input"],
Cell[4605, 133, 44, 1, 32, "Input"],
Cell[4652, 136, 369, 8, 124, "Input"],
Cell[5024, 146, 186, 4, 78, "Input"],
Cell[5213, 152, 196, 4, 101, "Input"],
Cell[5412, 158, 252, 5, 101, "Input"],
Cell[5667, 165, 163, 3, 78, "Input"],
Cell[5833, 170, 163, 3, 78, "Input"],
Cell[5999, 175, 484, 10, 101, "Input"]
}
]
*)



(*******************************************************************
End of Mathematica Notebook file.
*******************************************************************)

For the theory (a special collocation mehod) see F. Cap, 
Mathematical Methods in Physics and Engineering with Mathematica,
CRC Press, 2003, ISBN01584884029


  • Prev by Date: [Integrate] Why two results of same eq. are different?
  • Next by Date: Error?
  • Previous by thread: RE: [Integrate] Why two results of same eq. are different?
  • Next by thread: Error?