These are instructions to download and run the simulations for the Gaussian beam. A Linux machine with bash, gcc and gnuplot are required.
- Download and uncompress the file gaussian-beam.tar.gz
- To plot a beam, introduce the material and scale parameters as in the file ejemplo.params and save a copy in the folder graficar. The file can be renamed as long as the extension is unchanged. Parameters are:
Open a terminal in the previously uncompressed folder and run ./graficar.sh.
Each file with the extension params in the graficar subfolder will be processed and the resulting graphics will be saved in the resultado subfolder. The resulting filenames will be the same as the input, but with different suffixes, indicating what is plotted (according to the options described above). Once the file is processed, a tick (✔) will be added to the filename to indicate success and avoid further processing. The original params file will be copied to the resultado subfolder for future reference.
To facilitate debugging, all intermediate files are kept in the tmp subfolder. This includes the generated data files, the gnuplot files and the c code, all with their filenames matching the corresponding parameter file.
The resulting files depend on the gnuplot terminal selected (currently pdflatex). General changes to the plot can be made by modifying the template graficar.gnuplot in the main folder. The corresponding template for the c code is calcular.c.
This program is released under the GNU General Public License Version 3.0.
- distance between adjacent vectors for vector fields
- x_min, x_max, z_min, z_max
- coordinates that determine the rectangle being plotted
- angle of incidence (in radians)
- length of pixel in x-direction (length in z-direction is made equal to this by default)
- width of the beam multiplied by the wavenumber in vacuum
- parallel component of the magnetic permeability tensor (real)
- orthogonal component of the magnetic permeability tensor (real)
- product of epsilon_parallel and mu_parallel
- numerical (Euler method is used)
(these two values must be calculated by hand according to the parameter p used. Values in the example file are for a parameter p=300 and error 0.001)
- step size
- value of infinity
- sum of one or more of the following constants:
- plot the average electric energy density
- plot the line of maximum values of E^2
- plot the S_H field
- plot the S_B field
- plot the ExM field
- plot the divergence of ExH
- plot the divergence of ExB
- plot the direction of the main ExB
- plot the direction of the main ExH
- plot the magnitude of S_H (i_h)
- plot the magnitude of S_B (i_b)
- draw the interface (z=0)
- plot the proportion between i_u and i_h
- plot the proportion between i_b and i_h
- if set to 1, scales the intensity plots in order for the maximum to be 1
- if set to 1, scales the vector fields in orfer for their maximum magnitude to be 1