steps - propagates the field using finite difference method.
It can be shown that the propagation of the field U in a medium with complex refractive coefficient A, is described by the differential equation:
To solve this equation, we re-write it as a system of finite difference equations:
Collecting terms we obtain the standard three-diagonal system of linear equations, solution of which describes the complex amplitude of the light field in the layer z+dz as a function of the field defined in the layer Z:
where:(we put dx=dy=d)
The above three-diagonal system of linear equations is solved by standard elimination (double sweep) method.This scheme is absolutely stable (this variant is explicit with respect to the index i and implicit with respect to the index j). One step of propagation is divided into two sub-steps: the first sub-step applies the described procedure to all rows of the matrix, the second sub-step changes the direction of elimination and the procedure is applied to all columns of the matrix.
The main advantage of this approach is the possibility to take into account uniformly diffraction, absorption (amplification) and refraction. For example, the model of a waveguide with complex three-dimensional distribution of refraction index and absorption coefficient (both are defined as real and imaginary components of the can be built easily.
It works also much faster than all described previously algorithms on one step of propagation, though to obtain a good result at a considerable distance, many steps should be done. As the scheme is absolutely stable (at least for free-space propagation), there is no stability limitation on the step size in the direction Z. Large steps cause high-frequency errors, therefore the number of steps should be determined by trial (increase the number of steps in a probe model till the result stabilizes), especially for strong variations of refraction and absorption inside the propagation path.
Zero amplitude boundary conditions are commonly used for the described system. This, again, creates the problem of the wave reflection at the grid boundary. The influence of these reflections in many cases can be reduced by introducing an additional absorbing layer in the proximity of the boundary, with the absorption smoothly (to reduce the reflection at the absorption gradient) increasing towards the boundary.
the refraction term is not included into the propagation formulas, instead the phase of the field is modified at each step according to the distribution of the refractive coefficient. This ''zero-order'' approximation happened to be much more stable numerically than the direct inclusion of refraction terms into propagation formulas. It does not take into account the change of the wavelength in the medium, it does not model backscattering and reflections back on interfaces between different media. Perhaps there are other details to be mentioned.
The described algorithm is implemented in a filter steps. besides the input field, steps accepts other 6 arguments, first - the step size, second- the number of steps, third and fourth - files containing absorption and refraction coefficients to be imported and the last two arguments are the filename where field cross-sections are saved after each N steps, where N is the last argument. All filenames are optional
The format of imported datafiles is the same as exported for using in gnuplot. The format of the datafile into which cross sections of the field are saved at every N-th step is similar to the file generated by cros_out . It has one more column(so total 6 column), correspondent to Z coordinate. Cross sections correspondent to different values of Z are divided by an empty line.
steps has built-in absorption layer along the grid boundaries (to prevent reflections), occupying 10% of grid from each side. steps can import absorption/refraction coefficients defined in the format similar to exported by file_int . steps is the only filter in LightPipes allowing for modeling of (three-dimensional) waveguide devices.
Like forvard, steps can inversely propagate the field, for example the sequence f1=steps(f0,0.1,1);f2=steps(f1,-0.1,1)..doesn't change anything in the field distribution. Author has tested this reversibility also for propagation in absorptive/refractive media, examples will follow.
steps implements scalar approximation, it is not applicable for modeling of waveguide devices in the vector approximation, where two components of the field should be taken into account.
f1=begin(0.004,0.63e-6); f2=circ_ap(f1,0.0015); f3=steps(f2,0.1,1); f4=steps(f3,-0.1,1); f3=lens(f2,0.5); f4=steps(f3,0.01,75,"void","void","steps_out"); field_plot(f4); temp = fscanfMat('steps_out'); x=zeros(1,256);int_x=zeros(1,256); x(:)=temp(:,1);int_x(:)=temp(:,2); plot2d(x,int_x);
Chen jingyuan, Gan guangyong (IAPCM, Beijing,China.)
fresnel , forvard , forward , steps , lens_fresnel , geom_propagation , near_angular , near_fresnel , far_fresnel , fraunhoffer_grt , fresnel_grt , propagate ,