CAE Coureware Using VPython
(Tested in VPython 2.7)
Some screen shots of my courseware for electromagnetic fields are listed here.
Most of the executable programs are also available; instructions are not complete.
To run the programs, you need to install first Python and then VPython. You can
download these two programs here: Python
and VPython or visit VPython
website for more details.
Created by Zhengqing Yun.
Transverse Wave (VPython Program)
Longitudinal Wave (VPython Program)
Water Wave (VPython Program)
The program starts with an interface and a normal vector. Then a left button click
will introduce an incident direction (red arrow). Press 'v' key to turn on/off the plane of
incidence. Now you can use 'Up', 'Down', 'Left', and 'Right' keys to change the
incident direction. You can leave this interactive loop by pressing the 'e' key.
The program will display a 3D scene as follows:
- To change the incident direction: Drag the green sphere
- To assign an incident electric field vector: Click on the yellow wavefront with the incident wave.
- To decompose the electric field vector into parallel and perpendicular components: Press the 'p' key.
- You can turn on/off the e-field vector, the wavefronts by pressing keys: 'I','i','r','t'
- To get linear, circular, and elliptical polarizations:
- Drag the three spheres to change Ex, Ey magnitudes and the phase Ey leads Ex, Phi
- Press the 'i' key to enter the exact values of Ex, Ey and Phi (Ex and Ey are normalized to their max)
- In 3D mode, press 'x', 'y', and 't' keys to view/hide the Ex, Ey, and total field curves
- 2D mode (default or by press the '2' key to enter):
- 3D mode (press the '3' key to enter):
- Drag the green sphere to change incident angle;
- Press the 'x','y','z' key to show/hide x-, y-, z-components (yellow, green, pink arrows);
- Press the 'p' key to show/hide parallel component, Ex+Ez (white arrows);
- Press the 'Up', 'Down' arrow keys to make the field vectors larger, smaller (for visualization purposes);
- Press the '0' key to set t = 0.
Drag the object arrow and focal point to interact.
Use the Up/Down keys to change the antenna length (in wavelengths).
To change antenna length (in wavelengths):
Press '3' key to get 3D pattern; press '4' to cancel.
- Drag the top red sphere;
- Use the Up/Down keys;
- Press 'k' key to enter 2L
Simply click and click to build a FDTD grid step by step.
Explains sky light polarization using Rayleight scattering patterns
(f=2.4 GHz; side wall eps_r=3.0)
- Enter maximum number of reflections at the beginning (0 for free space).
- Drag Rx (green) to get the received power along a line.
- Drag Tx (red) along y-axis to change its location.
Drag Tx or Rx to view the change of the diffraction point and the field directions
Huygens Principle (for Snell's Law)