Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

FDTD method to solve Maxwell equations

700 views
Skip to first unread message

fc...@st-andrews.ac.uk

unread,
Nov 1, 2012, 3:19:03 AM11/1/12
to
Hi All,

I am new to Mathematica and I want to advance my knowledge of Electromagnetic wave propagation. Using the FDTD method I would like to solve Maxwell's equations and simulate different systems. I understand the physics but I have no idea how to translate that to Mathematica, so if anyone can help me to write and understand a code for this that would be great! Thanks a lot!

Roland Franzius

unread,
Nov 2, 2012, 1:11:46 AM11/2/12
to
Am 01.11.2012 08:19, schrieb fc...@st-andrews.ac.uk:
> Hi All,
>
> I am new to Mathematica and I want to advance my knowledge of Electromagnetic wave propagation. Using the FDTD method I would like to solve Maxwell's equations and simulate different systems. I understand the physics but I have no idea how to translate that to Mathematica, so if anyone can help me to write and understand a code for this that would be great! Thanks a lot!
>


Perhaps you should first work with the NDSolve tutorial you can download
here

http://www.wolfram.com/learningcenter/tutorialcollection/AdvancedNumericalDifferentialEquationSolvingInMathematica/

NDSolve has an optional parameter "Method -> xy". The predefines method
values reflect the current state of art in the translation of existing
high speed-high accuracy methods from the supercomputer area to computer
algebra systems.

To implement a NDSolve method in 4 space time dimensions for the Maxwell
second rank tensor field
(t,x)-> F_ik(t,x)
with six components obeying the constraints of exterior differential forms

Dt[Wedge[F_ik Dt[xi], Dt[xk]] = 0

is probably a very ambitious project and not so much a suitable working
field to learn the application of Mathematica to real space-time physics.

In the present situation the given Mathematica NDSolve-methods can not
handle such monster problems, monsters with respect to memory and time.

--

Roland Franzius

Ralph Dratman

unread,
Nov 2, 2012, 11:57:03 PM11/2/12
to

This also interests me. Suppose the problem were limited to free space --
would that be feasible with Mathematica?


On Fri, Nov 2, 2012 at 12:44 AM, Roland Franzius <roland....@uos.de>wrote:

> Am 01.11.2012 08:19, schrieb fc...@st-andrews.ac.uk:

fc...@st-andrews.ac.uk

unread,
Nov 4, 2012, 8:14:05 PM11/4/12
to
I would just be interested in solving for the 1D and 2D case so I can simulate some basic examples, how would I be able to do that? is that simpler?

Roland Franzius

unread,
Nov 7, 2012, 12:57:41 AM11/7/12
to
Am 05.11.2012 02:14, schrieb fc...@st-andrews.ac.uk:
> On Friday, November 2, 2012 5:13:46 AM UTC, Roland Franzius wrote:
>>
>> To implement a NDSolve method in 4 space time dimensions for the Maxwell
>>
>> second rank tensor field
>>
>> (t,x)-> F_ik(t,x)
>>
>> with six components obeying the constraints of exterior differential forms
>>
>>
>>
>> Dt[Wedge[F_ik Dt[xi], Dt[xk]] = 0
>>
>>
>>
>> is probably a very ambitious project and not so much a suitable working
>>
>> field to learn the application of Mathematica to real space-time physics.
>>
>>
>>
>> In the present situation the given Mathematica NDSolve-methods can not
>>
>> handle such monster problems, monsters with respect to memory and time.

>
> I would just be interested in solving for the 1D and 2D case so I can simulate some basic examples, how would I be able to do that?
> is that simpler?
>

Warning: Exterior calculus stuff.

As algebraists and geometers know, in 2-d space-time you have one
antisymmetric tensor field, the "volume" 2-form

F = f[t,x] dct /\ dx

with one single pseudoscalar density component f.

The first Maxwell equation is dF=0 which is satisfied by any suitable f
since any 3-form is null identically.

Given the Lorentz metric g=DiagonalMatrix[{1,-1}], the Hodge dual stress
tensor field S=*F is a scalar density given by the scalar product with
the 2-volume density

S = < cdt/\ dx , f(t,x) cdt /\dx >
= <cdt,cdt> <dx,dx> f(t,x)
= g^tt g^xx f(t,x)

Consequently, with metrics
g^tt=1, g^xx=-1
the source equation gives the dual of the source
"current-charge density" vector field j

dS = df/dct dct + df/dx dx = *j

with
df/dx = j_t/c = rho(t,x)
df/dct = j_x (t,x)/c

which because of ddS=0 is a conserved quantity

d rho/dt + dj/dx = 0

The distributional Coulomb field solution for a fixed point charge q in
the orgin is provided by the unit step function

f[t_,x_]:= q/2 (UnitStep[x]-UnitStep[-x])

It can be transformed to a moving charge by a Lorentz boost

x = Cosh[u] x' + Sinh[u] t'
t = Sinh[u] x' + Cosh[u] t'

F' = q/2 (UnitStep[#]-UnitStep[-#]&)[Cosh[u] x' + Sinh[u] t']
(Sinh[u] dx' + Cosh[u] dt')/\(Cosh[u] dx' + Sinh[u] dt')
= q/2 (UnitStep[#]-UnitStep[-#]&)[(x'+v/c*t')/Sqrt[1-(v/c)^2]]*
dt' /\ dx'

The vacuum wave solutions are superpositions of any genereralized
functions, which are constant along the right or left lightlike directions

F= (f_r(x-ct) + f_l(x+ct)) dt/\dx

This is the trivial content of 2-d electrodynamics.



In three dimansions the Maxwell field is

F = E_x dt/\dx + E_y dt/\dy + B dx/\dy

and the potential group of Maxwell yields

dF=0 : dE_x/dy -dE_y/dx + dB/dct = 0

As usual, any 1-Form A is a potential for a F

d (A_t dct + A_x dx + A_y dy) = F

with ddA = dF= 0


The stress tensor is (modulo signs?)

S = < dct /\ dx /\ dy , F > = E_x dy - E_y dx + B dt

so the source part of Maxwells equations are as usual

dS = *j= (dE_x/dct - dB/dy) dct/\dy - (dE_y/dct + dB/dx) dct/\dx
+ dE_x/dx + dE_y/dy dx/\dy

giving
div E=rho
dB/dy - dE_x/dct = j_x
dB/dx - dE_y/dct = j_y

Read B as B_z orthogonal to a plane to see its meaning.


With this basic knowledge on can introduce Maxwell electrodynamics eg on
a sphere, a torus or inside a capacitor.

Since everything boils down to eigenfunction expansions and Fourier
synthesis and solving with retarded Greens functions, its a nice field
to play around on both sides, numerically and algebraically, using
space-time NDSolve methods and series of special orthogonal function
systems.

After some experiments one has a chance to become an expert in one of
the most fundamental physical sciences, the trival science of the vacuum.

--

Roland Franzius

0 new messages