MathGroup Archive 2003

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

Search the Archive

from maxwell to helmholts using mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg42072] from maxwell to helmholts using mathematica
  • From: CAP F <Ferdinand.Cap at eunet.at>
  • Date: Wed, 18 Jun 2003 02:10:42 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Paul,
Let me congratulate for your pedagogical and excellent survey on
electromagnetism.
Find please  my  code c55, from Maxwell to Helmholtz
(wave equation, with Mathematica) as derived from my book:

Mathematical Methods of Physics and Engineering with Mathematica
Ferdinand F . Cap, CRC-Press/Chapman and Hall, 2003,
ISBN 1584884029,  56 Codes  to be downloaded from
www.crcpress.com


 filename="c55.nb"

(************** 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[      4732,        125]*)
(*NotebookOutlinePosition[      5361,        147]*)
(*  CellTagsIndexPosition[      5317,        143]*)
(*WindowFrame->Normal*)



Notebook[{

Cell[CellGroupData[{
Cell[BoxData[
    \(\(\( (*\ 
      c55\ From\ Maxwell' 
        s\ to\ vector\ Helmholtz\ equations, \[IndentingNewLine]\ 
      see\ page\ 179\ of\ the\ book . \ k = \[Omega]/c, \ c = 1/Sqrt[eps], 
      eps = \[CurlyEpsilon]\ *) \)\(\n\)\(<< Calculus`VectorAnalysis`\n
    $Packages\n
    \(Clear[H, El, t1, t2, t3, t4, t5, t6, t7, t8];\)\n
    \(H[x_, y_, z_, t_] := {Hx[x, y, z]*Exp[I*k*t/Sqrt[eps]], 
          Hy[x, y, z]*Exp[I*k*t/Sqrt[eps]], 
          Hz[x, y, z]*Exp[I*k*t/Sqrt[eps]]};\)\n
    \(El[x_, y_, z_, t_] := {Ex[x, y, z]*Exp[I*k*t/Sqrt[eps]], 
          Ey[x, y, z]*Exp[I*k*t/Sqrt[eps]], 
          Ez[x, y, z]*Exp[I*k*t/Sqrt[eps]]};\)\n
    \(t1 = Curl[El[x, y, z, t], Cartesian[x, y, z]];\)\n
    \(t2 = \(-D[H[x, y, z, t], t]\);\)\n
     (*\ The\ induction\ equation\ is\ \(now : \ t1\) = t2\ *) \(t1 \[Equal] 
        t2;\)\)\)\)], "Input"],

Cell[BoxData[
    \({"Calculus`VectorAnalysis`", "Global`", "System`"}\)], "Output"]
}, Open  ]],

Cell[BoxData[{
    \(\(t3 = Curl[H[x, y, z, t], Cartesian[x, y, z]];\)\), "\n", 
    \(\(t4 = eps*D[El[x, y, z, t], t];\)\), "\n", 
    \( (*\ t3 = t4\ is\ now\ the\ other\ Maxwell\ equation\ *) \(t3 \[Equal] 
        t4;\)\), "\n", 
    \(\)}], "Input"],

Cell[BoxData[{
    \(\(t5 = Curl[t1, Cartesian[x, y, z]];\)\  (*\ 
      Curl\ on\ curl\ El\ *) \), "\n", 
    \(\(t6 = Curl[t2, Cartesian[x, y, z]];\) (*\ Curl\ on\ D\ H, 
      t\ *) \), "\n", 
    \(\(t7 = D[t2, t];\) (*\ Time\ derivative\ of\ Curl\ H\ *) \), "\n", 
    \(\(t8 = D[t4, t];\) (*\ Second\ time\ derivative\ of\ El\ *) \), "\n", 
    \(\(Simplify[\((t5 - t8)\)]/Exp[I*k*t/Sqrt[eps]];\) (*\ 
      This\ gives\ the\ vector\ Helmholtz\ equation\ for\ the\ electric\ \
field\ *) \)}], "Input"],

Cell[BoxData[
    \(\(\( (*\ 
      Now\ the\ vector\ equation\ for\ the\ magnetic\ field\ *) \)\(\n\
\)\(\(t9 = D[t1, t];\)\(\n\)
    \(t10 = D[t2, t];\)\(\n\)
    \(t11 = Curl[t3, Cartesian[x, y, z]];\)\(\n\)
    \(t12 = \ Curl[t4, \ Cartesian[x, y, z]];\)\(\n\)
    \(Simplify[\((t11 - \ eps\ t10\ )\)/Exp[I*k*t/Sqrt[eps]]\ ];\)\( (*\ 
      This\ gives\ the\ vector\ equation\ for\ the\ magnetic\ \
\(\(field\)\(.\)\)\ *) \)\)\)\)], "Input"],

Cell[BoxData[
    \(\(\( (*\ 
      Now\ the\ 6\ coupled\ scalar\ \(\(equations\)\(.\)\)*) \)\(\n\)\(\ \)\(\
\(Eq1 = Simplify[\((t5[\([\)\(1\)\(]\)] - t8[\([\)\(1\)\(]\)])\)/
            Exp[I*k*t/Sqrt[eps]]];\)\n
    Eq2\  = 
      Simplify[\((\ t5[\([\)\(2\)\(]\)] - t8[\([\)\(2\)\(]\)])\)/
          Exp[I*k*t/Sqrt[eps]]]; \n
    Eq3 = 
      Simplify[\((t5[\([\)\(3\)\(]\)] - t8[\([\)\(3\)\(]\)])\)/
          Exp[I*k*t/Sqrt[eps]]]; \n
    Eq4 = 
      Simplify[\((t11[\([\)\(1\)\(]\)] - eps*t10[\([\)\(1\)\(]\)])\)/
          Exp[I*k*t/Sqrt[eps]]]; \n
    \(Eq5 = 
        Simplify[\((t11[\([\)\(2\)\(]\)] - eps*t10[\([\)\(2\)\(]\)])\)/
            Exp[I*k*t/Sqrt[eps]]];\)\n
    \(Eq6 = 
        Simplify[\((t11[\([\)\(3\)\(]\)] - eps*t10[\([\)\(3\)\(]\)])\)/
            Exp[I*k*t/Sqrt[eps]]];\)\)\)\)], "Input"]
},
FrontEndVersion->"4.1 for X",
ScreenRectangle->{{0, 1280}, {0, 1024}},
WindowSize->{863, 764},
WindowMargins->{{Automatic, 94}, {0, Automatic}}
]

(*******************************************************************
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[CellGroupData[{
Cell[1727, 52, 865, 17, 331, "Input"],
Cell[2595, 71, 84, 1, 31, "Output"]
}, Open  ]],
Cell[2694, 75, 254, 5, 101, "Input"],
Cell[2951, 82, 507, 9, 170, "Input"],
Cell[3461, 93, 445, 9, 170, "Input"],
Cell[3909, 104, 819, 19, 170, "Input"]
}
]
*)



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




  • Prev by Date: Re: Systems of ODEs
  • Next by Date: ack! simple partitioning problem making my
  • Previous by thread: Mathematica courses in Amsterdam - one of the most beautiful cities in Europe
  • Next by thread: ack! simple partitioning problem making my