## 180 Reputation

4 years, 193 days

## Antenna arrays...

Updated 26 January 2022 for compatibility with Maple 2021.2:

Antenna_arrays_2021.2.mw

## The Friis Transmission Equation...

Updated 26 January 2022 for compatibility with Maple 2021.2:

Friis_Transmission_Equation_2021.2.mw

## @Samir Khan Thank you for your suggestio...

@Samir Khan Thank you for your suggestion Samir,

Unfortunately any attempt to upload Antenna arrays.mw results in an error message.  The worksheet does take a while to process (on my MacBook), so perhaps it exceeds a timeout on the webserver?

## With contents....

@ecterrab Hi, Edgardo,

This version also includes the calculation of wave impedance and the Poynting Vector...

Examining Maxwell's Equations

 Initialise

Maxwell's Equations

We define Maxwell's Equations in terms of vector functions in Cartesian coordinates (this is the simple case for the vacuum):

 (2.1)

Ampère's circuital law (with Maxwell's addition):

 (2.2)

Gauss' Law:

 (2.3)

Gauss' Law for Magnetism:

 (2.4)

Constitutive Relations

 (3.1)

 (3.2)

General Solution for Maxwell's Equations

Finding a solution for the Electric Field

We need an expression for the Curl of H, so we start by taking the Curl of both sides of Maxwell_1:

 (4.1.1)

Now substitute B for μH:

 (4.1.2)

Now substitute the Curl of H with an expression in D:

 (4.1.3)

Now substitute E for D:

 (4.1.4)

Let's see what happens if we expand this:

 (4.1.5)

This is impressive!  Maple knows that V×(V×D) = V(V·D) - V2D

Now we can use Maxwell_3 to arrive at an expression in V2D because we know that V·D=0:

 (4.1.6)

Now we have an expression that looks like a wave, we can substitute D for E:

 (4.1.7)

 (4.1.8)

Loose the "-" sign:

 (4.1.9)

Finally, we can use the inert operator "%" to make the expression look more concise like this:

 (4.1.10)

Finding a solution for the Magnetic Field

We need an expression for the Curl of E, so we start by taking the Curl of both sides of Maxwell_2:

 (4.2.1)

Now substitute D for ϵE:

 (4.2.2)

Now substitute the Curl of E with an expression in B:

 (4.2.3)

Now substitute H for B:

 (4.2.4)

 (4.2.5)

Now we can use Maxwell_4 to arrive at an expression in V2H because we know that V·B=0:

 (4.2.6)

Now we have an expression that looks like a wave, we can substitute B for H:

 (4.2.7)

 (4.2.8)

Loose the "-" sign:

 (4.2.9)

Finally, we can use the inert operator "%" to make the expression look more concise like this:

 (4.2.10)

General PDE solutions

So the general solutions to Maxwell's Equations are:

 (4.3.1)

 (4.3.2)

Finding the equation for the magnitude of the Electric Field

 (4.4.1)

 (4.4.2)

pdsolve has found four functions by the separation of variables x, y, z and t.  We can see that the double derivative of functions _F1(x), _F2(y) & _F3(z)  must equal the original function, multiplied by some constant.

The sin function satisfies this requirement:

 (4.4.3)

And so does the exponential in 'i':

 (4.4.4)

The benefit of using the exponential form will be that the product _F1(x),*_F2(y) *_F3(z)*_F4(t) becomes a single exponential with the exponent being a simple arithmetic sum, whereas a solution based on sin, would be a product with the form sin(x)*sin(y)*sin(z)*sin(t) and this would be difficult to simplify.

We will multiply the x, y and z coordinates by constants kx, ky and kz respectively and we will multiply the time coordinate by a constant ω:

 (4.4.5)

Now test to see whether this wave equation is indeed a solution to the electric field PDE:

 (4.4.6)

It worked!

Substitute the expression for the electric field wave into the electric field PDE:

 (4.4.7)

 (4.4.8)

 (4.4.9)

So we now have the relationship between k and ω.

If we define a wave vector k:

 (4.4.10)

We can see that:

 (4.4.11)

And so using (4.4.9):

 (4.4.12)

And so:

 (4.4.13)

Finding the equation for the Electric Field Vector

Recall Gauss' Law and the first of the Constitutive Relations:

 (4.5.1)

 (4.5.2)

Substitute D for εE:

 (4.5.3)

Construct an expression for the electric field that will satisfy Maxwell's equations:

 (4.5.4)

Define the wave vector k, position vector r and electric field vector E:

 (4.5.5)

 (4.5.6)

 (4.5.7)

Substitute in to the expression for electric field:

 (4.5.8)

And substitute into the expression derived from Gauss' Law:

 (4.5.9)

Activate the divergence operator:

 (4.5.10)

Solve for the components of the E vector:

 (4.5.11)

It appears that the E vector must be perpendicular to the wave vector k.  We can check this as follows:

 (4.5.12)

Yes, since (4.5.11) and (4.5.12) are the same, we have confirmed that the direction of the electric field E, must be perpendicular to the wave vector k - a wave with a transverse electric field.

Finding the wave equation for the Magnetic Field Vector

We know that the PDEs for the electric and magnetic fields have the same form:

 (4.6.1)

 (4.6.2)

And so we would expect the solution for the magnetic field to have the same form as the solution for the electric field.

We know that a solution for  for the electric field equation is:

 (4.6.3)

And so the solution for the magnetic field equation will be:

 (4.6.4)

We used Gauss' Law to prove that the electric field vector must be perpendicular to the wave vector k:

 (4.6.5)

And we could do the same for the magnetic field.  Recall Gauss' Law for Magnetism and the second of the Constitutive Relations:

 (4.6.6)

So the magnetic field vector H must also be perpendicular to the wave vector, k.

Proving that E and H are perpendicular

Recall the Maxwell–Faraday equation and the second of the Constitutive Relations:

 (4.7.1)

 (4.7.2)

Substituting H for B:

 (4.7.3)

Construct expressions for the electric field and magnetic field that will satisfy Maxwell's equations:

 (4.7.4)

 (4.7.5)

Substitute into (4.7.3):

 (4.7.6)

Activate the curl operator:

 (4.7.7)

And now solve for the H vector:

 (4.7.8)

 (4.7.9)

 (4.7.10)

Substitute for the position vector r_ and the wave vector k_:

 (4.7.11)

 (4.7.12)

This looks a lot like k cross E.

 (4.7.13)

Lets test this by substituting for the wave vector k_:

 (4.7.14)

 (4.7.15)

 (4.7.16)

We were correct:

 (4.7.17)

So we have shown that:

 (4.7.18)

And so:

 (4.7.19)

Since we already know from (4.5.11) that the electric field vector E_ is perpendicular to the wave vector k_, then (4.7.18) proves that E_ and H_ must also be perpendicular.

Calculating wave impedance

We know from (4.7.18) that the magnetic field vector H_ and the electric field vector E_ are related as follows:

 (5.1)

And so:

 (5.2)

The wave impedance Z is defined as the ratio between the magnitude of the electric field ||E_|| and the magnitude of the magnetic field ||H_||:

 (5.3)

We know from (4.4.13) that:

 (5.4)

So we can substitute for ||k_||:

 (5.5)

And so:

 (5.6)

(5.6)If we assume that we are dealing with waves propagating through free space:

 (5.7)

 (5.8)

And so the wave impedance will be:

 (5.9)

As an engineer, I have always thought that the wave impedance in free space was 120π, but it seems that this is not quite true:

 (5.10)

Calculating wavelength

We know that the general solution for the monochromatic (single-frequency) electric field is:

 (6.1)

The wavelength is defined as the distance between two points in space that have the same field strength.

 (6.2)

And so:

 (6.3)

Which can be re-arranged as follows:

 (6.4)

Since we know that the two points will be 2π radians apart:

 (6.5)

And since we have defined the wavelength as the distance between two points in space that have the same field strength:

 (6.6)

And so:

 (6.7)

Calculating wave velocity

We know that the general solution for the monochromatic (single-frequency) electric field is:

 (7.1)

The wave velocity is the speed at which the increase in phase due to the ω*t term is cancelled out by a corresponding increase in the k.r term.  That is:

 (7.2)

Differentiating both sides with respect to time:

 (7.3)

And so:

 (7.4)

Since we know that:

 (7.5)

 (7.6)

If we assume that we are dealing with waves propagating through free space:

 (7.7)

 (7.8)

And so the wave velocity will be:

 (7.9)

Which is the speed of light:

 (7.10)

 (7.11)

So we have shown that:

 (7.12)

Calculating the ratio between the electric field strength and the magnetic flux density

We know that the ratio between the magnitude of the electric field strength vector E_ and the magnetic field strength vector H_ is given by:

 (8.1)

And we know that the magnetic field strength H_ is related to magnetic flux density as follows:

 (8.2)

So substituting:

 (8.3)

 (8.4)

And so:

 (8.5)

Amusing how this boils down to such a simple result :-)

The Poynting Vector

Defined as S=ExH

The Poynting vector represents the directional energy flux (the energy transfer per unit area per unit time) of an electromagnetic field and is defined as follows:

 (9.1.1)

This is analogous to a resistive circuit where power is the product of voltage and current: P=V*I.

We derived an expression for the magnetic field expressed in terms of the electric field:

 (9.1.2)

And we can use this in order to express the Poynting Vector in terms of the electric field only:

 (9.1.3)

Using the vector identity Ax(BxC)=(A.C)B-(A.B)C, this becomes:

 (9.1.4)

Since we know from (4.5.11) that the electric field vector is perpendicular to the wave vector, the second term must be zero, and so:

 (9.1.5)

We can split the wave vector into a scalar, magnitude component ||k|| and a directional, unit vector component k/||k|| as follows k=||k||*k/||k||, and since we know that:

 (9.1.6)

The :Poynting Vector becomes:

 (9.1.7)

 (9.1.8)

We have already defined wave impedance, Z in terms of μ and ε:

 (9.1.9)

 (9.1.10)

So we have shown that the Poynting Vector points in the direction of the wave vector k and has an instantaneous value equal to the square of the magnitude of the electric field divided by the wave impedance.  This is analogous to a resistive circuit where power, P=V2/R.

Since the The wave impedance Z is defined as the ratio between the magnitude of the electric field and the magnitude of the magnetic field, we can also express the Poynting Vector in terms of the magnetic field:

 (9.1.11)

 (9.1.12)

This is analogous to a resistive circuit where power, P=I2R.

Derivation based on the E and H field energy densities

If we accept that the electric field energy density is given by:

 (9.2.1)

And that the magnetic field energy density is given by:

 (9.2.2)

Then the energy density of the electromagnetic field will be:

 (9.2.3)

 (9.2.4)

The energy contained in a small volume, dV, will be:

 (9.2.5)

If we define the volume as having a surface with area dA and a length of dl:

 (9.2.6)

We now assume that the volume is oriented in space such that the surface dA is normal to the wave vector k and the length dl is parallel to k.  Since we know that the electromagnetic wave propagates in the direction of k, this means that all of the energy contained in the volume dV will exit through the surface dA at the speed of light, c.  The time required for this to happen will be dt=dl/c seconds.  We can therefore replace dl with c*dt:

 (9.2.7)

Power is defined as the rate of doing work, so we can calculate power by dividing du by dt:

 (9.2.8)

And power flux density is defied as power per unit area:

 (9.2.9)

Since we know that power is flowing in the direction of the wave vector k, we can express this relation as a vector quantity:

 (9.2.10)

This should be the Poynting Vector.

We know that:

 (9.2.11)

And so:

 (9.2.12)

Which can be re-arranged:

 (9.2.13)

We know that:

 (9.2.14)

And so:

 (9.2.15)

If we compare this result with:

 (9.2.16)

And:

 (9.2.17)

We see that all three expressions for S are equivalent, and can also see that the power is split evenly between the electric field and magnetic field components of the electromagnetic wave :-)

 Conservation of energy As the electromagnetic wave moves forward, the surface area of the wave will increase as the square of the distance traveled.  Since we are considering the propagation of electromagnetic waves in a vacuum, the energy in the wave will remain constant with no energy being lost to heating effects.  This means that the Poynting Vector must reduce as the square of the distance traveled.  Using (9.2.16) and (9.2.17) above, we see that the magnitude of the electric and magnetic fields must therefore reduce linearly with distance.

Visualising the electric field

 Procedures
 Plane waves The electric field strength is calculated for a plane wave (with a constant wave vector) in the XY plane at height z. The electric field strength is calculated for a plane wave (with a constant wave vector) in the XY plane at height z. The electric field vector is calculated for a plane wave (with a constant wave vector).  It is easier to examine the electric field by rotating the plot without running the animation.

 Spherical waves The electric field strength is calculated for a spherical wave (with the wave vector having a fixed magnitude and pointing out radially from the origin) in the XY plane at height z.  In order for energy to be conserved, the amplitude of the wave should reduce linearly with distance, but this has not been done in the interest of better aesthetics. The electric field strength is calculated for a spherical wave (with the wave vector having a fixed magnitude and pointing out radially from the origin) in the XY plane at height z.  It is interesting to watch the spherical wave become closer to a plane wave by increasing z.  In order for energy to be conserved, the amplitude of the wave should reduce linearly with distance, but this has not been done in the interest of better aesthetics. The electric field vector is calculated for a spherical wave (with the wave vector having a fixed magnitude and pointing out radially from the origin).  It is easier to examine the electric field by rotating the plot without running the animation.  In order for energy to be conserved, the amplitude of the wave should reduce linearly with distance, but this has not been done in the interest of better aesthetics.

## Modifed the initialization...

@Pascal4QM Thank you Pascal, your setting look a lot better :-)

I have managed to show why E and H must be perpendicular, so here is the new vesion...

Calculating the wave impedance is still work in progress.

Steve

Examining_Maxwells_Equations.mw

## Re: explanation...

@acer Thank you acer, this all makes perfect sense now.

The unevaluation quotes make a really useful tool :-). And I had not appreciated the subtlety of how they work when used to unassign variables.

Also thanks for "if not [x,y]::list(numeric) then return 'procname'(args); end if;", I would have never thought of doing that!

## Re: process...

@vv Thank you for this.

As you say, this appears to be a more general solution because it even works with my clumsy PUV procedure.  But I can't work out how it works?

## Re: piecewise...

@Preben Alsholm Thank you for introducing me to piecewise, it works well with fieldplot3d!

## Re: Correction...

@Kitonum Thank you Kitonum,

Your versions of UV and PUV are really nice :-)

I didn't realise that arctan would accept two-arguments, but this is a really nice way of avoiding my clumsy if statements!

Thanks for helping.

## Re: Easy generalisation...

@Carl Love Thank you Carl!

Can I ask where to find help on this please?: x:= `tools/genglobal`(:-_x)

Also, what is the correct format for the second argument is this version of PV?

## Finding a perpendicular vector - general...

@Kitonum Thank you Kitonum,

As a Maple newbie, I had not appreciated the possibility of solving for more than one variable ({x,y,z} vs {x})!

By the way, do you know a way to plot an arrow in order to visualise the vector <a,b,c> protruding from the perpendicular vector plane?

Finding a perpendicular vector - general solution

Kitonum's general solution (as a Maple newbie, I had not appreciated the possibility of solving for more than one variable ({x,y,z} vs {x}):

 (1)

 (2)

 (3)

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

So it always seems to work :-)

We can visualise the perpendicular vector plane like this:

## Rodrigues' rotation formula...

@ecterrab Thank you Edgardo,

I attempted another method using Rodrigues' rotation formula, with partial success:

Finding a Perpendicular Vector using Rodrigues' rotation formula

 (1)

 (2)

Define a vectors k:

 (3)

We wish to find a vector p that is perpendicular to k (p for perpendicular) and can achieve this using the following three step method:

 1 Rotate the vector k around the x-axis until the z component is zero.
 2 Create a vector that is perpendicular to the rotated vector by setting x_new = -y_old and y_new = x_old.
 3 Rotate the vector back again, to create a vector p that is perpendicular to k.

We use Rodrigues' rotation formula:

 (4)

Now we find the rotation angle that will deliver a _k component of zero.  We will rotate about the _i axis:

 (5)

For the _k component to be zero, the dot product of the rotated vector Vrot_ and _k must be zero:

 (6)

 (7)

OK, now we have the angle, we can go ahead and rotate vector k:

 (8)

 (9)

Now we create a vector Prot which is perpendicular to Vrot.  Since there is no _k component, we have reduced this to a simple 2D problem:

 (10)

 (11)

 (12)

Check that Vrot and Prot are perpendicular:

 (13)

Now we rotate the Prot vector back again to produce a vector p that should be perpendicular to k:

 (14)

 (15)

 (16)

Let's see is p is indeed perpendicular to k:

 (17)

It works!

It looks as though we should be able to re-arrange p like this (assigned to q to preserve the original p):

 (18)

But something is wrong, because q is not the same as p:

 (19)

Vector maths is really hard!

## Re: There is no Voodoo here....

Magnificent!  Thank you Edgardo!

I am doing my best to understand the diferrences between the ChangeBasis and ChangeCoordinates commands.  Do you know where I can find help on the ChangeCoordinates command please?

Kind regards,

Steve

## Calculating dot products using spherical...

@Steve Roper Hi Edgardo,

I have found a way to acheive the result I was expecting, but I'm not really sure how it works.  This was inspired by your post here: https://www.mapleprimes.com/posts/212253-Vectors-In-Spherical-Coordinates-Using

Calculating dot products using spherical coordinates - Voodoo magic version

This is the first application of Voodoo (inspired by Edgardo's post here https://www.mapleprimes.com/posts/212253-Vectors-In-Spherical-Coordinates-Using)...

 (1)

This is without voodoo...

 (2)

 (3)

I was hoping for the dot product to be calculated using the spherical coordinate system, but this is the cartesian dot product.

Now for some more Voodoo...

 (4)

 (5)

 (6)

 (7)

 (8)

 (9)

It works!

## Dot product converted spherical --> cart...

@Carl Love Hi Carl,

Yes, &dot_sph is delivering the results that I was expecting from Maple's dot operator.