import java.io.*; import java.util.*; public class CircPolarztn{ public static double Exini( int tim, double x,double phx) {//Ex all x and time t return Math.cos(tim-2*Math.PI*x/200.0 +phx ); } public static double Eyini( int tim, double x,double phy) {//Ey all x and time t return Math.cos(tim-2*Math.PI*x/200.0 +phy ); } public static double Hxini( int tim, double x,double phy) {//Hx all x and time t return Math.cos(tim-2*Math.PI*x/200.0 +phy+Math.PI); } public static double Hyini( int tim, double x,double phx) {//Hy all x and time t return Math.cos(tim-2*Math.PI*x/200.0 +phx); } public static void main(String[] argv) throws IOException, FileNotFoundException{ double dx,dt,c,c0; double phx,phy; int time,max,i,n,j,k; phx=0.5*Math.PI;//phases phy=0.0;//phase difference pi/2 // c= (c0/dz)*dt c = 0.1; //Courant stability condition time = 100; //change this time, stable up to 1700 max = 201; double Ex[][] = new double[max+2][2];// Ex and Hy components double Hy[][] = new double[max+2][2]; double Ey[][] = new double[max+2][2];// Ey and Hx components double Hx[][] = new double[max+2][2]; //Initialize variables for(i=0;i<=max;i++){ for (j=0;j<=1;j++){ Ex[i][j]=0; Ey[i][j]=0; Hx[i][j]=0; Hy[i][j]=0; } } //Initial values for E and H fields for(k = 0;k